@g4rcez/components 1.2.0 → 1.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.
Files changed (50) hide show
  1. package/dist/index.css +1 -21
  2. package/dist/index.js +19 -19
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +3158 -3126
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/index.umd.js +20 -20
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/preset/preset.tailwind.d.ts +5 -1
  9. package/dist/preset/preset.tailwind.d.ts.map +1 -1
  10. package/dist/preset/preset.tailwind.js +26 -20
  11. package/dist/preset/src/styles/dark.d.ts.map +1 -1
  12. package/dist/preset/src/styles/dark.js +3 -1
  13. package/dist/preset/src/styles/design-tokens.d.ts.map +1 -1
  14. package/dist/preset/src/styles/design-tokens.js +2 -1
  15. package/dist/preset/src/styles/light.d.ts.map +1 -1
  16. package/dist/preset/src/styles/light.js +4 -2
  17. package/dist/preset/src/styles/theme.types.d.ts +9 -7
  18. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  19. package/dist/preset.tailwind.d.ts +5 -1
  20. package/dist/preset.tailwind.d.ts.map +1 -1
  21. package/dist/preset.tailwind.js +20 -19
  22. package/dist/src/components/core/button.js +1 -1
  23. package/dist/src/components/display/calendar.d.ts.map +1 -1
  24. package/dist/src/components/display/calendar.js +6 -1
  25. package/dist/src/components/display/card.js +1 -1
  26. package/dist/src/components/display/list.js +1 -1
  27. package/dist/src/components/display/notifications.js +1 -1
  28. package/dist/src/components/display/stats.js +1 -1
  29. package/dist/src/components/floating/dropdown.js +1 -1
  30. package/dist/src/components/floating/menu.js +1 -1
  31. package/dist/src/components/floating/tooltip.d.ts.map +1 -1
  32. package/dist/src/components/floating/tooltip.js +1 -1
  33. package/dist/src/components/form/multi-select.d.ts.map +1 -1
  34. package/dist/src/components/form/multi-select.js +9 -3
  35. package/dist/src/components/form/slider.js +1 -1
  36. package/dist/src/components/table/index.d.ts.map +1 -1
  37. package/dist/src/components/table/index.js +3 -3
  38. package/dist/src/config/default-tweaks.d.ts +1 -0
  39. package/dist/src/config/default-tweaks.d.ts.map +1 -1
  40. package/dist/src/config/default-tweaks.js +1 -1
  41. package/dist/src/flow/flow.js +2 -2
  42. package/dist/src/styles/dark.d.ts.map +1 -1
  43. package/dist/src/styles/dark.js +3 -1
  44. package/dist/src/styles/design-tokens.d.ts.map +1 -1
  45. package/dist/src/styles/design-tokens.js +2 -1
  46. package/dist/src/styles/light.d.ts.map +1 -1
  47. package/dist/src/styles/light.js +4 -2
  48. package/dist/src/styles/theme.types.d.ts +9 -7
  49. package/dist/src/styles/theme.types.d.ts.map +1 -1
  50. package/package.json +1 -1
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(te,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],T):(te=typeof globalThis<"u"?globalThis:te||self,T(te.components={},te.React,te["react/jsx-runtime"],te.ReactDOM))})(this,function(te,T,y,xi){"use strict";var tR=Object.defineProperty;var nR=(te,T,y)=>T in te?tR(te,T,{enumerable:!0,configurable:!0,writable:!0,value:y}):te[T]=y;var pe=(te,T,y)=>nR(te,typeof T!="symbol"?T+"":T,y);function Hp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=Hp(T),Ia=Hp(xi);function Wp(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=Wp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wp(e))&&(r&&(r+=" "),r+=t);return r}const Up=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kp=qp,fo=(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=Up(u)||Up(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Kp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Yp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function MS(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 Fl,Zp;function po(){return Zp||(Zp=1,Fl=TypeError),Fl}const DS=MS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ll,Xp;function Oa(){if(Xp)return Ll;Xp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,E=RegExp.prototype.test,C=Array.prototype.concat,P=Array.prototype.join,I=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,A=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===A||!0)?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,j=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function L(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||E.call(/e/,U))return U;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var ot=W<0?-_(-W):_(W);if(ot!==W){var ft=String(ot),Fe=b.call(U,ft.length+1);return x.call(ft,Be,"$&_")+"."+x.call(x.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(U,Be,"$&_")}var z=DS,D=z.custom,B=Ce(D)?D:null,X={__proto__:null,double:'"',single:"'"},Q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ll=function W(U,Be,ot,ft){var Fe=Be||{};if(le(Fe,"quoteStyle")&&!le(X,Fe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(le(Fe,"maxStringLength")&&(typeof Fe.maxStringLength=="number"?Fe.maxStringLength<0&&Fe.maxStringLength!==1/0:Fe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ir=le(Fe,"customInspect")?Fe.customInspect:!0;if(typeof Ir!="boolean"&&Ir!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(le(Fe,"indent")&&Fe.indent!==null&&Fe.indent!==" "&&!(parseInt(Fe.indent,10)===Fe.indent&&Fe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(le(Fe,"numericSeparator")&&typeof Fe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var uo=Fe.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return De(U,Fe);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var on=String(U);return uo?L(U,on):on}if(typeof U=="bigint"){var Or=String(U)+"n";return uo?L(U,Or):Or}var Fp=typeof Fe.depth>"u"?5:Fe.depth;if(typeof ot>"u"&&(ot=0),ot>=Fp&&Fp>0&&typeof U=="object")return Z(U)?"[Array]":"[Object]";var yi=Pr(Fe,ot);if(typeof ft>"u")ft=[];else if(Se(ft,U)>=0)return"[Circular]";function En(bi,Nl,eR){if(Nl&&(ft=I.call(ft),ft.push(Nl)),eR){var OS={depth:Fe.depth};return le(Fe,"quoteStyle")&&(OS.quoteStyle=Fe.quoteStyle),W(bi,OS,ot+1,ft)}return W(bi,Fe,ot+1,ft)}if(typeof U=="function"&&!R(U)){var ES=ce(U),CS=_r(U,En);return"[Function"+(ES?": "+ES:" (anonymous)")+"]"+(CS.length>0?" { "+P.call(CS,", ")+" }":"")}if(Ce(U)){var kS=A?x.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(U);return typeof U=="object"&&!A?Qe(kS):kS}if(me(U)){for(var _a="<"+w.call(String(U.nodeName)),Lp=U.attributes||[],Dl=0;Dl<Lp.length;Dl++)_a+=" "+Lp[Dl].name+"="+J(G(Lp[Dl].value),"double",Fe);return _a+=">",U.childNodes&&U.childNodes.length&&(_a+="..."),_a+="</"+w.call(String(U.nodeName))+">",_a}if(Z(U)){if(U.length===0)return"[]";var Vp=_r(U,En);return yi&&!Hn(Vp)?"["+Ar(Vp,yi)+"]":"[ "+P.call(Vp,", ")+" ]"}if(K(U)){var $p=_r(U,En);return!("cause"in Error.prototype)&&"cause"in U&&!O.call(U,"cause")?"{ ["+String(U)+"] "+P.call(C.call("[cause]: "+En(U.cause),$p),", ")+" }":$p.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+P.call($p,", ")+" }"}if(typeof U=="object"&&Ir){if(B&&typeof U[B]=="function"&&z)return z(U,{depth:Fp-ot});if(Ir!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(ie(U)){var PS=[];return r&&r.call(U,function(bi,Nl){PS.push(En(Nl,U,!0)+" => "+En(bi,U))}),Tn("Map",n.call(U),PS,yi)}if(q(U)){var AS=[];return s&&s.call(U,function(bi){AS.push(En(bi,U))}),Tn("Set",a.call(U),AS,yi)}if(de(U))return Lt("WeakMap");if(ne(U))return Lt("WeakSet");if(ee(U))return Lt("WeakRef");if(H(U))return Qe(En(Number(U)));if(_e(U))return Qe(En(F.call(U)));if(be(U))return Qe(m.call(U));if(ae(U))return Qe(En(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Yp<"u"&&U===Yp)return"{ [object globalThis] }";if(!$(U)&&!R(U)){var jp=_r(U,En),_S=j?j(U)===Object.prototype:U instanceof Object||U.constructor===Object,zp=U instanceof Object?"":"null prototype",IS=!_S&&M&&Object(U)===U&&M in U?b.call(we(U),8,-1):zp?"Object":"",Jz=_S||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",Rp=Jz+(IS||zp?"["+P.call(C.call([],IS||[],zp||[]),": ")+"] ":"");return jp.length===0?Rp+"{}":yi?Rp+"{"+Ar(jp,yi)+"}":Rp+"{ "+P.call(jp,", ")+" }"}return String(U)};function J(W,U,Be){var ot=Be.quoteStyle||U,ft=X[ot];return ft+W+ft}function G(W){return x.call(String(W),/"/g,"&quot;")}function Y(W){return!M||!(typeof W=="object"&&(M in W||typeof W[M]<"u"))}function Z(W){return we(W)==="[object Array]"&&Y(W)}function $(W){return we(W)==="[object Date]"&&Y(W)}function R(W){return we(W)==="[object RegExp]"&&Y(W)}function K(W){return we(W)==="[object Error]"&&Y(W)}function ae(W){return we(W)==="[object String]"&&Y(W)}function H(W){return we(W)==="[object Number]"&&Y(W)}function be(W){return we(W)==="[object Boolean]"&&Y(W)}function Ce(W){if(A)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!V)return!1;try{return V.call(W),!0}catch{}return!1}function _e(W){if(!W||typeof W!="object"||!F)return!1;try{return F.call(W),!0}catch{}return!1}var Re=Object.prototype.hasOwnProperty||function(W){return W in this};function le(W,U){return Re.call(W,U)}function we(W){return g.call(W)}function ce(W){if(W.name)return W.name;var U=v.call(h.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function Se(W,U){if(W.indexOf)return W.indexOf(U);for(var Be=0,ot=W.length;Be<ot;Be++)if(W[Be]===U)return Be;return-1}function ie(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function de(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function ee(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function ne(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function me(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function De(W,U){if(W.length>U.maxStringLength){var Be=W.length-U.maxStringLength,ot="... "+Be+" more character"+(Be>1?"s":"");return De(b.call(W,0,U.maxStringLength),U)+ot}var ft=Q[U.quoteStyle||"single"];ft.lastIndex=0;var Fe=x.call(x.call(W,ft,"\\$1"),/[\x00-\x1f]/g,Ue);return J(Fe,"single",U)}function Ue(W){var U=W.charCodeAt(0),Be={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Be?"\\"+Be:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Qe(W){return"Object("+W+")"}function Lt(W){return W+" { ? }"}function Tn(W,U,Be,ot){var ft=ot?Ar(Be,ot):P.call(Be,", ");return W+" ("+U+") {"+ft+"}"}function Hn(W){for(var U=0;U<W.length;U++)if(Se(W[U],`
2
- `)>=0)return!1;return!0}function Pr(W,U){var Be;if(W.indent===" ")Be=" ";else if(typeof W.indent=="number"&&W.indent>0)Be=P.call(Array(W.indent+1)," ");else return null;return{base:Be,prev:P.call(Array(U+1),Be)}}function Ar(W,U){if(W.length===0)return"";var Be=`
1
+ (function(te,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):(te=typeof globalThis<"u"?globalThis:te||self,E(te.components={},te.React,te["react/jsx-runtime"],te.ReactDOM))})(this,function(te,E,y,wi){"use strict";var tR=Object.defineProperty;var nR=(te,E,y)=>E in te?tR(te,E,{enumerable:!0,configurable:!0,writable:!0,value:y}):te[E]=y;var pe=(te,E,y)=>nR(te,typeof E!="symbol"?E+"":E,y);function Hp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=Hp(E),Ia=Hp(wi);function Wp(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=Wp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wp(e))&&(r&&(r+=" "),r+=t);return r}const Up=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kp=qp,fo=(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=Up(u)||Up(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(m=>{let[g,h]=m;return Array.isArray(h)?h.includes({...i,...s}[g]):{...i,...s}[g]===h})?[...c,d,p]:c},[]);return Kp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Yp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function MS(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 Ll,Zp;function po(){return Zp||(Zp=1,Ll=TypeError),Ll}const DS=MS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Vl,Xp;function Oa(){if(Xp)return Vl;Xp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,C=Array.prototype.concat,P=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function F(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||T.call(/e/,U))return U;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var ot=W<0?-A(-W):A(W);if(ot!==W){var ft=String(ot),Fe=b.call(U,ft.length+1);return x.call(ft,Be,"$&_")+"."+x.call(x.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(U,Be,"$&_")}var H=DS,O=H.custom,R=Ce(O)?O:null,X={__proto__:null,double:'"',single:"'"},Q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Vl=function W(U,Be,ot,ft){var Fe=Be||{};if(le(Fe,"quoteStyle")&&!le(X,Fe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(le(Fe,"maxStringLength")&&(typeof Fe.maxStringLength=="number"?Fe.maxStringLength<0&&Fe.maxStringLength!==1/0:Fe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Or=le(Fe,"customInspect")?Fe.customInspect:!0;if(typeof Or!="boolean"&&Or!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(le(Fe,"indent")&&Fe.indent!==null&&Fe.indent!==" "&&!(parseInt(Fe.indent,10)===Fe.indent&&Fe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(le(Fe,"numericSeparator")&&typeof Fe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var uo=Fe.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return De(U,Fe);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var on=String(U);return uo?F(U,on):on}if(typeof U=="bigint"){var Mr=String(U)+"n";return uo?F(U,Mr):Mr}var Fp=typeof Fe.depth>"u"?5:Fe.depth;if(typeof ot>"u"&&(ot=0),ot>=Fp&&Fp>0&&typeof U=="object")return Z(U)?"[Array]":"[Object]";var bi=Ar(Fe,ot);if(typeof ft>"u")ft=[];else if(Se(ft,U)>=0)return"[Circular]";function En(xi,Fl,eR){if(Fl&&(ft=I.call(ft),ft.push(Fl)),eR){var OS={depth:Fe.depth};return le(Fe,"quoteStyle")&&(OS.quoteStyle=Fe.quoteStyle),W(xi,OS,ot+1,ft)}return W(xi,Fe,ot+1,ft)}if(typeof U=="function"&&!z(U)){var ES=ce(U),CS=Ir(U,En);return"[Function"+(ES?": "+ES:" (anonymous)")+"]"+(CS.length>0?" { "+P.call(CS,", ")+" }":"")}if(Ce(U)){var kS=_?x.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(U);return typeof U=="object"&&!_?Qe(kS):kS}if(me(U)){for(var _a="<"+w.call(String(U.nodeName)),Lp=U.attributes||[],Nl=0;Nl<Lp.length;Nl++)_a+=" "+Lp[Nl].name+"="+J(G(Lp[Nl].value),"double",Fe);return _a+=">",U.childNodes&&U.childNodes.length&&(_a+="..."),_a+="</"+w.call(String(U.nodeName))+">",_a}if(Z(U)){if(U.length===0)return"[]";var Vp=Ir(U,En);return bi&&!Hn(Vp)?"["+_r(Vp,bi)+"]":"[ "+P.call(Vp,", ")+" ]"}if(K(U)){var $p=Ir(U,En);return!("cause"in Error.prototype)&&"cause"in U&&!D.call(U,"cause")?"{ ["+String(U)+"] "+P.call(C.call("[cause]: "+En(U.cause),$p),", ")+" }":$p.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+P.call($p,", ")+" }"}if(typeof U=="object"&&Or){if(R&&typeof U[R]=="function"&&H)return H(U,{depth:Fp-ot});if(Or!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(ie(U)){var PS=[];return r&&r.call(U,function(xi,Fl){PS.push(En(Fl,U,!0)+" => "+En(xi,U))}),Tn("Map",n.call(U),PS,bi)}if(q(U)){var AS=[];return s&&s.call(U,function(xi){AS.push(En(xi,U))}),Tn("Set",a.call(U),AS,bi)}if(de(U))return Lt("WeakMap");if(ne(U))return Lt("WeakSet");if(ee(U))return Lt("WeakRef");if(B(U))return Qe(En(Number(U)));if(_e(U))return Qe(En(L.call(U)));if(be(U))return Qe(m.call(U));if(ae(U))return Qe(En(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Yp<"u"&&U===Yp)return"{ [object globalThis] }";if(!j(U)&&!z(U)){var jp=Ir(U,En),_S=V?V(U)===Object.prototype:U instanceof Object||U.constructor===Object,zp=U instanceof Object?"":"null prototype",IS=!_S&&M&&Object(U)===U&&M in U?b.call(we(U),8,-1):zp?"Object":"",Jz=_S||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",Rp=Jz+(IS||zp?"["+P.call(C.call([],IS||[],zp||[]),": ")+"] ":"");return jp.length===0?Rp+"{}":bi?Rp+"{"+_r(jp,bi)+"}":Rp+"{ "+P.call(jp,", ")+" }"}return String(U)};function J(W,U,Be){var ot=Be.quoteStyle||U,ft=X[ot];return ft+W+ft}function G(W){return x.call(String(W),/"/g,"&quot;")}function Y(W){return!M||!(typeof W=="object"&&(M in W||typeof W[M]<"u"))}function Z(W){return we(W)==="[object Array]"&&Y(W)}function j(W){return we(W)==="[object Date]"&&Y(W)}function z(W){return we(W)==="[object RegExp]"&&Y(W)}function K(W){return we(W)==="[object Error]"&&Y(W)}function ae(W){return we(W)==="[object String]"&&Y(W)}function B(W){return we(W)==="[object Number]"&&Y(W)}function be(W){return we(W)==="[object Boolean]"&&Y(W)}function Ce(W){if(_)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function _e(W){if(!W||typeof W!="object"||!L)return!1;try{return L.call(W),!0}catch{}return!1}var Re=Object.prototype.hasOwnProperty||function(W){return W in this};function le(W,U){return Re.call(W,U)}function we(W){return g.call(W)}function ce(W){if(W.name)return W.name;var U=v.call(h.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function Se(W,U){if(W.indexOf)return W.indexOf(U);for(var Be=0,ot=W.length;Be<ot;Be++)if(W[Be]===U)return Be;return-1}function ie(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function de(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function ee(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function ne(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function me(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function De(W,U){if(W.length>U.maxStringLength){var Be=W.length-U.maxStringLength,ot="... "+Be+" more character"+(Be>1?"s":"");return De(b.call(W,0,U.maxStringLength),U)+ot}var ft=Q[U.quoteStyle||"single"];ft.lastIndex=0;var Fe=x.call(x.call(W,ft,"\\$1"),/[\x00-\x1f]/g,Ue);return J(Fe,"single",U)}function Ue(W){var U=W.charCodeAt(0),Be={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Be?"\\"+Be:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Qe(W){return"Object("+W+")"}function Lt(W){return W+" { ? }"}function Tn(W,U,Be,ot){var ft=ot?_r(Be,ot):P.call(Be,", ");return W+" ("+U+") {"+ft+"}"}function Hn(W){for(var U=0;U<W.length;U++)if(Se(W[U],`
2
+ `)>=0)return!1;return!0}function Ar(W,U){var Be;if(W.indent===" ")Be=" ";else if(typeof W.indent=="number"&&W.indent>0)Be=P.call(Array(W.indent+1)," ");else return null;return{base:Be,prev:P.call(Array(U+1),Be)}}function _r(W,U){if(W.length===0)return"";var Be=`
3
3
  `+U.prev+U.base;return Be+P.call(W,","+Be)+`
4
- `+U.prev}function _r(W,U){var Be=Z(W),ot=[];if(Be){ot.length=W.length;for(var ft=0;ft<W.length;ft++)ot[ft]=le(W,ft)?U(W[ft],W):""}var Fe=typeof N=="function"?N(W):[],Ir;if(A){Ir={};for(var uo=0;uo<Fe.length;uo++)Ir["$"+Fe[uo]]=Fe[uo]}for(var on in W)le(W,on)&&(Be&&String(Number(on))===on&&on<W.length||A&&Ir["$"+on]instanceof Symbol||(E.call(/[^\w$]/,on)?ot.push(U(on,W)+": "+U(W[on],W)):ot.push(on+": "+U(W[on],W))));if(typeof N=="function")for(var Or=0;Or<Fe.length;Or++)O.call(W,Fe[Or])&&ot.push("["+U(Fe[Or])+"]: "+U(W[Fe[Or]],W));return ot}return Ll}var Vl,Qp;function NS(){if(Qp)return Vl;Qp=1;var e=Oa(),t=po(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Vl=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Vl}var $l,Jp;function eh(){return Jp||(Jp=1,$l=Object),$l}var jl,th;function FS(){return th||(th=1,jl=Error),jl}var zl,nh;function LS(){return nh||(nh=1,zl=EvalError),zl}var Rl,rh;function VS(){return rh||(rh=1,Rl=RangeError),Rl}var Bl,oh;function $S(){return oh||(oh=1,Bl=ReferenceError),Bl}var Hl,ih;function jS(){return ih||(ih=1,Hl=SyntaxError),Hl}var Wl,ah;function zS(){return ah||(ah=1,Wl=URIError),Wl}var ql,sh;function RS(){return sh||(sh=1,ql=Math.abs),ql}var Ul,lh;function BS(){return lh||(lh=1,Ul=Math.floor),Ul}var Kl,ch;function HS(){return ch||(ch=1,Kl=Math.max),Kl}var Yl,uh;function WS(){return uh||(uh=1,Yl=Math.min),Yl}var Gl,dh;function qS(){return dh||(dh=1,Gl=Math.pow),Gl}var Zl,fh;function US(){return fh||(fh=1,Zl=Math.round),Zl}var Xl,ph;function KS(){return ph||(ph=1,Xl=Number.isNaN||function(t){return t!==t}),Xl}var Ql,hh;function YS(){if(hh)return Ql;hh=1;var e=KS();return Ql=function(n){return e(n)||n===0?n:n<0?-1:1},Ql}var Jl,mh;function GS(){return mh||(mh=1,Jl=Object.getOwnPropertyDescriptor),Jl}var ec,gh;function vh(){if(gh)return ec;gh=1;var e=GS();if(e)try{e([],"length")}catch{e=null}return ec=e,ec}var tc,yh;function ZS(){if(yh)return tc;yh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return tc=e,tc}var nc,bh;function XS(){return bh||(bh=1,nc=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}),nc}var rc,xh;function QS(){if(xh)return rc;xh=1;var e=typeof Symbol<"u"&&Symbol,t=XS();return rc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},rc}var oc,wh;function Sh(){return wh||(wh=1,oc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),oc}var ic,Th;function Eh(){if(Th)return ic;Th=1;var e=eh();return ic=e.getPrototypeOf||null,ic}var ac,Ch;function JS(){if(Ch)return ac;Ch=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 ac=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},ac}var sc,kh;function Ma(){if(kh)return sc;kh=1;var e=JS();return sc=Function.prototype.bind||e,sc}var lc,Ph;function cc(){return Ph||(Ph=1,lc=Function.prototype.call),lc}var uc,Ah;function _h(){return Ah||(Ah=1,uc=Function.prototype.apply),uc}var dc,Ih;function eT(){return Ih||(Ih=1,dc=typeof Reflect<"u"&&Reflect&&Reflect.apply),dc}var fc,Oh;function tT(){if(Oh)return fc;Oh=1;var e=Ma(),t=_h(),n=cc(),r=eT();return fc=r||e.call(n,t),fc}var pc,Mh;function Dh(){if(Mh)return pc;Mh=1;var e=Ma(),t=po(),n=cc(),r=tT();return pc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},pc}var hc,Nh;function nT(){if(Nh)return hc;Nh=1;var e=Dh(),t=vh(),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 hc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,hc}var mc,Fh;function rT(){if(Fh)return mc;Fh=1;var e=Sh(),t=Eh(),n=nT();return mc=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,mc}var gc,Lh;function oT(){if(Lh)return gc;Lh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ma();return gc=n.call(e,t),gc}var vc,Vh;function yc(){if(Vh)return vc;Vh=1;var e,t=eh(),n=FS(),r=LS(),o=VS(),i=$S(),a=jS(),s=po(),l=zS(),c=RS(),u=BS(),d=HS(),p=WS(),f=qS(),m=US(),g=YS(),h=Function,v=function(R){try{return h('"use strict"; return ('+R+").constructor;")()}catch{}},b=vh(),x=ZS(),S=function(){throw new s},w=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,"callee").get}catch{return S}}}():S,E=QS()(),C=rT(),P=Eh(),I=Sh(),_=_h(),F=cc(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&C?C(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":V,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":_,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":P,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(R){var M=C(C(R));A["%Error.prototype%"]=M}var O=function R(K){var ae;if(K==="%AsyncFunction%")ae=v("async function () {}");else if(K==="%GeneratorFunction%")ae=v("function* () {}");else if(K==="%AsyncGeneratorFunction%")ae=v("async function* () {}");else if(K==="%AsyncGenerator%"){var H=R("%AsyncGeneratorFunction%");H&&(ae=H.prototype)}else if(K==="%AsyncIteratorPrototype%"){var be=R("%AsyncGenerator%");be&&C&&(ae=C(be.prototype))}return A[K]=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"]},L=Ma(),z=oT(),D=L.call(F,Array.prototype.concat),B=L.call(_,Array.prototype.splice),X=L.call(F,String.prototype.replace),Q=L.call(F,String.prototype.slice),J=L.call(F,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,Z=function(K){var ae=Q(K,0,1),H=Q(K,-1);if(ae==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return X(K,G,function(Ce,_e,Re,le){be[be.length]=Re?X(le,Y,"$1"):_e||Ce}),be},$=function(K,ae){var H=K,be;if(z(j,H)&&(be=j[H],H="%"+be[0]+"%"),z(A,H)){var Ce=A[H];if(Ce===N&&(Ce=O(H)),typeof Ce>"u"&&!ae)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:be,name:H,value:Ce}}throw new a("intrinsic "+K+" does not exist!")};return vc=function(K,ae){if(typeof K!="string"||K.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(J(/^%?[^%]*%?$/,K)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=Z(K),be=H.length>0?H[0]:"",Ce=$("%"+be+"%",ae),_e=Ce.name,Re=Ce.value,le=!1,we=Ce.alias;we&&(be=we[0],B(H,D([0,1],we)));for(var ce=1,Se=!0;ce<H.length;ce+=1){var ie=H[ce],de=Q(ie,0,1),ee=Q(ie,-1);if((de==='"'||de==="'"||de==="`"||ee==='"'||ee==="'"||ee==="`")&&de!==ee)throw new a("property names with quotes must have matching quotes");if((ie==="constructor"||!Se)&&(le=!0),be+="."+ie,_e="%"+be+"%",z(A,_e))Re=A[_e];else if(Re!=null){if(!(ie in Re)){if(!ae)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(b&&ce+1>=H.length){var q=b(Re,ie);Se=!!q,Se&&"get"in q&&!("originalValue"in q.get)?Re=q.get:Re=Re[ie]}else Se=z(Re,ie),Re=Re[ie];Se&&!le&&(A[_e]=Re)}}return Re},vc}var bc,$h;function jh(){if($h)return bc;$h=1;var e=yc(),t=Dh(),n=t([e("%String.prototype.indexOf%")]);return bc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},bc}var xc,zh;function Rh(){if(zh)return xc;zh=1;var e=yc(),t=jh(),n=Oa(),r=po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return xc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var m=l(d,f);return c(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},xc}var wc,Bh;function iT(){if(Bh)return wc;Bh=1;var e=yc(),t=jh(),n=Oa(),r=Rh(),o=po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return wc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return c(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,wc}var Sc,Hh;function aT(){if(Hh)return Sc;Hh=1;var e=po(),t=Oa(),n=NS(),r=Rh(),o=iT(),i=o||r||n;return Sc=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},Sc}var Wh=e=>Array.isArray(e),Tc=e=>e===void 0,Ec=e=>e===null,sT=Function.bind.call(Function.call,Object.prototype.toString),lT=e=>!!e&&sT(e)==="[object Error]"||e instanceof Error,qh=(e,t)=>e instanceof t,cT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},uT=e=>Object.prototype.toString.call(e)==="[object Date]"&&qh(e,Date),je={array:Wh,date:uT,empty:e=>Ec(e)||Tc(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:qh,isError:lT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Ec(e)||Tc(e),null:Ec,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wh(e)&&typeof e=="object",primitive:cT,string:e=>typeof e=="string",undefined:Tc},dT=e=>Object.keys(e),Cn=(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},fT=e=>e.replace(/[^0-9]/g,"");const Cc="-",pT=e=>{const t=mT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Cc);return s[0]===""&&s.length!==1&&s.shift(),Uh(s,t)||hT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Uh=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Uh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Cc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Kh=/^\[(.+)\]$/,hT=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}},mT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)kc(n[o],r,o,t);return r},kc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Yh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(gT(o)){kc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{kc(a,Yh(t,i),n,r)})})},Yh=(e,t)=>{let n=e;return t.split(Cc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},gT=e=>e.isThemeGetter,vT=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)}}},Pc="!",Ac=":",yT=Ac.length,bT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===Ac){i.push(o.slice(l,m)),l=m+yT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=xT(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+Ac,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},xT=e=>e.endsWith(Pc)?e.substring(0,e.length-1):e.startsWith(Pc)?e.substring(1):e,wT=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}},ST=e=>({cache:vT(e.cacheSize),parseClassName:bT(e),sortModifiers:wT(e),...pT(e)}),TT=/\s+/,ET=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(TT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?m.substring(0,g):m);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const b=i(p).join(":"),x=f?b+Pc:b,S=x+v;if(a.includes(S))continue;a.push(S);const w=o(v,h);for(let E=0;E<w.length;++E){const C=w[E];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function CT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Gh(t))&&(r&&(r+=" "),r+=n);return r}const Gh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Gh(e[r]))&&(n&&(n+=" "),n+=t);return n};function kT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=ST(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=ET(l,n);return o(l,u),u}return function(){return i(CT.apply(null,arguments))}}const Ot=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PT=/^\d+\/\d+$/,AT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_T=/\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$/,IT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,OT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>PT.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),Mr=e=>!!e&&Number.isInteger(Number(e)),Qh=e=>e.endsWith("%")&&ze(e.slice(0,-1)),tr=e=>AT.test(e),DT=()=>!0,NT=e=>_T.test(e)&&!IT.test(e),_c=()=>!1,FT=e=>OT.test(e),LT=e=>MT.test(e),VT=e=>!ge(e)&&!ve(e),$T=e=>mo(e,tm,_c),ge=e=>Zh.test(e),Dr=e=>mo(e,nm,NT),Ic=e=>mo(e,GT,ze),jT=e=>mo(e,Jh,_c),zT=e=>mo(e,em,LT),RT=e=>mo(e,_c,FT),ve=e=>Xh.test(e),Da=e=>go(e,nm),BT=e=>go(e,ZT),HT=e=>go(e,Jh),WT=e=>go(e,tm),qT=e=>go(e,em),UT=e=>go(e,XT,!0),mo=(e,t,n)=>{const r=Zh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=Xh.exec(e);return r?r[1]?t(r[1]):n:!1},Jh=e=>e==="position",KT=new Set(["image","url"]),em=e=>KT.has(e),YT=new Set(["length","size","percentage"]),tm=e=>YT.has(e),nm=e=>e==="length",GT=e=>e==="number",ZT=e=>e==="family-name",XT=e=>e==="shadow",QT=kT(()=>{const e=Ot("color"),t=Ot("font"),n=Ot("text"),r=Ot("font-weight"),o=Ot("tracking"),i=Ot("leading"),a=Ot("breakpoint"),s=Ot("container"),l=Ot("spacing"),c=Ot("radius"),u=Ot("shadow"),d=Ot("inset-shadow"),p=Ot("drop-shadow"),f=Ot("blur"),m=Ot("perspective"),g=Ot("aspect"),h=Ot("ease"),v=Ot("animate"),b=()=>["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"],w=()=>["auto","contain","none"],E=()=>[ve,ge,l],C=()=>[ho,"full","auto",...E()],P=()=>[Mr,"none","subgrid",ve,ge],I=()=>["auto",{span:["full",Mr,ve,ge]},ve,ge],_=()=>[Mr,"auto",ve,ge],F=()=>["auto","min","max","fr",ve,ge],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],A=()=>["auto",...E()],M=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],O=()=>[e,ve,ge],j=()=>[Qh,Dr],L=()=>["","none","full",c,ve,ge],z=()=>["",ze,Da,Dr],D=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["","none",f,ve,ge],Q=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve,ge],J=()=>["none",ze,ve,ge],G=()=>["none",ze,ve,ge],Y=()=>[ze,ve,ge],Z=()=>[ho,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tr],breakpoint:[tr],color:[DT],container:[tr],"drop-shadow":[tr],ease:["in","out","in-out"],font:[VT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tr],shadow:[tr],spacing:["px",ze],text:[tr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,ge,ve,g]}],container:["container"],columns:[{columns:[ze,ge,ve,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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(),ge,ve]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Mr,"auto",ve,ge]}],basis:[{basis:[ho,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,ho,"auto","initial","none",ge]}],grow:[{grow:["",ze,ve,ge]}],shrink:[{shrink:["",ze,ve,ge]}],order:[{order:[Mr,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen",...M()]}],"min-h":[{"min-h":["screen","none",...M()]}],"max-h":[{"max-h":["screen",...M()]}],"font-size":[{text:["base",n,Da,Dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ve,Ic]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qh,ge]}],"font-family":[{font:[BT,ge,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,ve,ge]}],"line-clamp":[{"line-clamp":[ze,"none",ve,Ic]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",ve,Dr]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ze,"auto",ve,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ge]}],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",ve,ge]}],"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(),HT,jT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",WT,$T]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mr,ve,ge],radial:["",ve,ge],conic:[Mr,ve,ge]},qT,zT]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,ve,ge]}],"outline-w":[{outline:["",ze,Da,Dr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,UT,RT]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",ve,ge,d]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ze,Dr]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":O()}],opacity:[{opacity:[ze,ve,ge]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:X()}],brightness:[{brightness:[ze,ve,ge]}],contrast:[{contrast:[ze,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",p,ve,ge]}],grayscale:[{grayscale:["",ze,ve,ge]}],"hue-rotate":[{"hue-rotate":[ze,ve,ge]}],invert:[{invert:["",ze,ve,ge]}],saturate:[{saturate:[ze,ve,ge]}],sepia:[{sepia:["",ze,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[ze,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[ze,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",ze,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[ze,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[ze,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,ve,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",ve,ge]}],ease:[{ease:["linear","initial",h,ve,ge]}],delay:[{delay:[ze,ve,ge]}],animate:[{animate:["none",v,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ve,ge]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",ve,ge]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",ve,ge]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ze,Da,Dr,Ic]}],stroke:[{stroke:["none",...O()]}],"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","*","**"]}}),Wn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},JT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Oc=e=>je.function(e),Oe=(...e)=>QT(qp(e)),rm=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},wi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},om=e=>e.scrollHeight>e.clientHeight,Si=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},eE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},tE="span",an=T.forwardRef(function(t,n){const r=t.as||tE;return y.jsx(r,{ref:n,...t,as:void 0})}),nE=fo("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"}}),Na=T.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return y.jsxs(an,{...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:Oe(nE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Nr=e=>{const t=T.useRef(e);return T.useEffect(()=>{t.current=e},[e]),t};function rE(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 oE=({children:e,...t})=>{const n=Nr(t.onIntersection),r=T.useRef(null),[o,i]=T.useState(()=>r.current===null?!1:rE(r.current));return T.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()},[]),y.jsx("div",{...t,ref:r,children:o?e:null})},iE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},aE=fo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),sE=fo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:iE,defaultVariants:{theme:"primary",size:"default"}}),Mc=T.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return y.jsxs(an,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Oe(sE({size:a,theme:i}),t),children:[n?y.jsx("span",{"aria-hidden":"true",className:aE({theme:n})}):null,r,s.children]})}),Ti=T.createContext({});function hn(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const Dc=typeof window<"u",Fa=Dc?T.useLayoutEffect:T.useEffect,La=T.createContext(null),vo=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class lE extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function cE({children:e,isPresent:t,anchorX:n}){const r=T.useId(),o=T.useRef(null),i=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=T.useContext(vo);return T.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(`
4
+ `+U.prev}function Ir(W,U){var Be=Z(W),ot=[];if(Be){ot.length=W.length;for(var ft=0;ft<W.length;ft++)ot[ft]=le(W,ft)?U(W[ft],W):""}var Fe=typeof N=="function"?N(W):[],Or;if(_){Or={};for(var uo=0;uo<Fe.length;uo++)Or["$"+Fe[uo]]=Fe[uo]}for(var on in W)le(W,on)&&(Be&&String(Number(on))===on&&on<W.length||_&&Or["$"+on]instanceof Symbol||(T.call(/[^\w$]/,on)?ot.push(U(on,W)+": "+U(W[on],W)):ot.push(on+": "+U(W[on],W))));if(typeof N=="function")for(var Mr=0;Mr<Fe.length;Mr++)D.call(W,Fe[Mr])&&ot.push("["+U(Fe[Mr])+"]: "+U(W[Fe[Mr]],W));return ot}return Vl}var $l,Qp;function NS(){if(Qp)return $l;Qp=1;var e=Oa(),t=po(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return $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 jl,Jp;function eh(){return Jp||(Jp=1,jl=Object),jl}var zl,th;function FS(){return th||(th=1,zl=Error),zl}var Rl,nh;function LS(){return nh||(nh=1,Rl=EvalError),Rl}var Bl,rh;function VS(){return rh||(rh=1,Bl=RangeError),Bl}var Hl,oh;function $S(){return oh||(oh=1,Hl=ReferenceError),Hl}var Wl,ih;function jS(){return ih||(ih=1,Wl=SyntaxError),Wl}var ql,ah;function zS(){return ah||(ah=1,ql=URIError),ql}var Ul,sh;function RS(){return sh||(sh=1,Ul=Math.abs),Ul}var Kl,lh;function BS(){return lh||(lh=1,Kl=Math.floor),Kl}var Yl,ch;function HS(){return ch||(ch=1,Yl=Math.max),Yl}var Gl,uh;function WS(){return uh||(uh=1,Gl=Math.min),Gl}var Zl,dh;function qS(){return dh||(dh=1,Zl=Math.pow),Zl}var Xl,fh;function US(){return fh||(fh=1,Xl=Math.round),Xl}var Ql,ph;function KS(){return ph||(ph=1,Ql=Number.isNaN||function(t){return t!==t}),Ql}var Jl,hh;function YS(){if(hh)return Jl;hh=1;var e=KS();return Jl=function(n){return e(n)||n===0?n:n<0?-1:1},Jl}var ec,mh;function GS(){return mh||(mh=1,ec=Object.getOwnPropertyDescriptor),ec}var tc,gh;function vh(){if(gh)return tc;gh=1;var e=GS();if(e)try{e([],"length")}catch{e=null}return tc=e,tc}var nc,yh;function ZS(){if(yh)return nc;yh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return nc=e,nc}var rc,bh;function XS(){return bh||(bh=1,rc=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}),rc}var oc,xh;function QS(){if(xh)return oc;xh=1;var e=typeof Symbol<"u"&&Symbol,t=XS();return oc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},oc}var ic,wh;function Sh(){return wh||(wh=1,ic=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ic}var ac,Th;function Eh(){if(Th)return ac;Th=1;var e=eh();return ac=e.getPrototypeOf||null,ac}var sc,Ch;function JS(){if(Ch)return sc;Ch=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 sc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},sc}var lc,kh;function Ma(){if(kh)return lc;kh=1;var e=JS();return lc=Function.prototype.bind||e,lc}var cc,Ph;function uc(){return Ph||(Ph=1,cc=Function.prototype.call),cc}var dc,Ah;function _h(){return Ah||(Ah=1,dc=Function.prototype.apply),dc}var fc,Ih;function eT(){return Ih||(Ih=1,fc=typeof Reflect<"u"&&Reflect&&Reflect.apply),fc}var pc,Oh;function tT(){if(Oh)return pc;Oh=1;var e=Ma(),t=_h(),n=uc(),r=eT();return pc=r||e.call(n,t),pc}var hc,Mh;function Dh(){if(Mh)return hc;Mh=1;var e=Ma(),t=po(),n=uc(),r=tT();return hc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},hc}var mc,Nh;function nT(){if(Nh)return mc;Nh=1;var e=Dh(),t=vh(),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 mc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,mc}var gc,Fh;function rT(){if(Fh)return gc;Fh=1;var e=Sh(),t=Eh(),n=nT();return gc=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,gc}var vc,Lh;function oT(){if(Lh)return vc;Lh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ma();return vc=n.call(e,t),vc}var yc,Vh;function bc(){if(Vh)return yc;Vh=1;var e,t=eh(),n=FS(),r=LS(),o=VS(),i=$S(),a=jS(),s=po(),l=zS(),c=RS(),u=BS(),d=HS(),p=WS(),f=qS(),m=US(),g=YS(),h=Function,v=function(z){try{return h('"use strict"; return ('+z+").constructor;")()}catch{}},b=vh(),x=ZS(),S=function(){throw new s},w=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,"callee").get}catch{return S}}}():S,T=QS()(),C=rT(),P=Eh(),I=Sh(),A=_h(),L=uc(),N={},$=typeof Uint8Array>"u"||!C?e:C(Uint8Array),_={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&C?C(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":$,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":A,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":P,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(z){var M=C(C(z));_["%Error.prototype%"]=M}var D=function z(K){var ae;if(K==="%AsyncFunction%")ae=v("async function () {}");else if(K==="%GeneratorFunction%")ae=v("function* () {}");else if(K==="%AsyncGeneratorFunction%")ae=v("async function* () {}");else if(K==="%AsyncGenerator%"){var B=z("%AsyncGeneratorFunction%");B&&(ae=B.prototype)}else if(K==="%AsyncIteratorPrototype%"){var be=z("%AsyncGenerator%");be&&C&&(ae=C(be.prototype))}return _[K]=ae,ae},V={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=Ma(),H=oT(),O=F.call(L,Array.prototype.concat),R=F.call(A,Array.prototype.splice),X=F.call(L,String.prototype.replace),Q=F.call(L,String.prototype.slice),J=F.call(L,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,Z=function(K){var ae=Q(K,0,1),B=Q(K,-1);if(ae==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return X(K,G,function(Ce,_e,Re,le){be[be.length]=Re?X(le,Y,"$1"):_e||Ce}),be},j=function(K,ae){var B=K,be;if(H(V,B)&&(be=V[B],B="%"+be[0]+"%"),H(_,B)){var Ce=_[B];if(Ce===N&&(Ce=D(B)),typeof Ce>"u"&&!ae)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:be,name:B,value:Ce}}throw new a("intrinsic "+K+" does not exist!")};return yc=function(K,ae){if(typeof K!="string"||K.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(J(/^%?[^%]*%?$/,K)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=Z(K),be=B.length>0?B[0]:"",Ce=j("%"+be+"%",ae),_e=Ce.name,Re=Ce.value,le=!1,we=Ce.alias;we&&(be=we[0],R(B,O([0,1],we)));for(var ce=1,Se=!0;ce<B.length;ce+=1){var ie=B[ce],de=Q(ie,0,1),ee=Q(ie,-1);if((de==='"'||de==="'"||de==="`"||ee==='"'||ee==="'"||ee==="`")&&de!==ee)throw new a("property names with quotes must have matching quotes");if((ie==="constructor"||!Se)&&(le=!0),be+="."+ie,_e="%"+be+"%",H(_,_e))Re=_[_e];else if(Re!=null){if(!(ie in Re)){if(!ae)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(b&&ce+1>=B.length){var q=b(Re,ie);Se=!!q,Se&&"get"in q&&!("originalValue"in q.get)?Re=q.get:Re=Re[ie]}else Se=H(Re,ie),Re=Re[ie];Se&&!le&&(_[_e]=Re)}}return Re},yc}var xc,$h;function jh(){if($h)return xc;$h=1;var e=bc(),t=Dh(),n=t([e("%String.prototype.indexOf%")]);return xc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},xc}var wc,zh;function Rh(){if(zh)return wc;zh=1;var e=bc(),t=jh(),n=Oa(),r=po(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return wc=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var m=l(d,f);return c(d)===0&&(d=void 0),m}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,m){d||(d=new o),a(d,f,m)}};return p},wc}var Sc,Bh;function iT(){if(Bh)return Sc;Bh=1;var e=bc(),t=jh(),n=Oa(),r=Rh(),o=po(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return Sc=i?function(){var d,p,f={assert:function(m){if(!f.has(m))throw new o("Side channel does not contain "+n(m))},delete:function(m){if(i&&m&&(typeof m=="object"||typeof m=="function")){if(d)return c(d,m)}else if(r&&p)return p.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?a(d,m):p&&p.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!p&&p.has(m)},set:function(m,g){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),s(d,m,g)):r&&(p||(p=r()),p.set(m,g))}};return f}:r,Sc}var Tc,Hh;function aT(){if(Hh)return Tc;Hh=1;var e=po(),t=Oa(),n=NS(),r=Rh(),o=iT(),i=o||r||n;return Tc=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},Tc}var Wh=e=>Array.isArray(e),Ec=e=>e===void 0,Cc=e=>e===null,sT=Function.bind.call(Function.call,Object.prototype.toString),lT=e=>!!e&&sT(e)==="[object Error]"||e instanceof Error,qh=(e,t)=>e instanceof t,cT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},uT=e=>Object.prototype.toString.call(e)==="[object Date]"&&qh(e,Date),je={array:Wh,date:uT,empty:e=>Cc(e)||Ec(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:qh,isError:lT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Cc(e)||Ec(e),null:Cc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wh(e)&&typeof e=="object",primitive:cT,string:e=>typeof e=="string",undefined:Ec},dT=e=>Object.keys(e),Cn=(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},fT=e=>e.replace(/[^0-9]/g,"");const kc="-",pT=e=>{const t=mT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(kc);return s[0]===""&&s.length!==1&&s.shift(),Uh(s,t)||hT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Uh=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Uh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(kc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Kh=/^\[(.+)\]$/,hT=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}},mT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Pc(n[o],r,o,t);return r},Pc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Yh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(gT(o)){Pc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Pc(a,Yh(t,i),n,r)})})},Yh=(e,t)=>{let n=e;return t.split(kc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},gT=e=>e.isThemeGetter,vT=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)}}},Ac="!",_c=":",yT=_c.length,bT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let m=0;m<o.length;m++){let g=o[m];if(a===0&&s===0){if(g===_c){i.push(o.slice(l,m)),l=m+yT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=xT(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+_c,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},xT=e=>e.endsWith(Ac)?e.substring(0,e.length-1):e.startsWith(Ac)?e.substring(1):e,wT=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}},ST=e=>({cache:vT(e.cacheSize),parseClassName:bT(e),sortModifiers:wT(e),...pT(e)}),TT=/\s+/,ET=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(TT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?m.substring(0,g):m);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const b=i(p).join(":"),x=f?b+Ac:b,S=x+v;if(a.includes(S))continue;a.push(S);const w=o(v,h);for(let T=0;T<w.length;++T){const C=w[T];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function CT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Gh(t))&&(r&&(r+=" "),r+=n);return r}const Gh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Gh(e[r]))&&(n&&(n+=" "),n+=t);return n};function kT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=ST(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=ET(l,n);return o(l,u),u}return function(){return i(CT.apply(null,arguments))}}const Ot=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PT=/^\d+\/\d+$/,AT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_T=/\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$/,IT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,OT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>PT.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),Dr=e=>!!e&&Number.isInteger(Number(e)),Qh=e=>e.endsWith("%")&&ze(e.slice(0,-1)),tr=e=>AT.test(e),DT=()=>!0,NT=e=>_T.test(e)&&!IT.test(e),Ic=()=>!1,FT=e=>OT.test(e),LT=e=>MT.test(e),VT=e=>!ge(e)&&!ve(e),$T=e=>mo(e,tm,Ic),ge=e=>Zh.test(e),Nr=e=>mo(e,nm,NT),Oc=e=>mo(e,GT,ze),jT=e=>mo(e,Jh,Ic),zT=e=>mo(e,em,LT),RT=e=>mo(e,Ic,FT),ve=e=>Xh.test(e),Da=e=>go(e,nm),BT=e=>go(e,ZT),HT=e=>go(e,Jh),WT=e=>go(e,tm),qT=e=>go(e,em),UT=e=>go(e,XT,!0),mo=(e,t,n)=>{const r=Zh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=Xh.exec(e);return r?r[1]?t(r[1]):n:!1},Jh=e=>e==="position",KT=new Set(["image","url"]),em=e=>KT.has(e),YT=new Set(["length","size","percentage"]),tm=e=>YT.has(e),nm=e=>e==="length",GT=e=>e==="number",ZT=e=>e==="family-name",XT=e=>e==="shadow",QT=kT(()=>{const e=Ot("color"),t=Ot("font"),n=Ot("text"),r=Ot("font-weight"),o=Ot("tracking"),i=Ot("leading"),a=Ot("breakpoint"),s=Ot("container"),l=Ot("spacing"),c=Ot("radius"),u=Ot("shadow"),d=Ot("inset-shadow"),p=Ot("drop-shadow"),f=Ot("blur"),m=Ot("perspective"),g=Ot("aspect"),h=Ot("ease"),v=Ot("animate"),b=()=>["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"],w=()=>["auto","contain","none"],T=()=>[ve,ge,l],C=()=>[ho,"full","auto",...T()],P=()=>[Dr,"none","subgrid",ve,ge],I=()=>["auto",{span:["full",Dr,ve,ge]},ve,ge],A=()=>[Dr,"auto",ve,ge],L=()=>["auto","min","max","fr",ve,ge],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],_=()=>["auto",...T()],M=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],D=()=>[e,ve,ge],V=()=>[Qh,Nr],F=()=>["","none","full",c,ve,ge],H=()=>["",ze,Da,Nr],O=()=>["solid","dashed","dotted","double"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["","none",f,ve,ge],Q=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve,ge],J=()=>["none",ze,ve,ge],G=()=>["none",ze,ve,ge],Y=()=>[ze,ve,ge],Z=()=>[ho,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tr],breakpoint:[tr],color:[DT],container:[tr],"drop-shadow":[tr],ease:["in","out","in-out"],font:[VT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tr],shadow:[tr],spacing:["px",ze],text:[tr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,ge,ve,g]}],container:["container"],columns:[{columns:[ze,ge,ve,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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(),ge,ve]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Dr,"auto",ve,ge]}],basis:[{basis:[ho,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,ho,"auto","initial","none",ge]}],grow:[{grow:["",ze,ve,ge]}],shrink:[{shrink:["",ze,ve,ge]}],order:[{order:[Dr,"first","last","none",ve,ge]}],"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":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen",...M()]}],"min-h":[{"min-h":["screen","none",...M()]}],"max-h":[{"max-h":["screen",...M()]}],"font-size":[{text:["base",n,Da,Nr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ve,Oc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qh,ge]}],"font-family":[{font:[BT,ge,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,ve,ge]}],"line-clamp":[{"line-clamp":[ze,"none",ve,Oc]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",ve,Nr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[ze,"auto",ve,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ge]}],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",ve,ge]}],"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(),HT,jT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",WT,$T]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Dr,ve,ge],radial:["",ve,ge],conic:[Dr,ve,ge]},qT,zT]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,ve,ge]}],"outline-w":[{outline:["",ze,Da,Nr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,UT,RT]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",ve,ge,d]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[ze,Nr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[ze,ve,ge]}],"mix-blend":[{"mix-blend":[...R(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:X()}],brightness:[{brightness:[ze,ve,ge]}],contrast:[{contrast:[ze,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",p,ve,ge]}],grayscale:[{grayscale:["",ze,ve,ge]}],"hue-rotate":[{"hue-rotate":[ze,ve,ge]}],invert:[{invert:["",ze,ve,ge]}],saturate:[{saturate:[ze,ve,ge]}],sepia:[{sepia:["",ze,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[ze,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[ze,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",ze,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[ze,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[ze,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,ve,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",ve,ge]}],ease:[{ease:["linear","initial",h,ve,ge]}],delay:[{delay:[ze,ve,ge]}],animate:[{animate:["none",v,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ve,ge]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,ge]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[ze,Da,Nr,Oc]}],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","*","**"]}}),Wn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},JT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Mc=e=>je.function(e),Oe=(...e)=>QT(qp(e)),rm=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Si=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},om=e=>e.scrollHeight>e.clientHeight,Ti=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},eE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},tE="span",an=E.forwardRef(function(t,n){const r=t.as||tE;return y.jsx(r,{ref:n,...t,as:void 0})}),nE=fo("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Na=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 y.jsxs(an,{...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:Oe(nE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Fr=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function rE(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 oE=({children:e,...t})=>{const n=Fr(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:rE(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()},[]),y.jsx("div",{...t,ref:r,children:o?e:null})},iE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},aE=fo("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),sE=fo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:iE,defaultVariants:{theme:"primary",size:"default"}}),Fa=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return y.jsxs(an,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Oe(sE({size:a,theme:i}),t),children:[n?y.jsx("span",{"aria-hidden":"true",className:aE({theme:n})}):null,r,s.children]})}),Ei=E.createContext({});function hn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Dc=typeof window<"u",La=Dc?E.useLayoutEffect:E.useEffect,Va=E.createContext(null),vo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class lE extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function cE({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,7 +9,7 @@
9
9
  ${p}px !important;
10
10
  top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(f)}},[t]),y.jsx(lE,{isPresent:t,childRef:o,sizeRef:i,children:k.cloneElement(e,{ref:o})})}const uE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=hn(dE),c=T.useId(),u=T.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=T.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 T.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),k.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=y.jsx(cE,{isPresent:n,anchorX:s,children:e})),y.jsx(La.Provider,{value:d,children:e})};function dE(){return new Map}function im(e=!0){const t=T.useContext(La);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=T.useId();T.useEffect(()=>{if(e)return o(i)},[e]);const a=T.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Va=e=>e.key||"";function am(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const nr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=im(a),u=T.useMemo(()=>am(e),[e]),d=a&&!l?[]:u.map(Va),p=T.useRef(!0),f=T.useRef(u),m=hn(()=>new Map),[g,h]=T.useState(u),[v,b]=T.useState(u);Fa(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const E=Va(v[w]);d.includes(E)?m.delete(E):m.get(E)!==!0&&m.set(E,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let E=0;E<v.length;E++){const C=v[E],P=Va(C);d.includes(P)||(w.splice(E,0,C),x.push(C))}return i==="wait"&&x.length&&(w=x),b(am(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=T.useContext(Ti);return y.jsx(y.Fragment,{children:v.map(w=>{const E=Va(w),C=a&&!l?!1:u===v||d.includes(E),P=()=>{if(m.has(E))m.set(E,!0);else return;let I=!0;m.forEach(_=>{_||(I=!1)}),I&&(S==null||S(),b(f.current),a&&(c==null||c()),r&&r())};return y.jsx(uE,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:P,anchorX:s,children:w},E)})})},fE=T.createContext(null),Ut=e=>e;let yo=Ut,sn=Ut;process.env.NODE_ENV!=="production"&&(yo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},sn=(e,t)=>{if(!e)throw new Error(t)});const pE={useManualTiming:!1},$a=["read","resolveKeyframes","update","preRender","render","postRender"];function hE(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const m=p&&o?n:r;return d&&a.add(u),m.has(u)||m.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const mE=40;function sm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=$a.reduce((v,b)=>(v[b]=hE(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,mE),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},m=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:$a.reduce((v,b)=>{const x=a[b];return v[b]=(S,w=!1,E=!1)=>(n||m(),x.schedule(S,w,E)),v},{}),cancel:v=>{for(let b=0;b<$a.length;b++)a[$a[b]].cancel(v)},state:o,steps:a}}const{schedule:nt,cancel:qn,state:Dt,steps:Nc}=sm(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);function gE(){const e=T.useRef(!1);return Fa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function vE(){const e=gE(),[t,n]=T.useState(0),r=T.useCallback(()=>{e.current&&n(t+1)},[t]);return[T.useCallback(()=>nt.postRender(r),[r]),t]}const yE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function lm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(yE);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 cm=e=>e===!0,bE=e=>cm(e===!0)||e==="id",xE=({children:e,id:t,inherit:n=!0})=>{const r=T.useContext(Ti),o=T.useContext(fE),[i,a]=vE(),s=T.useRef(null),l=r.id||o;s.current===null&&(bE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:cm(n)&&r.group||lm()});const c=T.useMemo(()=>({...s.current,forceRender:i}),[a]);return y.jsx(Ti.Provider,{value:c,children:e})},um=T.createContext({strict:!1}),dm={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 dm)bo[e]={isEnabled:t=>dm[e].some(n=>!!t[n])};function wE(e){for(const t in e)bo[t]={...bo[t],...e[t]}}const SE=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 ja(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||SE.has(e)}let fm=e=>!ja(e);function pm(e){e&&(fm=t=>t.startsWith("on")?!ja(t):e(t))}try{pm(require("@emotion/is-prop-valid").default)}catch{}function TE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(fm(o)||n===!0&&ja(o)||!t&&!ja(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function EE({children:e,isValidProp:t,...n}){t&&pm(t),n={...T.useContext(vo),...n},n.isStatic=hn(()=>n.isStatic);const r=T.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return y.jsx(vo.Provider,{value:r,children:e})}const hm=new Set;function za(e,t,n){e||hm.has(t)||(console.warn(t),hm.add(t))}function CE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&za(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Ra=T.createContext({});function Ba(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ei(e){return typeof e=="string"||Array.isArray(e)}const Fc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lc=["initial",...Fc];function Ha(e){return Ba(e.animate)||Lc.some(t=>Ei(e[t]))}function mm(e){return!!(Ha(e)||e.variants)}function kE(e,t){if(Ha(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ei(n)?n:void 0,animate:Ei(r)?r:void 0}}return e.inherit!==!1?t:{}}function PE(e){const{initial:t,animate:n}=kE(e,T.useContext(Ra));return T.useMemo(()=>({initial:t,animate:n}),[gm(t),gm(n)])}function gm(e){return Array.isArray(e)?e.join(" "):e}const AE=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _E(e,t,n){return T.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:Vc}=sm(queueMicrotask,!1),$c=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vm="data-"+$c("framerAppearId"),ym=T.createContext({});function IE(e,t,n,r,o){var i,a;const{visualElement:s}=T.useContext(Ra),l=T.useContext(um),c=T.useContext(La),u=T.useContext(vo).reducedMotion,d=T.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=T.useContext(ym);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&OE(d.current,n,o,f);const m=T.useRef(!1);T.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[vm],h=T.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 Fa(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Vc.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),T.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),h.current=!1))}),p}function OE(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:bm(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 bm(e){if(e)return e.options.allowProjection!==!1?e.projection:bm(e.parent)}function ME({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&wE(e);function s(c,u){let d;const p={...T.useContext(vo),...c,layoutId:DE(c)},{isStatic:f}=p,m=PE(c),g=r(c,f);if(!f&&Dc){NE(p,e);const h=FE(p);d=h.MeasureLayout,m.visualElement=IE(o,g,p,t,h.ProjectionNode)}return y.jsxs(Ra.Provider,{value:m,children:[d&&m.visualElement?y.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,_E(g,m.visualElement,u),g,f,m.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=T.forwardRef(s);return l[AE]=o,l}function DE({layoutId:e}){const t=T.useContext(Ti).id;return t&&e!==void 0?t+"-"+e:e}function NE(e,t){const n=T.useContext(um).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):sn(!1,r)}}function FE(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 xm=e=>t=>typeof t=="string"&&t.startsWith(e),jc=xm("--"),LE=xm("var(--"),zc=e=>LE(e)?VE.test(e.split("/*")[0].trim()):!1,VE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ci={};function $E(e){for(const t in e)Ci[t]=e[t],jc(t)&&(Ci[t].isCSSVariable=!0)}const wo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fr=new Set(wo);function wm(e,{layout:t,layoutId:n}){return Fr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ci[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),Sm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Un=(e,t,n)=>n>t?t:n<e?e:n,So={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ki={...So,transform:e=>Un(0,1,e)},Wa={...So,default:1},Pi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rr=Pi("deg"),kn=Pi("%"),Te=Pi("px"),jE=Pi("vh"),zE=Pi("vw"),Tm={...kn,parse:e=>kn.parse(e)/100,transform:e=>kn.transform(e*100)},RE={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},BE={rotate:rr,rotateX:rr,rotateY:rr,rotateZ:rr,scale:Wa,scaleX:Wa,scaleY:Wa,scaleZ:Wa,skew:rr,skewX:rr,skewY:rr,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:ki,originX:Tm,originY:Tm,originZ:Te},Em={...So,transform:Math.round},Rc={...RE,...BE,zIndex:Em,size:Te,fillOpacity:ki,strokeOpacity:ki,numOctaves:Em},HE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WE=wo.length;function qE(e,t,n){let r="",o=!0;for(let i=0;i<WE;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=Sm(s,Rc[a]);if(!l){o=!1;const u=HE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Bc(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(Fr.has(l)){a=!0;continue}else if(jc(l)){o[l]=c;continue}else{const u=Sm(c,Rc[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=qE(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 Hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cm(e,t,n){for(const r in t)!Pt(t[r])&&!wm(r,n)&&(e[r]=t[r])}function UE({transformTemplate:e},t){return T.useMemo(()=>{const n=Hc();return Bc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function KE(e,t){const n=e.style||{},r={};return Cm(r,n,e),Object.assign(r,UE(e,t)),r}function YE(e,t){const n={},r=KE(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 GE=["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 Wc(e){return typeof e!="string"||e.includes("-")?!1:!!(GE.indexOf(e)>-1||/[A-Z]/u.test(e))}const ZE={offset:"stroke-dashoffset",array:"stroke-dasharray"},XE={offset:"strokeDashoffset",array:"strokeDasharray"};function QE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ZE:XE;e[i.offset]=Te.transform(-r);const a=Te.transform(t),s=Te.transform(n);e[i.array]=`${a} ${s}`}function km(e,t,n){return typeof e=="string"?e:Te.transform(t+n*e)}function JE(e,t,n){const r=km(t,e.x,e.width),o=km(n,e.y,e.height);return`${r} ${o}`}function qc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Bc(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=JE(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&QE(p,a,s,l,!1)}const Pm=()=>({...Hc(),attrs:{}}),Uc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function eC(e,t,n,r){const o=T.useMemo(()=>{const i=Pm();return qc(i,t,Uc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Cm(i,e.style,e),o.style={...i,...o.style}}return o}function tC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Wc(n)?eC:YE)(r,i,a,n),c=TE(r,typeof n=="string",e),u=n!==T.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=T.useMemo(()=>Pt(d)?d.get():d,[d]);return T.createElement(n,{...u,children:p})}}function Am(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Kc(e,t,n,r){if(typeof t=="function"){const[o,i]=Am(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]=Am(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Yc=e=>Array.isArray(e),nC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),rC=e=>Yc(e)?e[e.length-1]||0:e;function qa(e){const t=Pt(e)?e.get():e;return nC(t)?t.toValue():t}function oC({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:iC(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const _m=e=>(t,n)=>{const r=T.useContext(Ra),o=T.useContext(La),i=()=>oC(e,t,r,o);return n?i():hn(i)};function iC(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=qa(i[p]);let{initial:a,animate:s}=e;const l=Ha(e),c=mm(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"&&!Ba(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=Kc(e,p[f]);if(m){const{transitionEnd:g,transition:h,...v}=m;for(const b in v){let x=v[b];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[b]=x)}for(const b in g)o[b]=g[b]}}}return o}function Gc(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||wm(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 aC={useVisualState:_m({scrapeMotionValuesFromProps:Gc,createRenderState:Hc})};function Im(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 Om(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 Mm=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 Dm(e,t,n,r){Om(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Mm.has(o)?o:$c(o),t.attrs[o])}function Nm(e,t,n){const r=Gc(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=wo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Fm=["x","y","width","height","cx","cy","r"],sC={useVisualState:_m({scrapeMotionValuesFromProps:Nm,createRenderState:Pm,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(Fr.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Fm.length;s++){const l=Fm[s];e[l]!==t[l]&&(a=!0)}a&&nt.read(()=>{Im(n,r),nt.render(()=>{qc(r,o,Uc(n.tagName),e.transformTemplate),Dm(n,r)})})}})};function lC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Wc(r)?sC:aC,preloadedFeatures:e,useRender:tC(o),createVisualElement:t,Component:r};return ME(a)}}function Ai(e,t,n){const r=e.getProps();return Kc(r,t,n!==void 0?n:r.custom,e)}function Zc(e,t){return e?e[t]||e.default||e:void 0}const Lm=new Set(["width","height","top","left","right","bottom",...wo]);function Xc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ua(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function cC([...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 Qc{constructor(){this.subscriptions=[]}add(t){return Xc(this.subscriptions,t),()=>Ua(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 Vm(e,t){return t?e*(1e3/t):0}let Ka;function uC(){Ka=void 0}const Pn={now:()=>(Ka===void 0&&Pn.set(Dt.isProcessing||pE.useManualTiming?Dt.timestamp:performance.now()),Ka),set:e=>{Ka=e,queueMicrotask(uC)}},$m=30,dC=e=>!isNaN(parseFloat(e)),_i={current:void 0};class fC{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Pn.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=Pn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=dC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&za(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Qc);const r=this.events[t].add(n);return t==="change"?()=>{r(),nt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return _i.current&&_i.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Pn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$m)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$m);return Vm(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 To(e,t){return new fC(e,t)}function pC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,To(n))}function hC(e,t){const n=Ai(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=rC(i[a]);pC(e,a,s)}}function mC(e){return!!(Pt(e)&&e.add)}function Jc(e,t){const n=e.getValue("willChange");if(mC(n))return n.add(t)}function jm(e){return e.props[vm]}function eu(e){let t;return()=>(t===void 0&&(t=e()),t)}const gC=eu(()=>window.ScrollTimeline!==void 0);class vC{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(gC()&&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 zm extends vC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const mn=e=>e*1e3,An=e=>e/1e3;function Ya(e){return typeof e=="function"}function Rm(e,t){e.timeline=t,e.onfinish=null}const tu=e=>Array.isArray(e)&&typeof e[0]=="number",yC={linearEasing:void 0};function bC(e,t){const n=eu(e);return()=>{var r;return(r=yC[t])!==null&&r!==void 0?r:n()}}const Ga=bC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Lr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Bm=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Lr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Hm(e){return!!(typeof e=="function"&&Ga()||!e||typeof e=="string"&&(e in nu||Ga())||tu(e)||Array.isArray(e)&&e.every(Hm))}const Ii=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ii([0,.65,.55,1]),circOut:Ii([.55,0,1,.45]),backIn:Ii([.31,.01,.66,-.59]),backOut:Ii([.33,1.53,.69,.99])};function Wm(e,t){if(e)return typeof e=="function"&&Ga()?Bm(e,t):tu(e)?Ii(e):Array.isArray(e)?e.map(n=>Wm(n,t)||nu.easeOut):nu[e]}const qm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,xC=1e-7,wC=12;function SC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=qm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>xC&&++s<wC);return a}function Oi(e,t,n,r){if(e===t&&n===r)return Ut;const o=i=>SC(i,0,1,e,n);return i=>i===0||i===1?i:qm(o(i),t,r)}const Um=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Km=e=>t=>1-e(1-t),Ym=Oi(.33,1.53,.69,.99),ru=Km(Ym),Gm=Um(ru),Zm=e=>(e*=2)<1?.5*ru(e):.5*(2-Math.pow(2,-10*(e-1))),ou=e=>1-Math.sin(Math.acos(e)),Xm=Km(ou),Qm=Um(ou),Jm=e=>/^0[^.\s]+$/u.test(e);function TC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Jm(e):!0}const Mi=e=>Math.round(e*1e5)/1e5,iu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function EC(e){return e==null}const CC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,au=(e,t)=>n=>!!(typeof n=="string"&&CC.test(n)&&n.startsWith(e)||t&&!EC(n)&&Object.prototype.hasOwnProperty.call(n,t)),eg=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(iu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},kC=e=>Un(0,255,e),su={...So,transform:e=>Math.round(kC(e))},Vr={test:au("rgb","red"),parse:eg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+su.transform(e)+", "+su.transform(t)+", "+su.transform(n)+", "+Mi(ki.transform(r))+")"};function PC(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 lu={test:au("#"),parse:PC,transform:Vr.transform},Eo={test:au("hsl","hue"),parse:eg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+kn.transform(Mi(t))+", "+kn.transform(Mi(n))+", "+Mi(ki.transform(r))+")"},Vt={test:e=>Vr.test(e)||lu.test(e)||Eo.test(e),parse:e=>Vr.test(e)?Vr.parse(e):Eo.test(e)?Eo.parse(e):lu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Vr.transform(e):Eo.transform(e)},AC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _C(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(iu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(AC))===null||n===void 0?void 0:n.length)||0)>0}const tg="number",ng="color",IC="var",OC="var(",rg="${}",MC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Di(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(MC,l=>(Vt.test(l)?(r.color.push(i),o.push(ng),n.push(Vt.parse(l))):l.startsWith(OC)?(r.var.push(i),o.push(IC),n.push(l)):(r.number.push(i),o.push(tg),n.push(parseFloat(l))),++i,rg)).split(rg);return{values:n,split:s,indexes:r,types:o}}function og(e){return Di(e).values}function ig(e){const{split:t,types:n}=Di(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===tg?i+=Mi(o[a]):s===ng?i+=Vt.transform(o[a]):i+=o[a]}return i}}const DC=e=>typeof e=="number"?0:e;function NC(e){const t=og(e);return ig(e)(t.map(DC))}const or={test:_C,parse:og,createTransformer:ig,getAnimatableNone:NC},FC=new Set(["brightness","contrast","saturate","opacity"]);function LC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(iu)||[];if(!r)return e;const o=n.replace(r,"");let i=FC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const VC=/\b([a-z-]*)\(.*?\)/gu,cu={...or,getAnimatableNone:e=>{const t=e.match(VC);return t?t.map(LC).join(" "):e}},$C={...Rc,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:cu,WebkitFilter:cu},ag=e=>$C[e];function sg(e,t){let n=ag(e);return n!==cu&&(n=or),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jC=new Set(["auto","none","0"]);function zC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!jC.has(i)&&Di(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=sg(n,o)}const $r=e=>e*180/Math.PI,uu=e=>{const t=$r(Math.atan2(e[1],e[0]));return du(t)},RC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:uu,rotateZ:uu,skewX:e=>$r(Math.atan(e[1])),skewY:e=>$r(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},du=e=>(e=e%360,e<0&&(e+=360),e),lg=uu,cg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ug=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),BC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cg,scaleY:ug,scale:e=>(cg(e)+ug(e))/2,rotateX:e=>du($r(Math.atan2(e[6],e[5]))),rotateY:e=>du($r(Math.atan2(-e[2],e[0]))),rotateZ:lg,rotate:lg,skewX:e=>$r(Math.atan(e[4])),skewY:e=>$r(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function dg(e){return e.includes("scale")?1:0}function fu(e,t){if(!e||e==="none")return dg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=BC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=RC,o=s}if(!o)return dg(t);const i=r[t],a=o[1].split(",").map(WC);return typeof i=="function"?i(a):a[i]}const HC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fu(n,t)};function WC(e){return parseFloat(e.trim())}const fg=e=>e===So||e===Te,qC=new Set(["x","y","z"]),UC=wo.filter(e=>!qC.has(e));function KC(e){const t=[];return UC.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})=>fu(t,"x"),y:(e,{transform:t})=>fu(t,"y")};Co.translateX=Co.x,Co.translateY=Co.y;const jr=new Set;let pu=!1,hu=!1;function pg(){if(hu){const e=Array.from(jr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=KC(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}hu=!1,pu=!1,jr.forEach(e=>e.complete()),jr.clear()}function hg(){jr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hu=!0)})}function YC(){hg(),pg()}class mu{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?(jr.add(this),pu||(pu=!0,nt.read(hg),nt.resolveKeyframes(pg))):(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),jr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,jr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const mg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),GC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ZC(e){const t=GC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const XC=4;function gg(e,t,n=1){sn(n<=XC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=ZC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return mg(a)?parseFloat(a):a}return zc(o)?gg(o,t,n+1):o}const vg=e=>t=>t.test(e),yg=[So,Te,kn,rr,zE,jE,{test:e=>e==="auto",parse:e=>e}],bg=e=>yg.find(vg(e));class xg extends mu{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(),zc(c))){const u=gg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Lm.has(r)||t.length!==2)return;const[o,i]=t,a=bg(o),s=bg(i);if(a!==s)if(fg(a)&&fg(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++)TC(t[o])&&r.push(o);r.length&&zC(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 wg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(or.test(e)||e==="0")&&!e.startsWith("url("));function QC(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 JC(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=wg(o,t),s=wg(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:QC(e)||(n==="spring"||Ya(n))&&r}const ek=e=>e!==null;function Za(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ek),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const tk=40;class Sg{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=Pn.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>tk?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&YC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Pn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!JC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(Za(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 Xa=2e4;function gu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Xa;)t+=n,r=e.next(t);return t>=Xa?1/0:t}const lt=(e,t,n)=>e+(t-e)*n;function vu(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 nk({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=vu(l,s,e+1/3),i=vu(l,s,e),a=vu(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Qa(e,t){return n=>n>0?t:e}const yu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},rk=[lu,Vr,Eo],ok=e=>rk.find(t=>t.test(e));function Tg(e){const t=ok(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=nk(n)),n}const Eg=(e,t)=>{const n=Tg(e),r=Tg(t);if(!n||!r)return Qa(e,t);const o={...n};return i=>(o.red=yu(n.red,r.red,i),o.green=yu(n.green,r.green,i),o.blue=yu(n.blue,r.blue,i),o.alpha=lt(n.alpha,r.alpha,i),Vr.transform(o))},ik=(e,t)=>n=>t(e(n)),Ni=(...e)=>e.reduce(ik),bu=new Set(["none","hidden"]);function ak(e,t){return bu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sk(e,t){return n=>lt(e,t,n)}function xu(e){return typeof e=="number"?sk:typeof e=="string"?zc(e)?Qa:Vt.test(e)?Eg:uk:Array.isArray(e)?Cg:typeof e=="object"?Vt.test(e)?Eg:lk:Qa}function Cg(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function lk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function ck(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 uk=(e,t)=>{const n=or.createTransformer(t),r=Di(e),o=Di(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?bu.has(e)&&!o.values.length||bu.has(t)&&!r.values.length?ak(e,t):Ni(Cg(ck(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.`),Qa(e,t))};function kg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):xu(e)(e,t)}const dk=5;function Pg(e,t,n){const r=Math.max(t-dk,0);return Vm(n-e(r),t-r)}const mt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ag=.001;function fk({duration:e=mt.duration,bounce:t=mt.bounce,velocity:n=mt.velocity,mass:r=mt.mass}){let o,i;yo(e<=mn(mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Un(mt.minDamping,mt.maxDamping,a),e=Un(mt.minDuration,mt.maxDuration,An(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=wu(c,a),m=Math.exp(-d);return Ag-p/f*m},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=wu(Math.pow(c,2),a);return(-o(c)+Ag>0?-1:1)*((p-f)*m)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=hk(o,i,s);if(e=mn(e),isNaN(l))return{stiffness:mt.stiffness,damping:mt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const pk=12;function hk(e,t,n){let r=n;for(let o=1;o<pk;o++)r=r-e(r)/t(r);return r}function wu(e,t){return e*Math.sqrt(1-t*t)}const mk=["duration","bounce"],gk=["stiffness","damping","mass"];function _g(e,t){return t.some(n=>e[n]!==void 0)}function vk(e){let t={velocity:mt.velocity,stiffness:mt.stiffness,damping:mt.damping,mass:mt.mass,isResolvedFromDuration:!1,...e};if(!_g(e,gk)&&_g(e,mk))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Un(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:mt.mass,stiffness:o,damping:i}}else{const n=fk(e);t={...t,...n,mass:mt.mass},t.isResolvedFromDuration=!0}return t}function Su(e=mt.visualDuration,t=mt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=vk({...n,velocity:-An(n.velocity||0)}),m=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,v=An(Math.sqrt(l/u)),b=Math.abs(h)<5;r||(r=b?mt.restSpeed.granular:mt.restSpeed.default),o||(o=b?mt.restDelta.granular:mt.restDelta.default);let x;if(g<1){const w=wu(v,g);x=E=>{const C=Math.exp(-g*v*E);return a-C*((m+g*v*h)/w*Math.sin(w*E)+h*Math.cos(w*E))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(h+(m+v*h)*w);else{const w=v*Math.sqrt(g*g-1);x=E=>{const C=Math.exp(-g*v*E),P=Math.min(w*E,300);return a-C*((m+g*v*h)*Math.sinh(P)+w*h*Math.cosh(P))/w}}const S={calculatedDuration:f&&d||null,next:w=>{const E=x(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?mn(m):Pg(x,w,E));const P=Math.abs(C)<=r,I=Math.abs(a-E)<=o;s.done=P&&I}return s.value=s.done?a:E,s},toString:()=>{const w=Math.min(gu(S),Xa),E=Bm(C=>S.next(w*C).value,w,30);return w+"ms "+E}};return S}function Ig({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=P=>s!==void 0&&P<s||l!==void 0&&P>l,m=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l;let g=n*t;const h=d+g,v=a===void 0?h:a(h);v!==h&&(g=v-d);const b=P=>-g*Math.exp(-P/r),x=P=>v+b(P),S=P=>{const I=b(P),_=x(P);p.done=Math.abs(I)<=c,p.value=p.done?v:_};let w,E;const C=P=>{f(p.value)&&(w=P,E=Su({keyframes:[p.value,m(p.value)],velocity:Pg(x,P,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:P=>{let I=!1;return!E&&w===void 0&&(I=!0,S(P),C(P)),w!==void 0&&P>=w?E.next(P-w):(!I&&S(P),p)}}}const yk=Oi(.42,0,1,1),bk=Oi(0,0,.58,1),Og=Oi(.42,0,.58,1),Mg=e=>Array.isArray(e)&&typeof e[0]!="number",Dg={linear:Ut,easeIn:yk,easeInOut:Og,easeOut:bk,circIn:ou,circInOut:Qm,circOut:Xm,backIn:ru,backInOut:Gm,backOut:Ym,anticipate:Zm},Tu=e=>{if(tu(e)){sn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Oi(t,n,r,o)}else if(typeof e=="string")return sn(Dg[e]!==void 0,`Invalid easing type '${e}'`),Dg[e];return e};function xk(e,t,n){const r=[],o=n||kg,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Ut:t;s=Ni(l,s)}r.push(s)}return r}function Ng(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(sn(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=xk(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=Lr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Un(e[0],e[i-1],u)):c}function Fg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Lr(0,t,r);e.push(lt(n,1,o))}}function Lg(e){const t=[0];return Fg(t,e.length-1),t}function wk(e,t){return e.map(n=>n*t)}function Sk(e,t){return e.map(()=>t||Og).splice(0,e.length-1)}function Fi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Mg(r)?r.map(Tu):Tu(r),i={done:!1,value:t[0]},a=wk(n&&n.length===t.length?n:Lg(t),e),s=Ng(a,t,{ease:Array.isArray(o)?o:Sk(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const Tk=e=>{const t=({timestamp:n})=>e(n);return{start:()=>nt.update(t,!0),stop:()=>qn(t),now:()=>Dt.isProcessing?Dt.timestamp:Pn.now()}},Ek={decay:Ig,inertia:Ig,tween:Fi,keyframes:Fi,spring:Su},Ck=e=>e/100;class Eu extends Sg{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)||mu,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=Ya(n)?n:Ek[n]||Fi;let l,c;process.env.NODE_ENV!=="production"&&s!==Fi&&sn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Fi&&typeof t[0]!="number"&&(l=Ni(Ck,kg(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=gu(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:m,repeatDelay:g,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),b=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),_=P%1;!_&&P>=1&&(_=1),_===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(m==="reverse"?(_=1-_,g&&(_-=g/d)):m==="mirror"&&(S=a)),x=Un(0,1,_)*d}const w=b?{done:!1,value:l[0]}:S.next(x);s&&(w.value=s(w.value));let{done:E}=w;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(w.value=Za(l,this.options,o)),h&&h(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?An(t.calculatedDuration):0}get time(){return An(this.currentTime)}set time(t){t=mn(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=An(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Tk,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 kk=new Set(["opacity","clipPath","filter","transform"]);function Pk(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=Wm(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 Ak=eu(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ja=10,_k=2e4;function Ik(e){return Ya(e.type)||e.type==="spring"||!Hm(e.ease)}function Ok(e,t){const n=new Eu({...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<_k;)r=n.sample(i),o.push(r.value),i+=Ja;return{times:void 0,keyframes:o,duration:i-Ja,ease:"linear"}}const Vg={anticipate:Zm,backInOut:Gm,circInOut:Qm};function Mk(e){return e in Vg}class $g extends Sg{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new xg(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"&&Ga()&&Mk(i)&&(i=Vg[i]),Ik(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=Ok(t,g);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,o=h.times,i=h.ease,a="keyframes"}const u=Pk(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Rm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(Za(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 An(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return An(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=mn(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;Rm(r,t)}return Ut}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,m=new Eu({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=mn(this.time);c.setWithVelocity(m.sample(g-Ja).value,m.sample(g).value,Ja)}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 Ak()&&r&&kk.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const Dk={type:"spring",stiffness:500,damping:25,restSpeed:10},Nk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fk={type:"keyframes",duration:.8},Lk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vk=(e,{keyframes:t})=>t.length>2?Fk:Fr.has(e)?e.startsWith("scale")?Nk(t[1]):Dk:Lk;function $k({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 Cu=(e,t,n,r={},o,i)=>a=>{const s=Zc(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-mn(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};$k(s)||(u={...u,...Vk(e,u)}),u.duration&&(u.duration=mn(u.duration)),u.repeatDelay&&(u.repeatDelay=mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=Za(u.keyframes,s);if(p!==void 0)return nt.update(()=>{u.onUpdate(p),u.onComplete()}),new zm([])}return!i&&$g.supports(u)?new $g(u):new Eu(u)};function jk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ku(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&&jk(u,d))continue;const m={delay:n,...Zc(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=jm(e);if(v){const b=window.MotionHandoffAnimation(v,d,nt);b!==null&&(m.startTime=b,g=!0)}}Jc(e,d),p.start(Cu(d,p,f,e.shouldReduceMotion&&Lm.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{nt.update(()=>{s&&hC(e,s)})}),c}function Pu(e,t,n={}){var r;const o=Ai(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(ku(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return zk(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 zk(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(Rk).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Pu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function Rk(e,t){return e.sortNodePosition(t)}function Bk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Pu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Pu(e,t,n);else{const o=typeof t=="function"?Ai(e,t,n.custom):t;r=Promise.all(ku(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function jg(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 Hk=Lc.length;function zg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?zg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Hk;n++){const r=Lc[n],o=e.props[r];(Ei(o)||o===!1)&&(t[r]=o)}return t}const Wk=[...Fc].reverse(),qk=Fc.length;function Uk(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Bk(e,n,r)))}function Kk(e){let t=Uk(e),n=Rg(),r=!0;const o=l=>(c,u)=>{var d;const p=Ai(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:m,...g}=p;c={...c,...g,...m}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=zg(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<qk;h++){const v=Wk[h],b=n[v],x=c[v]!==void 0?c[v]:u[v],S=Ei(x),w=v===l?b.isActive:null;w===!1&&(m=h);let E=x===u[v]&&x!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...f},!b.isActive&&w===null||!x&&!b.prevProp||Ba(x)||typeof x=="boolean")continue;const C=Yk(b.prevProp,x);let P=C||v===l&&b.isActive&&!E&&S||h>m&&S,I=!1;const _=Array.isArray(x)?x:[x];let F=_.reduce(o(v),{});w===!1&&(F={});const{prevResolvedValues:N={}}=b,V={...N,...F},A=j=>{P=!0,p.has(j)&&(I=!0,p.delete(j)),b.needsAnimating[j]=!0;const L=e.getValue(j);L&&(L.liveStyle=!1)};for(const j in V){const L=F[j],z=N[j];if(f.hasOwnProperty(j))continue;let D=!1;Yc(L)&&Yc(z)?D=!jg(L,z):D=L!==z,D?L!=null?A(j):p.add(j):L!==void 0&&p.has(j)?A(j):b.protectedKeys[j]=!0}b.prevProp=x,b.prevResolvedValues=F,b.isActive&&(f={...f,...F}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(E&&C)||I)&&d.push(..._.map(j=>({animation:j,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=Ai(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}p.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),h[v]=b??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){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=Rg(),r=!0}}}function Yk(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jg(t,e):!1}function zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rg(){return{animate:zr(!0),whileInView:zr(),whileHover:zr(),whileTap:zr(),whileDrag:zr(),whileFocus:zr(),exit:zr()}}class ir{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Gk extends ir{constructor(t){super(t),t.animationState||(t.animationState=Kk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ba(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 Zk=0;class Xk extends ir{constructor(){super(...arguments),this.id=Zk++}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 Qk={animation:{Feature:Gk},exit:{Feature:Xk}},gn={x:!1,y:!1};function Bg(){return gn.x||gn.y}function Jk(e){return e==="x"||e==="y"?gn[e]?null:(gn[e]=!0,()=>{gn[e]=!1}):gn.x||gn.y?null:(gn.x=gn.y=!0,()=>{gn.x=gn.y=!1})}function Li(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Vi(e){return{point:{x:e.pageX,y:e.pageY}}}const eP=e=>t=>Au(t)&&e(t,Vi(t));function $i(e,t,n,r){return Li(e,t,eP(n),r)}function Hg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nP(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 Wg=1e-4,rP=1-Wg,oP=1+Wg,qg=.01,iP=0-qg,aP=0+qg;function Bt(e){return e.max-e.min}function sP(e,t,n){return Math.abs(e-t)<=n}function Ug(e,t,n,r=.5){e.origin=r,e.originPoint=lt(t.min,t.max,e.origin),e.scale=Bt(n)/Bt(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=rP&&e.scale<=oP||isNaN(e.scale))&&(e.scale=1),(e.translate>=iP&&e.translate<=aP||isNaN(e.translate))&&(e.translate=0)}function ji(e,t,n,r){Ug(e.x,t.x,n.x,r?r.originX:void 0),Ug(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 lP(e,t,n){Kg(e.x,t.x,n.x),Kg(e.y,t.y,n.y)}function Yg(e,t,n){e.min=t.min-n.min,e.max=e.min+Bt(t)}function zi(e,t,n){Yg(e.x,t.x,n.x),Yg(e.y,t.y,n.y)}const Gg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ko=()=>({x:Gg(),y:Gg()}),Zg=()=>({min:0,max:0}),yt=()=>({x:Zg(),y:Zg()});function ln(e){return[e("x"),e("y")]}function _u(e){return e===void 0||e===1}function Iu({scale:e,scaleX:t,scaleY:n}){return!_u(e)||!_u(t)||!_u(n)}function Rr(e){return Iu(e)||Xg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Xg(e){return Qg(e.x)||Qg(e.y)}function Qg(e){return e&&e!=="0%"}function es(e,t,n){const r=e-n,o=t*r;return n+o}function Jg(e,t,n,r,o){return o!==void 0&&(e=es(e,o,r)),es(e,n,r)+t}function Ou(e,t=0,n=1,r,o){e.min=Jg(e.min,t,n,r,o),e.max=Jg(e.max,t,n,r,o)}function ev(e,{x:t,y:n}){Ou(e.x,t.translate,t.scale,t.originPoint),Ou(e.y,n.translate,n.scale,n.originPoint)}const tv=.999999999999,nv=1.0000000000001;function cP(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,ev(e,a)),r&&Rr(i.latestValues)&&Ao(e,i.latestValues))}t.x<nv&&t.x>tv&&(t.x=1),t.y<nv&&t.y>tv&&(t.y=1)}function Po(e,t){e.min=e.min+t,e.max=e.max+t}function rv(e,t,n,r,o=.5){const i=lt(e.min,e.max,o);Ou(e,t,n,i,r)}function Ao(e,t){rv(e.x,t.x,t.scaleX,t.scale,t.originX),rv(e.y,t.y,t.scaleY,t.scale,t.originY)}function ov(e,t){return Hg(nP(e.getBoundingClientRect(),t))}function uP(e,t,n){const r=ov(e,n),{scroll:o}=t;return o&&(Po(r.x,o.offset.x),Po(r.y,o.offset.y)),r}const iv=({current:e})=>e?e.ownerDocument.defaultView:null,av=(e,t)=>Math.abs(e-t);function dP(e,t){const n=av(e.x,t.x),r=av(e.y,t.y);return Math.sqrt(n**2+r**2)}class sv{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=Du(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=dP(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Dt;this.history.push({...m,timestamp:g});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Mu(p,this.transformPagePoint),nt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Du(d.type==="pointercancel"?this.lastMoveEventInfo:Mu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Vi(t),s=Mu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Du(s,this.history)),this.removeListeners=Ni($i(this.contextWindow,"pointermove",this.handlePointerMove),$i(this.contextWindow,"pointerup",this.handlePointerUp),$i(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qn(this.updatePoint)}}function Mu(e,t){return t?{point:t(e.point)}:e}function lv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Du({point:e},t){return{point:e,delta:lv(e,cv(t)),offset:lv(e,fP(t)),velocity:pP(t,.1)}}function fP(e){return e[0]}function cv(e){return e[e.length-1]}function pP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=cv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};const i=An(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 hP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?lt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?lt(n,e,r.max):Math.min(e,n)),e}function uv(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 mP(e,{top:t,left:n,bottom:r,right:o}){return{x:uv(e.x,n,o),y:uv(e.y,t,r)}}function dv(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 gP(e,t){return{x:dv(e.x,t.x),y:dv(e.y,t.y)}}function vP(e,t){let n=.5;const r=Bt(e),o=Bt(t);return o>r?n=Lr(t.min,t.max-r,e.min):r>o&&(n=Lr(e.min,e.max-o,t.min)),Un(0,1,n)}function yP(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 Nu=.35;function bP(e=Nu){return e===!1?e=0:e===!0&&(e=Nu),{x:fv(e,"left","right"),y:fv(e,"top","bottom")}}function fv(e,t,n){return{min:pv(e,t),max:pv(e,n)}}function pv(e,t){return typeof e=="number"?e:e[t]||0}const xP=new WeakMap;class wP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Vi(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Jk(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),ln(h=>{let v=this.getAxisMotionValue(h).get()||0;if(kn.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const x=b.layout.layoutBox[h];x&&(v=Bt(x)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&nt.postRender(()=>m(u,d)),Jc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=SP(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>ln(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 sv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:iv(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&&nt.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||!ts(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=hP(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=mP(o.layoutBox,n):this.constraints=!1,this.elastic=bP(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ln(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=yP(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xo(t))return!1;const r=t.current;sn(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=uP(r,o.root,this.visualElement.getTransformPagePoint());let a=gP(o.layout.layoutBox,i);if(n){const s=n(tP(a));this.hasMutatedConstraints=!!s,s&&(a=Hg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=ln(u=>{if(!ts(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jc(this.visualElement,t),r.start(Cu(t,r,0,n,this.visualElement,!1))}stopAnimation(){ln(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ln(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){ln(n=>{const{drag:r}=this.getProps();if(!ts(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-lt(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!xo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ln(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=vP({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ln(a=>{if(!ts(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(lt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;xP.set(this.visualElement,this);const t=this.visualElement.current,n=$i(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()),nt.read(r);const a=Li(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ln(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=Nu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function ts(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function SP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class TP extends ir{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new wP(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 hv=e=>(t,n)=>{e&&nt.postRender(()=>e(t,n))};class EP extends ir{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new sv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:hv(t),onStart:hv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&nt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=$i(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ri={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=mv(e,t.target.x),r=mv(e,t.target.y);return`${n}% ${r}%`}},CP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=or.parse(e);if(o.length>5)return r;const i=or.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=lt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class kP extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;$E(PP),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||nt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vc.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 gv(e){const[t,n]=im(),r=T.useContext(Ti);return y.jsx(kP,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(ym),isPresent:t,safeToRemove:n})}const PP={borderRadius:{...Ri,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ri,borderTopRightRadius:Ri,borderBottomLeftRadius:Ri,borderBottomRightRadius:Ri,boxShadow:CP};function vv(e,t,n){const r=Pt(e)?e:To(e);return r.start(Cu("",r,t,n)),r.animation}function yv(e){return e instanceof SVGElement&&e.tagName!=="svg"}const AP=(e,t)=>e.depth-t.depth;class _P{constructor(){this.children=[],this.isDirty=!1}add(t){Xc(this.children,t),this.isDirty=!0}remove(t){Ua(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AP),this.isDirty=!1,this.children.forEach(t)}}function IP(e,t){const n=Pn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(qn(r),e(i-t))};return nt.read(r,!0),()=>qn(r)}const bv=["TopLeft","TopRight","BottomLeft","BottomRight"],OP=bv.length,xv=e=>typeof e=="string"?parseFloat(e):e,wv=e=>typeof e=="number"||Te.test(e);function MP(e,t,n,r,o,i){o?(e.opacity=lt(0,n.opacity!==void 0?n.opacity:1,DP(r)),e.opacityExit=lt(t.opacity!==void 0?t.opacity:1,0,NP(r))):i&&(e.opacity=lt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<OP;a++){const s=`border${bv[a]}Radius`;let l=Sv(t,s),c=Sv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||wv(l)===wv(c)?(e[s]=Math.max(lt(xv(l),xv(c),r),0),(kn.test(c)||kn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,r))}function Sv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DP=Tv(0,.5,Xm),NP=Tv(.5,.95,Ut);function Tv(e,t,n){return r=>r<e?0:r>t?1:n(Lr(e,t,r))}function Ev(e,t){e.min=t.min,e.max=t.max}function cn(e,t){Ev(e.x,t.x),Ev(e.y,t.y)}function Cv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function kv(e,t,n,r,o){return e-=t,e=es(e,1/n,r),o!==void 0&&(e=es(e,1/o,r)),e}function FP(e,t=0,n=1,r=.5,o,i=e,a=e){if(kn.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=lt(i.min,i.max,r);e===i&&(s-=t),e.min=kv(e.min,t,n,s,o),e.max=kv(e.max,t,n,s,o)}function Pv(e,t,[n,r,o],i,a){FP(e,t[n],t[r],t[o],t.scale,i,a)}const LP=["x","scaleX","originX"],VP=["y","scaleY","originY"];function Av(e,t,n,r){Pv(e.x,t,LP,n?n.x:void 0,r?r.x:void 0),Pv(e.y,t,VP,n?n.y:void 0,r?r.y:void 0)}function _v(e){return e.translate===0&&e.scale===1}function Iv(e){return _v(e.x)&&_v(e.y)}function Ov(e,t){return e.min===t.min&&e.max===t.max}function $P(e,t){return Ov(e.x,t.x)&&Ov(e.y,t.y)}function Mv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dv(e,t){return Mv(e.x,t.x)&&Mv(e.y,t.y)}function Nv(e){return Bt(e.x)/Bt(e.y)}function Fv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class jP{constructor(){this.members=[]}add(t){Xc(this.members,t),t.scheduleRender()}remove(t){if(Ua(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 zP(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const Fu=["","X","Y","Z"],RP={visibility:"hidden"},Lv=1e3;let BP=0;function Lu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Vv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=jm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",nt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Vv(r)}function $v({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=BP++,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(qP),this.nodes.forEach(ZP),this.nodes.forEach(XP),this.nodes.forEach(UP)},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 _P)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Qc),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=yv(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=IP(p,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(zv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||nA,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Dv(this.targetLayout,m),x=!p&&f;if(this.options.layoutRoot||this.resumeFrom||x||p&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const S={...Zc(g,"layout"),onPlay:h,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||zv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,qn(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(QP),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jv);return}this.isUpdating||this.nodes.forEach(YP),this.isUpdating=!1,this.nodes.forEach(GP),this.nodes.forEach(HP),this.nodes.forEach(WP),this.clearAllSnapshots();const s=Pn.now();Dt.delta=Un(0,1e3/60,s-Dt.timestamp),Dt.timestamp=s,Dt.isProcessing=!0,Nc.update.process(Dt),Nc.preRender.process(Dt),Nc.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KP),this.sharedNodes.forEach(JP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){nt.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=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){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&&!Iv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Rr(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)),rA(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return yt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(oA))){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=yt();if(cn(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&&cn(l,a),Po(l.x,d.offset.x),Po(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=yt();cn(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}),Rr(u.latestValues)&&Ao(l,u.latestValues)}return Rr(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(a){const s=yt();cn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Rr(c.latestValues))continue;Iu(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();cn(u,d),Av(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Rr(this.latestValues)&&Av(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=yt(),this.relativeTargetOrigin=yt(),zi(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):cn(this.target,this.layout.layoutBox),ev(this.target,this.targetDelta)):cn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),zi(this.relativeTargetOrigin,this.target,f.target),cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Iu(this.parent.latestValues)||Xg(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;cn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;cP(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=yt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Cv(this.prevProjectionDelta.x,this.projectionDelta.x),Cv(this.prevProjectionDelta.y,this.projectionDelta.y)),ji(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Fv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Fv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=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=yt(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),v=!h||h.members.length<=1,b=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(tA));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const w=S/1e3;Rv(d.x,a.x,w),Rv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),eA(this.relativeTarget,this.relativeTargetOrigin,p,w),x&&$P(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),cn(x,this.relativeTarget)),g&&(this.animationValues=u,MP(u,c,this.latestValues,w,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(qn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nt.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=vv(0,Lv,{...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(Lv),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&&Uv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();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}cn(s,l),Ao(s,u),ji(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new jP),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&&Lu("z",a,c,this.animationValues);for(let u=0;u<Fu.length;u++)Lu(`rotate${Fu[u]}`,a,c,this.animationValues),Lu(`skew${Fu[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 RP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=qa(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=qa(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Rr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=zP(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Ci){if(p[g]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:b}=Ci[g],x=c.transform==="none"?p[g]:h(p[g],d);if(v){const S=v.length;for(let w=0;w<S;w++)c[v[w]]=x}else b?this.options.visualElement.renderState.vars[g]=x:c[g]=x}return this.options.layoutId&&(c.pointerEvents=d===this?qa(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(jv),this.root.sharedNodes.clear()}}}function HP(e){e.updateLayout()}function WP(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"?ln(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(p);p.min=r[d].min,p.max=p.min+f}):Uv(i,n.layoutBox,r)&&ln(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();ji(s,r,n.layoutBox);const l=ko();a?ji(l,e.applyTransform(o,!0),n.measuredBox):ji(l,r,n.layoutBox);const c=!Iv(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const m=yt();zi(m,n.layoutBox,p.layoutBox);const g=yt();zi(g,r,f.layoutBox),Dv(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function qP(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 UP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function KP(e){e.clearSnapshot()}function jv(e){e.clearMeasurements()}function YP(e){e.isLayoutDirty=!1}function GP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ZP(e){e.resolveTargetDelta()}function XP(e){e.calcProjection()}function QP(e){e.resetSkewAndRotation()}function JP(e){e.removeLeadSnapshot()}function Rv(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bv(e,t,n,r){e.min=lt(t.min,n.min,r),e.max=lt(t.max,n.max,r)}function eA(e,t,n,r){Bv(e.x,t.x,n.x,r),Bv(e.y,t.y,n.y,r)}function tA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const nA={duration:.45,ease:[.4,0,.1,1]},Hv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Wv=Hv("applewebkit/")&&!Hv("chrome/")?Math.round:Ut;function qv(e){e.min=Wv(e.min),e.max=Wv(e.max)}function rA(e){qv(e.x),qv(e.y)}function Uv(e,t,n){return e==="position"||e==="preserve-aspect"&&!sP(Nv(t),Nv(n),.2)}function oA(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const iA=$v({attachResizeListener:(e,t)=>Li(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vu={current:void 0},Kv=$v({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vu.current){const e=new iA({});e.mount(window),e.setOptions({layoutScroll:!0}),Vu.current=e}return Vu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),aA={pan:{Feature:EP},drag:{Feature:TP,ProjectionNode:Kv,MeasureLayout:gv}};function Yv(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 Gv(e,t){const n=Yv(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Zv(e){return!(e.pointerType==="touch"||Bg())}function sA(e,t,n={}){const[r,o,i]=Gv(e,n),a=s=>{if(!Zv(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Zv(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Xv(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&&nt.postRender(()=>i(t,Vi(t)))}class lA extends ir{mount(){const{current:t}=this.node;t&&(this.unmount=sA(t,(n,r)=>(Xv(this.node,r,"Start"),o=>Xv(this.node,o,"End"))))}unmount(){}}class cA extends ir{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ni(Li(this.node.current,"focus",()=>this.onFocus()),Li(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Qv=(e,t)=>t?e===t?!0:Qv(e,t.parentElement):!1,uA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function dA(e){return uA.has(e.tagName)||e.tabIndex!==-1}const Bi=new WeakSet;function Jv(e){return t=>{t.key==="Enter"&&e(t)}}function $u(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fA=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Jv(()=>{if(Bi.has(n))return;$u(n,"down");const o=Jv(()=>{$u(n,"up")}),i=()=>$u(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 ey(e){return Au(e)&&!Bg()}function pA(e,t,n={}){const[r,o,i]=Gv(e,n),a=s=>{const l=s.currentTarget;if(!ey(s)||Bi.has(l))return;Bi.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!ey(f)||!Bi.has(l))&&(Bi.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Qv(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>fA(c,o)),!dA(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function ty(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&&nt.postRender(()=>i(t,Vi(t)))}class hA extends ir{mount(){const{current:t}=this.node;t&&(this.unmount=pA(t,(n,r)=>(ty(this.node,r,"Start"),(o,{success:i})=>ty(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ju=new WeakMap,zu=new WeakMap,mA=e=>{const t=ju.get(e.target);t&&t(e)},gA=e=>{e.forEach(mA)};function vA({root:e,...t}){const n=e||document;zu.has(n)||zu.set(n,{});const r=zu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(gA,{root:e,...t})),r[o]}function yA(e,t,n){const r=vA(t);return ju.set(e,n),r.observe(e),()=>{ju.delete(e),r.unobserve(e)}}const bA={some:0,all:1};class xA extends ir{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:bA[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 yA(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(wA(t,n))&&this.startObserver()}unmount(){}}function wA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const SA={inView:{Feature:xA},tap:{Feature:hA},focus:{Feature:cA},hover:{Feature:lA}},TA={layout:{ProjectionNode:Kv,MeasureLayout:gv}},Ru={current:null},ny={current:!1};function EA(){if(ny.current=!0,!!Dc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ru.current=e.matches;e.addListener(t),t()}else Ru.current=!1}const CA=[...yg,Vt,or],kA=e=>CA.find(vg(e)),Hi=new WeakMap;function PA(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&za(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,To(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,To(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ry=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class oy{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=mu,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=Pn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,nt.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=Ha(n),this.isVariantNode=mm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const m=p[f];l[f]!==void 0&&Pt(m)&&m.set(l[f],!1)}}mount(t){this.current=t,Hi.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),ny.current||EA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ru.current,process.env.NODE_ENV!=="production"&&za(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qn(this.notifyUpdate),qn(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=Fr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&nt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in bo){const n=bo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ry.length;r++){const o=ry[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=PA(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=To(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"&&(mg(o)||Jm(o))?o=parseFloat(o):!kA(o)&&or.test(n)&&(o=sg(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=Kc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Qc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class iy extends oy{constructor(){super(...arguments),this.KeyframeResolver=xg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function AA(e){return window.getComputedStyle(e)}class ay extends iy{constructor(){super(...arguments),this.type="html",this.renderInstance=Om}readValueFromInstance(t,n){if(Fr.has(n))return HC(t,n);{const r=AA(t),o=(jc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ov(t,n)}build(t,n,r){Bc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Gc(t,n,r)}}class sy extends iy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Im(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fr.has(n)){const r=ag(n);return r&&r.default||0}return n=Mm.has(n)?n:$c(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Nm(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&nt.postRender(this.updateDimensions)}build(t,n,r){qc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Dm(t,n,r,o)}mount(t){this.isSVGTag=Uc(t.tagName),super.mount(t)}}const _A=(e,t)=>Wc(e)?new sy(t):new ay(t,{allowProjection:e!==T.Fragment}),IA=lC({...Qk,...SA,...aA,...TA},_A),pt=CE(IA);function OA(e){return T.useEffect(()=>()=>e(),[])}function rs(e){const t=hn(()=>To(e)),{isStatic:n}=T.useContext(vo);if(n){const[,r]=T.useState(e);T.useEffect(()=>t.on("change",r),[])}return t}function ly(e,t){const n=rs(t()),r=()=>n.set(t());return r(),Fa(()=>{const o=()=>nt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),qn(r)}}),n}const MA=e=>e&&typeof e=="object"&&e.mix,DA=e=>MA(e)?e.mix:void 0;function NA(...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=Ng(o,i,{mixer:DA(i[0]),...a});return t?s(r):s}function FA(e){_i.current=[],e();const t=ly(_i.current,e);return _i.current=void 0,t}function LA(e,t,n,r){if(typeof e=="function")return FA(e);const o=typeof t=="function"?t:NA(t,n,r);return Array.isArray(e)?cy(e,o):cy([e],([i])=>o(i))}function cy(e,t){const n=hn(()=>[]);return ly(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function VA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(gu(r),Xa);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:An(o)}}const $A=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function uy(e,t){return Mg(e)?e[$A(0,e.length,t)]:e}function Bu(e){return typeof e=="object"&&!Array.isArray(e)}function dy(e,t,n,r){return typeof e=="string"&&Bu(t)?Yv(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function jA(e,t,n){return e*(t+1)}function fy(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 zA(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ua(e,o),r--)}}function RA(e,t,n,r,o,i){zA(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:lt(o,i,r[a]),easing:uy(n,a)})}function BA(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function HA(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const WA="easeInOut",qA=20;function UA(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const m=e[f];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,fy(d,m.at,u,c));continue}let[g,h,v={}]=m;v.at!==void 0&&(d=fy(d,v.at,u,c));let b=0;const x=(S,w,E,C=0,P=0)=>{const I=KA(S),{delay:_=0,times:F=Lg(I),type:N="keyframes",repeat:V,repeatType:A,repeatDelay:M=0,...O}=w;let{ease:j=t.ease||"easeOut",duration:L}=w;const z=typeof _=="function"?_(C,P):_,D=I.length,B=Ya(N)?N:o==null?void 0:o[N];if(D<=2&&B){let G=100;if(D===2&&ZA(I)){const $=I[1]-I[0];G=Math.abs($)}const Y={...O};L!==void 0&&(Y.duration=mn(L));const Z=VA(Y,G,B);j=Z.ease,L=Z.duration}L??(L=i);const X=d+z;F.length===1&&F[0]===0&&(F[1]=1);const Q=F.length-I.length;if(Q>0&&Fg(F,Q),I.length===1&&I.unshift(null),V){sn(V<qA,"Repeat count too high, must be less than 20"),L=jA(L,V);const G=[...I],Y=[...F];j=Array.isArray(j)?[...j]:[j];const Z=[...j];for(let $=0;$<V;$++){I.push(...G);for(let R=0;R<G.length;R++)F.push(Y[R]+($+1)),j.push(R===0?"linear":uy(Z,R-1))}BA(F,V)}const J=X+L;RA(E,I,j,F,X,J),b=Math.max(z+L,b),p=Math.max(J,p)};if(Pt(g)){const S=py(g,s);x(h,v,hy("default",S))}else{const S=dy(g,h,r,l),w=S.length;for(let E=0;E<w;E++){h=h,v=v;const C=S[E],P=py(C,s);for(const I in h)x(h[I],YA(v,I),hy(I,P),E,w)}}u=d,d+=b}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(HA);const v=[],b=[],x=[];for(let w=0;w<h.length;w++){const{at:E,value:C,easing:P}=h[w];v.push(C),b.push(Lr(0,p,E)),x.push(P||"easeOut")}b[0]!==0&&(b.unshift(0),v.unshift(v[0]),x.unshift(WA)),b[b.length-1]!==1&&(b.push(1),v.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const S=a.get(m);S.keyframes[g]=v,S.transition[g]={...t,duration:p,ease:x,times:b,...n}}}),a}function py(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function hy(e,t){return t[e]||(t[e]=[]),t[e]}function KA(e){return Array.isArray(e)?e:[e]}function YA(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const GA=e=>typeof e=="number",ZA=e=>e.every(GA);function XA(e,t){return e in t}class QA extends oy{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(XA(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function JA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=yv(e)?new sy(t):new ay(t);n.mount(e),Hi.set(e,n)}function e_(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new QA(t);n.mount(e),Hi.set(e,n)}function t_(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Bu(t)}function my(e,t,n,r){const o=[];if(t_(e,t))o.push(vv(e,Bu(t)&&t.default||t,n&&(n.default||n)));else{const i=dy(e,t,r),a=i.length;sn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?JA:e_;Hi.has(l)||c(l);const u=Hi.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...ku(u,{...t,transition:d},{}))}}return o}function n_(e,t,n){const r=[];return UA(e,t,n,{spring:Su}).forEach(({keyframes:i,transition:a},s)=>{r.push(...my(s,i,a))}),r}function r_(e){return Array.isArray(e)&&e.some(Array.isArray)}function o_(e){function t(n,r,o){let i=[];r_(n)?i=n_(n,r,e):i=my(n,r,o,e);const a=new zm(i);return e&&e.animations.push(a),a}return t}function i_(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>o_(e));return OA(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class a_{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 s_=()=>new a_;function l_(){return hn(s_)}function c_(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function u_(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:c_(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Tu(r)(l/c)*c}return t+l}}const gy=T.createContext(null);function d_(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=lt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?cC(e,o,o+i):e}function f_({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=hn(()=>pt[t]),l=[],c=T.useRef(!1);sn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(m=>d===m.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(h_)},updateOrder:(d,p,f)=>{if(c.current)return;const m=d_(l,d,p,f);l!==m&&(c.current=!0,r(m.map(p_).filter(g=>o.indexOf(g)!==-1)))}};return T.useEffect(()=>{c.current=!1}),y.jsx(s,{...i,ref:a,ignoreStrict:!0,children:y.jsx(gy.Provider,{value:u,children:e})})}const vy=T.forwardRef(f_);function p_(e){return e.value}function h_(e,t){return e.layout.min-t.layout.min}function yy(e,t=0){return Pt(e)?e:rs(t)}function m_({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=hn(()=>pt[r]),c=T.useContext(gy),u={x:yy(t.x),y:yy(t.y)},d=LA([u.x,u.y],([g,h])=>g||h?1:"unset");sn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=c;return y.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:v}=h;v[p]&&m(n,u[p].get(),v[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const by=T.forwardRef(m_);/**
12
+ `),()=>{document.head.removeChild(f)}},[t]),y.jsx(lE,{isPresent:t,childRef:o,sizeRef:i,children:k.cloneElement(e,{ref:o})})}const uE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=hn(dE),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),k.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=y.jsx(cE,{isPresent:n,anchorX:s,children:e})),y.jsx(Va.Provider,{value:d,children:e})};function dE(){return new Map}function im(e=!0){const t=E.useContext(Va);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const $a=e=>e.key||"";function am(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const nr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=im(a),u=E.useMemo(()=>am(e),[e]),d=a&&!l?[]:u.map($a),p=E.useRef(!0),f=E.useRef(u),m=hn(()=>new Map),[g,h]=E.useState(u),[v,b]=E.useState(u);La(()=>{p.current=!1,f.current=u;for(let w=0;w<v.length;w++){const T=$a(v[w]);d.includes(T)?m.delete(T):m.get(T)!==!0&&m.set(T,!1)}},[v,d.length,d.join("-")]);const x=[];if(u!==g){let w=[...u];for(let T=0;T<v.length;T++){const C=v[T],P=$a(C);d.includes(P)||(w.splice(T,0,C),x.push(C))}return i==="wait"&&x.length&&(w=x),b(am(w)),h(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=E.useContext(Ei);return y.jsx(y.Fragment,{children:v.map(w=>{const T=$a(w),C=a&&!l?!1:u===v||d.includes(T),P=()=>{if(m.has(T))m.set(T,!0);else return;let I=!0;m.forEach(A=>{A||(I=!1)}),I&&(S==null||S(),b(f.current),a&&(c==null||c()),r&&r())};return y.jsx(uE,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:P,anchorX:s,children:w},T)})})},fE=E.createContext(null),Ut=e=>e;let yo=Ut,sn=Ut;process.env.NODE_ENV!=="production"&&(yo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},sn=(e,t)=>{if(!e)throw new Error(t)});const pE={useManualTiming:!1},ja=["read","resolveKeyframes","update","preRender","render","postRender"];function hE(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const m=p&&o?n:r;return d&&a.add(u),m.has(u)||m.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const mE=40;function sm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ja.reduce((v,b)=>(v[b]=hE(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,mE),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},m=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:ja.reduce((v,b)=>{const x=a[b];return v[b]=(S,w=!1,T=!1)=>(n||m(),x.schedule(S,w,T)),v},{}),cancel:v=>{for(let b=0;b<ja.length;b++)a[ja[b]].cancel(v)},state:o,steps:a}}const{schedule:nt,cancel:qn,state:Dt,steps:Nc}=sm(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);function gE(){const e=E.useRef(!1);return La(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function vE(){const e=gE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>nt.postRender(r),[r]),t]}const yE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function lm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(yE);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 cm=e=>e===!0,bE=e=>cm(e===!0)||e==="id",xE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Ei),o=E.useContext(fE),[i,a]=vE(),s=E.useRef(null),l=r.id||o;s.current===null&&(bE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:cm(n)&&r.group||lm()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return y.jsx(Ei.Provider,{value:c,children:e})},um=E.createContext({strict:!1}),dm={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 dm)bo[e]={isEnabled:t=>dm[e].some(n=>!!t[n])};function wE(e){for(const t in e)bo[t]={...bo[t],...e[t]}}const SE=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 za(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||SE.has(e)}let fm=e=>!za(e);function pm(e){e&&(fm=t=>t.startsWith("on")?!za(t):e(t))}try{pm(require("@emotion/is-prop-valid").default)}catch{}function TE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(fm(o)||n===!0&&za(o)||!t&&!za(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function EE({children:e,isValidProp:t,...n}){t&&pm(t),n={...E.useContext(vo),...n},n.isStatic=hn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return y.jsx(vo.Provider,{value:r,children:e})}const hm=new Set;function Ra(e,t,n){e||hm.has(t)||(console.warn(t),hm.add(t))}function CE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ra(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Ba=E.createContext({});function Ha(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ci(e){return typeof e=="string"||Array.isArray(e)}const Fc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lc=["initial",...Fc];function Wa(e){return Ha(e.animate)||Lc.some(t=>Ci(e[t]))}function mm(e){return!!(Wa(e)||e.variants)}function kE(e,t){if(Wa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ci(n)?n:void 0,animate:Ci(r)?r:void 0}}return e.inherit!==!1?t:{}}function PE(e){const{initial:t,animate:n}=kE(e,E.useContext(Ba));return E.useMemo(()=>({initial:t,animate:n}),[gm(t),gm(n)])}function gm(e){return Array.isArray(e)?e.join(" "):e}const AE=Symbol.for("motionComponentSymbol");function xo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _E(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:Vc}=sm(queueMicrotask,!1),$c=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vm="data-"+$c("framerAppearId"),ym=E.createContext({});function IE(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(Ba),l=E.useContext(um),c=E.useContext(Va),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(ym);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&OE(d.current,n,o,f);const m=E.useRef(!1);E.useInsertionEffect(()=>{p&&m.current&&p.update(n,c)});const g=n[vm],h=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return La(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Vc.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),h.current=!1))}),p}function OE(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:bm(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 bm(e){if(e)return e.options.allowProjection!==!1?e.projection:bm(e.parent)}function ME({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&wE(e);function s(c,u){let d;const p={...E.useContext(vo),...c,layoutId:DE(c)},{isStatic:f}=p,m=PE(c),g=r(c,f);if(!f&&Dc){NE(p,e);const h=FE(p);d=h.MeasureLayout,m.visualElement=IE(o,g,p,t,h.ProjectionNode)}return y.jsxs(Ba.Provider,{value:m,children:[d&&m.visualElement?y.jsx(d,{visualElement:m.visualElement,...p}):null,n(o,c,_E(g,m.visualElement,u),g,f,m.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[AE]=o,l}function DE({layoutId:e}){const t=E.useContext(Ei).id;return t&&e!==void 0?t+"-"+e:e}function NE(e,t){const n=E.useContext(um).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):sn(!1,r)}}function FE(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 xm=e=>t=>typeof t=="string"&&t.startsWith(e),jc=xm("--"),LE=xm("var(--"),zc=e=>LE(e)?VE.test(e.split("/*")[0].trim()):!1,VE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ki={};function $E(e){for(const t in e)ki[t]=e[t],jc(t)&&(ki[t].isCSSVariable=!0)}const wo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lr=new Set(wo);function wm(e,{layout:t,layoutId:n}){return Lr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ki[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),Sm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Un=(e,t,n)=>n>t?t:n<e?e:n,So={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pi={...So,transform:e=>Un(0,1,e)},qa={...So,default:1},Ai=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rr=Ai("deg"),kn=Ai("%"),Te=Ai("px"),jE=Ai("vh"),zE=Ai("vw"),Tm={...kn,parse:e=>kn.parse(e)/100,transform:e=>kn.transform(e*100)},RE={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},BE={rotate:rr,rotateX:rr,rotateY:rr,rotateZ:rr,scale:qa,scaleX:qa,scaleY:qa,scaleZ:qa,skew:rr,skewX:rr,skewY:rr,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:Pi,originX:Tm,originY:Tm,originZ:Te},Em={...So,transform:Math.round},Rc={...RE,...BE,zIndex:Em,size:Te,fillOpacity:Pi,strokeOpacity:Pi,numOctaves:Em},HE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WE=wo.length;function qE(e,t,n){let r="",o=!0;for(let i=0;i<WE;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=Sm(s,Rc[a]);if(!l){o=!1;const u=HE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Bc(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(Lr.has(l)){a=!0;continue}else if(jc(l)){o[l]=c;continue}else{const u=Sm(c,Rc[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=qE(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 Hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cm(e,t,n){for(const r in t)!Pt(t[r])&&!wm(r,n)&&(e[r]=t[r])}function UE({transformTemplate:e},t){return E.useMemo(()=>{const n=Hc();return Bc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function KE(e,t){const n=e.style||{},r={};return Cm(r,n,e),Object.assign(r,UE(e,t)),r}function YE(e,t){const n={},r=KE(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 GE=["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 Wc(e){return typeof e!="string"||e.includes("-")?!1:!!(GE.indexOf(e)>-1||/[A-Z]/u.test(e))}const ZE={offset:"stroke-dashoffset",array:"stroke-dasharray"},XE={offset:"strokeDashoffset",array:"strokeDasharray"};function QE(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ZE:XE;e[i.offset]=Te.transform(-r);const a=Te.transform(t),s=Te.transform(n);e[i.array]=`${a} ${s}`}function km(e,t,n){return typeof e=="string"?e:Te.transform(t+n*e)}function JE(e,t,n){const r=km(t,e.x,e.width),o=km(n,e.y,e.height);return`${r} ${o}`}function qc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Bc(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=JE(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&QE(p,a,s,l,!1)}const Pm=()=>({...Hc(),attrs:{}}),Uc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function eC(e,t,n,r){const o=E.useMemo(()=>{const i=Pm();return qc(i,t,Uc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Cm(i,e.style,e),o.style={...i,...o.style}}return o}function tC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(Wc(n)?eC:YE)(r,i,a,n),c=TE(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>Pt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Am(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Kc(e,t,n,r){if(typeof t=="function"){const[o,i]=Am(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]=Am(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Yc=e=>Array.isArray(e),nC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),rC=e=>Yc(e)?e[e.length-1]||0:e;function Ua(e){const t=Pt(e)?e.get():e;return nC(t)?t.toValue():t}function oC({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:iC(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const _m=e=>(t,n)=>{const r=E.useContext(Ba),o=E.useContext(Va),i=()=>oC(e,t,r,o);return n?i():hn(i)};function iC(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Ua(i[p]);let{initial:a,animate:s}=e;const l=Wa(e),c=mm(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!Ha(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const m=Kc(e,p[f]);if(m){const{transitionEnd:g,transition:h,...v}=m;for(const b in v){let x=v[b];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[b]=x)}for(const b in g)o[b]=g[b]}}}return o}function Gc(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||wm(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 aC={useVisualState:_m({scrapeMotionValuesFromProps:Gc,createRenderState:Hc})};function Im(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 Om(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 Mm=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 Dm(e,t,n,r){Om(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Mm.has(o)?o:$c(o),t.attrs[o])}function Nm(e,t,n){const r=Gc(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=wo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Fm=["x","y","width","height","cx","cy","r"],sC={useVisualState:_m({scrapeMotionValuesFromProps:Nm,createRenderState:Pm,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(Lr.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Fm.length;s++){const l=Fm[s];e[l]!==t[l]&&(a=!0)}a&&nt.read(()=>{Im(n,r),nt.render(()=>{qc(r,o,Uc(n.tagName),e.transformTemplate),Dm(n,r)})})}})};function lC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Wc(r)?sC:aC,preloadedFeatures:e,useRender:tC(o),createVisualElement:t,Component:r};return ME(a)}}function _i(e,t,n){const r=e.getProps();return Kc(r,t,n!==void 0?n:r.custom,e)}function Zc(e,t){return e?e[t]||e.default||e:void 0}const Lm=new Set(["width","height","top","left","right","bottom",...wo]);function Xc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ka(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function cC([...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 Qc{constructor(){this.subscriptions=[]}add(t){return Xc(this.subscriptions,t),()=>Ka(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 Vm(e,t){return t?e*(1e3/t):0}let Ya;function uC(){Ya=void 0}const Pn={now:()=>(Ya===void 0&&Pn.set(Dt.isProcessing||pE.useManualTiming?Dt.timestamp:performance.now()),Ya),set:e=>{Ya=e,queueMicrotask(uC)}},$m=30,dC=e=>!isNaN(parseFloat(e)),Ii={current:void 0};class fC{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Pn.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=Pn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=dC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ra(!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 Qc);const r=this.events[t].add(n);return t==="change"?()=>{r(),nt.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 Ii.current&&Ii.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Pn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$m)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$m);return Vm(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 To(e,t){return new fC(e,t)}function pC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,To(n))}function hC(e,t){const n=_i(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=rC(i[a]);pC(e,a,s)}}function mC(e){return!!(Pt(e)&&e.add)}function Jc(e,t){const n=e.getValue("willChange");if(mC(n))return n.add(t)}function jm(e){return e.props[vm]}function eu(e){let t;return()=>(t===void 0&&(t=e()),t)}const gC=eu(()=>window.ScrollTimeline!==void 0);class vC{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(gC()&&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 zm extends vC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const mn=e=>e*1e3,An=e=>e/1e3;function Ga(e){return typeof e=="function"}function Rm(e,t){e.timeline=t,e.onfinish=null}const tu=e=>Array.isArray(e)&&typeof e[0]=="number",yC={linearEasing:void 0};function bC(e,t){const n=eu(e);return()=>{var r;return(r=yC[t])!==null&&r!==void 0?r:n()}}const Za=bC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Bm=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Vr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Hm(e){return!!(typeof e=="function"&&Za()||!e||typeof e=="string"&&(e in nu||Za())||tu(e)||Array.isArray(e)&&e.every(Hm))}const Oi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Oi([0,.65,.55,1]),circOut:Oi([.55,0,1,.45]),backIn:Oi([.31,.01,.66,-.59]),backOut:Oi([.33,1.53,.69,.99])};function Wm(e,t){if(e)return typeof e=="function"&&Za()?Bm(e,t):tu(e)?Oi(e):Array.isArray(e)?e.map(n=>Wm(n,t)||nu.easeOut):nu[e]}const qm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,xC=1e-7,wC=12;function SC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=qm(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>xC&&++s<wC);return a}function Mi(e,t,n,r){if(e===t&&n===r)return Ut;const o=i=>SC(i,0,1,e,n);return i=>i===0||i===1?i:qm(o(i),t,r)}const Um=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Km=e=>t=>1-e(1-t),Ym=Mi(.33,1.53,.69,.99),ru=Km(Ym),Gm=Um(ru),Zm=e=>(e*=2)<1?.5*ru(e):.5*(2-Math.pow(2,-10*(e-1))),ou=e=>1-Math.sin(Math.acos(e)),Xm=Km(ou),Qm=Um(ou),Jm=e=>/^0[^.\s]+$/u.test(e);function TC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Jm(e):!0}const Di=e=>Math.round(e*1e5)/1e5,iu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function EC(e){return e==null}const CC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,au=(e,t)=>n=>!!(typeof n=="string"&&CC.test(n)&&n.startsWith(e)||t&&!EC(n)&&Object.prototype.hasOwnProperty.call(n,t)),eg=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(iu);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},kC=e=>Un(0,255,e),su={...So,transform:e=>Math.round(kC(e))},$r={test:au("rgb","red"),parse:eg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+su.transform(e)+", "+su.transform(t)+", "+su.transform(n)+", "+Di(Pi.transform(r))+")"};function PC(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 lu={test:au("#"),parse:PC,transform:$r.transform},Eo={test:au("hsl","hue"),parse:eg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+kn.transform(Di(t))+", "+kn.transform(Di(n))+", "+Di(Pi.transform(r))+")"},Vt={test:e=>$r.test(e)||lu.test(e)||Eo.test(e),parse:e=>$r.test(e)?$r.parse(e):Eo.test(e)?Eo.parse(e):lu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$r.transform(e):Eo.transform(e)},AC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _C(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(iu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(AC))===null||n===void 0?void 0:n.length)||0)>0}const tg="number",ng="color",IC="var",OC="var(",rg="${}",MC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ni(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(MC,l=>(Vt.test(l)?(r.color.push(i),o.push(ng),n.push(Vt.parse(l))):l.startsWith(OC)?(r.var.push(i),o.push(IC),n.push(l)):(r.number.push(i),o.push(tg),n.push(parseFloat(l))),++i,rg)).split(rg);return{values:n,split:s,indexes:r,types:o}}function og(e){return Ni(e).values}function ig(e){const{split:t,types:n}=Ni(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===tg?i+=Di(o[a]):s===ng?i+=Vt.transform(o[a]):i+=o[a]}return i}}const DC=e=>typeof e=="number"?0:e;function NC(e){const t=og(e);return ig(e)(t.map(DC))}const or={test:_C,parse:og,createTransformer:ig,getAnimatableNone:NC},FC=new Set(["brightness","contrast","saturate","opacity"]);function LC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(iu)||[];if(!r)return e;const o=n.replace(r,"");let i=FC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const VC=/\b([a-z-]*)\(.*?\)/gu,cu={...or,getAnimatableNone:e=>{const t=e.match(VC);return t?t.map(LC).join(" "):e}},$C={...Rc,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:cu,WebkitFilter:cu},ag=e=>$C[e];function sg(e,t){let n=ag(e);return n!==cu&&(n=or),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jC=new Set(["auto","none","0"]);function zC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!jC.has(i)&&Ni(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=sg(n,o)}const jr=e=>e*180/Math.PI,uu=e=>{const t=jr(Math.atan2(e[1],e[0]));return du(t)},RC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:uu,rotateZ:uu,skewX:e=>jr(Math.atan(e[1])),skewY:e=>jr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},du=e=>(e=e%360,e<0&&(e+=360),e),lg=uu,cg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ug=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),BC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cg,scaleY:ug,scale:e=>(cg(e)+ug(e))/2,rotateX:e=>du(jr(Math.atan2(e[6],e[5]))),rotateY:e=>du(jr(Math.atan2(-e[2],e[0]))),rotateZ:lg,rotate:lg,skewX:e=>jr(Math.atan(e[4])),skewY:e=>jr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function dg(e){return e.includes("scale")?1:0}function fu(e,t){if(!e||e==="none")return dg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=BC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=RC,o=s}if(!o)return dg(t);const i=r[t],a=o[1].split(",").map(WC);return typeof i=="function"?i(a):a[i]}const HC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fu(n,t)};function WC(e){return parseFloat(e.trim())}const fg=e=>e===So||e===Te,qC=new Set(["x","y","z"]),UC=wo.filter(e=>!qC.has(e));function KC(e){const t=[];return UC.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})=>fu(t,"x"),y:(e,{transform:t})=>fu(t,"y")};Co.translateX=Co.x,Co.translateY=Co.y;const zr=new Set;let pu=!1,hu=!1;function pg(){if(hu){const e=Array.from(zr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=KC(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}hu=!1,pu=!1,zr.forEach(e=>e.complete()),zr.clear()}function hg(){zr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hu=!0)})}function YC(){hg(),pg()}class mu{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?(zr.add(this),pu||(pu=!0,nt.read(hg),nt.resolveKeyframes(pg))):(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),zr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,zr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const mg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),GC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ZC(e){const t=GC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const XC=4;function gg(e,t,n=1){sn(n<=XC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=ZC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return mg(a)?parseFloat(a):a}return zc(o)?gg(o,t,n+1):o}const vg=e=>t=>t.test(e),yg=[So,Te,kn,rr,zE,jE,{test:e=>e==="auto",parse:e=>e}],bg=e=>yg.find(vg(e));class xg extends mu{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(),zc(c))){const u=gg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Lm.has(r)||t.length!==2)return;const[o,i]=t,a=bg(o),s=bg(i);if(a!==s)if(fg(a)&&fg(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++)TC(t[o])&&r.push(o);r.length&&zC(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 wg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(or.test(e)||e==="0")&&!e.startsWith("url("));function QC(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 JC(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=wg(o,t),s=wg(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:QC(e)||(n==="spring"||Ga(n))&&r}const ek=e=>e!==null;function Xa(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ek),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const tk=40;class Sg{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=Pn.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>tk?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&YC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Pn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!JC(t,r,o,i))if(a)this.options.duration=0;else{l&&l(Xa(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Qa=2e4;function gu(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Qa;)t+=n,r=e.next(t);return t>=Qa?1/0:t}const lt=(e,t,n)=>e+(t-e)*n;function vu(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 nk({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=vu(l,s,e+1/3),i=vu(l,s,e),a=vu(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Ja(e,t){return n=>n>0?t:e}const yu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},rk=[lu,$r,Eo],ok=e=>rk.find(t=>t.test(e));function Tg(e){const t=ok(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=nk(n)),n}const Eg=(e,t)=>{const n=Tg(e),r=Tg(t);if(!n||!r)return Ja(e,t);const o={...n};return i=>(o.red=yu(n.red,r.red,i),o.green=yu(n.green,r.green,i),o.blue=yu(n.blue,r.blue,i),o.alpha=lt(n.alpha,r.alpha,i),$r.transform(o))},ik=(e,t)=>n=>t(e(n)),Fi=(...e)=>e.reduce(ik),bu=new Set(["none","hidden"]);function ak(e,t){return bu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sk(e,t){return n=>lt(e,t,n)}function xu(e){return typeof e=="number"?sk:typeof e=="string"?zc(e)?Ja:Vt.test(e)?Eg:uk:Array.isArray(e)?Cg:typeof e=="object"?Vt.test(e)?Eg:lk:Ja}function Cg(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xu(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function lk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xu(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function ck(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 uk=(e,t)=>{const n=or.createTransformer(t),r=Ni(e),o=Ni(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?bu.has(e)&&!o.values.length||bu.has(t)&&!r.values.length?ak(e,t):Fi(Cg(ck(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.`),Ja(e,t))};function kg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):xu(e)(e,t)}const dk=5;function Pg(e,t,n){const r=Math.max(t-dk,0);return Vm(n-e(r),t-r)}const mt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ag=.001;function fk({duration:e=mt.duration,bounce:t=mt.bounce,velocity:n=mt.velocity,mass:r=mt.mass}){let o,i;yo(e<=mn(mt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Un(mt.minDamping,mt.maxDamping,a),e=Un(mt.minDuration,mt.maxDuration,An(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=wu(c,a),m=Math.exp(-d);return Ag-p/f*m},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=wu(Math.pow(c,2),a);return(-o(c)+Ag>0?-1:1)*((p-f)*m)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=hk(o,i,s);if(e=mn(e),isNaN(l))return{stiffness:mt.stiffness,damping:mt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const pk=12;function hk(e,t,n){let r=n;for(let o=1;o<pk;o++)r=r-e(r)/t(r);return r}function wu(e,t){return e*Math.sqrt(1-t*t)}const mk=["duration","bounce"],gk=["stiffness","damping","mass"];function _g(e,t){return t.some(n=>e[n]!==void 0)}function vk(e){let t={velocity:mt.velocity,stiffness:mt.stiffness,damping:mt.damping,mass:mt.mass,isResolvedFromDuration:!1,...e};if(!_g(e,gk)&&_g(e,mk))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Un(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:mt.mass,stiffness:o,damping:i}}else{const n=fk(e);t={...t,...n,mass:mt.mass},t.isResolvedFromDuration=!0}return t}function Su(e=mt.visualDuration,t=mt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=vk({...n,velocity:-An(n.velocity||0)}),m=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,v=An(Math.sqrt(l/u)),b=Math.abs(h)<5;r||(r=b?mt.restSpeed.granular:mt.restSpeed.default),o||(o=b?mt.restDelta.granular:mt.restDelta.default);let x;if(g<1){const w=wu(v,g);x=T=>{const C=Math.exp(-g*v*T);return a-C*((m+g*v*h)/w*Math.sin(w*T)+h*Math.cos(w*T))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(h+(m+v*h)*w);else{const w=v*Math.sqrt(g*g-1);x=T=>{const C=Math.exp(-g*v*T),P=Math.min(w*T,300);return a-C*((m+g*v*h)*Math.sinh(P)+w*h*Math.cosh(P))/w}}const S={calculatedDuration:f&&d||null,next:w=>{const T=x(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?mn(m):Pg(x,w,T));const P=Math.abs(C)<=r,I=Math.abs(a-T)<=o;s.done=P&&I}return s.value=s.done?a:T,s},toString:()=>{const w=Math.min(gu(S),Qa),T=Bm(C=>S.next(w*C).value,w,30);return w+"ms "+T}};return S}function Ig({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=P=>s!==void 0&&P<s||l!==void 0&&P>l,m=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l;let g=n*t;const h=d+g,v=a===void 0?h:a(h);v!==h&&(g=v-d);const b=P=>-g*Math.exp(-P/r),x=P=>v+b(P),S=P=>{const I=b(P),A=x(P);p.done=Math.abs(I)<=c,p.value=p.done?v:A};let w,T;const C=P=>{f(p.value)&&(w=P,T=Su({keyframes:[p.value,m(p.value)],velocity:Pg(x,P,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:P=>{let I=!1;return!T&&w===void 0&&(I=!0,S(P),C(P)),w!==void 0&&P>=w?T.next(P-w):(!I&&S(P),p)}}}const yk=Mi(.42,0,1,1),bk=Mi(0,0,.58,1),Og=Mi(.42,0,.58,1),Mg=e=>Array.isArray(e)&&typeof e[0]!="number",Dg={linear:Ut,easeIn:yk,easeInOut:Og,easeOut:bk,circIn:ou,circInOut:Qm,circOut:Xm,backIn:ru,backInOut:Gm,backOut:Ym,anticipate:Zm},Tu=e=>{if(tu(e)){sn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Mi(t,n,r,o)}else if(typeof e=="string")return sn(Dg[e]!==void 0,`Invalid easing type '${e}'`),Dg[e];return e};function xk(e,t,n){const r=[],o=n||kg,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=Fi(l,s)}r.push(s)}return r}function Ng(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(sn(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=xk(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=Vr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Un(e[0],e[i-1],u)):c}function Fg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Vr(0,t,r);e.push(lt(n,1,o))}}function Lg(e){const t=[0];return Fg(t,e.length-1),t}function wk(e,t){return e.map(n=>n*t)}function Sk(e,t){return e.map(()=>t||Og).splice(0,e.length-1)}function Li({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Mg(r)?r.map(Tu):Tu(r),i={done:!1,value:t[0]},a=wk(n&&n.length===t.length?n:Lg(t),e),s=Ng(a,t,{ease:Array.isArray(o)?o:Sk(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const Tk=e=>{const t=({timestamp:n})=>e(n);return{start:()=>nt.update(t,!0),stop:()=>qn(t),now:()=>Dt.isProcessing?Dt.timestamp:Pn.now()}},Ek={decay:Ig,inertia:Ig,tween:Li,keyframes:Li,spring:Su},Ck=e=>e/100;class Eu extends Sg{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)||mu,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=Ga(n)?n:Ek[n]||Li;let l,c;process.env.NODE_ENV!=="production"&&s!==Li&&sn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==Li&&typeof t[0]!="number"&&(l=Fi(Ck,kg(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=gu(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:m,repeatDelay:g,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-p*(this.speed>=0?1:-1),b=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)&&(m==="reverse"?(A=1-A,g&&(A-=g/d)):m==="mirror"&&(S=a)),x=Un(0,1,A)*d}const w=b?{done:!1,value:l[0]}:S.next(x);s&&(w.value=s(w.value));let{done:T}=w;!b&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return C&&o!==void 0&&(w.value=Xa(l,this.options,o)),h&&h(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?An(t.calculatedDuration):0}get time(){return An(this.currentTime)}set time(t){t=mn(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=An(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Tk,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 kk=new Set(["opacity","clipPath","filter","transform"]);function Pk(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=Wm(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 Ak=eu(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),es=10,_k=2e4;function Ik(e){return Ga(e.type)||e.type==="spring"||!Hm(e.ease)}function Ok(e,t){const n=new Eu({...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<_k;)r=n.sample(i),o.push(r.value),i+=es;return{times:void 0,keyframes:o,duration:i-es,ease:"linear"}}const Vg={anticipate:Zm,backInOut:Gm,circInOut:Qm};function Mk(e){return e in Vg}class $g extends Sg{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new xg(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&Za()&&Mk(i)&&(i=Vg[i]),Ik(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:m,...g}=this.options,h=Ok(t,g);t=h.keyframes,t.length===1&&(t[1]=t[0]),r=h.duration,o=h.times,i=h.ease,a="keyframes"}const u=Pk(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Rm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(Xa(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return An(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return An(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=mn(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;Rm(r,t)}return Ut}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,m=new Eu({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=mn(this.time);c.setWithVelocity(m.sample(g-es).value,m.sample(g).value,es)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Ak()&&r&&kk.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const Dk={type:"spring",stiffness:500,damping:25,restSpeed:10},Nk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fk={type:"keyframes",duration:.8},Lk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vk=(e,{keyframes:t})=>t.length>2?Fk:Lr.has(e)?e.startsWith("scale")?Nk(t[1]):Dk:Lk;function $k({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 Cu=(e,t,n,r={},o,i)=>a=>{const s=Zc(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-mn(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};$k(s)||(u={...u,...Vk(e,u)}),u.duration&&(u.duration=mn(u.duration)),u.repeatDelay&&(u.repeatDelay=mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=Xa(u.keyframes,s);if(p!==void 0)return nt.update(()=>{u.onUpdate(p),u.onComplete()}),new zm([])}return!i&&$g.supports(u)?new $g(u):new Eu(u)};function jk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ku(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&&jk(u,d))continue;const m={delay:n,...Zc(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=jm(e);if(v){const b=window.MotionHandoffAnimation(v,d,nt);b!==null&&(m.startTime=b,g=!0)}}Jc(e,d),p.start(Cu(d,p,f,e.shouldReduceMotion&&Lm.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return s&&Promise.all(c).then(()=>{nt.update(()=>{s&&hC(e,s)})}),c}function Pu(e,t,n={}){var r;const o=_i(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(ku(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return zk(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 zk(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(Rk).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Pu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function Rk(e,t){return e.sortNodePosition(t)}function Bk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Pu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Pu(e,t,n);else{const o=typeof t=="function"?_i(e,t,n.custom):t;r=Promise.all(ku(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function jg(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 Hk=Lc.length;function zg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?zg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Hk;n++){const r=Lc[n],o=e.props[r];(Ci(o)||o===!1)&&(t[r]=o)}return t}const Wk=[...Fc].reverse(),qk=Fc.length;function Uk(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Bk(e,n,r)))}function Kk(e){let t=Uk(e),n=Rg(),r=!0;const o=l=>(c,u)=>{var d;const p=_i(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:m,...g}=p;c={...c,...g,...m}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=zg(e.parent)||{},d=[],p=new Set;let f={},m=1/0;for(let h=0;h<qk;h++){const v=Wk[h],b=n[v],x=c[v]!==void 0?c[v]:u[v],S=Ci(x),w=v===l?b.isActive:null;w===!1&&(m=h);let T=x===u[v]&&x!==c[v]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...f},!b.isActive&&w===null||!x&&!b.prevProp||Ha(x)||typeof x=="boolean")continue;const C=Yk(b.prevProp,x);let P=C||v===l&&b.isActive&&!T&&S||h>m&&S,I=!1;const A=Array.isArray(x)?x:[x];let L=A.reduce(o(v),{});w===!1&&(L={});const{prevResolvedValues:N={}}=b,$={...N,...L},_=V=>{P=!0,p.has(V)&&(I=!0,p.delete(V)),b.needsAnimating[V]=!0;const F=e.getValue(V);F&&(F.liveStyle=!1)};for(const V in $){const F=L[V],H=N[V];if(f.hasOwnProperty(V))continue;let O=!1;Yc(F)&&Yc(H)?O=!jg(F,H):O=F!==H,O?F!=null?_(V):p.add(V):F!==void 0&&p.has(V)?_(V):b.protectedKeys[V]=!0}b.prevProp=x,b.prevResolvedValues=L,b.isActive&&(f={...f,...L}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(T&&C)||I)&&d.push(...A.map(V=>({animation:V,options:{type:v}})))}if(p.size){const h={};if(typeof c.initial!="boolean"){const v=_i(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}p.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),h[v]=b??null}),d.push({animation:h})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){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=Rg(),r=!0}}}function Yk(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jg(t,e):!1}function Rr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rg(){return{animate:Rr(!0),whileInView:Rr(),whileHover:Rr(),whileTap:Rr(),whileDrag:Rr(),whileFocus:Rr(),exit:Rr()}}class ir{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Gk extends ir{constructor(t){super(t),t.animationState||(t.animationState=Kk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ha(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Zk=0;class Xk extends ir{constructor(){super(...arguments),this.id=Zk++}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 Qk={animation:{Feature:Gk},exit:{Feature:Xk}},gn={x:!1,y:!1};function Bg(){return gn.x||gn.y}function Jk(e){return e==="x"||e==="y"?gn[e]?null:(gn[e]=!0,()=>{gn[e]=!1}):gn.x||gn.y?null:(gn.x=gn.y=!0,()=>{gn.x=gn.y=!1})}function Vi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function $i(e){return{point:{x:e.pageX,y:e.pageY}}}const eP=e=>t=>Au(t)&&e(t,$i(t));function ji(e,t,n,r){return Vi(e,t,eP(n),r)}function Hg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nP(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 Wg=1e-4,rP=1-Wg,oP=1+Wg,qg=.01,iP=0-qg,aP=0+qg;function Bt(e){return e.max-e.min}function sP(e,t,n){return Math.abs(e-t)<=n}function Ug(e,t,n,r=.5){e.origin=r,e.originPoint=lt(t.min,t.max,e.origin),e.scale=Bt(n)/Bt(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=rP&&e.scale<=oP||isNaN(e.scale))&&(e.scale=1),(e.translate>=iP&&e.translate<=aP||isNaN(e.translate))&&(e.translate=0)}function zi(e,t,n,r){Ug(e.x,t.x,n.x,r?r.originX:void 0),Ug(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 lP(e,t,n){Kg(e.x,t.x,n.x),Kg(e.y,t.y,n.y)}function Yg(e,t,n){e.min=t.min-n.min,e.max=e.min+Bt(t)}function Ri(e,t,n){Yg(e.x,t.x,n.x),Yg(e.y,t.y,n.y)}const Gg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ko=()=>({x:Gg(),y:Gg()}),Zg=()=>({min:0,max:0}),yt=()=>({x:Zg(),y:Zg()});function ln(e){return[e("x"),e("y")]}function _u(e){return e===void 0||e===1}function Iu({scale:e,scaleX:t,scaleY:n}){return!_u(e)||!_u(t)||!_u(n)}function Br(e){return Iu(e)||Xg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Xg(e){return Qg(e.x)||Qg(e.y)}function Qg(e){return e&&e!=="0%"}function ts(e,t,n){const r=e-n,o=t*r;return n+o}function Jg(e,t,n,r,o){return o!==void 0&&(e=ts(e,o,r)),ts(e,n,r)+t}function Ou(e,t=0,n=1,r,o){e.min=Jg(e.min,t,n,r,o),e.max=Jg(e.max,t,n,r,o)}function ev(e,{x:t,y:n}){Ou(e.x,t.translate,t.scale,t.originPoint),Ou(e.y,n.translate,n.scale,n.originPoint)}const tv=.999999999999,nv=1.0000000000001;function cP(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,ev(e,a)),r&&Br(i.latestValues)&&Ao(e,i.latestValues))}t.x<nv&&t.x>tv&&(t.x=1),t.y<nv&&t.y>tv&&(t.y=1)}function Po(e,t){e.min=e.min+t,e.max=e.max+t}function rv(e,t,n,r,o=.5){const i=lt(e.min,e.max,o);Ou(e,t,n,i,r)}function Ao(e,t){rv(e.x,t.x,t.scaleX,t.scale,t.originX),rv(e.y,t.y,t.scaleY,t.scale,t.originY)}function ov(e,t){return Hg(nP(e.getBoundingClientRect(),t))}function uP(e,t,n){const r=ov(e,n),{scroll:o}=t;return o&&(Po(r.x,o.offset.x),Po(r.y,o.offset.y)),r}const iv=({current:e})=>e?e.ownerDocument.defaultView:null,av=(e,t)=>Math.abs(e-t);function dP(e,t){const n=av(e.x,t.x),r=av(e.y,t.y);return Math.sqrt(n**2+r**2)}class sv{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=Du(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=dP(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:m}=d,{timestamp:g}=Dt;this.history.push({...m,timestamp:g});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Mu(p,this.transformPagePoint),nt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Du(d.type==="pointercancel"?this.lastMoveEventInfo:Mu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),m&&m(d,h)},!Au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=$i(t),s=Mu(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Dt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Du(s,this.history)),this.removeListeners=Fi(ji(this.contextWindow,"pointermove",this.handlePointerMove),ji(this.contextWindow,"pointerup",this.handlePointerUp),ji(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qn(this.updatePoint)}}function Mu(e,t){return t?{point:t(e.point)}:e}function lv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Du({point:e},t){return{point:e,delta:lv(e,cv(t)),offset:lv(e,fP(t)),velocity:pP(t,.1)}}function fP(e){return e[0]}function cv(e){return e[e.length-1]}function pP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=cv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};const i=An(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 hP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?lt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?lt(n,e,r.max):Math.min(e,n)),e}function uv(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 mP(e,{top:t,left:n,bottom:r,right:o}){return{x:uv(e.x,n,o),y:uv(e.y,t,r)}}function dv(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 gP(e,t){return{x:dv(e.x,t.x),y:dv(e.y,t.y)}}function vP(e,t){let n=.5;const r=Bt(e),o=Bt(t);return o>r?n=Vr(t.min,t.max-r,e.min):r>o&&(n=Vr(e.min,e.max-o,t.min)),Un(0,1,n)}function yP(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 Nu=.35;function bP(e=Nu){return e===!1?e=0:e===!0&&(e=Nu),{x:fv(e,"left","right"),y:fv(e,"top","bottom")}}function fv(e,t,n){return{min:pv(e,t),max:pv(e,n)}}function pv(e,t){return typeof e=="number"?e:e[t]||0}const xP=new WeakMap;class wP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($i(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:m}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Jk(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),ln(h=>{let v=this.getAxisMotionValue(h).get()||0;if(kn.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const x=b.layout.layoutBox[h];x&&(v=Bt(x)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&nt.postRender(()=>m(u,d)),Jc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:h}=d;if(f&&this.currentDirection===null){this.currentDirection=SP(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,h),this.updateAxis("y",d.point,h),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>ln(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 sv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:iv(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&&nt.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ns(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=hP(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=mP(o.layoutBox,n):this.constraints=!1,this.elastic=bP(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ln(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=yP(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xo(t))return!1;const r=t.current;sn(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=uP(r,o.root,this.visualElement.getTransformPagePoint());let a=gP(o.layout.layoutBox,i);if(n){const s=n(tP(a));this.hasMutatedConstraints=!!s,s&&(a=Hg(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=ln(u=>{if(!ns(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jc(this.visualElement,t),r.start(Cu(t,r,0,n,this.visualElement,!1))}stopAnimation(){ln(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ln(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){ln(n=>{const{drag:r}=this.getProps();if(!ns(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-lt(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};ln(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=vP({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ln(a=>{if(!ns(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(lt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;xP.set(this.visualElement,this);const t=this.visualElement.current,n=ji(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();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()),nt.read(r);const a=Vi(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ln(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=Nu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function ns(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function SP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class TP extends ir{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new wP(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 hv=e=>(t,n)=>{e&&nt.postRender(()=>e(t,n))};class EP extends ir{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new sv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:hv(t),onStart:hv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&nt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=ji(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const rs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Bi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=mv(e,t.target.x),r=mv(e,t.target.y);return`${n}% ${r}%`}},CP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=or.parse(e);if(o.length>5)return r;const i=or.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=lt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class kP extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;$E(PP),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),rs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||nt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vc.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 gv(e){const[t,n]=im(),r=E.useContext(Ei);return y.jsx(kP,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(ym),isPresent:t,safeToRemove:n})}const PP={borderRadius:{...Bi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bi,borderTopRightRadius:Bi,borderBottomLeftRadius:Bi,borderBottomRightRadius:Bi,boxShadow:CP};function vv(e,t,n){const r=Pt(e)?e:To(e);return r.start(Cu("",r,t,n)),r.animation}function yv(e){return e instanceof SVGElement&&e.tagName!=="svg"}const AP=(e,t)=>e.depth-t.depth;class _P{constructor(){this.children=[],this.isDirty=!1}add(t){Xc(this.children,t),this.isDirty=!0}remove(t){Ka(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AP),this.isDirty=!1,this.children.forEach(t)}}function IP(e,t){const n=Pn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(qn(r),e(i-t))};return nt.read(r,!0),()=>qn(r)}const bv=["TopLeft","TopRight","BottomLeft","BottomRight"],OP=bv.length,xv=e=>typeof e=="string"?parseFloat(e):e,wv=e=>typeof e=="number"||Te.test(e);function MP(e,t,n,r,o,i){o?(e.opacity=lt(0,n.opacity!==void 0?n.opacity:1,DP(r)),e.opacityExit=lt(t.opacity!==void 0?t.opacity:1,0,NP(r))):i&&(e.opacity=lt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<OP;a++){const s=`border${bv[a]}Radius`;let l=Sv(t,s),c=Sv(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||wv(l)===wv(c)?(e[s]=Math.max(lt(xv(l),xv(c),r),0),(kn.test(c)||kn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,r))}function Sv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DP=Tv(0,.5,Xm),NP=Tv(.5,.95,Ut);function Tv(e,t,n){return r=>r<e?0:r>t?1:n(Vr(e,t,r))}function Ev(e,t){e.min=t.min,e.max=t.max}function cn(e,t){Ev(e.x,t.x),Ev(e.y,t.y)}function Cv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function kv(e,t,n,r,o){return e-=t,e=ts(e,1/n,r),o!==void 0&&(e=ts(e,1/o,r)),e}function FP(e,t=0,n=1,r=.5,o,i=e,a=e){if(kn.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=lt(i.min,i.max,r);e===i&&(s-=t),e.min=kv(e.min,t,n,s,o),e.max=kv(e.max,t,n,s,o)}function Pv(e,t,[n,r,o],i,a){FP(e,t[n],t[r],t[o],t.scale,i,a)}const LP=["x","scaleX","originX"],VP=["y","scaleY","originY"];function Av(e,t,n,r){Pv(e.x,t,LP,n?n.x:void 0,r?r.x:void 0),Pv(e.y,t,VP,n?n.y:void 0,r?r.y:void 0)}function _v(e){return e.translate===0&&e.scale===1}function Iv(e){return _v(e.x)&&_v(e.y)}function Ov(e,t){return e.min===t.min&&e.max===t.max}function $P(e,t){return Ov(e.x,t.x)&&Ov(e.y,t.y)}function Mv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dv(e,t){return Mv(e.x,t.x)&&Mv(e.y,t.y)}function Nv(e){return Bt(e.x)/Bt(e.y)}function Fv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class jP{constructor(){this.members=[]}add(t){Xc(this.members,t),t.scheduleRender()}remove(t){if(Ka(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 zP(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const Fu=["","X","Y","Z"],RP={visibility:"hidden"},Lv=1e3;let BP=0;function Lu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Vv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=jm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",nt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Vv(r)}function $v({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=BP++,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(qP),this.nodes.forEach(ZP),this.nodes.forEach(XP),this.nodes.forEach(UP)},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 _P)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Qc),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=yv(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=IP(p,250),rs.hasAnimatedSinceResize&&(rs.hasAnimatedSinceResize=!1,this.nodes.forEach(zv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||nA,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Dv(this.targetLayout,m),x=!p&&f;if(this.options.layoutRoot||this.resumeFrom||x||p&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const S={...Zc(g,"layout"),onPlay:h,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||zv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,qn(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(QP),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jv);return}this.isUpdating||this.nodes.forEach(YP),this.isUpdating=!1,this.nodes.forEach(GP),this.nodes.forEach(HP),this.nodes.forEach(WP),this.clearAllSnapshots();const s=Pn.now();Dt.delta=Un(0,1e3/60,s-Dt.timestamp),Dt.timestamp=s,Dt.isProcessing=!0,Nc.update.process(Dt),Nc.preRender.process(Dt),Nc.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KP),this.sharedNodes.forEach(JP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){nt.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=yt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){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&&!Iv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||Br(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)),rA(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return yt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(oA))){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=yt();if(cn(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&&cn(l,a),Po(l.x,d.offset.x),Po(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=yt();cn(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}),Br(u.latestValues)&&Ao(l,u.latestValues)}return Br(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(a){const s=yt();cn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Br(c.latestValues))continue;Iu(c.latestValues)&&c.updateSnapshot();const u=yt(),d=c.measurePageBox();cn(u,d),Av(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Br(this.latestValues)&&Av(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=yt(),this.relativeTargetOrigin=yt(),Ri(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):cn(this.target,this.layout.layoutBox),ev(this.target,this.targetDelta)):cn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Ri(this.relativeTargetOrigin,this.target,f.target),cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Iu(this.parent.latestValues)||Xg(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;cn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;cP(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=yt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Cv(this.prevProjectionDelta.x,this.projectionDelta.x),Cv(this.prevProjectionDelta.y,this.projectionDelta.y)),zi(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Fv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Fv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=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=yt(),f=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=f!==m,h=this.getStack(),v=!h||h.members.length<=1,b=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(tA));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const w=S/1e3;Rv(d.x,a.x,w),Rv(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ri(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),eA(this.relativeTarget,this.relativeTargetOrigin,p,w),x&&$P(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=yt()),cn(x,this.relativeTarget)),g&&(this.animationValues=u,MP(u,c,this.latestValues,w,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(qn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nt.update(()=>{rs.hasAnimatedSinceResize=!0,this.currentAnimation=vv(0,Lv,{...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(Lv),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&&Uv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||yt();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}cn(s,l),Ao(s,u),zi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new jP),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&&Lu("z",a,c,this.animationValues);for(let u=0;u<Fu.length;u++)Lu(`rotate${Fu[u]}`,a,c,this.animationValues),Lu(`skew${Fu[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 RP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ua(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Ua(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Br(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=zP(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:m}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in ki){if(p[g]===void 0)continue;const{correct:h,applyTo:v,isCSSVariable:b}=ki[g],x=c.transform==="none"?p[g]:h(p[g],d);if(v){const S=v.length;for(let w=0;w<S;w++)c[v[w]]=x}else b?this.options.visualElement.renderState.vars[g]=x:c[g]=x}return this.options.layoutId&&(c.pointerEvents=d===this?Ua(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(jv),this.root.sharedNodes.clear()}}}function HP(e){e.updateLayout()}function WP(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"?ln(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=Bt(p);p.min=r[d].min,p.max=p.min+f}):Uv(i,n.layoutBox,r)&&ln(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();zi(s,r,n.layoutBox);const l=ko();a?zi(l,e.applyTransform(o,!0),n.measuredBox):zi(l,r,n.layoutBox);const c=!Iv(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const m=yt();Ri(m,n.layoutBox,p.layoutBox);const g=yt();Ri(g,r,f.layoutBox),Dv(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function qP(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 UP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function KP(e){e.clearSnapshot()}function jv(e){e.clearMeasurements()}function YP(e){e.isLayoutDirty=!1}function GP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ZP(e){e.resolveTargetDelta()}function XP(e){e.calcProjection()}function QP(e){e.resetSkewAndRotation()}function JP(e){e.removeLeadSnapshot()}function Rv(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bv(e,t,n,r){e.min=lt(t.min,n.min,r),e.max=lt(t.max,n.max,r)}function eA(e,t,n,r){Bv(e.x,t.x,n.x,r),Bv(e.y,t.y,n.y,r)}function tA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const nA={duration:.45,ease:[.4,0,.1,1]},Hv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Wv=Hv("applewebkit/")&&!Hv("chrome/")?Math.round:Ut;function qv(e){e.min=Wv(e.min),e.max=Wv(e.max)}function rA(e){qv(e.x),qv(e.y)}function Uv(e,t,n){return e==="position"||e==="preserve-aspect"&&!sP(Nv(t),Nv(n),.2)}function oA(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const iA=$v({attachResizeListener:(e,t)=>Vi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vu={current:void 0},Kv=$v({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vu.current){const e=new iA({});e.mount(window),e.setOptions({layoutScroll:!0}),Vu.current=e}return Vu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),aA={pan:{Feature:EP},drag:{Feature:TP,ProjectionNode:Kv,MeasureLayout:gv}};function Yv(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 Gv(e,t){const n=Yv(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Zv(e){return!(e.pointerType==="touch"||Bg())}function sA(e,t,n={}){const[r,o,i]=Gv(e,n),a=s=>{if(!Zv(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Zv(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function Xv(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&&nt.postRender(()=>i(t,$i(t)))}class lA extends ir{mount(){const{current:t}=this.node;t&&(this.unmount=sA(t,(n,r)=>(Xv(this.node,r,"Start"),o=>Xv(this.node,o,"End"))))}unmount(){}}class cA extends ir{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=Fi(Vi(this.node.current,"focus",()=>this.onFocus()),Vi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Qv=(e,t)=>t?e===t?!0:Qv(e,t.parentElement):!1,uA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function dA(e){return uA.has(e.tagName)||e.tabIndex!==-1}const Hi=new WeakSet;function Jv(e){return t=>{t.key==="Enter"&&e(t)}}function $u(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fA=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Jv(()=>{if(Hi.has(n))return;$u(n,"down");const o=Jv(()=>{$u(n,"up")}),i=()=>$u(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 ey(e){return Au(e)&&!Bg()}function pA(e,t,n={}){const[r,o,i]=Gv(e,n),a=s=>{const l=s.currentTarget;if(!ey(s)||Hi.has(l))return;Hi.add(l);const c=t(l,s),u=(f,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!ey(f)||!Hi.has(l))&&(Hi.delete(l),typeof c=="function"&&c(f,{success:m}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Qv(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>fA(c,o)),!dA(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function ty(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&&nt.postRender(()=>i(t,$i(t)))}class hA extends ir{mount(){const{current:t}=this.node;t&&(this.unmount=pA(t,(n,r)=>(ty(this.node,r,"Start"),(o,{success:i})=>ty(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ju=new WeakMap,zu=new WeakMap,mA=e=>{const t=ju.get(e.target);t&&t(e)},gA=e=>{e.forEach(mA)};function vA({root:e,...t}){const n=e||document;zu.has(n)||zu.set(n,{});const r=zu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(gA,{root:e,...t})),r[o]}function yA(e,t,n){const r=vA(t);return ju.set(e,n),r.observe(e),()=>{ju.delete(e),r.unobserve(e)}}const bA={some:0,all:1};class xA extends ir{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:bA[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 yA(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(wA(t,n))&&this.startObserver()}unmount(){}}function wA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const SA={inView:{Feature:xA},tap:{Feature:hA},focus:{Feature:cA},hover:{Feature:lA}},TA={layout:{ProjectionNode:Kv,MeasureLayout:gv}},Ru={current:null},ny={current:!1};function EA(){if(ny.current=!0,!!Dc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ru.current=e.matches;e.addListener(t),t()}else Ru.current=!1}const CA=[...yg,Vt,or],kA=e=>CA.find(vg(e)),Wi=new WeakMap;function PA(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Ra(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,To(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,To(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ry=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class oy{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=mu,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=Pn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,nt.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=Wa(n),this.isVariantNode=mm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const m=p[f];l[f]!==void 0&&Pt(m)&&m.set(l[f],!1)}}mount(t){this.current=t,Wi.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)),ny.current||EA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ru.current,process.env.NODE_ENV!=="production"&&Ra(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(),qn(this.notifyUpdate),qn(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=Lr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&nt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in bo){const n=bo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ry.length;r++){const o=ry[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=PA(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=To(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"&&(mg(o)||Jm(o))?o=parseFloat(o):!kA(o)&&or.test(n)&&(o=sg(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=Kc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Qc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class iy extends oy{constructor(){super(...arguments),this.KeyframeResolver=xg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function AA(e){return window.getComputedStyle(e)}class ay extends iy{constructor(){super(...arguments),this.type="html",this.renderInstance=Om}readValueFromInstance(t,n){if(Lr.has(n))return HC(t,n);{const r=AA(t),o=(jc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ov(t,n)}build(t,n,r){Bc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Gc(t,n,r)}}class sy extends iy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Im(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Lr.has(n)){const r=ag(n);return r&&r.default||0}return n=Mm.has(n)?n:$c(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Nm(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&nt.postRender(this.updateDimensions)}build(t,n,r){qc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Dm(t,n,r,o)}mount(t){this.isSVGTag=Uc(t.tagName),super.mount(t)}}const _A=(e,t)=>Wc(e)?new sy(t):new ay(t,{allowProjection:e!==E.Fragment}),IA=lC({...Qk,...SA,...aA,...TA},_A),pt=CE(IA);function OA(e){return E.useEffect(()=>()=>e(),[])}function os(e){const t=hn(()=>To(e)),{isStatic:n}=E.useContext(vo);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function ly(e,t){const n=os(t()),r=()=>n.set(t());return r(),La(()=>{const o=()=>nt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),qn(r)}}),n}const MA=e=>e&&typeof e=="object"&&e.mix,DA=e=>MA(e)?e.mix:void 0;function NA(...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=Ng(o,i,{mixer:DA(i[0]),...a});return t?s(r):s}function FA(e){Ii.current=[],e();const t=ly(Ii.current,e);return Ii.current=void 0,t}function LA(e,t,n,r){if(typeof e=="function")return FA(e);const o=typeof t=="function"?t:NA(t,n,r);return Array.isArray(e)?cy(e,o):cy([e],([i])=>o(i))}function cy(e,t){const n=hn(()=>[]);return ly(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function VA(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(gu(r),Qa);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:An(o)}}const $A=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function uy(e,t){return Mg(e)?e[$A(0,e.length,t)]:e}function Bu(e){return typeof e=="object"&&!Array.isArray(e)}function dy(e,t,n,r){return typeof e=="string"&&Bu(t)?Yv(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function jA(e,t,n){return e*(t+1)}function fy(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 zA(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ka(e,o),r--)}}function RA(e,t,n,r,o,i){zA(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:lt(o,i,r[a]),easing:uy(n,a)})}function BA(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function HA(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const WA="easeInOut",qA=20;function UA(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const m=e[f];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,fy(d,m.at,u,c));continue}let[g,h,v={}]=m;v.at!==void 0&&(d=fy(d,v.at,u,c));let b=0;const x=(S,w,T,C=0,P=0)=>{const I=KA(S),{delay:A=0,times:L=Lg(I),type:N="keyframes",repeat:$,repeatType:_,repeatDelay:M=0,...D}=w;let{ease:V=t.ease||"easeOut",duration:F}=w;const H=typeof A=="function"?A(C,P):A,O=I.length,R=Ga(N)?N:o==null?void 0:o[N];if(O<=2&&R){let G=100;if(O===2&&ZA(I)){const j=I[1]-I[0];G=Math.abs(j)}const Y={...D};F!==void 0&&(Y.duration=mn(F));const Z=VA(Y,G,R);V=Z.ease,F=Z.duration}F??(F=i);const X=d+H;L.length===1&&L[0]===0&&(L[1]=1);const Q=L.length-I.length;if(Q>0&&Fg(L,Q),I.length===1&&I.unshift(null),$){sn($<qA,"Repeat count too high, must be less than 20"),F=jA(F,$);const G=[...I],Y=[...L];V=Array.isArray(V)?[...V]:[V];const Z=[...V];for(let j=0;j<$;j++){I.push(...G);for(let z=0;z<G.length;z++)L.push(Y[z]+(j+1)),V.push(z===0?"linear":uy(Z,z-1))}BA(L,$)}const J=X+F;RA(T,I,V,L,X,J),b=Math.max(H+F,b),p=Math.max(J,p)};if(Pt(g)){const S=py(g,s);x(h,v,hy("default",S))}else{const S=dy(g,h,r,l),w=S.length;for(let T=0;T<w;T++){h=h,v=v;const C=S[T],P=py(C,s);for(const I in h)x(h[I],YA(v,I),hy(I,P),T,w)}}u=d,d+=b}return s.forEach((f,m)=>{for(const g in f){const h=f[g];h.sort(HA);const v=[],b=[],x=[];for(let w=0;w<h.length;w++){const{at:T,value:C,easing:P}=h[w];v.push(C),b.push(Vr(0,p,T)),x.push(P||"easeOut")}b[0]!==0&&(b.unshift(0),v.unshift(v[0]),x.unshift(WA)),b[b.length-1]!==1&&(b.push(1),v.push(null)),a.has(m)||a.set(m,{keyframes:{},transition:{}});const S=a.get(m);S.keyframes[g]=v,S.transition[g]={...t,duration:p,ease:x,times:b,...n}}}),a}function py(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function hy(e,t){return t[e]||(t[e]=[]),t[e]}function KA(e){return Array.isArray(e)?e:[e]}function YA(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const GA=e=>typeof e=="number",ZA=e=>e.every(GA);function XA(e,t){return e in t}class QA extends oy{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(XA(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return yt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function JA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=yv(e)?new sy(t):new ay(t);n.mount(e),Wi.set(e,n)}function e_(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new QA(t);n.mount(e),Wi.set(e,n)}function t_(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Bu(t)}function my(e,t,n,r){const o=[];if(t_(e,t))o.push(vv(e,Bu(t)&&t.default||t,n&&(n.default||n)));else{const i=dy(e,t,r),a=i.length;sn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?JA:e_;Wi.has(l)||c(l);const u=Wi.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...ku(u,{...t,transition:d},{}))}}return o}function n_(e,t,n){const r=[];return UA(e,t,n,{spring:Su}).forEach(({keyframes:i,transition:a},s)=>{r.push(...my(s,i,a))}),r}function r_(e){return Array.isArray(e)&&e.some(Array.isArray)}function o_(e){function t(n,r,o){let i=[];r_(n)?i=n_(n,r,e):i=my(n,r,o,e);const a=new zm(i);return e&&e.animations.push(a),a}return t}function i_(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>o_(e));return OA(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class a_{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 s_=()=>new a_;function l_(){return hn(s_)}function c_(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function u_(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:c_(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Tu(r)(l/c)*c}return t+l}}const gy=E.createContext(null);function d_(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=lt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?cC(e,o,o+i):e}function f_({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=hn(()=>pt[t]),l=[],c=E.useRef(!1);sn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(m=>d===m.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(h_)},updateOrder:(d,p,f)=>{if(c.current)return;const m=d_(l,d,p,f);l!==m&&(c.current=!0,r(m.map(p_).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),y.jsx(s,{...i,ref:a,ignoreStrict:!0,children:y.jsx(gy.Provider,{value:u,children:e})})}const vy=E.forwardRef(f_);function p_(e){return e.value}function h_(e,t){return e.layout.min-t.layout.min}function yy(e,t=0){return Pt(e)?e:os(t)}function m_({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=hn(()=>pt[r]),c=E.useContext(gy),u={x:yy(t.x),y:yy(t.y)},d=LA([u.x,u.y],([g,h])=>g||h?1:"unset");sn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:m}=c;return y.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,h)=>{const{velocity:v}=h;v[p]&&m(n,u[p].get(),v[p]),o&&o(g,h)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const by=E.forwardRef(m_);/**
13
13
  * @license lucide-react v0.485.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
@@ -24,12 +24,12 @@
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 b_=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>T.createElement("svg",{ref:l,...y_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:wy("lucide",o),...s},[...a.map(([c,u])=>T.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
27
+ */const b_=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,...y_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:wy("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 Ge=(e,t)=>{const n=T.forwardRef(({className:r,...o},i)=>T.createElement(b_,{ref:i,iconNode:t,className:wy(`lucide-${g_(xy(e))}`,`lucide-${e}`,r),...o}));return n.displayName=xy(e),n};/**
32
+ */const Ge=(e,t)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(b_,{ref:i,iconNode:t,className:wy(`lucide-${g_(xy(e))}`,`lucide-${e}`,r),...o}));return n.displayName=xy(e),n};/**
33
33
  * @license lucide-react v0.485.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
@@ -164,7 +164,7 @@
164
164
  *
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
- */const os=Ge("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
167
+ */const is=Ge("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
168
168
  * @license lucide-react v0.485.0 - ISC
169
169
  *
170
170
  * This source code is licensed under the ISC license.
@@ -179,7 +179,7 @@
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
- */const Wi=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_y={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},V_={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Iy=e=>y.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:_y,exit:_y.false,transition:V_,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),$_=fo("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"}}),j_=T.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return y.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:y.jsx(Iy,{"data-open":!!i,open:!!i,children:y.jsxs(an,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe($_({theme:n}),t),children:[y.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?y.jsx(Ty,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?y.jsx(Ay,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?y.jsx(F_,{"aria-hidden":"true",size:20}):null,r,y.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?y.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:y.jsx(Wi,{size:20})}):null]})})})}),Oy=6048e5,z_=864e5,R_=6e4,B_=36e5,H_=1e3,My=Symbol.for("constructDateFrom");function st(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&My in e?e[My](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return st(t||e,e)}function is(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(t)?st((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Dy(e,t,n){const r=Je(e,n==null?void 0:n.in);if(isNaN(t))return st(e,NaN);if(!t)return r;const o=r.getDate(),i=st(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 _o(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n==null?void 0:n.in),d=o||r?Dy(u,o+r*12):u,p=a||i?is(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return st(e,+p+g)}let W_={};function Br(){return W_}function _n(e,t){var s,l,c,u;const n=Br(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Je(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Io(e,t){return _n(e,{...t,weekStartsOn:1})}function Ny(e,t){const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=st(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Io(o),a=st(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Io(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function as(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ss(e,...t){const n=st.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Oo(e,t){const n=Je(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function q_(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t),i=Oo(r),a=Oo(o),s=+i-as(i),l=+a-as(a);return Math.round((s-l)/z_)}function U_(e,t){const n=Ny(e,t),r=st(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Io(r)}function K_(e){return st(e,Date.now())}function Y_(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t);return+Oo(r)==+Oo(o)}function G_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ku(e){return!(!G_(e)&&typeof e!="number"||isNaN(+Je(e)))}function Z_(e,t){const[n,r]=ss(e,t.start,t.end);return{start:n,end:r}}function Fy(e,t){const{start:n,end:r}=Z_(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(st(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Ly(e,t){const n=Je(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function X_(e,t){const n=Je(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Q_(e,t){var s,l;const n=Br(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Je(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const J_={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},eI=(e,t,n)=>{let r;const o=J_[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 Yu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oI={date:Yu({formats:tI,defaultWidth:"full"}),time:Yu({formats:nI,defaultWidth:"full"}),dateTime:Yu({formats:rI,defaultWidth:"full"})},iI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},aI=(e,t,n,r)=>iI[e];function qi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const sI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cI={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uI={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},pI={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:qi({values:sI,defaultWidth:"wide"}),quarter:qi({values:lI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qi({values:cI,defaultWidth:"wide"}),day:qi({values:uI,defaultWidth:"wide"}),dayPeriod:qi({values:dI,defaultWidth:"wide",formattingValues:fI,defaultFormattingWidth:"wide"})};function Ui(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)?mI(s,d=>d.test(a)):hI(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 hI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function gI(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 vI=/^(\d+)(th|st|nd|rd)?/i,yI=/\d+/i,bI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xI={any:[/^b/i,/^(a|c)/i]},wI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},SI={any:[/1/i,/2/i,/3/i,/4/i]},TI={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},EI={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]},CI={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},kI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},PI={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},AI={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_I={ordinalNumber:gI({matchPattern:vI,parsePattern:yI,valueCallback:e=>parseInt(e,10)}),era:Ui({matchPatterns:bI,defaultMatchWidth:"wide",parsePatterns:xI,defaultParseWidth:"any"}),quarter:Ui({matchPatterns:wI,defaultMatchWidth:"wide",parsePatterns:SI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ui({matchPatterns:TI,defaultMatchWidth:"wide",parsePatterns:EI,defaultParseWidth:"any"}),day:Ui({matchPatterns:CI,defaultMatchWidth:"wide",parsePatterns:kI,defaultParseWidth:"any"}),dayPeriod:Ui({matchPatterns:PI,defaultMatchWidth:"any",parsePatterns:AI,defaultParseWidth:"any"})},Vy={code:"en-US",formatDistance:eI,formatLong:oI,formatRelative:aI,localize:pI,match:_I,options:{weekStartsOn:0,firstWeekContainsDate:1}};function II(e,t){const n=Je(e,t==null?void 0:t.in);return q_(n,X_(n))+1}function $y(e,t){const n=Je(e,t==null?void 0:t.in),r=+Io(n)-+U_(n);return Math.round(r/Oy)+1}function Gu(e,t){var u,d,p,f;const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=Br(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=st((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=_n(a,t),l=st((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=_n(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function OI(e,t){var s,l,c,u;const n=Br(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Gu(e,t),i=st((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),_n(i,t)}function jy(e,t){const n=Je(e,t==null?void 0:t.in),r=+_n(n,t)-+OI(n,t);return Math.round(r/Oy)+1}function et(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ar={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return et(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):et(n+1,2)},d(e,t){return et(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return et(e.getHours()%12||12,t.length)},H(e,t){return et(e.getHours(),t.length)},m(e,t){return et(e.getMinutes(),t.length)},s(e,t){return et(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return et(o,t.length)}},Mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zy={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 ar.y(e,t)},Y:function(e,t,n,r){const o=Gu(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return et(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):et(i,t.length)},R:function(e,t){const n=Ny(e);return et(n,t.length)},u:function(e,t){const n=e.getFullYear();return et(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return et(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return et(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ar.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return et(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=jy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):et(o,t.length)},I:function(e,t,n){const r=$y(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):et(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ar.d(e,t)},D:function(e,t,n){const r=II(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):et(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return et(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return et(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return et(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Mo.noon:r===0?o=Mo.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=Mo.evening:r>=12?o=Mo.afternoon:r>=4?o=Mo.morning:o=Mo.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 ar.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ar.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ar.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ar.s(e,t)},S:function(e,t){return ar.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 Hr(r);case"XXXXX":case"XXX":default:return Hr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return By(r);case"xxxx":case"xx":return Hr(r);case"xxxxx":case"xxx":default:return Hr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ry(r,":");case"OOOO":default:return"GMT"+Hr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ry(r,":");case"zzzz":default:return"GMT"+Hr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return et(r,t.length)},T:function(e,t,n){return et(+e,t.length)}};function Ry(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+et(i,2)}function By(e,t){return e%60===0?(e>0?"-":"+")+et(Math.abs(e)/60,2):Hr(e,t)}function Hr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=et(Math.trunc(r/60),2),i=et(r%60,2);return n+o+t+i}const Hy=(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"})}},Zu={p:Wy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Hy(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}}",Hy(r,t)).replace("{{time}}",Wy(o,t))}},MI=/^D+$/,DI=/^Y+$/,NI=["D","DD","YY","YYYY"];function qy(e){return MI.test(e)}function Uy(e){return DI.test(e)}function Xu(e,t,n){const r=FI(e,t,n);if(console.warn(r),NI.includes(e))throw new RangeError(r)}function FI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const LI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$I=/^'([^]*?)'?$/,jI=/''/g,zI=/[a-zA-Z]/;function RI(e,t,n){var u,d,p,f;const r=Br(),o=r.locale??Vy,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Je(e,n==null?void 0:n.in);if(!Ku(s))throw new RangeError("Invalid time value");let l=t.match(VI).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Zu[g];return h(m,o.formatLong)}return m}).join("").match(LI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:BI(m)};if(zy[g])return{isToken:!0,value:m};if(g.match(zI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(Uy(g)||qy(g))&&Xu(g,t,String(e));const h=zy[g[0]];return h(s,g,o.localize,c)}).join("")}function BI(e){const t=e.match($I);return t?t[1].replace(jI,"'"):e}function HI(){return Object.assign({},Br())}function WI(e,t){const n=Je(e,t==null?void 0:t.in).getDay();return n===0?7:n}function qI(e,t){return+Je(e)>+Je(t)}function UI(e,t){return+Je(e)<+Je(t)}function KI(e,t){const n=YI(t)?new t(0):st(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function YI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const GI=10;class Ky{constructor(){pe(this,"subPriority",0)}validate(t,n){return!0}}class ZI 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 XI extends Ky{constructor(n,r){super();pe(this,"priority",GI);pe(this,"subPriority",-1);this.context=n||(o=>st(r,o))}set(n,r){return r.timestampIsSet?n:st(n,KI(n,this.context))}}class Ke{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new ZI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class QI extends Ke{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 St={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}/},In={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 gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function On(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*B_+i*R_+a*H_),rest:t.slice(n[0].length)}}function Yy(e){return gt(St.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(St.singleDigit,t);case 2:return gt(St.twoDigits,t);case 3:return gt(St.threeDigits,t);case 4:return gt(St.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function ls(e,t){switch(e){case 1:return gt(St.singleDigitSigned,t);case 2:return gt(St.twoDigitsSigned,t);case 3:return gt(St.threeDigitsSigned,t);case 4:return gt(St.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Qu(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 Gy(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function Zy(e){return e%400===0||e%4===0&&e%100!==0}class JI extends Ke{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(bt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=Gy(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 eO extends Ke{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(bt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Gu(n,i);if(o.isTwoDigitYear){const l=Gy(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),_n(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),_n(n,i)}}class tO extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ls(r==="R"?4:r.length,n)}set(n,r,o){const i=st(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Io(i)}}class nO extends Ke{constructor(){super(...arguments);pe(this,"priority",130);pe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ls(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class rO extends Ke{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 bt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class oO extends Ke{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 bt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class iO extends Ke{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(gt(St.month,n),i);case"MM":return Tt(bt(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 aO extends Ke{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(gt(St.month,n),i);case"LL":return Tt(bt(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 sO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=jy(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n==null?void 0:n.in)}class lO extends Ke{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 gt(St.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return _n(sO(n,o,i),i)}}function cO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=$y(r,n)-t;return r.setDate(r.getDate()-o*7),r}class uO extends Ke{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 gt(St.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Io(cO(n,o))}}const dO=[31,28,31,30,31,30,31,31,30,31,30,31],fO=[31,29,31,30,31,30,31,31,30,31,30,31];class pO extends Ke{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 gt(St.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Zy(o),a=n.getMonth();return i?r>=1&&r<=fO[a]:r>=1&&r<=dO[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class hO extends Ke{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 gt(St.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Zy(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Ju(e,t,n){var d,p,f,m;const r=Br(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,i=Je(e,n==null?void 0:n.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return is(i,u,n)}class mO extends Ke{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=Ju(n,o,i),n.setHours(0,0,0,0),n}}class gO extends Ke{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(bt(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=Ju(n,o,i),n.setHours(0,0,0,0),n}}class vO extends Ke{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(bt(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=Ju(n,o,i),n.setHours(0,0,0,0),n}}function yO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=WI(r,n),i=t-o;return is(r,i,n)}class bO extends Ke{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 bt(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=yO(n,o),n.setHours(0,0,0,0),n}}class xO extends Ke{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(Qu(o),0,0,0),n}}class wO extends Ke{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(Qu(o),0,0,0),n}}class SO extends Ke{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(Qu(o),0,0,0),n}}class TO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return gt(St.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class EO extends Ke{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 gt(St.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class CO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return gt(St.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class kO extends Ke{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 gt(St.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class PO extends Ke{constructor(){super(...arguments);pe(this,"priority",60);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return gt(St.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class AO extends Ke{constructor(){super(...arguments);pe(this,"priority",50);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return gt(St.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class _O extends Ke{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(bt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class IO extends Ke{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return On(In.basicOptionalMinutes,n);case"XX":return On(In.basic,n);case"XXXX":return On(In.basicOptionalSeconds,n);case"XXXXX":return On(In.extendedOptionalSeconds,n);case"XXX":default:return On(In.extended,n)}}set(n,r,o){return r.timestampIsSet?n:st(n,n.getTime()-as(n)-o)}}class OO extends Ke{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return On(In.basicOptionalMinutes,n);case"xx":return On(In.basic,n);case"xxxx":return On(In.basicOptionalSeconds,n);case"xxxxx":return On(In.extendedOptionalSeconds,n);case"xxx":default:return On(In.extended,n)}}set(n,r,o){return r.timestampIsSet?n:st(n,n.getTime()-as(n)-o)}}class MO extends Ke{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[st(n,o*1e3),{timestampIsSet:!0}]}}class DO extends Ke{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[st(n,o),{timestampIsSet:!0}]}}const NO={G:new QI,y:new JI,Y:new eO,R:new tO,u:new nO,Q:new rO,q:new oO,M:new iO,L:new aO,w:new lO,I:new uO,d:new pO,D:new hO,E:new mO,e:new gO,c:new vO,i:new bO,a:new xO,b:new wO,B:new SO,h:new TO,H:new EO,K:new CO,k:new kO,m:new PO,s:new AO,S:new _O,X:new IO,x:new OO,t:new MO,T:new DO},FO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,LO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,VO=/^'([^]*?)'?$/,$O=/''/g,jO=/\S/,zO=/[a-zA-Z]/;function RO(e,t,n,r){var h,v,b,x;const o=()=>st(n,NaN),i=HI(),a=i.locale??Vy,s=i.firstWeekContainsDate??((v=(h=i.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((x=(b=i.locale)==null?void 0:b.options)==null?void 0:x.weekStartsOn)??0;if(!t)return e?o():Je(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new XI(r==null?void 0:r.in,n)],d=t.match(LO).map(S=>{const w=S[0];if(w in Zu){const E=Zu[w];return E(S,a.formatLong)}return S}).join("").match(FO),p=[];for(let S of d){Uy(S)&&Xu(S,t,e),qy(S)&&Xu(S,t,e);const w=S[0],E=NO[w];if(E){const{incompatibleTokens:C}=E;if(Array.isArray(C)){const I=p.find(_=>C.includes(_.token)||_.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${S}\` at the same time`)}else if(E.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);p.push({token:w,fullToken:S});const P=E.run(e,S,a.match,c);if(!P)return o();u.push(P.setter),e=P.rest}else{if(w.match(zO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(S==="''"?S="'":w==="'"&&(S=BO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&jO.test(e))return o();const f=u.map(S=>S.priority).sort((S,w)=>w-S).filter((S,w,E)=>E.indexOf(S)===w).map(S=>u.filter(w=>w.priority===S).sort((w,E)=>E.subPriority-w.subPriority)).map(S=>S[0]);let m=Je(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const S of f){if(!S.validate(m,c))return o();const w=S.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function BO(e){return e.match(VO)[1].replace($O,"'")}function HO(e,t,n){const[r,o]=ss(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function WO(e,t){return Y_(st(e,e),K_(e))}function qO(e,t,n){return is(e,-t,n)}function UO(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(+r)?st(e,NaN):(r.setFullYear(t),r)}function KO(e,t,n){return Dy(e,-t,n)}function Ki(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=KO(e,o+r*12,n),d=qO(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return st(e,+d-m)}var Et=function(){return Et=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},Et.apply(this,arguments)};function ed(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function td(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Yi=function(e){return e.replace(new RegExp(" ","g")," ")},Xy=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)},YO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Qy=function(e,t,n){var r=e.length-2,o=YO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Jy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},cs=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},GO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},nd=function(e){var t=T.useRef(e);return T.useEffect(function(){t.current=e},[e]),t},ZO=function(e){return e==="money"||e==="currency"},XO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Et(Et({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},us=function(e,t){var n=Xy(Jy(e),t.fraction.length),r="".concat(t.currency).concat(Qy(n,t.group,t.decimal));return Yi(r)},QO=T.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=ed(e,["locale","currency","currencyDisplay","mask","onChange"]),u=T.useRef(null);T.useImperativeHandle(t,function(){return u.current});var d=T.useMemo(function(){var m=XO(r,i,s);return m.currency=Yi("".concat(m.currency.trim()," ")),m.literal=Yi(m.literal.trim()),m},[r,i]),p=function(m){var g=us(m.target.value,d),h=cs(g);m.target.value=g,m.target.setAttribute("data-number",h.toString()),l==null||l(m),h!==0&&(u.current.selectionEnd=g.length)};T.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var g=us(m,d),h=cs(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l==null||l(Et(Et({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?us(c.defaultValue,d):void 0;return T.createElement("input",Et({},c,{value:typeof c.value=="string"?us(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),JO=1,eM=function(e){return e==="percentage"||e==="percent"||e==="percentual"},tM=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Et(Et({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},ds=function(e,t){var n=Xy(Jy(e),t.fraction.length),r="".concat(Qy(n,t.group,t.decimal)," ").concat(t.percentSign);return Yi(r)},nM=T.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=ed(e,["locale","mask","onChange","onKeyUp"]),s=T.useRef(null),l=td(T.useState(function(){var v,b;return(b=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];T.useImperativeHandle(t,function(){return s.current}),T.useEffect(function(){var v,b=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(ds(b,d))},[a.value]);var d=T.useMemo(function(){var v=tM(r);return v.percentSign=Yi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-JO,f=function(v){var b,x=s.current;x&&(x.setSelectionRange(p,p),v&&((b=a.onFocus)===null||b===void 0||b.call(a,v)))},m=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,S=b.selectionEnd,w=x!==S,E=p<x;!w&&E&&f()}i==null||i(v)},g=function(v){var b=ds(v.target.value,d),x=cs(b);u(b),v.target.value=b,v.target.setAttribute("data-number",x.toString()),o==null||o(v)};T.useEffect(function(){if(s.current!==null){var v=s.current.value;if(v!==""){var b=ds(v,d),x=cs(b);u(b),s.current.value=b,s.current.setAttribute("data-number",x.toString());var S=new InputEvent("change",{});o==null||o(Et(Et({},S),{target:s.current,currentTarget:s.current}))}}},[]),T.useEffect(function(){return f()},[c]);var h=a.defaultValue?ds(a.defaultValue,d):void 0;return T.createElement("input",Et({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:m,ref:s,type:"text"}))}),Gi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},rM=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=fs[i];a===void 0?r.push(i.replace(Gi.dots,"\\.").replace(Gi.openParenthesis,"\\(").replace(Gi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Gi.leadingBars,"\\")},Zi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return rd(o,n);var i=rM(o);return n?"^".concat(i,"$"):i},oM=function(e){return e.replace(Gi.escape,"\\$&")},rd=function(e,t){var n=e.map(function(r){return typeof r=="string"?oM(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fs={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},iM=/\d/,eb="(dd) 9dddd-dddd",tb="(dd) dddd-dddd",nb="ddd.ddd.ddd-dd",rb="dd.ddd.ddd/dddd-dd",ps=function(e){return e.replace(/\D/g,"")},aM=["2",/[0-3]/,":",/[0-5]/,/\d/],sM=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Kt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:nb,isoDate:"dddd-dd-dd",cnpj:rb,telephone:tb,cellphone:eb,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ps(e).length<=11?nb:rb},int:function(e){return e===void 0&&(e=""),iM.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=ps(e);return t.length<11?tb:eb},time:function(e){var t=ps(e),n=t[0];return n==="2"?aM:sM}},Yt=function(e,t,n){var r;return n===void 0&&(n={}),Et({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Zi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Yt(Kt.cellTelephone,"tel"),cellphone:Yt(Kt.cellphone,"tel"),cep:Yt(Kt.cep,"decimal"),cnpj:Yt(Kt.cnpj,"decimal"),color:Yt(Kt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Yt(Kt.cpf,"decimal"),cpfCnpj:Yt(Kt.cpfCnpj,"decimal",{transform:ps}),creditCard:Yt(Kt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Yt(Kt.date,"decimal"),int:Yt(Kt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Yt(Kt.isoDate,"decimal"),telephone:Yt(Kt.telephone,"tel"),time:Yt(Kt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Yt(Kt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ob(e,t,n,r){var o,i;r===void 0&&(r=fs);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var ib=function(e){return e},lM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Zi(e,n,t));return r.test(n)};function cM(e){var t=T.useRef(e);return T.useEffect(function(){t.current=e},[e]),t.current}var uM=T.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=ed(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=T.useRef(null);T.useImperativeHandle(t,function(){return m.current});var g=nd(s),h=nd(d),v=nd(u),b=T.useRef(lM(u,i,f.value||f.defaultValue)),x=p??"input",S=td(T.useState(""),2),w=S[0],E=S[1],C=cM(w),P=T.useCallback(function(M,O){var j,L,z=(j=M??O)!==null&&j!==void 0?j:"";if(u===void 0)return z;var D=(L=z==null?void 0:z.toString())!==null&&L!==void 0?L:"";return ob(D,typeof u=="function"?u(D):u,a??ib,c??fs)},[a,u,c]),I=td(T.useState(function(){return P(f.value,f.defaultValue)}),2),_=I[0],F=I[1],N=P(f.defaultValue,f.defaultValue),V=T.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var M=u(_);return Array.isArray(M)?rd(M,i):Zi(u,_,i)}return typeof u=="string"?Zi(u,_,i):rd(u,i)},[l,_,i,u]);T.useEffect(function(){if(f.value!==void 0){var M=P(f.value,f.defaultValue);F(M),m.current!==null&&(m.current.value=M)}},[f.value,u,a,f.defaultValue]);var A=function(M){var O,j,L,z,D,B=M.currentTarget,X=M.target.value;if(v.current===void 0)return F(X),(O=h.current)===null||O===void 0||O.call(h,X),(j=g.current)===null||j===void 0||j.call(g,M),d==null?void 0:d(X);var Q=new RegExp(Zi(v.current,X,i)),J=(L=B.selectionEnd)!==null&&L!==void 0?L:0,G=function(K,ae,H){if(K.type!=="number")return K.setSelectionRange(ae,H)};if(r&&b.current&&X.length>=_.length)return B.value=_,G(B,J-1,J-1);var Y=!1;X.length<C.length&&(b.current=!1,Y=!0),Q.test(X)&&(b.current=!0);var Z=J,$=X[Z-1],R=ob(X,typeof v.current=="function"?v.current(X):v.current,a??ib,c??fs);for(B.value=R,F(R);Z<R.length&&R.charAt(Z-1)!==$;)Z+=1;Y?G(B,J,J):G(B,Z,Z),M.target.value=R,E(R),(z=h.current)===null||z===void 0||z.call(h,R),(D=g.current)===null||D===void 0||D.call(g,M)};return T.createElement(x,Et({},f,{ref:m,pattern:V,onChange:A,defaultValue:ab(f.defaultValue)?N:void 0,value:ab(f.value)?P(f.value,f.value):f.value}))}),ab=function(e){return typeof e=="string"},sb=T.forwardRef(function(e,t){return ZO(e.mask)?T.createElement(QO,Et({},e,{mask:void 0,ref:t})):eM(e.mask)?T.createElement(nM,Et({},e,{mask:void 0,ref:t})):T.createElement(uM,Et({},e,{ref:t}))}),Gt=function(e){return function(t){return T.createElement(sb,Et({},e,t))}};Gt($t.cellTelephone),Gt($t.cellphone),Gt($t.cep),Gt($t.cnpj),Gt($t.color),Gt($t.cpf),Gt($t.cpfCnpj),Gt($t.creditCard),Gt($t.date),Gt($t.int),Gt($t.isoDate),Gt($t.telephone),Gt($t.time),Gt($t.uuid);var lb=T.forwardRef(function(t,n){var r=T.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&GO($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return T.createElement(sb,Et({},o,{ref:n}))}),hs={exports:{}},od={},ms={exports:{}},id={};/**
182
+ */const qi=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_y={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},V_={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Iy=e=>y.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:_y,exit:_y.false,transition:V_,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),$_=fo("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"}}),j_=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 y.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:y.jsx(Iy,{"data-open":!!i,open:!!i,children:y.jsxs(an,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe($_({theme:n}),t),children:[y.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?y.jsx(Ty,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?y.jsx(Ay,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?y.jsx(F_,{"aria-hidden":"true",size:20}):null,r,y.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?y.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:y.jsx(qi,{size:20})}):null]})})})}),Oy=6048e5,z_=864e5,R_=6e4,B_=36e5,H_=1e3,My=Symbol.for("constructDateFrom");function st(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&My in e?e[My](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return st(t||e,e)}function as(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(t)?st((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Dy(e,t,n){const r=Je(e,n==null?void 0:n.in);if(isNaN(t))return st(e,NaN);if(!t)return r;const o=r.getDate(),i=st(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 _o(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n==null?void 0:n.in),d=o||r?Dy(u,o+r*12):u,p=a||i?as(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return st(e,+p+g)}let W_={};function Hr(){return W_}function _n(e,t){var s,l,c,u;const n=Hr(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Je(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Io(e,t){return _n(e,{...t,weekStartsOn:1})}function Ny(e,t){const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=st(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Io(o),a=st(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Io(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ss(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ls(e,...t){const n=st.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Oo(e,t){const n=Je(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function q_(e,t,n){const[r,o]=ls(n==null?void 0:n.in,e,t),i=Oo(r),a=Oo(o),s=+i-ss(i),l=+a-ss(a);return Math.round((s-l)/z_)}function U_(e,t){const n=Ny(e,t),r=st(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Io(r)}function K_(e){return st(e,Date.now())}function Y_(e,t,n){const[r,o]=ls(n==null?void 0:n.in,e,t);return+Oo(r)==+Oo(o)}function G_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ku(e){return!(!G_(e)&&typeof e!="number"||isNaN(+Je(e)))}function Z_(e,t){const[n,r]=ls(e,t.start,t.end);return{start:n,end:r}}function Fy(e,t){const{start:n,end:r}=Z_(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(st(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function Ly(e,t){const n=Je(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function X_(e,t){const n=Je(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Q_(e,t){var s,l;const n=Hr(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Je(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const J_={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},eI=(e,t,n)=>{let r;const o=J_[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 Yu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oI={date:Yu({formats:tI,defaultWidth:"full"}),time:Yu({formats:nI,defaultWidth:"full"}),dateTime:Yu({formats:rI,defaultWidth:"full"})},iI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},aI=(e,t,n,r)=>iI[e];function Ui(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const sI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cI={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uI={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},pI={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:Ui({values:sI,defaultWidth:"wide"}),quarter:Ui({values:lI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ui({values:cI,defaultWidth:"wide"}),day:Ui({values:uI,defaultWidth:"wide"}),dayPeriod:Ui({values:dI,defaultWidth:"wide",formattingValues:fI,defaultFormattingWidth:"wide"})};function Ki(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)?mI(s,d=>d.test(a)):hI(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 hI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function gI(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 vI=/^(\d+)(th|st|nd|rd)?/i,yI=/\d+/i,bI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xI={any:[/^b/i,/^(a|c)/i]},wI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},SI={any:[/1/i,/2/i,/3/i,/4/i]},TI={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},EI={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]},CI={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},kI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},PI={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},AI={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_I={ordinalNumber:gI({matchPattern:vI,parsePattern:yI,valueCallback:e=>parseInt(e,10)}),era:Ki({matchPatterns:bI,defaultMatchWidth:"wide",parsePatterns:xI,defaultParseWidth:"any"}),quarter:Ki({matchPatterns:wI,defaultMatchWidth:"wide",parsePatterns:SI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ki({matchPatterns:TI,defaultMatchWidth:"wide",parsePatterns:EI,defaultParseWidth:"any"}),day:Ki({matchPatterns:CI,defaultMatchWidth:"wide",parsePatterns:kI,defaultParseWidth:"any"}),dayPeriod:Ki({matchPatterns:PI,defaultMatchWidth:"any",parsePatterns:AI,defaultParseWidth:"any"})},Vy={code:"en-US",formatDistance:eI,formatLong:oI,formatRelative:aI,localize:pI,match:_I,options:{weekStartsOn:0,firstWeekContainsDate:1}};function II(e,t){const n=Je(e,t==null?void 0:t.in);return q_(n,X_(n))+1}function $y(e,t){const n=Je(e,t==null?void 0:t.in),r=+Io(n)-+U_(n);return Math.round(r/Oy)+1}function Gu(e,t){var u,d,p,f;const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=Hr(),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=st((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=_n(a,t),l=st((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=_n(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function OI(e,t){var s,l,c,u;const n=Hr(),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=Gu(e,t),i=st((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),_n(i,t)}function jy(e,t){const n=Je(e,t==null?void 0:t.in),r=+_n(n,t)-+OI(n,t);return Math.round(r/Oy)+1}function et(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ar={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return et(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):et(n+1,2)},d(e,t){return et(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return et(e.getHours()%12||12,t.length)},H(e,t){return et(e.getHours(),t.length)},m(e,t){return et(e.getMinutes(),t.length)},s(e,t){return et(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return et(o,t.length)}},Mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zy={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 ar.y(e,t)},Y:function(e,t,n,r){const o=Gu(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return et(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):et(i,t.length)},R:function(e,t){const n=Ny(e);return et(n,t.length)},u:function(e,t){const n=e.getFullYear();return et(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return et(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return et(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ar.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return et(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=jy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):et(o,t.length)},I:function(e,t,n){const r=$y(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):et(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ar.d(e,t)},D:function(e,t,n){const r=II(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):et(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return et(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return et(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return et(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Mo.noon:r===0?o=Mo.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=Mo.evening:r>=12?o=Mo.afternoon:r>=4?o=Mo.morning:o=Mo.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 ar.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ar.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ar.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ar.s(e,t)},S:function(e,t){return ar.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 Wr(r);case"XXXXX":case"XXX":default:return Wr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return By(r);case"xxxx":case"xx":return Wr(r);case"xxxxx":case"xxx":default:return Wr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ry(r,":");case"OOOO":default:return"GMT"+Wr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ry(r,":");case"zzzz":default:return"GMT"+Wr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return et(r,t.length)},T:function(e,t,n){return et(+e,t.length)}};function Ry(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+et(i,2)}function By(e,t){return e%60===0?(e>0?"-":"+")+et(Math.abs(e)/60,2):Wr(e,t)}function Wr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=et(Math.trunc(r/60),2),i=et(r%60,2);return n+o+t+i}const Hy=(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"})}},Zu={p:Wy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Hy(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}}",Hy(r,t)).replace("{{time}}",Wy(o,t))}},MI=/^D+$/,DI=/^Y+$/,NI=["D","DD","YY","YYYY"];function qy(e){return MI.test(e)}function Uy(e){return DI.test(e)}function Xu(e,t,n){const r=FI(e,t,n);if(console.warn(r),NI.includes(e))throw new RangeError(r)}function FI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const LI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$I=/^'([^]*?)'?$/,jI=/''/g,zI=/[a-zA-Z]/;function RI(e,t,n){var u,d,p,f;const r=Hr(),o=r.locale??Vy,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Je(e,n==null?void 0:n.in);if(!Ku(s))throw new RangeError("Invalid time value");let l=t.match(VI).map(m=>{const g=m[0];if(g==="p"||g==="P"){const h=Zu[g];return h(m,o.formatLong)}return m}).join("").match(LI).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:BI(m)};if(zy[g])return{isToken:!0,value:m};if(g.match(zI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(Uy(g)||qy(g))&&Xu(g,t,String(e));const h=zy[g[0]];return h(s,g,o.localize,c)}).join("")}function BI(e){const t=e.match($I);return t?t[1].replace(jI,"'"):e}function HI(){return Object.assign({},Hr())}function WI(e,t){const n=Je(e,t==null?void 0:t.in).getDay();return n===0?7:n}function qI(e,t){return+Je(e)>+Je(t)}function UI(e,t){return+Je(e)<+Je(t)}function KI(e,t){const n=YI(t)?new t(0):st(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function YI(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const GI=10;class Ky{constructor(){pe(this,"subPriority",0)}validate(t,n){return!0}}class ZI 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 XI extends Ky{constructor(n,r){super();pe(this,"priority",GI);pe(this,"subPriority",-1);this.context=n||(o=>st(r,o))}set(n,r){return r.timestampIsSet?n:st(n,KI(n,this.context))}}class Ke{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new ZI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class QI extends Ke{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 St={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}/},In={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 gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function On(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*B_+i*R_+a*H_),rest:t.slice(n[0].length)}}function Yy(e){return gt(St.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(St.singleDigit,t);case 2:return gt(St.twoDigits,t);case 3:return gt(St.threeDigits,t);case 4:return gt(St.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function cs(e,t){switch(e){case 1:return gt(St.singleDigitSigned,t);case 2:return gt(St.twoDigitsSigned,t);case 3:return gt(St.threeDigitsSigned,t);case 4:return gt(St.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Qu(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 Gy(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function Zy(e){return e%400===0||e%4===0&&e%100!==0}class JI extends Ke{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(bt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=Gy(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 eO extends Ke{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(bt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Gu(n,i);if(o.isTwoDigitYear){const l=Gy(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),_n(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),_n(n,i)}}class tO extends Ke{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 cs(r==="R"?4:r.length,n)}set(n,r,o){const i=st(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Io(i)}}class nO extends Ke{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 cs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class rO extends Ke{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 bt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class oO extends Ke{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 bt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class iO extends Ke{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(gt(St.month,n),i);case"MM":return Tt(bt(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 aO extends Ke{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(gt(St.month,n),i);case"LL":return Tt(bt(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 sO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=jy(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n==null?void 0:n.in)}class lO extends Ke{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 gt(St.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return _n(sO(n,o,i),i)}}function cO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=$y(r,n)-t;return r.setDate(r.getDate()-o*7),r}class uO extends Ke{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 gt(St.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Io(cO(n,o))}}const dO=[31,28,31,30,31,30,31,31,30,31,30,31],fO=[31,29,31,30,31,30,31,31,30,31,30,31];class pO extends Ke{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 gt(St.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Zy(o),a=n.getMonth();return i?r>=1&&r<=fO[a]:r>=1&&r<=dO[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class hO extends Ke{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 gt(St.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Zy(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Ju(e,t,n){var d,p,f,m;const r=Hr(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,i=Je(e,n==null?void 0:n.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return as(i,u,n)}class mO extends Ke{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=Ju(n,o,i),n.setHours(0,0,0,0),n}}class gO extends Ke{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(bt(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=Ju(n,o,i),n.setHours(0,0,0,0),n}}class vO extends Ke{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(bt(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=Ju(n,o,i),n.setHours(0,0,0,0),n}}function yO(e,t,n){const r=Je(e,n==null?void 0:n.in),o=WI(r,n),i=t-o;return as(r,i,n)}class bO extends Ke{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 bt(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=yO(n,o),n.setHours(0,0,0,0),n}}class xO extends Ke{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(Qu(o),0,0,0),n}}class wO extends Ke{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(Qu(o),0,0,0),n}}class SO extends Ke{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(Qu(o),0,0,0),n}}class TO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return gt(St.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class EO extends Ke{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 gt(St.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class CO extends Ke{constructor(){super(...arguments);pe(this,"priority",70);pe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return gt(St.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class kO extends Ke{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 gt(St.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class PO extends Ke{constructor(){super(...arguments);pe(this,"priority",60);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return gt(St.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class AO extends Ke{constructor(){super(...arguments);pe(this,"priority",50);pe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return gt(St.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class _O extends Ke{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(bt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class IO extends Ke{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return On(In.basicOptionalMinutes,n);case"XX":return On(In.basic,n);case"XXXX":return On(In.basicOptionalSeconds,n);case"XXXXX":return On(In.extendedOptionalSeconds,n);case"XXX":default:return On(In.extended,n)}}set(n,r,o){return r.timestampIsSet?n:st(n,n.getTime()-ss(n)-o)}}class OO extends Ke{constructor(){super(...arguments);pe(this,"priority",10);pe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return On(In.basicOptionalMinutes,n);case"xx":return On(In.basic,n);case"xxxx":return On(In.basicOptionalSeconds,n);case"xxxxx":return On(In.extendedOptionalSeconds,n);case"xxx":default:return On(In.extended,n)}}set(n,r,o){return r.timestampIsSet?n:st(n,n.getTime()-ss(n)-o)}}class MO extends Ke{constructor(){super(...arguments);pe(this,"priority",40);pe(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[st(n,o*1e3),{timestampIsSet:!0}]}}class DO extends Ke{constructor(){super(...arguments);pe(this,"priority",20);pe(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[st(n,o),{timestampIsSet:!0}]}}const NO={G:new QI,y:new JI,Y:new eO,R:new tO,u:new nO,Q:new rO,q:new oO,M:new iO,L:new aO,w:new lO,I:new uO,d:new pO,D:new hO,E:new mO,e:new gO,c:new vO,i:new bO,a:new xO,b:new wO,B:new SO,h:new TO,H:new EO,K:new CO,k:new kO,m:new PO,s:new AO,S:new _O,X:new IO,x:new OO,t:new MO,T:new DO},FO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,LO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,VO=/^'([^]*?)'?$/,$O=/''/g,jO=/\S/,zO=/[a-zA-Z]/;function RO(e,t,n,r){var h,v,b,x;const o=()=>st(n,NaN),i=HI(),a=i.locale??Vy,s=i.firstWeekContainsDate??((v=(h=i.locale)==null?void 0:h.options)==null?void 0:v.firstWeekContainsDate)??1,l=i.weekStartsOn??((x=(b=i.locale)==null?void 0:b.options)==null?void 0:x.weekStartsOn)??0;if(!t)return e?o():Je(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new XI(r==null?void 0:r.in,n)],d=t.match(LO).map(S=>{const w=S[0];if(w in Zu){const T=Zu[w];return T(S,a.formatLong)}return S}).join("").match(FO),p=[];for(let S of d){Uy(S)&&Xu(S,t,e),qy(S)&&Xu(S,t,e);const w=S[0],T=NO[w];if(T){const{incompatibleTokens:C}=T;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${S}\` at the same time`)}else if(T.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);p.push({token:w,fullToken:S});const P=T.run(e,S,a.match,c);if(!P)return o();u.push(P.setter),e=P.rest}else{if(w.match(zO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(S==="''"?S="'":w==="'"&&(S=BO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&jO.test(e))return o();const f=u.map(S=>S.priority).sort((S,w)=>w-S).filter((S,w,T)=>T.indexOf(S)===w).map(S=>u.filter(w=>w.priority===S).sort((w,T)=>T.subPriority-w.subPriority)).map(S=>S[0]);let m=Je(n,r==null?void 0:r.in);if(isNaN(+m))return o();const g={};for(const S of f){if(!S.validate(m,c))return o();const w=S.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return m}function BO(e){return e.match(VO)[1].replace($O,"'")}function HO(e,t,n){const[r,o]=ls(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function WO(e,t){return Y_(st(e,e),K_(e))}function qO(e,t,n){return as(e,-t,n)}function UO(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(+r)?st(e,NaN):(r.setFullYear(t),r)}function KO(e,t,n){return Dy(e,-t,n)}function Yi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=KO(e,o+r*12,n),d=qO(u,a+i*7,n),p=l+s*60,m=(c+p*60)*1e3;return st(e,+d-m)}var Et=function(){return Et=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},Et.apply(this,arguments)};function ed(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function td(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Gi=function(e){return e.replace(new RegExp(" ","g")," ")},Xy=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)},YO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Qy=function(e,t,n){var r=e.length-2,o=YO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Jy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},us=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},GO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},nd=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},ZO=function(e){return e==="money"||e==="currency"},XO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Et(Et({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ds=function(e,t){var n=Xy(Jy(e),t.fraction.length),r="".concat(t.currency).concat(Qy(n,t.group,t.decimal));return Gi(r)},QO=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=ed(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var m=XO(r,i,s);return m.currency=Gi("".concat(m.currency.trim()," ")),m.literal=Gi(m.literal.trim()),m},[r,i]),p=function(m){var g=ds(m.target.value,d),h=us(g);m.target.value=g,m.target.setAttribute("data-number",h.toString()),l==null||l(m),h!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var g=ds(m,d),h=us(g);u.current.value=g,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l==null||l(Et(Et({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?ds(c.defaultValue,d):void 0;return E.createElement("input",Et({},c,{value:typeof c.value=="string"?ds(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),JO=1,eM=function(e){return e==="percentage"||e==="percent"||e==="percentual"},tM=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Et(Et({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},fs=function(e,t){var n=Xy(Jy(e),t.fraction.length),r="".concat(Qy(n,t.group,t.decimal)," ").concat(t.percentSign);return Gi(r)},nM=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=ed(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=td(E.useState(function(){var v,b;return(b=(v=a.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var v,b=Number.parseFloat("".concat((v=a.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(fs(b,d))},[a.value]);var d=E.useMemo(function(){var v=tM(r);return v.percentSign=Gi("".concat(v.percentSign)),v},[r]),p=c.length-d.percentSign.length-JO,f=function(v){var b,x=s.current;x&&(x.setSelectionRange(p,p),v&&((b=a.onFocus)===null||b===void 0||b.call(a,v)))},m=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,S=b.selectionEnd,w=x!==S,T=p<x;!w&&T&&f()}i==null||i(v)},g=function(v){var b=fs(v.target.value,d),x=us(b);u(b),v.target.value=b,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 b=fs(v,d),x=us(b);u(b),s.current.value=b,s.current.setAttribute("data-number",x.toString());var S=new InputEvent("change",{});o==null||o(Et(Et({},S),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var h=a.defaultValue?fs(a.defaultValue,d):void 0;return E.createElement("input",Et({},a,{defaultValue:h,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:m,ref:s,type:"text"}))}),Zi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},rM=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=ps[i];a===void 0?r.push(i.replace(Zi.dots,"\\.").replace(Zi.openParenthesis,"\\(").replace(Zi.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Zi.leadingBars,"\\")},Xi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return rd(o,n);var i=rM(o);return n?"^".concat(i,"$"):i},oM=function(e){return e.replace(Zi.escape,"\\$&")},rd=function(e,t){var n=e.map(function(r){return typeof r=="string"?oM(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ps={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]/}},iM=/\d/,eb="(dd) 9dddd-dddd",tb="(dd) dddd-dddd",nb="ddd.ddd.ddd-dd",rb="dd.ddd.ddd/dddd-dd",hs=function(e){return e.replace(/\D/g,"")},aM=["2",/[0-3]/,":",/[0-5]/,/\d/],sM=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Kt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:nb,isoDate:"dddd-dd-dd",cnpj:rb,telephone:tb,cellphone:eb,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return hs(e).length<=11?nb:rb},int:function(e){return e===void 0&&(e=""),iM.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=hs(e);return t.length<11?tb:eb},time:function(e){var t=hs(e),n=t[0];return n==="2"?aM:sM}},Yt=function(e,t,n){var r;return n===void 0&&(n={}),Et({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Xi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Yt(Kt.cellTelephone,"tel"),cellphone:Yt(Kt.cellphone,"tel"),cep:Yt(Kt.cep,"decimal"),cnpj:Yt(Kt.cnpj,"decimal"),color:Yt(Kt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Yt(Kt.cpf,"decimal"),cpfCnpj:Yt(Kt.cpfCnpj,"decimal",{transform:hs}),creditCard:Yt(Kt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Yt(Kt.date,"decimal"),int:Yt(Kt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Yt(Kt.isoDate,"decimal"),telephone:Yt(Kt.telephone,"tel"),time:Yt(Kt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Yt(Kt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ob(e,t,n,r){var o,i;r===void 0&&(r=ps);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 ib=function(e){return e},lM=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Xi(e,n,t));return r.test(n)};function cM(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var uM=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=ed(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=E.useRef(null);E.useImperativeHandle(t,function(){return m.current});var g=nd(s),h=nd(d),v=nd(u),b=E.useRef(lM(u,i,f.value||f.defaultValue)),x=p??"input",S=td(E.useState(""),2),w=S[0],T=S[1],C=cM(w),P=E.useCallback(function(M,D){var V,F,H=(V=M??D)!==null&&V!==void 0?V:"";if(u===void 0)return H;var O=(F=H==null?void 0:H.toString())!==null&&F!==void 0?F:"";return ob(O,typeof u=="function"?u(O):u,a??ib,c??ps)},[a,u,c]),I=td(E.useState(function(){return P(f.value,f.defaultValue)}),2),A=I[0],L=I[1],N=P(f.defaultValue,f.defaultValue),$=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var M=u(A);return Array.isArray(M)?rd(M,i):Xi(u,A,i)}return typeof u=="string"?Xi(u,A,i):rd(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var M=P(f.value,f.defaultValue);L(M),m.current!==null&&(m.current.value=M)}},[f.value,u,a,f.defaultValue]);var _=function(M){var D,V,F,H,O,R=M.currentTarget,X=M.target.value;if(v.current===void 0)return L(X),(D=h.current)===null||D===void 0||D.call(h,X),(V=g.current)===null||V===void 0||V.call(g,M),d==null?void 0:d(X);var Q=new RegExp(Xi(v.current,X,i)),J=(F=R.selectionEnd)!==null&&F!==void 0?F:0,G=function(K,ae,B){if(K.type!=="number")return K.setSelectionRange(ae,B)};if(r&&b.current&&X.length>=A.length)return R.value=A,G(R,J-1,J-1);var Y=!1;X.length<C.length&&(b.current=!1,Y=!0),Q.test(X)&&(b.current=!0);var Z=J,j=X[Z-1],z=ob(X,typeof v.current=="function"?v.current(X):v.current,a??ib,c??ps);for(R.value=z,L(z);Z<z.length&&z.charAt(Z-1)!==j;)Z+=1;Y?G(R,J,J):G(R,Z,Z),M.target.value=z,T(z),(H=h.current)===null||H===void 0||H.call(h,z),(O=g.current)===null||O===void 0||O.call(g,M)};return E.createElement(x,Et({},f,{ref:m,pattern:$,onChange:_,defaultValue:ab(f.defaultValue)?N:void 0,value:ab(f.value)?P(f.value,f.value):f.value}))}),ab=function(e){return typeof e=="string"},sb=E.forwardRef(function(e,t){return ZO(e.mask)?E.createElement(QO,Et({},e,{mask:void 0,ref:t})):eM(e.mask)?E.createElement(nM,Et({},e,{mask:void 0,ref:t})):E.createElement(uM,Et({},e,{ref:t}))}),Gt=function(e){return function(t){return E.createElement(sb,Et({},e,t))}};Gt($t.cellTelephone),Gt($t.cellphone),Gt($t.cep),Gt($t.cnpj),Gt($t.color),Gt($t.cpf),Gt($t.cpfCnpj),Gt($t.creditCard),Gt($t.date),Gt($t.int),Gt($t.isoDate),Gt($t.telephone),Gt($t.time),Gt($t.uuid);var lb=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&GO($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return E.createElement(sb,Et({},o,{ref:n}))}),ms={exports:{}},od={},gs={exports:{}},id={};/**
183
183
  * @license React
184
184
  * use-sync-external-store-shim.production.js
185
185
  *
@@ -187,7 +187,7 @@
187
187
  *
188
188
  * This source code is licensed under the MIT license found in the
189
189
  * LICENSE file in the root directory of this source tree.
190
- */var cb;function dM(){if(cb)return id;cb=1;var e=T;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),m=r({inst:{value:f,getSnapshot:p}}),g=m[0].inst,h=m[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&h({inst:g})},[d,f,p]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return id.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,id}var ad={};/**
190
+ */var cb;function dM(){if(cb)return id;cb=1;var e=E;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),m=r({inst:{value:f,getSnapshot:p}}),g=m[0].inst,h=m[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&h({inst:g})},[d,f,p]),o(function(){return l(g)&&h({inst:g}),d(function(){l(g)&&h({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return id.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,id}var ad={};/**
191
191
  * @license React
192
192
  * use-sync-external-store-shim.development.js
193
193
  *
@@ -195,7 +195,7 @@
195
195
  *
196
196
  * This source code is licensed under the MIT license found in the
197
197
  * LICENSE file in the root directory of this source tree.
198
- */var ub;function fM(){return ub||(ub=1,process.env.NODE_ENV!=="production"&&function(){function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}function t(f,m){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=m();if(!d){var h=m();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:g,getSnapshot:m}});var v=h[0].inst,b=h[1];return l(function(){v.value=g,v.getSnapshot=m,n(v)&&b({inst:v})},[f,g,m]),s(function(){return n(v)&&b({inst:v}),f(function(){n(v)&&b({inst:v})})},[f]),c(g),g}function n(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!i(f,g)}catch{return!0}}function r(f,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=T,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;ad.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())}()),ad}var db;function fb(){return db||(db=1,process.env.NODE_ENV==="production"?ms.exports=dM():ms.exports=fM()),ms.exports}/**
198
+ */var ub;function fM(){return ub||(ub=1,process.env.NODE_ENV!=="production"&&function(){function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}function t(f,m){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=m();if(!d){var h=m();i(g,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:g,getSnapshot:m}});var v=h[0].inst,b=h[1];return l(function(){v.value=g,v.getSnapshot=m,n(v)&&b({inst:v})},[f,g,m]),s(function(){return n(v)&&b({inst:v}),f(function(){n(v)&&b({inst:v})})},[f]),c(g),g}function n(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!i(f,g)}catch{return!0}}function r(f,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;ad.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())}()),ad}var db;function fb(){return db||(db=1,process.env.NODE_ENV==="production"?gs.exports=dM():gs.exports=fM()),gs.exports}/**
199
199
  * @license React
200
200
  * use-sync-external-store-shim/with-selector.production.js
201
201
  *
@@ -203,7 +203,7 @@
203
203
  *
204
204
  * This source code is licensed under the MIT license found in the
205
205
  * LICENSE file in the root directory of this source tree.
206
- */var pb;function pM(){if(pb)return od;pb=1;var e=T,t=fb();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 od.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(E){if(!b){if(b=!0,x=E,E=p(E),f!==void 0&&g.hasValue){var C=g.value;if(f(C,E))return S=C}return S=E}if(C=S,r(x,E))return C;var P=p(E);return f!==void 0&&f(C,P)?(x=E,C):(x=E,S=P)}var b=!1,x,S,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},od}var sd={};/**
206
+ */var pb;function pM(){if(pb)return od;pb=1;var e=E,t=fb();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 od.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(T){if(!b){if(b=!0,x=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(x,T))return C;var P=p(T);return f!==void 0&&f(C,P)?(x=T,C):(x=T,S=P)}var b=!1,x,S,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},od}var sd={};/**
207
207
  * @license React
208
208
  * use-sync-external-store-shim/with-selector.development.js
209
209
  *
@@ -211,32 +211,32 @@
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var hb;function hM(){return hb||(hb=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=T,n=fb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;sd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(E){if(!b){if(b=!0,x=E,E=p(E),f!==void 0&&g.hasValue){var C=g.value;if(f(C,E))return S=C}return S=E}if(C=S,r(x,E))return C;var P=p(E);return f!==void 0&&f(C,P)?(x=E,C):(x=E,S=P)}var b=!1,x,S,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),sd}var mb;function mM(){return mb||(mb=1,process.env.NODE_ENV==="production"?hs.exports=pM():hs.exports=hM()),hs.exports}mM();var Do=function(){return Do=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},Do.apply(this,arguments)};function Xi(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 gb(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 No=function(e){var t=T.useRef(e??{});return T.useEffect(function(){return void(t.current=e)},[e]),t},gM=function(e){var t=T.useRef(void 0);return T.useEffect(function(){t.current=e},[e]),t.current},vM=function(e){return Object.entries(e)},vb=function(e){return e instanceof Promise},yb=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)},Do(Do({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},yM=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,gb([],Xi(a),!1)),u=function(d,p){return n(function(f){return yb(d,f,i,p)})};return vb(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))}},bM=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,gb([],Xi(a),!1)),c=function(u){return n(function(d){return yb(u,d,i,o.current)})};return vb(l)?l.then(function(u){return c(u)}):c(l)}},ld=function(e,t,n){var r,o,i,a=Xi(T.useState(function(){return e}),2),s=a[0],l=a[1],c=No(s),u=No((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=No(t),p=No((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=No((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=T.useRef(e),g=gM(s),h=No(g),v=T.useRef(null);T.useEffect(function(){if(v.current!==null){var S=v.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var b=Xi(T.useState(function(){var S=function(){return u.current},w=d.current({props:S,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return vM(w).reduce(function(E,C){var P,I=Xi(C,2),_=I[0],F=I[1];return Do(Do({},E),(P={},P[_]=n!=null&&n.debug?yM(_,F,l,S,v,f.current):bM(_,F,l,S,v,f.current),P))},{})}),1),x=b[0];return[s,x,u.current]};const xM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function wM(e,t){return T.useRef(xM(e,t)).current}const gs={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Wr=(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(Wr(a,t,n,s))},[]),bb=(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]:bb(a,t,n,s)}},{}),xb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},vs=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},SM={default:e=>vs(e,{result:xb.default}),dark:e=>vs(e,{result:xb.dark})},Qi=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},TM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),cd=(e,t)=>{const n=Wr(e.colors,Qi(t==null?void 0:t.colors)),r=Wr(e.spacing,Qi(t==null?void 0:t.spacing)),o=Wr(e.rounded,Qi(t==null?void 0:t.rounded)),i=Wr(e.zIndex,Qi((t==null?void 0:t.zIndex)??TM)),a=e.custom?Wr(e.custom,Qi(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},EM=(e,t)=>vs(cd(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),CM=(e,t)=>cd(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),kM=(e,t)=>vs(cd(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ys={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>y.jsxs(T.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file"},bs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},Fo=T.createContext({tweaks:bs,parser:gs.hsla,map:ys,locale:void 0}),ud=e=>{const t=T.useContext(Fo);if(e)return e;if(t)return t.locale||e};function PM(e,t){const n=T.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const Ct=()=>{const e=T.useContext(Fo);return e?e.map:ys},un=(e,t=2)=>e.toString(16).padStart(t,"0"),Lo=()=>{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,`${un(t,4)+un(n,3)}-${un(r[0])+un(r[1])}-${un(r[2])+un(r[3])}-${un(r[4])+un(r[5])}-${un(r[6])+un(r[7])+un(r[8])+un(r[9])}`},wb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Sb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},dd=(e,t)=>{const n=wb(t,Sb.basic,e)||wb(t,Sb.extend,e);return n===void 0||n===e?void 0:n},qr=()=>typeof window>"u",fd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Tb=(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},AM=e=>!e,pd=()=>{},Eb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},_M={type:"spring",bounce:.3,duration:.6},Cb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),kb={enter:Cb(1),exit:Cb(-1),middle:{x:"0%",opacity:1}},Pb={exit:{visibility:"hidden"}},IM=e=>{const t=_n(Ly(e));return Fy({start:t,end:_o(t,{days:41})})},Ab=(e,t)=>e.toLocaleDateString(t,{month:"long"}),OM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Ly(new Date(1970,o,1).setMonth(o)),a=Ab(i,n);return y.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),hd={ArrowLeft:(e,t)=>t==="days"?Ki(e,{days:1}):Ki(e,{months:1}),ArrowRight:(e,t)=>t==="days"?_o(e,{days:1}):_o(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ki(e,{weeks:1}):Ki(e,{years:1}),ArrowDown:(e,t)=>t==="days"?_o(e,{weeks:1}):_o(e,{years:1})},_b=(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)},Ur=e=>e.getFullYear().toString().padStart(4,"0"),MM=(e,t,n)=>e===void 0||n===void 0?!1:qI(t,e)&&UI(t,n),DM=e=>{var n;const t=Ct();return y.jsx(pt.tbody,{layout:!0,variants:kb,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=je.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 y.jsx("tr",{className:i,children:r.map(c=>{var v,b,x,S,w,E,C,P,I,_,F,N,V,A,M,O,j,L;const u=c.toISOString(),d=e.rangeMode?u===((b=(v=e.range)==null?void 0:v.to)==null?void 0:b.toISOString())||u===((S=(x=e.range)==null?void 0:x.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=WO(c)&&e.markToday,f=((E=e.disabledDate)==null?void 0:E.call(e,c))||!1,m=HO(c,e.stateDate),g=!m||f,h=e.rangeMode?MM((C=e.range)==null?void 0:C.from,c,(P=e.range)==null?void 0:P.to):!1;return y.jsxs("td",{align:"center",className:Oe("relative",je.function((I=e.styles)==null?void 0:I.dayFrame)?(_=e.styles)==null?void 0:_.dayFrame(c):(F=e.styles)==null?void 0:F.dayFrame),children:[y.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",je.function((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(c):(A=e.styles)==null?void 0:A.day),children:[c.getDate(),d&&((M=e.stateRange.from)==null?void 0:M.toISOString())===u?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:((O=e.labelRange)==null?void 0:O.from)??t.calendarFromDate})}):null,d&&((j=e.stateRange.to)==null?void 0:j.toISOString())===u?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:((L=e.labelRange)==null?void 0:L.to)??t.calendarToDate})}):null]}),e.RenderOnDay?y.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},NM=()=>Oo(new Date),Ib=({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=T.useRef(Lo()),m=Ct(),g=ud(o),h=T.useRef(null),{date:v,range:b}=p,x=v||new Date,S=T.useRef(null),[w,E]=ld({date:x,isAnimating:!1,year:Ur(x),direction:void 0,range:{from:b==null?void 0:b.from,to:b==null?void 0:b.to},months:OM(f.current,x,g),selectMode:l?"from":void 0,week:Fy({start:_n(x),end:Q_(x)})},A=>({onChangeYear:M=>({year:M}),onExitComplete:()=>(_b(S.current||null,h,A.state().date,200),S.current=null,{isAnimating:!1}),date:M=>{const O=M(A.state().date);return{date:O,year:Ur(O)}},nextMonth:M=>{M&&(S.current=M.currentTarget);const O=A.state();if(O.isAnimating)return O;const j=_o(O.date,{months:1});return{date:j,isAnimating:!0,direction:1,year:Ur(j)}},previousMonth:M=>{M&&(S.current=M.currentTarget);const O=A.state();if(O.isAnimating)return O;const j=Ki(O.date,{months:1});return{date:j,isAnimating:!0,direction:-1,year:Ur(j)}},onSelectDate:M=>{const O=A.state(),j=M.currentTarget.dataset.range==="true",L=M.currentTarget.dataset.date||"",z=new Date(L);return{date:z,year:Ur(z),selectMode:O.selectMode===void 0?void 0:O.selectMode==="from"?"to":"from",range:j?{from:O.selectMode==="from"?z:O.range.from,to:O.selectMode==="to"?z:O.range.to}:O.range}},onChangeMonth:M=>{const O=M.target.value,L=Array.from(M.target.options).find(D=>D.value===O),z=A.state();if(L){const D=L.dataset.index||"",B=new Date(A.state().date);return B.setMonth(+D),{...z,date:B,year:Ur(B)}}return z},onKeyDown:M=>{const O=M.key,j=A.state();if(O in hd){(O==="ArrowUp"||O==="ArrowDown")&&M.preventDefault();const L=A.state().date,z=je.keyof(hd,O)?hd[O](L,M.shiftKey?"month":"days"):null;if(z!==null)return _b(M.target,h,z),{...j,date:z,year:Ur(z)}}return A.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(A,M,O)=>{var L,z;return(O.method==="onChangeMonth"||O.method==="previousMonth"||O.method==="nextMonth")&&((z=(L=O.props).onChangeMonth)==null||z.call(L,A.date)),A},(A,M,O)=>{var L,z;return O.method==="onChangeYear"&&((z=(L=O.props).onChangeYear)==null||z.call(L,A.date)),A},(A,M,O)=>{const j=O.method==="onSelectDate"||O.method==="setToday"||O.method==="onKeyDown";return l&&j&&t?(c==null||c(A.range),A):(j&&t&&(c==null||c(A.date)),A)}]}),C=IM(w.date),P=Tb(C,7),I=w.date.toISOString(),_=Ab(w.date,g);T.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const F=wM(A=>E.date(M=>UO(new Date(M),+A)),1200),N=A=>{const M=A.currentTarget.value;E.onChangeYear(M),s==null||s(new Date(M)),F(M)},V=PM((A,M)=>(A.preventDefault(),M==="right"?E.previousMonth():E.nextMonth()),10);return y.jsx(EE,{transition:_M,children:y.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:Oe("relative overflow-hidden",je.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[y.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:y.jsx(nr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:E.onExitComplete,children:y.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[y.jsxs("header",{className:"relative flex justify-between",children:[y.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Pb,onClick:E.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx(E_,{className:"h-4 w-4"})}),y.jsx(pt.span,{layout:!0,variants:kb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:y.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[y.jsx("select",{value:_,onChange:E.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${_.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),y.jsx(lb,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),y.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Pb,onClick:E.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx(Wu,{className:"h-4 w-4"})}),y.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%)"}})]}),y.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[y.jsx("thead",{children:y.jsx("tr",{children:w.week.map(A=>y.jsx("th",{role:"columnheader",className:Oe("py-2 text-sm font-medium capitalize",je.function(u==null?void 0:u.weekDay)?u.weekDay(A):u==null?void 0:u.weekDay),children:A.toLocaleDateString(g,{weekday:"short"})},A.toString()))})}),y.jsx(DM,{zip:P,range:b,styles:u,date:v||null,dispatch:E,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},_)})}),y.jsx("footer",{className:"mt-2 text-center text-primary",children:y.jsx("button",{type:"button",onClick:()=>E.date(NM),className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},md=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>y.jsxs(an,{...s,as:r,"data-component":"card",className:Oe("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?y.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,y.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-4 lg:px-8",a),children:e})]});md.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return y.jsxs(i,{...o,title:je.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[y.jsx(a,{className:"font-semibold",children:o.title}),r?y.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const Ob=e=>{const t=e.Icon??ky,n=Ct();return y.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[y.jsx(t,{size:64,className:"text-disabled"}),y.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 Mb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Db(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Mb(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():Mb(e[o],null)}}}}function Kr(...e){return k.useCallback(Db(...e),e)}function Nb(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,FM(o,...t)]}function FM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Vo=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(VM);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return y.jsx(gd,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return y.jsx(gd,{...r,ref:t,children:n})});Vo.displayName="Slot";var gd=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=jM(n),i=$M(r,n.props);return n.type!==k.Fragment&&(i.ref=t?Db(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});gd.displayName="SlotClone";var LM=({children:e})=>y.jsx(y.Fragment,{children:e});function VM(e){return k.isValidElement(e)&&e.type===LM}function $M(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 jM(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 zM(e){const t=e+"CollectionProvider",[n,r]=Nb(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=T.useRef(null),v=T.useRef(new Map).current;return y.jsx(o,{scope:m,itemMap:v,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=T.forwardRef((f,m)=>{const{scope:g,children:h}=f,v=i(s,g),b=Kr(m,v.collectionRef);return y.jsx(Vo,{ref:b,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=T.forwardRef((f,m)=>{const{scope:g,children:h,...v}=f,b=T.useRef(null),x=Kr(m,b),S=i(c,g);return T.useEffect(()=>(S.itemMap.set(b,{ref:b,...v}),()=>void S.itemMap.delete(b))),y.jsx(Vo,{[u]:"",ref:x,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return T.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((S,w)=>v.indexOf(S.ref.current)-v.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var RM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Mn=RM.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Vo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Fb(e,t){e&&Ia.flushSync(()=>e.dispatchEvent(t))}function Kn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function BM(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var HM="DismissableLayer",vd="dismissableLayer.update",WM="dismissableLayer.pointerDownOutside",qM="dismissableLayer.focusOutside",Lb,Vb=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$b=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(Vb),[u,d]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=Kr(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),b=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,w=KM(C=>{const P=C.target,I=[...c.branches].some(_=>_.contains(P));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),E=YM(C=>{const P=C.target;[...c.branches].some(_=>_.contains(P))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return BM(C=>{b===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Lb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),zb(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Lb)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),zb())},[u,c]),k.useEffect(()=>{const C=()=>f({});return document.addEventListener(vd,C),()=>document.removeEventListener(vd,C)},[]),y.jsx(Mn.div,{...l,ref:m,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,w.onPointerDownCapture)})});$b.displayName=HM;var UM="DismissableLayerBranch",jb=k.forwardRef((e,t)=>{const n=k.useContext(Vb),r=k.useRef(null),o=Kr(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),y.jsx(Mn.div,{...e,ref:o})});jb.displayName=UM;function KM(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Rb(WM,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 YM(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&Rb(qM,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zb(){const e=new CustomEvent(vd);document.dispatchEvent(e)}function Rb(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 GM=$b,ZM=jb,xs=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},XM="Portal",Bb=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);xs(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?xi.createPortal(y.jsx(Mn.div,{...r,ref:t}),a):null});Bb.displayName=XM;function QM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Hb=e=>{const{present:t,children:n}=e,r=JM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=Kr(r.ref,eD(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};Hb.displayName="Presence";function JM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=QM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=ws(r.current);i.current=s==="mounted"?c:"none"},[s]),xs(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=ws(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),xs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=ws(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=ws(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function eD(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 tD({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=nD({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Kn(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function nD({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Kn(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var rD="VisuallyHidden",yd=k.forwardRef((e,t)=>y.jsx(Mn.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}}));yd.displayName=rD;var bd="ToastProvider",[xd,oD,iD]=zM("Toast"),[Wb,BR]=Nb("Toast",[iD]),[aD,Ss]=Wb(bd),qb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),p=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${bd}\`. Expected non-empty \`string\`.`),y.jsx(xd.Provider,{scope:t,children:y.jsx(aD,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:k.useCallback(()=>u(f=>f+1),[]),onToastRemove:k.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};qb.displayName=bd;var Ub="ToastViewport",sD=["F8"],wd="toast.viewportPause",Sd="toast.viewportResume",Kb=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=sD,label:o="Notifications ({hotkey})",...i}=e,a=Ss(Ub,n),s=oD(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=Kr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;k.useEffect(()=>{const h=v=>{var x;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),k.useEffect(()=>{const h=l.current,v=d.current;if(m&&h&&v){const b=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(wd);v.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Sd);v.dispatchEvent(E),a.isClosePausedRef.current=!1}},S=E=>{!h.contains(E.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",b),h.addEventListener("focusout",S),h.addEventListener("pointermove",b),h.addEventListener("pointerleave",w),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",b),h.removeEventListener("focusout",S),h.removeEventListener("pointermove",b),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[m,a.isClosePausedRef]);const g=k.useCallback(({tabbingDirection:h})=>{const b=s().map(x=>{const S=x.ref.current,w=[S,...wD(S)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?b.reverse():b).flat()},[s]);return k.useEffect(()=>{const h=d.current;if(h){const v=b=>{var w,E,C;const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const P=document.activeElement,I=b.shiftKey;if(b.target===h&&I){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(A=>A===P);Cd(N.slice(V+1))?b.preventDefault():I?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),y.jsxs(ZM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&y.jsx(Td,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});Cd(h)}}),y.jsx(xd.Slot,{scope:n,children:y.jsx(Mn.ol,{tabIndex:-1,...i,ref:p})}),m&&y.jsx(Td,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});Cd(h)}})]})});Kb.displayName=Ub;var Yb="ToastFocusProxy",Td=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss(Yb,n);return y.jsx(yd,{"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()}})});Td.displayName=Yb;var Ts="Toast",lD="toast.swipeStart",cD="toast.swipeMove",uD="toast.swipeCancel",dD="toast.swipeEnd",Gb=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=tD({prop:r,defaultProp:o,onChange:i});return y.jsx(Hb,{present:n||s,children:y.jsx(hD,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Kn(e.onPause),onResume:Kn(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)})})})});Gb.displayName=Ts;var[fD,pD]=Wb(Ts,{onClose(){}}),hD=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=Ss(Ts,n),[h,v]=k.useState(null),b=Kr(t,A=>v(A)),x=k.useRef(null),S=k.useRef(null),w=o||g.duration,E=k.useRef(0),C=k.useRef(w),P=k.useRef(0),{onToastAdd:I,onToastRemove:_}=g,F=Kn(()=>{var M;(h==null?void 0:h.contains(document.activeElement))&&((M=g.viewport)==null||M.focus()),a()}),N=k.useCallback(A=>{!A||A===1/0||(window.clearTimeout(P.current),E.current=new Date().getTime(),P.current=window.setTimeout(F,A))},[F]);k.useEffect(()=>{const A=g.viewport;if(A){const M=()=>{N(C.current),c==null||c()},O=()=>{const j=new Date().getTime()-E.current;C.current=C.current-j,window.clearTimeout(P.current),l==null||l()};return A.addEventListener(wd,O),A.addEventListener(Sd,M),()=>{A.removeEventListener(wd,O),A.removeEventListener(Sd,M)}}},[g.viewport,w,l,c,N]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),k.useEffect(()=>(I(),()=>_()),[I,_]);const V=k.useMemo(()=>h?t0(h):null,[h]);return g.viewport?y.jsxs(y.Fragment,{children:[V&&y.jsx(mD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),y.jsx(fD,{scope:n,onClose:F,children:Ia.createPortal(y.jsx(xd.ItemSlot,{scope:n,children:y.jsx(GM,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||F(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(Mn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,A=>{A.key==="Escape"&&(s==null||s(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:Xt(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:Xt(e.onPointerMove,A=>{if(!x.current)return;const M=A.clientX-x.current.x,O=A.clientY-x.current.y,j=!!S.current,L=["left","right"].includes(g.swipeDirection),z=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=L?z(0,M):0,B=L?0:z(0,O),X=A.pointerType==="touch"?10:2,Q={x:D,y:B},J={originalEvent:A,delta:Q};j?(S.current=Q,Es(cD,d,J,{discrete:!1})):n0(Q,g.swipeDirection,X)?(S.current=Q,Es(lD,u,J,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(M)>X||Math.abs(O)>X)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,A=>{const M=S.current,O=A.target;if(O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),S.current=null,x.current=null,M){const j=A.currentTarget,L={originalEvent:A,delta:M};n0(M,g.swipeDirection,g.swipeThreshold)?Es(dD,f,L,{discrete:!0}):Es(uD,p,L,{discrete:!0}),j.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),mD=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Ts,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return bD(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:y.jsx(Bb,{asChild:!0,children:y.jsx(yd,{...r,children:i&&y.jsxs(y.Fragment,{children:[o.label," ",n]})})})},gD="ToastTitle",Zb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(Mn.div,{...r,ref:t})});Zb.displayName=gD;var vD="ToastDescription",Xb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(Mn.div,{...r,ref:t})});Xb.displayName=vD;var Qb="ToastAction",yD=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?y.jsx(e0,{altText:n,asChild:!0,children:y.jsx(Ed,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Qb}\`. Expected non-empty \`string\`.`),null)});yD.displayName=Qb;var Jb="ToastClose",Ed=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=pD(Jb,n);return y.jsx(e0,{asChild:!0,children:y.jsx(Mn.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});Ed.displayName=Jb;var e0=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return y.jsx(Mn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function t0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),xD(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(...t0(r))}}),t}function Es(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Fb(o,i):o.dispatchEvent(i)}var n0=(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 bD(e=()=>{}){const t=Kn(e);xs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function xD(e){return e.nodeType===e.ELEMENT_NODE}function wD(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 Cd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var SD=qb,TD=Kb,ED=Gb,CD=Zb,kD=Xb,PD=Ed;const AD=e=>{const[t,n]=T.useState(!1),r=()=>n(!0),o=()=>n(!1);return T.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},_D=fo("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"}}),r0=T.createContext(()=>{throw new Error("Not implemented")}),ID=()=>T.useContext(r0),o0={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]}},OD=T.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=_D({theme:t.theme||"default"});return y.jsx(ED,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:y.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:o0[t.reversedIndex]||o0.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:y.jsxs("div",{className:a,children:[y.jsxs("div",{className:"flex flex-col p-4",children:[t.title?y.jsx(CD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,y.jsx(kD,{className:"select-text truncate",children:t.text})]}),r?y.jsx(PD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:y.jsx(Wi,{className:"h-5 w-5"})}):null]})})})});function MD({children:e,max:t=5,duration:n=5e3}){const r=T.useRef(null),o=AD(r),[i,a]=T.useState([]),s=T.useCallback(()=>a([]),[]);T.useEffect(()=>s,[s]);const l=T.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return y.jsxs(SD,{duration:n,swipeThreshold:150,children:[y.jsx(r0.Provider,{value:l,children:e}),y.jsx(nr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return T.createElement(OD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),y.jsx(TD,{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 DD=e=>y.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[y.jsxs("header",{className:"flex items-start gap-4 p-6",children:[y.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:y.jsx("div",{children:y.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("header",{children:y.jsx("h3",{className:"text-base leading-none",children:e.title})}),y.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?y.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),i0=(e,t)=>{const[n,r]=T.useState(()=>t||e);return T.useEffect(()=>{r(e)},[e]),[n,r]},a0={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},s0=T.createContext(""),ND=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",kd=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!ND(a))return a}return n==="backward"?kd(e,e.length-1,"backward"):kd(e,-1,"forward")},l0=(e,t)=>{var i;const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(a=>a.dataset.active==="true");if(r===-1)return null;const o=kd(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},c0={[a0.ArrowLeft]:(e,t)=>l0(t,"backward"),[a0.ArrowRight]:(e,t)=>l0(t,"forward")},FD=e=>{const[t,n]=i0(e.active),r=T.useRef(null),o=Nr(e.onChange);T.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),T.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=T.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(je.keyof(c0,c)){const u=c0[c],d=u(l,r.current);if(d===null)return;n(d)}};return y.jsx(s0.Provider,{value:t,children:y.jsx(md,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:y.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[y.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),y.jsx("nav",{className:"min-w-0",children:y.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return y.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:y.jsx(an,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},LD=()=>T.useContext(s0),VD=e=>{const t=LD();return y.jsx(T.Fragment,{children:e.id===t?e.children:null})},Cs=e=>y.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[y.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),y.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Cs.Icon=function(t){return y.jsx("header",{...t,className:Oe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Cs.Body=function(t){return y.jsx(an,{...t,className:Oe("min-w-0 flex-1",t.className),children:t.children})},Cs.Right=function(t){return y.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:y.jsx(an,{...t,type:"button"})})};const $D=e=>y.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function ks(){return typeof window<"u"}function sr(e){return u0(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){var t;return(t=(u0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function u0(e){return ks()?e instanceof Node||e instanceof Ht(e).Node:!1}function rt(e){return ks()?e instanceof Element||e instanceof Ht(e).Element:!1}function kt(e){return ks()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function Pd(e){return!ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Ji(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 jD(e){return["table","td","th"].includes(sr(e))}function Ps(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ad(e){const t=_d(),n=rt(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 zD(e){let t=Gn(e);for(;kt(t)&&!lr(t);){if(Ad(t))return t;if(Ps(t))return null;t=Gn(t)}return null}function _d(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lr(e){return["html","body","#document"].includes(sr(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function As(e){return rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gn(e){if(sr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pd(e)&&e.host||Yn(e);return Pd(t)?t.host:t}function d0(e){const t=Gn(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&Ji(t)?t:d0(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=d0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=Id(a);return t.concat(a,a.visualViewport||[],Ji(o)?o:[],s&&n?cr(s):[])}return t.concat(o,cr(o,[],n))}function Id(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Pd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Od(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function f0(){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 p0(e){return e.mozInputSource===0&&e.isTrusted?!0:Nd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Md(e){return RD()?!1:!Nd()&&e.width===0&&e.height===0||Nd()&&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 Dd(){return/apple/i.test(navigator.vendor)}function Nd(){const e=/android/i;return e.test(Od())||e.test(f0())}function h0(){return Od().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function RD(){return f0().includes("jsdom/")}function $o(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function BD(e){return"nativeEvent"in e}function HD(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function Fd(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Dn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const WD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ld(e){return kt(e)&&e.matches(WD)}function Nt(e){e.preventDefault(),e.stopPropagation()}function m0(e){return e?e.getAttribute("role")==="combobox"&&Ld(e):!1}const Nn=Math.min,Jt=Math.max,_s=Math.round,jo=Math.floor,ur=e=>({x:e,y:e}),qD={left:"right",right:"left",bottom:"top",top:"bottom"},UD={start:"end",end:"start"};function Vd(e,t,n){return Jt(e,Nn(t,n))}function zo(e,t){return typeof e=="function"?e(t):e}function dr(e){return e.split("-")[0]}function Ro(e){return e.split("-")[1]}function g0(e){return e==="x"?"y":"x"}function $d(e){return e==="y"?"height":"width"}function Yr(e){return["top","bottom"].includes(dr(e))?"y":"x"}function jd(e){return g0(Yr(e))}function KD(e,t,n){n===void 0&&(n=!1);const r=Ro(e),o=jd(e),i=$d(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Is(a)),[a,Is(a)]}function YD(e){const t=Is(e);return[zd(e),t,zd(t)]}function zd(e){return e.replace(/start|end/g,t=>UD[t])}function GD(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 ZD(e,t,n,r){const o=Ro(e);let i=GD(dr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(zd)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>qD[t])}function XD(e){return{top:0,right:0,bottom:0,left:0,...e}}function v0(e){return typeof e!="number"?XD(e):{top:e,right:e,bottom:e,left:e}}function Os(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
214
+ */var hb;function hM(){return hb||(hb=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=fb(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;sd.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function v(T){if(!b){if(b=!0,x=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(x,T))return C;var P=p(T);return f!==void 0&&f(C,P)?(x=T,C):(x=T,S=P)}var b=!1,x,S,w=d===void 0?null:d;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),sd}var mb;function mM(){return mb||(mb=1,process.env.NODE_ENV==="production"?ms.exports=pM():ms.exports=hM()),ms.exports}mM();var Do=function(){return Do=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},Do.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 gb(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 No=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},gM=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},vM=function(e){return Object.entries(e)},vb=function(e){return e instanceof Promise},yb=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)},Do(Do({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},yM=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,gb([],Qi(a),!1)),u=function(d,p){return n(function(f){return yb(d,f,i,p)})};return vb(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))}},bM=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,gb([],Qi(a),!1)),c=function(u){return n(function(d){return yb(u,d,i,o.current)})};return vb(l)?l.then(function(u){return c(u)}):c(l)}},ld=function(e,t,n){var r,o,i,a=Qi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=No(s),u=No((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=No(t),p=No((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=No((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=gM(s),h=No(g),v=E.useRef(null);E.useEffect(function(){if(v.current!==null){var S=v.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var b=Qi(E.useState(function(){var S=function(){return u.current},w=d.current({props:S,state:function(){return c.current},initialState:m.current,previousState:function(){return h.current}});return vM(w).reduce(function(T,C){var P,I=Qi(C,2),A=I[0],L=I[1];return Do(Do({},T),(P={},P[A]=n!=null&&n.debug?yM(A,L,l,S,v,f.current):bM(A,L,l,S,v,f.current),P))},{})}),1),x=b[0];return[s,x,u.current]};const xM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function wM(e,t){return E.useRef(xM(e,t)).current}const vs={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>)`},sr=(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(sr(a,t,n,s))},[]),bb=(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]:bb(a,t,n,s)}},{}),xb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ys=(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)},SM={default:e=>ys(e,{result:xb.default}),dark:e=>ys(e,{result:xb.dark})},Fo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},TM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),cd=(e,t)=>{const n=sr(e.colors,Fo(t==null?void 0:t.colors)),r=sr(e.spacing,Fo(t==null?void 0:t.spacing)),o=sr(e.rounded,Fo(t==null?void 0:t.rounded)),i=sr(e.shadow,Fo(t==null?void 0:t.rounded)),a=sr(e.zIndex,Fo((t==null?void 0:t.zIndex)??TM)),s=e.custom?sr(e.custom,Fo(t==null?void 0:t.customTokens)):[];return n.concat(r,o,s,a,i)},EM=(e,t)=>ys(cd(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),CM=(e,t)=>cd(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),kM=(e,t)=>ys(cd(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),bs={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>y.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file"},xs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Lo=E.createContext({tweaks:xs,parser:vs.hsla,map:bs,locale:void 0}),ud=e=>{const t=E.useContext(Lo);if(e)return e;if(t)return t.locale||e};function PM(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 Ct=()=>{const e=E.useContext(Lo);return e?e.map:bs},un=(e,t=2)=>e.toString(16).padStart(t,"0"),Vo=()=>{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,`${un(t,4)+un(n,3)}-${un(r[0])+un(r[1])}-${un(r[2])+un(r[3])}-${un(r[4])+un(r[5])}-${un(r[6])+un(r[7])+un(r[8])+un(r[9])}`},wb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Sb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},dd=(e,t)=>{const n=wb(t,Sb.basic,e)||wb(t,Sb.extend,e);return n===void 0||n===e?void 0:n},qr=()=>typeof window>"u",fd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Tb=(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},AM=e=>!e,pd=()=>{},Eb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},_M={type:"spring",bounce:.3,duration:.6},Cb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),kb={enter:Cb(1),exit:Cb(-1),middle:{x:"0%",opacity:1}},Pb={exit:{visibility:"hidden"}},IM=e=>{const t=_n(Ly(e));return Fy({start:t,end:_o(t,{days:41})})},Ab=(e,t)=>e.toLocaleDateString(t,{month:"long"}),OM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Ly(new Date(1970,o,1).setMonth(o)),a=Ab(i,n);return y.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),hd={ArrowLeft:(e,t)=>t==="days"?Yi(e,{days:1}):Yi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?_o(e,{days:1}):_o(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Yi(e,{weeks:1}):Yi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?_o(e,{weeks:1}):_o(e,{years:1})},_b=(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)},Ur=e=>e.getFullYear().toString().padStart(4,"0"),MM=(e,t,n)=>e===void 0||n===void 0?!1:qI(t,e)&&UI(t,n),DM=e=>{var n;const t=Ct();return y.jsx(pt.tbody,{layout:!0,variants:kb,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=je.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 y.jsx("tr",{className:i,children:r.map(c=>{var v,b,x,S,w,T,C,P,I,A,L,N,$,_,M,D,V,F;const u=c.toISOString(),d=e.rangeMode?u===((b=(v=e.range)==null?void 0:v.to)==null?void 0:b.toISOString())||u===((S=(x=e.range)==null?void 0:x.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=WO(c)&&e.markToday,f=((T=e.disabledDate)==null?void 0:T.call(e,c))||!1,m=HO(c,e.stateDate),g=!m||f,h=e.rangeMode?MM((C=e.range)==null?void 0:C.from,c,(P=e.range)==null?void 0:P.to):!1;return y.jsxs("td",{align:"center",className:Oe("relative",je.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(L=e.styles)==null?void 0:L.dayFrame),children:[y.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,h&&e.markRange?"size-10 border border-dashed border-card-border":"",je.function((N=e.styles)==null?void 0:N.day)?($=e.styles)==null?void 0:$.day(c):(_=e.styles)==null?void 0:_.day),children:[c.getDate(),d&&((M=e.stateRange.from)==null?void 0:M.toISOString())===u?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?y.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:y.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?y.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},NM=()=>Oo(new Date),Ib=({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(Vo()),m=Ct(),g=ud(o),h=E.useRef(null),{date:v,range:b}=p,x=v||new Date,S=E.useRef(null),[w,T]=ld({date:x,isAnimating:!1,year:Ur(x),direction:void 0,range:{from:b==null?void 0:b.from,to:b==null?void 0:b.to},months:OM(f.current,x,g),selectMode:l?"from":void 0,week:Fy({start:_n(x),end:Q_(x)})},M=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(_b(S.current||null,h,M.state().date,200),S.current=null,{isAnimating:!1}),date:D=>{const V=D(M.state().date);return{date:V,year:Ur(V)}},nextMonth:D=>{D&&(S.current=D.currentTarget);const V=M.state();if(V.isAnimating)return V;const F=_o(V.date,{months:1});return{date:F,isAnimating:!0,direction:1,year:Ur(F)}},previousMonth:D=>{D&&(S.current=D.currentTarget);const V=M.state();if(V.isAnimating)return V;const F=Yi(V.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Ur(F)}},onSelectDate:D=>{const V=M.state(),F=D.currentTarget.dataset.range==="true",H=D.currentTarget.dataset.date||"",O=new Date(H);return{date:O,year:Ur(O),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:F?{from:V.selectMode==="from"?O:V.range.from,to:V.selectMode==="to"?O:V.range.to}:V.range}},onChangeMonth:D=>{const V=D.target.value,H=Array.from(D.target.options).find(R=>R.value===V),O=M.state();if(H){const R=H.dataset.index||"",X=new Date(M.state().date);return X.setMonth(+R),{...O,date:X,year:Ur(X)}}return O},onKeyDown:D=>{const V=D.key,F=M.state();if(V in hd){(V==="ArrowUp"||V==="ArrowDown")&&D.preventDefault();const H=M.state().date,O=je.keyof(hd,V)?hd[V](H,D.shiftKey?"month":"days"):null;if(O!==null)return _b(D.target,h,O),{...F,date:O,year:Ur(O)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,D,V)=>{var H,O;return(V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&((O=(H=V.props).onChangeMonth)==null||O.call(H,M.date)),M},(M,D,V)=>{var H,O;return V.method==="onChangeYear"&&((O=(H=V.props).onChangeYear)==null||O.call(H,M.date)),M},(M,D,V)=>{const F=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&F&&t?(c==null||c(M.range),M):(F&&t&&(c==null||c(M.date)),M)}]}),C=IM(w.date),P=Tb(C,7),I=w.date.toISOString(),A=Ab(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const L=wM(M=>T.date(D=>UO(new Date(D),+M)),1200),N=M=>{const D=M.currentTarget.value;T.onChangeYear(D),s==null||s(new Date(D)),L(D)},$=PM((M,D)=>(M.preventDefault(),D==="right"?T.previousMonth():T.nextMonth()),10),_=()=>{const M=NM();T.date(()=>M),c==null||c(M)};return y.jsx(EE,{transition:_M,children:y.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:Oe("relative overflow-hidden",je.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[y.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:y.jsx(nr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:y.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[y.jsxs("header",{className:"relative flex justify-between",children:[y.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Pb,onClick:T.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx(E_,{className:"h-4 w-4"})}),y.jsx(pt.span,{layout:!0,variants:kb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:y.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[y.jsx("select",{value:A,onChange:T.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),y.jsx(lb,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),y.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Pb,onClick:T.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:y.jsx(Wu,{className:"h-4 w-4"})}),y.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%)"}})]}),y.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[y.jsx("thead",{children:y.jsx("tr",{children:w.week.map(M=>y.jsx("th",{role:"columnheader",className:Oe("py-2 text-sm font-medium capitalize",je.function(u==null?void 0:u.weekDay)?u.weekDay(M):u==null?void 0:u.weekDay),children:M.toLocaleDateString(g,{weekday:"short"})},M.toString()))})}),y.jsx(DM,{zip:P,range:b,styles:u,date:v||null,dispatch:T,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:T.onKeyDown})]})]},A)})}),y.jsx("footer",{className:"mt-2 text-center text-primary",children:y.jsx("button",{type:"button",onClick:_,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},md=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>y.jsxs(an,{...s,as:r,"data-component":"card",className:Oe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8",o),children:[t?y.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,y.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-4 lg:px-8",a),children:e})]});md.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return y.jsxs(i,{...o,title:je.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[y.jsx(a,{className:"font-semibold",children:o.title}),r?y.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const Ob=e=>{const t=e.Icon??ky,n=Ct();return y.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[y.jsx(t,{size:64,className:"text-disabled"}),y.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 Mb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Db(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Mb(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():Mb(e[o],null)}}}}function Kr(...e){return k.useCallback(Db(...e),e)}function Nb(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,FM(o,...t)]}function FM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var $o=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(VM);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return y.jsx(gd,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return y.jsx(gd,{...r,ref:t,children:n})});$o.displayName="Slot";var gd=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=jM(n),i=$M(r,n.props);return n.type!==k.Fragment&&(i.ref=t?Db(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});gd.displayName="SlotClone";var LM=({children:e})=>y.jsx(y.Fragment,{children:e});function VM(e){return k.isValidElement(e)&&e.type===LM}function $M(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 jM(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 zM(e){const t=e+"CollectionProvider",[n,r]=Nb(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:m,children:g}=f,h=E.useRef(null),v=E.useRef(new Map).current;return y.jsx(o,{scope:m,itemMap:v,collectionRef:h,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,m)=>{const{scope:g,children:h}=f,v=i(s,g),b=Kr(m,v.collectionRef);return y.jsx($o,{ref:b,children:h})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,m)=>{const{scope:g,children:h,...v}=f,b=E.useRef(null),x=Kr(m,b),S=i(c,g);return E.useEffect(()=>(S.itemMap.set(b,{ref:b,...v}),()=>void S.itemMap.delete(b))),y.jsx($o,{[u]:"",ref:x,children:h})});d.displayName=c;function p(f){const m=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const h=m.collectionRef.current;if(!h)return[];const v=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((S,w)=>v.indexOf(S.ref.current)-v.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var RM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Mn=RM.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?$o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Fb(e,t){e&&Ia.flushSync(()=>e.dispatchEvent(t))}function Kn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function BM(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var HM="DismissableLayer",vd="dismissableLayer.update",WM="dismissableLayer.pointerDownOutside",qM="dismissableLayer.focusOutside",Lb,Vb=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$b=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(Vb),[u,d]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=Kr(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),b=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,w=KM(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),T=YM(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 BM(C=>{b===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Lb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),zb(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Lb)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),zb())},[u,c]),k.useEffect(()=>{const C=()=>f({});return document.addEventListener(vd,C),()=>document.removeEventListener(vd,C)},[]),y.jsx(Mn.div,{...l,ref:m,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Xt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Xt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Xt(e.onPointerDownCapture,w.onPointerDownCapture)})});$b.displayName=HM;var UM="DismissableLayerBranch",jb=k.forwardRef((e,t)=>{const n=k.useContext(Vb),r=k.useRef(null),o=Kr(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),y.jsx(Mn.div,{...e,ref:o})});jb.displayName=UM;function KM(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Rb(WM,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 YM(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&Rb(qM,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zb(){const e=new CustomEvent(vd);document.dispatchEvent(e)}function Rb(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 GM=$b,ZM=jb,ws=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},XM="Portal",Bb=k.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=k.useState(!1);ws(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?wi.createPortal(y.jsx(Mn.div,{...r,ref:t}),a):null});Bb.displayName=XM;function QM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Hb=e=>{const{present:t,children:n}=e,r=JM(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=Kr(r.ref,eD(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};Hb.displayName="Presence";function JM(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=QM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=Ss(r.current);i.current=s==="mounted"?c:"none"},[s]),ws(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=Ss(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]),ws(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=Ss(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=f=>{f.target===t&&(i.current=Ss(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ss(e){return(e==null?void 0:e.animationName)||"none"}function eD(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 tD({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=nD({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Kn(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function nD({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Kn(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var rD="VisuallyHidden",yd=k.forwardRef((e,t)=>y.jsx(Mn.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}}));yd.displayName=rD;var bd="ToastProvider",[xd,oD,iD]=zM("Toast"),[Wb,BR]=Nb("Toast",[iD]),[aD,Ts]=Wb(bd),qb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),p=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${bd}\`. Expected non-empty \`string\`.`),y.jsx(xd.Provider,{scope:t,children:y.jsx(aD,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:k.useCallback(()=>u(f=>f+1),[]),onToastRemove:k.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};qb.displayName=bd;var Ub="ToastViewport",sD=["F8"],wd="toast.viewportPause",Sd="toast.viewportResume",Kb=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=sD,label:o="Notifications ({hotkey})",...i}=e,a=Ts(Ub,n),s=oD(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=Kr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;k.useEffect(()=>{const h=v=>{var x;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),k.useEffect(()=>{const h=l.current,v=d.current;if(m&&h&&v){const b=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(wd);v.dispatchEvent(T),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(Sd);v.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!h.contains(T.relatedTarget)&&x()},w=()=>{h.contains(document.activeElement)||x()};return h.addEventListener("focusin",b),h.addEventListener("focusout",S),h.addEventListener("pointermove",b),h.addEventListener("pointerleave",w),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{h.removeEventListener("focusin",b),h.removeEventListener("focusout",S),h.removeEventListener("pointermove",b),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[m,a.isClosePausedRef]);const g=k.useCallback(({tabbingDirection:h})=>{const b=s().map(x=>{const S=x.ref.current,w=[S,...wD(S)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?b.reverse():b).flat()},[s]);return k.useEffect(()=>{const h=d.current;if(h){const v=b=>{var w,T,C;const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const P=document.activeElement,I=b.shiftKey;if(b.target===h&&I){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:I?"backwards":"forwards"}),$=N.findIndex(_=>_===P);Cd(N.slice($+1))?b.preventDefault():I?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[s,g]),y.jsxs(ZM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&y.jsx(Td,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});Cd(h)}}),y.jsx(xd.Slot,{scope:n,children:y.jsx(Mn.ol,{tabIndex:-1,...i,ref:p})}),m&&y.jsx(Td,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});Cd(h)}})]})});Kb.displayName=Ub;var Yb="ToastFocusProxy",Td=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ts(Yb,n);return y.jsx(yd,{"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()}})});Td.displayName=Yb;var Es="Toast",lD="toast.swipeStart",cD="toast.swipeMove",uD="toast.swipeCancel",dD="toast.swipeEnd",Gb=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=tD({prop:r,defaultProp:o,onChange:i});return y.jsx(Hb,{present:n||s,children:y.jsx(hD,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Kn(e.onPause),onResume:Kn(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)})})})});Gb.displayName=Es;var[fD,pD]=Wb(Es,{onClose(){}}),hD=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=Ts(Es,n),[h,v]=k.useState(null),b=Kr(t,_=>v(_)),x=k.useRef(null),S=k.useRef(null),w=o||g.duration,T=k.useRef(0),C=k.useRef(w),P=k.useRef(0),{onToastAdd:I,onToastRemove:A}=g,L=Kn(()=>{var M;(h==null?void 0:h.contains(document.activeElement))&&((M=g.viewport)==null||M.focus()),a()}),N=k.useCallback(_=>{!_||_===1/0||(window.clearTimeout(P.current),T.current=new Date().getTime(),P.current=window.setTimeout(L,_))},[L]);k.useEffect(()=>{const _=g.viewport;if(_){const M=()=>{N(C.current),c==null||c()},D=()=>{const V=new Date().getTime()-T.current;C.current=C.current-V,window.clearTimeout(P.current),l==null||l()};return _.addEventListener(wd,D),_.addEventListener(Sd,M),()=>{_.removeEventListener(wd,D),_.removeEventListener(Sd,M)}}},[g.viewport,w,l,c,N]),k.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),k.useEffect(()=>(I(),()=>A()),[I,A]);const $=k.useMemo(()=>h?t0(h):null,[h]);return g.viewport?y.jsxs(y.Fragment,{children:[$&&y.jsx(mD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),y.jsx(fD,{scope:n,onClose:L,children:Ia.createPortal(y.jsx(xd.ItemSlot,{scope:n,children:y.jsx(GM,{asChild:!0,onEscapeKeyDown:Xt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||L(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(Mn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Xt(e.onKeyDown,_=>{_.key==="Escape"&&(s==null||s(_.nativeEvent),_.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:Xt(e.onPointerDown,_=>{_.button===0&&(x.current={x:_.clientX,y:_.clientY})}),onPointerMove:Xt(e.onPointerMove,_=>{if(!x.current)return;const M=_.clientX-x.current.x,D=_.clientY-x.current.y,V=!!S.current,F=["left","right"].includes(g.swipeDirection),H=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,O=F?H(0,M):0,R=F?0:H(0,D),X=_.pointerType==="touch"?10:2,Q={x:O,y:R},J={originalEvent:_,delta:Q};V?(S.current=Q,Cs(cD,d,J,{discrete:!1})):n0(Q,g.swipeDirection,X)?(S.current=Q,Cs(lD,u,J,{discrete:!1}),_.target.setPointerCapture(_.pointerId)):(Math.abs(M)>X||Math.abs(D)>X)&&(x.current=null)}),onPointerUp:Xt(e.onPointerUp,_=>{const M=S.current,D=_.target;if(D.hasPointerCapture(_.pointerId)&&D.releasePointerCapture(_.pointerId),S.current=null,x.current=null,M){const V=_.currentTarget,F={originalEvent:_,delta:M};n0(M,g.swipeDirection,g.swipeThreshold)?Cs(dD,f,F,{discrete:!0}):Cs(uD,p,F,{discrete:!0}),V.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),mD=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ts(Es,t),[i,a]=k.useState(!1),[s,l]=k.useState(!1);return bD(()=>a(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:y.jsx(Bb,{asChild:!0,children:y.jsx(yd,{...r,children:i&&y.jsxs(y.Fragment,{children:[o.label," ",n]})})})},gD="ToastTitle",Zb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(Mn.div,{...r,ref:t})});Zb.displayName=gD;var vD="ToastDescription",Xb=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(Mn.div,{...r,ref:t})});Xb.displayName=vD;var Qb="ToastAction",yD=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?y.jsx(e0,{altText:n,asChild:!0,children:y.jsx(Ed,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Qb}\`. Expected non-empty \`string\`.`),null)});yD.displayName=Qb;var Jb="ToastClose",Ed=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=pD(Jb,n);return y.jsx(e0,{asChild:!0,children:y.jsx(Mn.button,{type:"button",...r,ref:t,onClick:Xt(e.onClick,o.onClose)})})});Ed.displayName=Jb;var e0=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return y.jsx(Mn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function t0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),xD(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(...t0(r))}}),t}function Cs(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 n0=(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 bD(e=()=>{}){const t=Kn(e);ws(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function xD(e){return e.nodeType===e.ELEMENT_NODE}function wD(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 Cd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var SD=qb,TD=Kb,ED=Gb,CD=Zb,kD=Xb,PD=Ed;const AD=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},_D=fo("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),r0=E.createContext(()=>{throw new Error("Not implemented")}),ID=()=>E.useContext(r0),o0={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]}},OD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=_D({theme:t.theme||"default"});return y.jsx(ED,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:y.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:o0[t.reversedIndex]||o0.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:y.jsxs("div",{className:a,children:[y.jsxs("div",{className:"flex flex-col p-4",children:[t.title?y.jsx(CD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,y.jsx(kD,{className:"select-text truncate",children:t.text})]}),r?y.jsx(PD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:y.jsx(qi,{className:"h-5 w-5"})}):null]})})})});function MD({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=AD(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return y.jsxs(SD,{duration:n,swipeThreshold:150,children:[y.jsx(r0.Provider,{value:l,children:e}),y.jsx(nr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(OD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),y.jsx(TD,{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 DD=e=>y.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[y.jsxs("header",{className:"flex items-start gap-4 p-6",children:[y.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:y.jsx("div",{children:y.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("header",{children:y.jsx("h3",{className:"text-base leading-none",children:e.title})}),y.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?y.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),i0=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},a0={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},s0=E.createContext(""),ND=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",kd=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!ND(a))return a}return n==="backward"?kd(e,e.length-1,"backward"):kd(e,-1,"forward")},l0=(e,t)=>{var i;const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(a=>a.dataset.active==="true");if(r===-1)return null;const o=kd(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},c0={[a0.ArrowLeft]:(e,t)=>l0(t,"backward"),[a0.ArrowRight]:(e,t)=>l0(t,"forward")},FD=e=>{const[t,n]=i0(e.active),r=E.useRef(null),o=Fr(e.onChange);E.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),E.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=E.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(je.keyof(c0,c)){const u=c0[c],d=u(l,r.current);if(d===null)return;n(d)}};return y.jsx(s0.Provider,{value:t,children:y.jsx(md,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:y.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[y.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),y.jsx("nav",{className:"min-w-0",children:y.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return y.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:y.jsx(an,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},LD=()=>E.useContext(s0),VD=e=>{const t=LD();return y.jsx(E.Fragment,{children:e.id===t?e.children:null})},ks=e=>y.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[y.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),y.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});ks.Icon=function(t){return y.jsx("header",{...t,className:Oe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},ks.Body=function(t){return y.jsx(an,{...t,className:Oe("min-w-0 flex-1",t.className),children:t.children})},ks.Right=function(t){return y.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:y.jsx(an,{...t,type:"button"})})};const $D=e=>y.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function Ps(){return typeof window<"u"}function lr(e){return u0(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){var t;return(t=(u0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function u0(e){return Ps()?e instanceof Node||e instanceof Ht(e).Node:!1}function rt(e){return Ps()?e instanceof Element||e instanceof Ht(e).Element:!1}function kt(e){return Ps()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function Pd(e){return!Ps()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}function Ji(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 jD(e){return["table","td","th"].includes(lr(e))}function As(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ad(e){const t=_d(),n=rt(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 zD(e){let t=Gn(e);for(;kt(t)&&!cr(t);){if(Ad(t))return t;if(As(t))return null;t=Gn(t)}return null}function _d(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cr(e){return["html","body","#document"].includes(lr(e))}function Qt(e){return Ht(e).getComputedStyle(e)}function _s(e){return rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gn(e){if(lr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pd(e)&&e.host||Yn(e);return Pd(t)?t.host:t}function d0(e){const t=Gn(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&Ji(t)?t:d0(t)}function ur(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=d0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(o);if(i){const s=Id(a);return t.concat(a,a.visualViewport||[],Ji(o)?o:[],s&&n?ur(s):[])}return t.concat(o,ur(o,[],n))}function Id(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Pd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Od(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function f0(){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 p0(e){return e.mozInputSource===0&&e.isTrusted?!0:Nd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Md(e){return RD()?!1:!Nd()&&e.width===0&&e.height===0||Nd()&&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 Dd(){return/apple/i.test(navigator.vendor)}function Nd(){const e=/android/i;return e.test(Od())||e.test(f0())}function h0(){return Od().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function RD(){return f0().includes("jsdom/")}function jo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function BD(e){return"nativeEvent"in e}function HD(e){return e.matches("html,body")}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}function Fd(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Dn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const WD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ld(e){return kt(e)&&e.matches(WD)}function Nt(e){e.preventDefault(),e.stopPropagation()}function m0(e){return e?e.getAttribute("role")==="combobox"&&Ld(e):!1}const Nn=Math.min,Jt=Math.max,Is=Math.round,zo=Math.floor,dr=e=>({x:e,y:e}),qD={left:"right",right:"left",bottom:"top",top:"bottom"},UD={start:"end",end:"start"};function Vd(e,t,n){return Jt(e,Nn(t,n))}function Ro(e,t){return typeof e=="function"?e(t):e}function fr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function g0(e){return e==="x"?"y":"x"}function $d(e){return e==="y"?"height":"width"}function Yr(e){return["top","bottom"].includes(fr(e))?"y":"x"}function jd(e){return g0(Yr(e))}function KD(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=jd(e),i=$d(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Os(a)),[a,Os(a)]}function YD(e){const t=Os(e);return[zd(e),t,zd(t)]}function zd(e){return e.replace(/start|end/g,t=>UD[t])}function GD(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 ZD(e,t,n,r){const o=Bo(e);let i=GD(fr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(zd)))),i}function Os(e){return e.replace(/left|right|bottom|top/g,t=>qD[t])}function XD(e){return{top:0,right:0,bottom:0,left:0,...e}}function v0(e){return typeof e!="number"?XD(e):{top:e,right:e,bottom:e,left:e}}function Ms(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}}/*!
215
215
  * tabbable 6.2.0
216
216
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
217
- */var QD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ms=QD.join(","),y0=typeof Element>"u",Bo=y0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ds=!y0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ns=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},JD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},eN=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ms));return n&&Bo.call(t,Ms)&&o.unshift(t),o=o.filter(r),o},tN=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ns(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=Bo.call(a,Ms);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ns(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},b0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},x0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||JD(t))&&!b0(t)?0:t.tabIndex},nN=function(t,n){var r=x0(t);return r<0&&n&&!b0(t)?0:r},rN=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},w0=function(t){return t.tagName==="INPUT"},oN=function(t){return w0(t)&&t.type==="hidden"},iN=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},aN=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},sN=function(t){if(!t.name)return!0;var n=t.form||Ds(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=aN(o,t.form);return!i||i===t},lN=function(t){return w0(t)&&t.type==="radio"},cN=function(t){return lN(t)&&!sN(t)},uN=function(t){var n,r=t&&Ds(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Ds(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},S0=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},dN=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Bo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Bo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ds(t);if(l&&!l.shadowRoot&&o(l)===!0)return S0(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(uN(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return S0(t);return!1},fN=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 Bo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},pN=function(t,n){return!(n.disabled||Ns(n)||oN(n)||dN(n,t)||iN(n)||fN(n))},Rd=function(t,n){return!(cN(n)||x0(n)<0||!pN(t,n))},hN=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},mN=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=nN(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(rN).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ea=function(t,n){n=n||{};var r;return n.getShadowRoot?r=tN([t],n.includeContainer,{filter:Rd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:hN}):r=eN(t,n.includeContainer,Rd.bind(null,n)),mN(r)},gN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Bo.call(t,Ms)===!1?!1:Rd(n,t)};function T0(e,t,n){let{reference:r,floating:o}=e;const i=Yr(t),a=jd(t),s=$d(a),l=dr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,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(Ro(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const vN=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}=T0(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:b,y:x,data:S,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=x??d,f={...f,[h]:{...f[h],...S}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=T0(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Bd(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),m=v0(f),h=s[p?d==="floating"?"reference":"floating":d],v=Os(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=Os(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-w.top+m.top)/S.y,bottom:(w.bottom-v.bottom+m.bottom)/S.y,left:(v.left-w.left+m.left)/S.x,right:(w.right-v.right+m.right)/S.x}}const yN=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=v0(u),p={x:n,y:r},f=jd(o),m=$d(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",b=h?"bottom":"right",x=h?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=E?E[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(E)))&&(C=s.floating[x]||i.floating[m]);const P=S/2-w/2,I=C/2-g[m]/2-1,_=Nn(d[v],I),F=Nn(d[b],I),N=_,V=C-g[m]-F,A=C/2-g[m]/2+P,M=Vd(N,A,V),O=!l.arrow&&Ro(o)!=null&&A!==M&&i.reference[m]/2-(A<N?_:F)-g[m]/2<0,j=O?A<N?A-N:A-V:0;return{[f]:p[f]+j,data:{[f]:M,centerOffset:A-M-j,...O&&{alignmentOffset:j}},reset:O}}}),bN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=zo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=dr(o),b=Yr(s),x=dr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[Is(s)]:YD(s)),E=m!=="none";!p&&E&&w.push(...ZD(s,g,m,S));const C=[s,...w],P=await Bd(t,h),I=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[v]),d){const A=KD(o,a,S);I.push(P[A[0]],P[A[1]])}if(_=[..._,{placement:o,overflows:I}],!I.every(A=>A<=0)){var F,N;const A=(((F=i.flip)==null?void 0:F.index)||0)+1,M=C[A];if(M)return{data:{index:A,overflows:_},reset:{placement:M}};let O=(N=_.filter(j=>j.overflows[0]<=0).sort((j,L)=>j.overflows[1]-L.overflows[1])[0])==null?void 0:N.placement;if(!O)switch(f){case"bestFit":{var V;const j=(V=_.filter(L=>{if(E){const z=Yr(L.placement);return z===b||z==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(z=>z>0).reduce((z,D)=>z+D,0)]).sort((L,z)=>L[1]-z[1])[0])==null?void 0:V[0];j&&(O=j);break}case"initialPlacement":O=s;break}if(o!==O)return{reset:{placement:O}}}return{}}}};async function xN(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=dr(n),s=Ro(n),l=Yr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=zo(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const wN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await xN(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},SN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y:b}=h;return{x:v,y:b}}},...l}=zo(e,t),c={x:n,y:r},u=await Bd(t,l),d=Yr(dr(o)),p=g0(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",b=f+u[h],x=f-u[v];f=Vd(b,f,x)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=m+u[h],x=m-u[v];m=Vd(b,m,x)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},TN=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 Bd(t,s),c=dr(n),u=Ro(n),d=Yr(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,v=p-l.left-l.right,b=Nn(f-l[m],h),x=Nn(p-l[g],v),S=!t.middlewareData.shift;let w=b,E=x;if(d?E=u||S?Nn(x,v):v:w=u||S?Nn(b,h):h,S&&!u){const P=Jt(l.left,0),I=Jt(l.right,0),_=Jt(l.top,0),F=Jt(l.bottom,0);d?E=p-2*(P!==0||I!==0?P+I:Jt(l.left,l.right)):w=f-2*(_!==0||F!==0?_+F:Jt(l.top,l.bottom))}await a({...t,availableWidth:E,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function E0(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=_s(n)!==i||_s(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Hd(e){return rt(e)?e:e.contextElement}function Ho(e){const t=Hd(e);if(!kt(t))return ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=E0(t);let a=(i?_s(n.width):n.width)/r,s=(i?_s(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const EN=ur(0);function C0(e){const t=Ht(e);return!_d()||!t.visualViewport?EN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Hd(e);let a=ur(1);t&&(r?rt(r)&&(a=Ho(r)):a=Ho(e));const s=CN(i,n,r)?C0(i):ur(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Ht(i),f=r&&rt(r)?Ht(r):r;let m=p,g=Id(m);for(;g&&r&&f!==m;){const h=Ho(g),v=g.getBoundingClientRect(),b=Qt(g),x=v.left+(g.clientLeft+parseFloat(b.paddingLeft))*h.x,S=v.top+(g.clientTop+parseFloat(b.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=S,m=Ht(g),g=Id(m)}}return Os({width:u,height:d,x:l,y:c})}function kN(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Yn(r),s=t?Ps(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ur(1);const u=ur(0),d=kt(r);if((d||!d&&!i)&&((sr(r)!=="body"||Ji(a))&&(l=As(r)),kt(r))){const p=Gr(r);c=Ho(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 PN(e){return Array.from(e.getClientRects())}function k0(e){return Gr(Yn(e)).left+As(e).scrollLeft}function AN(e){const t=Yn(e),n=As(e),r=e.ownerDocument.body,o=Jt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+k0(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 _N(e,t){const n=Ht(e),r=Yn(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=_d();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function IN(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?Ho(e):ur(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function P0(e,t,n){let r;if(t==="viewport")r=_N(e,n);else if(t==="document")r=AN(Yn(e));else if(rt(t))r=IN(t,n);else{const o=C0(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Os(r)}function A0(e,t){const n=Gn(e);return n===t||!rt(n)||lr(n)?!1:Qt(n).position==="fixed"||A0(n,t)}function ON(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(s=>rt(s)&&sr(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?Gn(e):e;for(;rt(a)&&!lr(a);){const s=Qt(a),l=Ad(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ji(a)&&!l&&A0(e,a))?r=r.filter(u=>u!==a):o=s,a=Gn(a)}return t.set(e,r),r}function MN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ps(t)?[]:ON(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=P0(t,u,o);return c.top=Jt(d.top,c.top),c.right=Nn(d.right,c.right),c.bottom=Nn(d.bottom,c.bottom),c.left=Jt(d.left,c.left),c},P0(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function DN(e){const{width:t,height:n}=E0(e);return{width:t,height:n}}function NN(e,t,n){const r=kt(t),o=Yn(t),i=n==="fixed",a=Gr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ur(0);if(r||!r&&!i)if((sr(t)!=="body"||Ji(o))&&(s=As(t)),r){const d=Gr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=k0(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 Wd(e){return Qt(e).position==="static"}function _0(e,t){return!kt(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function I0(e,t){const n=Ht(e);if(Ps(e))return n;if(!kt(e)){let o=Gn(e);for(;o&&!lr(o);){if(rt(o)&&!Wd(o))return o;o=Gn(o)}return n}let r=_0(e,t);for(;r&&jD(r)&&Wd(r);)r=_0(r,t);return r&&lr(r)&&Wd(r)&&!Ad(r)?n:r||zD(e)||n}const FN=async function(e){const t=this.getOffsetParent||I0,n=this.getDimensions,r=await n(e.floating);return{reference:NN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function LN(e){return Qt(e).direction==="rtl"}const VN={convertOffsetParentRelativeRectToViewportRelativeRect:kN,getDocumentElement:Yn,getClippingRect:MN,getOffsetParent:I0,getElementRects:FN,getClientRects:PN,getDimensions:DN,getScale:Ho,isElement:rt,isRTL:LN};function $N(e,t){let n=null,r;const o=Yn(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),m=jo(o.clientWidth-(c+d)),g=jo(o.clientHeight-(u+p)),h=jo(c),b={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Jt(0,Nn(1,l))||1};let x=!0;function S(w){const E=w[0].intersectionRatio;if(E!==l){if(!x)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),i}function Wo(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=Hd(e),u=o||i?[...c?cr(c):[],...cr(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?$N(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Gr(e):null;l&&h();function h(){const v=Gr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const jN=wN,zN=SN,RN=bN,BN=TN,O0=yN,HN=(e,t,n)=>{const r=new Map,o={platform:VN,...n},i={...o.platform,_c:r};return vN(e,t,{...o,platform:i})};var Fs=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Ls(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ls(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ls(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function M0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function D0(e,t){const n=M0(e);return Math.round(t*n)/n}function qd(e){const t=k.useRef(e);return Fs(()=>{t.current=e}),t}function WN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=k.useState(r);Ls(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),b=k.useCallback(L=>{L!==E.current&&(E.current=L,g(L))},[]),x=k.useCallback(L=>{L!==C.current&&(C.current=L,v(L))},[]),S=i||m,w=a||h,E=k.useRef(null),C=k.useRef(null),P=k.useRef(u),I=l!=null,_=qd(l),F=qd(o),N=qd(c),V=k.useCallback(()=>{if(!E.current||!C.current)return;const L={placement:t,strategy:n,middleware:p};F.current&&(L.platform=F.current),HN(E.current,C.current,L).then(z=>{const D={...z,isPositioned:N.current!==!1};A.current&&!Ls(P.current,D)&&(P.current=D,Ia.flushSync(()=>{d(D)}))})},[p,t,n,F,N]);Fs(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const A=k.useRef(!1);Fs(()=>(A.current=!0,()=>{A.current=!1}),[]),Fs(()=>{if(S&&(E.current=S),w&&(C.current=w),S&&w){if(_.current)return _.current(S,w,V);V()}},[S,w,V,_,I]);const M=k.useMemo(()=>({reference:E,floating:C,setReference:b,setFloating:x}),[b,x]),O=k.useMemo(()=>({reference:S,floating:w}),[S,w]),j=k.useMemo(()=>{const L={position:n,left:0,top:0};if(!O.floating)return L;const z=D0(O.floating,u.x),D=D0(O.floating,u.y);return s?{...L,transform:"translate("+z+"px, "+D+"px)",...M0(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:D}},[n,s,O.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:V,refs:M,elements:O,floatingStyles:j}),[u,V,M,O,j])}const qN=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?O0({element:r.current,padding:o}).fn(n):{}:r?O0({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...jN(e),options:[e,t]}),Ud=(e,t)=>({...zN(e),options:[e,t]}),Kd=(e,t)=>({...RN(e),options:[e,t]}),N0=(e,t)=>({...BN(e),options:[e,t]}),F0=(e,t)=>({...qN(e),options:[e,t]}),L0={...k},UN=L0.useInsertionEffect||(e=>e());function At(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return UN(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Yd="ArrowUp",na="ArrowDown",qo="ArrowLeft",Uo="ArrowRight";function Vs(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function Gd(e,t){return jt(e,{disabledIndices:t})}function V0(e,t){return jt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function jt(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&&$s(a,s,o));return s}function KN(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===Yd){if(u&&Nt(n),c===-1)d=l;else if(d=jt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}ra(e,d)&&(d=c)}if(n.key===na&&(u&&Nt(n),c===-1?d=s:(d=jt(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=jt(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=c)),r==="both"){const p=jo(c/i);n.key===Uo&&(u&&Nt(n),c%i!==i-1?(d=jt(e,{startingIndex:c,disabledIndices:a}),o&&Vs(d,i,p)&&(d=jt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=jt(e,{startingIndex:c-c%i-1,disabledIndices:a})),Vs(d,i,p)&&(d=c)),n.key===qo&&(u&&Nt(n),c%i!==0?(d=jt(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Vs(d,i,p)&&(d=jt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=jt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Vs(d,i,p)&&(d=c));const f=jo(l/i)===p;ra(e,d)&&(o&&f?d=n.key===qo?l:jt(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function YN(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function GN(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 ZN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function $s(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 $0=0;function fr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($0);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():$0=requestAnimationFrame(i)}var We=typeof document<"u"?T.useLayoutEffect:T.useEffect;function XN(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 QN(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 j0=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function JN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=k.useState(()=>new Map),a=k.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=k.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return We(()=>{const l=new Map(o);Array.from(l.keys()).sort(XN).forEach((u,d)=>{l.set(u,d)}),QN(o,l)||i(l)},[o]),k.createElement(j0.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function z0(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(j0),[s,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return We(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),We(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ko.apply(this,arguments)}let R0=!1,e2=0;const B0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+e2++;function t2(){const[e,t]=k.useState(()=>R0?B0():void 0);return We(()=>{e==null&&t(B0())},[]),k.useEffect(()=>{R0=!0},[]),e}const Yo=L0.useId||t2;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function js(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function n2(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const H0=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||js("The `ref` prop is required for `FloatingArrow`."));const h=Yo(),[v,b]=k.useState(!1);if(We(()=>{if(!o)return;Qt(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const x=c*2,S=x/2,w=a/2*(l/-8+1),E=s/2*l/4,[C,P]=r.split("-"),I=!!p,_=C==="top"||C==="bottom",F=u&&P==="end"?"bottom":"top";let N=u&&P==="end"?"right":"left";u&&v&&(N=P==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",A=(i==null?void 0:i.y)!=null?u||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-E))+(" Q"+a/2+","+s+" "+w+","+(s-E))+" Z",O={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Ko({},g,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[F]:A,[C]:_||I?"100%":"calc(100% - "+x/2+"px)",transform:""+O+(f??""),...m}}),x>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:M}),k.createElement("path",{stroke:x&&!p?g.fill:"none",d:M}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+x,height:a})))});function W0(){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 q0=k.createContext(null),U0=k.createContext(null),pr=()=>{var e;return((e=k.useContext(q0))==null?void 0:e.id)||null},hr=()=>k.useContext(U0);function r2(e){const t=Yo(),n=hr(),o=pr();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function o2(e){const{children:t,id:n}=e,r=pr();return k.createElement(q0.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function i2(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(a=>{n.current=[...n.current,a]},[]),o=k.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=k.useState(()=>W0())[0];return k.createElement(U0.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function mr(e){return"data-floating-ui-"+e}function Ft(e){const t=T.useRef(e);return We(()=>{t.current=e}),t}const K0=mr("safe-polygon");function Zd(e,t,n){return n&&!$o(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Y0(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=hr(),m=pr(),g=Ft(c),h=Ft(l),v=Ft(n),b=k.useRef(),x=k.useRef(-1),S=k.useRef(),w=k.useRef(-1),E=k.useRef(!0),C=k.useRef(!1),P=k.useRef(()=>{}),I=k.useCallback(()=>{var M;const O=(M=o.current.openEvent)==null?void 0:M.type;return(O==null?void 0:O.includes("mouse"))&&O!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function M(O){let{open:j}=O;j||(clearTimeout(x.current),clearTimeout(w.current),E.current=!0)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function M(j){I()&&r(!1,j,"hover")}const O=Mt(a.floating).documentElement;return O.addEventListener("mouseleave",M),()=>{O.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,I]);const _=k.useCallback(function(M,O,j){O===void 0&&(O=!0),j===void 0&&(j="hover");const L=Zd(h.current,"close",b.current);L&&!S.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,M,j),L)):O&&(clearTimeout(x.current),r(!1,M,j))},[h,r]),F=At(()=>{P.current(),S.current=void 0}),N=At(()=>{if(C.current){const M=Mt(a.floating).body;M.style.pointerEvents="",M.removeAttribute(K0),C.current=!1}});k.useEffect(()=>{if(!s)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function O(D){if(clearTimeout(x.current),E.current=!1,u&&!$o(b.current)||d>0&&!Zd(h.current,"open"))return;const B=Zd(h.current,"open",b.current);B?x.current=window.setTimeout(()=>{v.current||r(!0,D,"hover")},B):r(!0,D,"hover")}function j(D){if(M())return;P.current();const B=Mt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(x.current),S.current=g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){N(),F(),_(D,!0,"safe-polygon")}});const Q=S.current;B.addEventListener("mousemove",Q),P.current=()=>{B.removeEventListener("mousemove",Q)};return}(b.current==="touch"?!xt(a.floating,D.relatedTarget):!0)&&_(D)}function L(D){M()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:D.clientX,y:D.clientY,onClose(){N(),F(),_(D)}})(D))}if(rt(a.domReference)){var z;const D=a.domReference;return n&&D.addEventListener("mouseleave",L),(z=a.floating)==null||z.addEventListener("mouseleave",L),p&&D.addEventListener("mousemove",O,{once:!0}),D.addEventListener("mouseenter",O),D.addEventListener("mouseleave",j),()=>{var B;n&&D.removeEventListener("mouseleave",L),(B=a.floating)==null||B.removeEventListener("mouseleave",L),p&&D.removeEventListener("mousemove",O),D.removeEventListener("mouseenter",O),D.removeEventListener("mouseleave",j)}}},[a,s,e,u,d,p,_,F,N,r,n,v,f,h,g,o]),We(()=>{var M;if(s&&n&&(M=g.current)!=null&&M.__options.blockPointerEvents&&I()){const j=Mt(a.floating).body;j.setAttribute(K0,""),j.style.pointerEvents="none",C.current=!0;const L=a.floating;if(rt(a.domReference)&&L){var O;const z=a.domReference,D=f==null||(O=f.nodesRef.current.find(B=>B.id===m))==null||(O=O.context)==null?void 0:O.elements.floating;return D&&(D.style.pointerEvents=""),z.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{z.style.pointerEvents="",L.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),We(()=>{n||(b.current=void 0,F(),N())},[n,F,N]),k.useEffect(()=>()=>{F(),clearTimeout(x.current),clearTimeout(w.current),N()},[s,a.domReference,F,N]);const V=k.useMemo(()=>{function M(O){b.current=O.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(O){const{nativeEvent:j}=O;function L(){!E.current&&!v.current&&r(!0,j,"hover")}u&&!$o(b.current)||n||d===0||(clearTimeout(w.current),b.current==="touch"?L():w.current=window.setTimeout(L,d))}}},[u,r,n,v,d]),A=k.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(M){_(M.nativeEvent,!1)}}),[_]);return k.useMemo(()=>s?{reference:V,floating:A}:{},[s,V,A])}function a2(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 Zr(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 s2(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Zr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Go=new WeakMap,zs=new WeakSet,Rs={},Xd=0;const l2=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,G0=e=>e&&(e.host||G0(e.parentNode)),c2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=G0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function u2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=c2(t,e),s=new Set,l=new Set(a),c=[];Rs[o]||(Rs[o]=new WeakMap);const u=Rs[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,m=>{if(sr(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",v=(Go.get(m)||0)+1,b=(u.get(m)||0)+1;Go.set(m,v),u.set(m,b),c.push(m),v===1&&h&&zs.add(m),b===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Xd++,()=>{c.forEach(f=>{const m=(Go.get(f)||0)-1,g=(u.get(f)||0)-1;Go.set(f,m),u.set(f,g),m||(!zs.has(f)&&i&&f.removeAttribute(i),zs.delete(f)),g||f.removeAttribute(o)}),Xd--,Xd||(Go=new WeakMap,Go=new WeakMap,zs=new WeakSet,Rs={})}}function Z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return u2(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 X0(e,t){const n=ea(e,Zo());t==="prev"&&n.reverse();const r=n.indexOf(vn(Mt(e)));return n.slice(r+1)[0]}function Q0(){return X0(document.body,"next")}function J0(){return X0(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xt(n,r)}function d2(e){ea(e,Zo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function f2(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 p2(e,t,n){const r=e.indexOf(t);function o(a){const s=mr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||xt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Qd={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 h2;function ex(e){e.key==="Tab"&&(e.target,clearTimeout(h2))}const Bs=k.forwardRef(function(t,n){const[r,o]=k.useState();We(()=>(Dd()&&o("button"),document.addEventListener("keydown",ex),()=>{document.removeEventListener("keydown",ex)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[mr("focus-guard")]:"",style:Qd};return k.createElement("span",Ko({},t,i))}),tx=k.createContext(null),nx=mr("portal");function m2(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Yo(),o=rx(),[i,a]=k.useState(null),s=k.useRef(null);return We(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),We(()=>{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(nx,""),l.appendChild(c),s.current=c,a(c)},[t,r]),We(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!rt(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(nx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Xr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=m2({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?f2:d2)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),k.createElement(tx.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Bs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=J0()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:Qd}),i&&Ia.createPortal(t,i),p&&i&&k.createElement(Bs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Q0()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const rx=()=>k.useContext(tx),g2=20;let Qr=[];function Jd(e){Qr=Qr.filter(n=>n.isConnected);let t=e;if(!(!t||sr(t)==="body")){if(!gN(t,Zo())){const n=ea(t,Zo())[0];n&&(t=n)}Qr.push(t),Qr.length>g2&&(Qr=Qr.slice(-20))}}function ox(){return Qr.slice().reverse().find(e=>e.isConnected)}const v2=k.forwardRef(function(t,n){return k.createElement("button",Ko({},t,{type:"button",ref:n,tabIndex:-1,style:Qd}))});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:m,onOpenChange:g,events:h,dataRef:v,floatingId:b,elements:{domReference:x,floating:S}}=t,w=typeof a=="number"&&a<0,E=m0(x)&&w,C=l2()?i:!0,P=Ft(o),I=Ft(a),_=Ft(s),F=hr(),N=rx(),V=k.useRef(null),A=k.useRef(null),M=k.useRef(!1),O=k.useRef(!1),j=k.useRef(-1),L=N!=null,z=S==null?void 0:S.firstElementChild,D=(z==null?void 0:z.id)===b?z:S,B=At(function(G){return G===void 0&&(G=D),G?ea(G,Zo()):[]}),X=At(G=>{const Y=B(G);return P.current.map(Z=>x&&Z==="reference"?x:D&&Z==="floating"?D:Y).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function G(Z){if(Z.key==="Tab"){xt(D,vn(Mt(D)))&&B().length===0&&!E&&Nt(Z);const $=X(),R=Dn(Z);P.current[0]==="reference"&&R===x&&(Nt(Z),Z.shiftKey?fr($[$.length-1]):fr($[1])),P.current[1]==="floating"&&R===D&&Z.shiftKey&&(Nt(Z),fr($[0]))}}const Y=Mt(D);return Y.addEventListener("keydown",G),()=>{Y.removeEventListener("keydown",G)}},[r,x,D,c,P,E,B,X]),k.useEffect(()=>{if(r||!S)return;function G(Y){const Z=Dn(Y),R=B().indexOf(Z);R!==-1&&(j.current=R)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,B]),k.useEffect(()=>{if(r||!d)return;function G(){O.current=!0,setTimeout(()=>{O.current=!1})}function Y(Z){const $=Z.relatedTarget;queueMicrotask(()=>{const R=!(xt(x,$)||xt(S,$)||xt($,S)||xt(N==null?void 0:N.portalNode,$)||$!=null&&$.hasAttribute(mr("focus-guard"))||F&&(Zr(F.nodesRef.current,m).find(K=>{var ae,H;return xt((ae=K.context)==null?void 0:ae.elements.floating,$)||xt((H=K.context)==null?void 0:H.elements.domReference,$)})||a2(F.nodesRef.current,m).find(K=>{var ae,H;return((ae=K.context)==null?void 0:ae.elements.floating)===$||((H=K.context)==null?void 0:H.elements.domReference)===$})));if(l&&R&&vn(Mt(D))===Mt(D).body){kt(D)&&(D==null||D.focus());const K=j.current,ae=B(),H=ae[K]||ae[ae.length-1]||D;kt(H)&&H.focus()}(E||!c)&&$&&R&&!O.current&&$!==ox()&&(M.current=!0,g(!1,Z))})}if(S&&kt(x))return x.addEventListener("focusout",Y),x.addEventListener("pointerdown",G),S.addEventListener("focusout",Y),()=>{x.removeEventListener("focusout",Y),x.removeEventListener("pointerdown",G),S.removeEventListener("focusout",Y)}},[r,x,S,D,c,m,F,N,g,d,l,B,E]),k.useEffect(()=>{var G;if(r)return;const Y=Array.from((N==null||(G=N.portalNode)==null?void 0:G.querySelectorAll("["+mr("portal")+"]"))||[]);if(S){const Z=[S,...Y,V.current,A.current,P.current.includes("reference")||E?x:null].filter(R=>R!=null),$=c||E?Z0(Z,C,!C):Z0(Z);return()=>{$()}}},[r,x,S,c,P,N,E,C]),We(()=>{if(r||!kt(D))return;const G=Mt(D),Y=vn(G);queueMicrotask(()=>{const Z=X(D),$=I.current,R=(typeof $=="number"?Z[$]:$.current)||D,K=xt(D,Y);!w&&!K&&p&&fr(R,{preventScroll:R===D})})},[r,p,D,w,X,I]),We(()=>{if(r||!D)return;let G=!1;const Y=Mt(D),Z=vn(Y);let R=v.current.openEvent;const K=f.domReference.current;Jd(Z);function ae(H){let{open:be,reason:Ce,event:_e,nested:Re}=H;be&&(R=_e),Ce==="escape-key"&&f.domReference.current&&Jd(f.domReference.current),Ce==="hover"&&_e.type==="mouseleave"&&(M.current=!0),Ce==="outside-press"&&(Re?(M.current=!1,G=!0):M.current=!(p0(_e)||Md(_e)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const H=vn(Y),be=xt(S,H)||F&&Zr(F.nodesRef.current,m).some(le=>{var we;return xt((we=le.context)==null?void 0:we.elements.floating,H)});(be||R&&["click","mousedown"].includes(R.type))&&f.domReference.current&&Jd(f.domReference.current);const _e=K||Z,Re=ea(Mt(_e).body,Zo());queueMicrotask(()=>{let le=ox();!le&&kt(_e)&&S&&(le=p2(Re,_e,S)),_.current&&!M.current&&kt(le)&&(!(le!==H&&H!==Y.body)||be)&&le.focus({preventScroll:G})})}},[r,S,D,_,v,f,h,F,m]),We(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,g,f,d]),We(()=>{if(r||!D||typeof MutationObserver!="function"||w)return;const G=()=>{const Z=D.getAttribute("tabindex"),$=B(),R=vn(Mt(S)),K=$.indexOf(R);K!==-1&&(j.current=K),P.current.includes("floating")||R!==f.domReference.current&&$.length===0?Z!=="0"&&D.setAttribute("tabindex","0"):Z!=="-1"&&D.setAttribute("tabindex","-1")};G();const Y=new MutationObserver(G);return Y.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,D,f,P,B,w]);function Q(G){return r||!u||!c?null:k.createElement(v2,{ref:G==="start"?V:A,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!E:!0)&&(L||c);return k.createElement(k.Fragment,null,J&&k.createElement(Bs,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:G=>{if(c){const Z=X();fr(o[0]==="reference"?Z[0]:Z[Z.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(M.current=!1,ia(G,N.portalNode)){const Z=Q0()||x;Z==null||Z.focus()}else{var Y;(Y=N.beforeOutsideRef.current)==null||Y.focus()}}}),!E&&Q("start"),n,Q("end"),J&&k.createElement(Bs,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:G=>{if(c)fr(X()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(M.current=!0),ia(G,N.portalNode)){const Z=J0()||x;Z==null||Z.focus()}else{var Y;(Y=N.afterOutsideRef.current)==null||Y.focus()}}}))}const ef=new Set,ix=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Yo();return We(()=>{if(!r)return;ef.add(i);const a=/iP(hone|ad|od)|iOS/.test(Od()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{ef.delete(i),ef.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),k.createElement("div",Ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function ax(e){return kt(e.target)&&e.target.tagName==="BUTTON"}function sx(e){return Ld(e)}function aa(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=k.useRef(),p=k.useRef(!1),f=k.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&($o(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}$o(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||ax(m))&&(m.key===" "&&!sx(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||ax(m)||sx(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}function y2(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 lx(e){return e!=null&&e.clientX!=null}function b2(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=k.useRef(!1),p=k.useRef(null),[f,m]=k.useState(),[g,h]=k.useState([]),v=At((E,C)=>{d.current||r.current.openEvent&&!lx(r.current.openEvent)||a.setPositionReference(y2(i,{x:E,y:C,axis:l,dataRef:r,pointerType:f}))}),b=At(E=>{c!=null||u!=null||(n?p.current||h([]):v(E.clientX,E.clientY))}),x=$o(f)?o:n,S=k.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const E=Ht(o);function C(P){const I=Dn(P);xt(o,I)?(E.removeEventListener("mousemove",C),p.current=null):v(P.clientX,P.clientY)}if(!r.current.openEvent||lx(r.current.openEvent)){E.addEventListener("mousemove",C);const P=()=>{E.removeEventListener("mousemove",C),p.current=null};return p.current=P,P}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);k.useEffect(()=>S(),[S,g]),k.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),k.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=k.useMemo(()=>{function E(C){let{pointerType:P}=C;m(P)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:b,onMouseEnter:b}},[b]);return k.useMemo(()=>s?{reference:w}:{},[s,w])}const x2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},w2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},cx=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 Jr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=hr(),h=At(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,b=k.useRef(!1),x=k.useRef(!1),{escapeKey:S,outsidePress:w}=cx(f),{escapeKey:E,outsidePress:C}=cx(m),P=At(A=>{var M;if(!n||!a||!s||A.key!=="Escape")return;const O=(M=i.current.floatingContext)==null?void 0:M.nodeId,j=g?Zr(g.nodesRef.current,O):[];if(!S&&(A.stopPropagation(),j.length>0)){let L=!0;if(j.forEach(z=>{var D;if((D=z.context)!=null&&D.open&&!z.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}r(!1,BD(A)?A.nativeEvent:A,"escape-key")}),I=At(A=>{var M;const O=()=>{var j;P(A),(j=Dn(A))==null||j.removeEventListener("keydown",O)};(M=Dn(A))==null||M.addEventListener("keydown",O)}),_=At(A=>{var M;const O=b.current;b.current=!1;const j=x.current;if(x.current=!1,c==="click"&&j||O||typeof v=="function"&&!v(A))return;const L=Dn(A),z="["+mr("inert")+"]",D=Mt(o.floating).querySelectorAll(z);let B=rt(L)?L:null;for(;B&&!lr(B);){const G=Gn(B);if(lr(G)||!rt(G))break;B=G}if(D.length&&rt(L)&&!HD(L)&&!xt(L,o.floating)&&Array.from(D).every(G=>!xt(B,G)))return;if(kt(L)&&V){const G=L.clientWidth>0&&L.scrollWidth>L.clientWidth,Y=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let Z=Y&&A.offsetX>L.clientWidth;if(Y&&Qt(L).direction==="rtl"&&(Z=A.offsetX<=L.offsetWidth-L.clientWidth),Z||G&&A.offsetY>L.clientHeight)return}const X=(M=i.current.floatingContext)==null?void 0:M.nodeId,Q=g&&Zr(g.nodesRef.current,X).some(G=>{var Y;return Fd(A,(Y=G.context)==null?void 0:Y.elements.floating)});if(Fd(A,o.floating)||Fd(A,o.domReference)||Q)return;const J=g?Zr(g.nodesRef.current,X):[];if(J.length>0){let G=!0;if(J.forEach(Y=>{var Z;if((Z=Y.context)!=null&&Z.open&&!Y.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,A,"outside-press")}),F=At(A=>{var M;const O=()=>{var j;_(A),(j=Dn(A))==null||j.removeEventListener(c,O)};(M=Dn(A))==null||M.addEventListener(c,O)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function A(j){r(!1,j,"ancestor-scroll")}const M=Mt(o.floating);s&&M.addEventListener("keydown",E?I:P,E),v&&M.addEventListener(c,C?F:_,C);let O=[];return p&&(rt(o.domReference)&&(O=cr(o.domReference)),rt(o.floating)&&(O=O.concat(cr(o.floating))),!rt(o.reference)&&o.reference&&o.reference.contextElement&&(O=O.concat(cr(o.reference.contextElement)))),O=O.filter(j=>{var L;return j!==((L=M.defaultView)==null?void 0:L.visualViewport)}),O.forEach(j=>{j.addEventListener("scroll",A,{passive:!0})}),()=>{s&&M.removeEventListener("keydown",E?I:P,E),v&&M.removeEventListener(c,C?F:_,C),O.forEach(j=>{j.removeEventListener("scroll",A)})}},[i,o,s,v,c,n,r,p,a,S,w,P,E,I,_,C,F]),k.useEffect(()=>{b.current=!1},[v,c]);const N=k.useMemo(()=>({onKeyDown:P,[x2[d]]:A=>{u&&r(!1,A.nativeEvent,"reference-press")}}),[P,r,u,d]),V=k.useMemo(()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[w2[c]]:()=>{b.current=!0}}),[P,c]);return k.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function S2(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yo(),i=k.useRef({}),[a]=k.useState(()=>W0()),s=pr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!rt(f)&&n2("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=k.useState(r.reference),u=At((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=k.useMemo(()=>({setPositionReference:c}),[]),p=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function gr(e){e===void 0&&(e={});const{nodeId:t}=e,n=S2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=k.useState(null),[s,l]=k.useState(null),u=(o==null?void 0:o.reference)||i,d=k.useRef(null),p=hr();We(()=>{u&&(d.current=u)},[u]);const f=WN({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(x=>{const S=rt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(S),f.refs.setReference(S)},[f.refs]),g=k.useCallback(x=>{(rt(x)||x===null)&&(d.current=x,a(x)),(rt(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!rt(x))&&f.refs.setReference(x)},[f.refs]),h=k.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),v=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),b=k.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return We(()=>{r.dataRef.current.floatingContext=b;const x=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);x&&(x.context=b)}),k.useMemo(()=>({...f,context:b,refs:h,elements:v}),[f,h,v,b])}function T2(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function m(){!n&&kt(a.domReference)&&a.domReference===vn(Mt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),k.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=k.useMemo(()=>({onPointerDown(f){Md(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Dn(f.nativeEvent);if(l&&rt(m))try{if(Dd()&&h0())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Ld(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=rt(m)&&m.hasAttribute(mr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=vn(a.domReference?a.domReference.ownerDocument:document);!m&&b===a.domReference||xt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||xt(a.domReference,b)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const ux="active",dx="selected";function tf(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ux]:a,[dx]: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&&[ux,dx].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function vr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=k.useCallback(s=>tf(s,e,"reference"),t),i=k.useCallback(s=>tf(s,e,"floating"),n),a=k.useCallback(s=>tf(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let fx=!1;function Hs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function px(e,t){return Hs(t,e===Yd||e===na,e===qo||e===Uo)}function nf(e,t,n){return Hs(t,e===na,n?e===qo:e===Uo)||e==="Enter"||e===" "||e===""}function E2(e,t,n){return Hs(t,n?e===qo:e===Uo,e===na)}function hx(e,t,n){return Hs(t,n?e===Uo:e===qo,e===Yd)}function Ws(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:x="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:E,itemSizes:C,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||js("`useListNavigation` looping must be enabled to allow escaping."),m||js("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&S>1&&js("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=pr(),_=hr(),F=At(s),N=k.useRef(g),V=k.useRef(c??-1),A=k.useRef(null),M=k.useRef(!0),O=k.useRef(F),j=k.useRef(!!o.floating),L=k.useRef(n),z=k.useRef(!1),D=k.useRef(!1),B=Ft(b),X=Ft(n),Q=Ft(w),J=Ft(o.floating),G=Ft(c),[Y,Z]=k.useState(),[$,R]=k.useState(),K=At(function(le,we,ce){ce===void 0&&(ce=!1);function Se(de){m?(Z(de.id),_==null||_.events.emit("virtualfocus",de),E&&(E.current=de)):fr(de,{preventScroll:!0,sync:h0()&&Dd()?fx||z.current:!1})}const ie=le.current[we.current];ie&&Se(ie),requestAnimationFrame(()=>{const de=le.current[we.current]||ie;if(!de)return;ie||Se(de);const ee=Q.current;ee&&H&&(ce||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});We(()=>{document.createElement("div").focus({get preventScroll(){return fx=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?N.current&&c!=null&&(D.current=!0,V.current=c,F(c)):j.current&&(V.current=-1,O.current(null)))},[l,n,o.floating,c,F]),We(()=>{if(l&&n&&o.floating)if(a==null){if(z.current=!1,G.current!=null)return;if(j.current&&(V.current=-1,K(i,V)),(!L.current||!j.current)&&N.current&&(A.current!=null||N.current===!0&&A.current==null)){let le=0;const we=()=>{i.current[0]==null?(le<2&&(le?requestAnimationFrame:queueMicrotask)(we),le++):(V.current=A.current==null||nf(A.current,x,f)||p?Gd(i,B.current):V0(i,B.current),A.current=null,F(V.current))};we()}}else ra(i,a)||(V.current=a,K(i,V,D.current),D.current=!1)},[l,n,o.floating,a,G,p,i,x,f,F,K,B]),We(()=>{var le;if(!l||o.floating||!_||m||!j.current)return;const we=_.nodesRef.current,ce=(le=we.find(de=>de.id===I))==null||(le=le.context)==null?void 0:le.elements.floating,Se=vn(Mt(o.floating)),ie=we.some(de=>de.context&&xt(de.context.elements.floating,Se));ce&&!ie&&M.current&&ce.focus({preventScroll:!0})},[l,o.floating,_,I,m]),We(()=>{if(!l||!_||!m||I)return;function le(we){R(we.id),E&&(E.current=we)}return _.events.on("virtualfocus",le),()=>{_.events.off("virtualfocus",le)}},[l,_,m,I,E]),We(()=>{O.current=F,j.current=!!o.floating}),We(()=>{n||(A.current=null)},[n]),We(()=>{L.current=n},[n]);const ae=a!=null,H=k.useMemo(()=>{function le(ce){if(!n)return;const Se=i.current.indexOf(ce);Se!==-1&&F(Se)}return{onFocus(ce){let{currentTarget:Se}=ce;le(Se)},onClick:ce=>{let{currentTarget:Se}=ce;return Se.focus({preventScroll:!0})},...h&&{onMouseMove(ce){let{currentTarget:Se}=ce;le(Se)},onPointerLeave(ce){let{pointerType:Se}=ce;!M.current||Se==="touch"||(V.current=-1,K(i,V),F(null),m||fr(J.current,{preventScroll:!0}))}}}},[n,J,K,h,i,F,m]),be=At(le=>{if(M.current=!1,z.current=!0,!X.current&&le.currentTarget===J.current)return;if(p&&hx(le.key,x,f)){Nt(le),r(!1,le.nativeEvent,"list-navigation"),kt(o.domReference)&&!m&&o.domReference.focus();return}const we=V.current,ce=Gd(i,b),Se=V0(i,b);if(le.key==="Home"&&(Nt(le),V.current=ce,F(V.current)),le.key==="End"&&(Nt(le),V.current=Se,F(V.current)),S>1){const ie=C||Array.from({length:i.current.length},()=>({width:1,height:1})),de=YN(ie,S,P),ee=de.findIndex(ne=>ne!=null&&!$s(i.current,ne,b)),q=de.reduce((ne,me,De)=>me!=null&&!$s(i.current,me,b)?De:ne,-1);if(V.current=de[KN({current:de.map(ne=>ne!=null?i.current[ne]:null)},{event:le,orientation:x,loop:d,cols:S,disabledIndices:ZN([...b||i.current.map((ne,me)=>$s(i.current,me)?me:void 0),void 0],de),minIndex:ee,maxIndex:q,prevIndex:GN(V.current>Se?ce:V.current,ie,de,S,le.key===na?"bl":le.key===Uo?"tr":"tl"),stopEvent:!0})],F(V.current),x==="both")return}if(px(le.key,x)){if(Nt(le),n&&!m&&vn(le.currentTarget.ownerDocument)===le.currentTarget){V.current=nf(le.key,x,f)?ce:Se,F(V.current);return}nf(le.key,x,f)?d?V.current=we>=Se?u&&we!==i.current.length?-1:ce:jt(i,{startingIndex:we,disabledIndices:b}):V.current=Math.min(Se,jt(i,{startingIndex:we,disabledIndices:b})):d?V.current=we<=ce?u&&we!==-1?i.current.length:Se:jt(i,{startingIndex:we,decrement:!0,disabledIndices:b}):V.current=Math.max(ce,jt(i,{startingIndex:we,decrement:!0,disabledIndices:b})),ra(i,V.current)?F(null):F(V.current)}}),Ce=k.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":$||Y},[m,n,ae,$,Y]),_e=k.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!m0(o.domReference)&&Ce,onKeyDown:be,onPointerMove(){M.current=!0}}),[Ce,be,o.domReference,x]),Re=k.useMemo(()=>{function le(ce){g==="auto"&&p0(ce.nativeEvent)&&(N.current=!0)}function we(ce){N.current=g,g==="auto"&&Md(ce.nativeEvent)&&(N.current=!0)}return{...Ce,onKeyDown(ce){M.current=!1;const Se=ce.key.indexOf("Arrow")===0,ie=E2(ce.key,x,f),de=hx(ce.key,x,f),ee=px(ce.key,x),q=(p?ie:ee)||ce.key==="Enter"||ce.key.trim()==="";if(m&&n){const Ue=_==null?void 0:_.nodesRef.current.find(Lt=>Lt.parentId==null),Qe=_&&Ue?s2(_.nodesRef.current,Ue.id):null;if(Se&&Qe&&E){const Lt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ie||de){var ne,me;const Tn=((ne=Qe.context)==null?void 0:ne.elements.domReference)===ce.currentTarget,Hn=de&&!Tn?(me=Qe.context)==null?void 0:me.elements.domReference:ie?i.current.find(Pr=>(Pr==null?void 0:Pr.id)===Y):null;Hn&&(Nt(ce),Hn.dispatchEvent(Lt),R(void 0))}if(ee&&Qe.context&&Qe.context.open&&Qe.parentId&&ce.currentTarget!==Qe.context.elements.domReference){var De;Nt(ce),(De=Qe.context.elements.domReference)==null||De.dispatchEvent(Lt);return}}return be(ce)}if(!(!n&&!v&&Se)){if(q&&(A.current=p&&ee?null:ce.key),p){ie&&(Nt(ce),n?(V.current=Gd(i,B.current),F(V.current)):r(!0,ce.nativeEvent,"list-navigation"));return}ee&&(c!=null&&(V.current=c),Nt(ce),!n&&v?r(!0,ce.nativeEvent,"list-navigation"):be(ce),n&&F(V.current))}},onFocus(){n&&!m&&F(null)},onPointerDown:we,onMouseDown:le,onClick:le}},[Y,Ce,be,B,g,i,p,F,r,n,v,x,f,c,_,m,E]);return k.useMemo(()=>l?{reference:Re,floating:_e,item:H}:{},[l,Re,_e,H])}const C2=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function eo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=C2.get(a))!=null?n:a,l=Yo(),u=pr()!=null,d=k.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=k.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=k.useCallback(m=>{let{active:g,selected:h}=m;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&h};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return k.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const mx=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 k2(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function P2(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=k.useState("unmounted"),c=k2(n,a);return!c&&s==="close"&&l("unmounted"),We(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function gx(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=k.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=k.useState(()=>({...Qo(i,c),...Qo(n,c)})),{isMounted:g,status:h}=P2(e,{duration:a}),v=Ft(n),b=Ft(r),x=Ft(o),S=Ft(i);return We(()=>{const w=Qo(v.current,c),E=Qo(x.current,c),C=Qo(S.current,c),P=Qo(b.current,c)||Object.keys(w).reduce((I,_)=>(I[_]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(P).map(mx).join(","),transitionDuration:d+"ms",...C,...P}),h==="close"){const I=E||w;m({transitionProperty:Object.keys(I).map(mx).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,v,b,S,d,h,c]),{isMounted:g,styles:f}}function A2(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=k.useRef(),g=k.useRef(""),h=k.useRef((n=f??a)!=null?n:-1),v=k.useRef(null),b=At(s),x=At(l),S=Ft(u),w=Ft(p);We(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),We(()=>{if(r&&g.current===""){var _;h.current=(_=f??a)!=null?_:-1}},[r,f,a]);const E=At(_=>{_?o.current.typing||(o.current.typing=_,x(_)):o.current.typing&&(o.current.typing=_,x(_))}),C=At(_=>{function F(O,j,L){const z=S.current?S.current(j,L):j.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(L.toLocaleLowerCase()))===0);return z?O.indexOf(z):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(F(N,N,g.current)===-1?E(!1):_.key===" "&&Nt(_)),N==null||w.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Nt(_),E(!0)),N.every(O=>{var j,L;return O?((j=O[0])==null?void 0:j.toLocaleLowerCase())!==((L=O[1])==null?void 0:L.toLocaleLowerCase()):!0})&&g.current===_.key&&(g.current="",h.current=v.current),g.current+=_.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=v.current,E(!1)},d);const A=h.current,M=F(N,[...N.slice((A||0)+1),...N.slice(0,(A||0)+1)],g.current);M!==-1?(b(M),v.current=M):_.key!==" "&&(g.current="",E(!1))}),P=k.useMemo(()=>({onKeyDown:C}),[C]),I=k.useMemo(()=>({onKeyDown:C,onKeyUp(_){_.key===" "&&E(!1)}}),[C,E]);return k.useMemo(()=>c?{reference:P,floating:I}:{},[c,P,I])}function vx(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 _2(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(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,b=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,b}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:v,tree:b}=d;return function(S){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:E,clientY:C}=S,P=[E,C],I=Dn(S),_=S.type==="mouseleave",F=xt(g.floating,I),N=xt(g.domReference,I),V=g.domReference.getBoundingClientRect(),A=g.floating.getBoundingClientRect(),M=m.split("-")[0],O=p>A.right-A.width/2,j=f>A.bottom-A.height/2,L=_2(P,V),z=A.width>V.width,D=A.height>V.height,B=(z?V:A).left,X=(z?V:A).right,Q=(D?V:A).top,J=(D?V:A).bottom;if(F&&(i=!0,!_))return;if(N&&(i=!1),N&&!_){i=!0;return}if(_&&rt(S.relatedTarget)&&xt(g.floating,S.relatedTarget)||b&&Zr(b.nodesRef.current,v).some(Z=>{let{context:$}=Z;return $==null?void 0:$.open}))return;if(M==="top"&&f>=V.bottom-1||M==="bottom"&&f<=V.top+1||M==="left"&&p>=V.right-1||M==="right"&&p<=V.left+1)return w();let G=[];switch(M){case"top":G=[[B,V.top+1],[B,A.bottom-1],[X,A.bottom-1],[X,V.top+1]];break;case"bottom":G=[[B,A.top+1],[B,V.bottom-1],[X,V.bottom-1],[X,A.top+1]];break;case"left":G=[[A.right-1,J],[A.right-1,Q],[V.left+1,Q],[V.left+1,J]];break;case"right":G=[[V.right-1,J],[V.right-1,Q],[A.left+1,Q],[A.left+1,J]];break}function Y(Z){let[$,R]=Z;switch(M){case"top":{const K=[z?$+t/2:O?$+t*4:$-t*4,R+t+1],ae=[z?$-t/2:O?$+t*4:$-t*4,R+t+1],H=[[A.left,O||z?A.bottom-t:A.top],[A.right,O?z?A.bottom-t:A.top:A.bottom-t]];return[K,ae,...H]}case"bottom":{const K=[z?$+t/2:O?$+t*4:$-t*4,R-t],ae=[z?$-t/2:O?$+t*4:$-t*4,R-t],H=[[A.left,O||z?A.top+t:A.bottom],[A.right,O?z?A.top+t:A.bottom:A.top+t]];return[K,ae,...H]}case"left":{const K=[$+t+1,D?R+t/2:j?R+t*4:R-t*4],ae=[$+t+1,D?R-t/2:j?R+t*4:R-t*4];return[...[[j||D?A.right-t:A.left,A.top],[j?D?A.right-t:A.left:A.right-t,A.bottom]],K,ae]}case"right":{const K=[$-t,D?R+t/2:j?R+t*4:R-t*4],ae=[$-t,D?R-t/2:j?R+t*4:R-t*4],H=[[j||D?A.left+t:A.right,A.top],[j?D?A.left+t:A.right:A.left+t,A.bottom]];return[K,ae,...H]}}}if(!vx([E,C],G)){if(i&&!L)return w();if(!_&&r){const Z=c(S.clientX,S.clientY);if(Z!==null&&Z<.1)return w()}vx([E,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const I2=/Mac|iPod|iPhone|iPad/,qs=()=>I2.test(navigator.userAgent),O2=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?qs()?"Meta":"Control":n==="Hyper"?qs()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),bx=e=>e.map(t=>t.trim()).join("+");class M2{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=bx(O2(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=bx(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class yn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof yn&&(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 yn(this);return t?t(n):n}static from(t,n){return new yn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(yn.from(t,n).values())}toArray(){return Array.from(this.values())}}const D2=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},xx=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},wx={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Sx=(e,t)=>{const n=xx(t,wx.basic,e);return n!==void 0&&n!==e?n:xx(t,wx.extend,e)},Tx=e=>e.replace(/[^0-9]/g,""),Us=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),Ex=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?Tx(e).includes(Tx(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?D2(e,t)!==null:!1,N2=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>Ex(e,o,n,r)):Ex(e,t,n,r),rf=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:je.array(i.value)?i.value.map(Us):Us(`${i.value}`)}));return e.forEach(i=>{const a=Sx(i,t);o.forEach(s=>{const l=Sx(i,s.key);if(!l)return;const c=Us(`${s.value}`.toLocaleLowerCase()).trim(),u=Us(`${l}`.toLocaleLowerCase()).trim();if(N2(u,c,s.score,s.match))return void r.set(a,i);je.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},F2=e=>(e=e.trim(),e==="Alt"?qs()?y.jsx(M_,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?qs()?y.jsx(k_,{"aria-label":"Command",size:14}):"Ctrl":e),L2=e=>{const t=e.value.trim().split("+");return y.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return y.jsxs(T.Fragment,{children:[y.jsx("kbd",{"aria-label":n,children:F2(n)}),o?null:y.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},of=y.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),V2=(e,t)=>qr()?t:window.matchMedia(e).matches,$2=(e,t=!0)=>{const[n,r]=T.useState(t);return T.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(V2(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},Cx=()=>window.matchMedia("@media (pointer: coarse)"),j2=()=>{var r;const e=T.useRef(qr()?null:Cx()),[t,n]=T.useState(qr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return T.useEffect(()=>{(e.current===null?Cx():e.current).addEventListener("change",i=>n(i.matches))},[]),t},af=(e,t="overflow-hidden")=>{const n=T.useRef(null),r=j2(),o=T.useRef(qr()?"":document.documentElement.style.overflowY);return T.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||Eb())return;document.documentElement.style.padding=om(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),T.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(fT(c.style.height)):null,p=je.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},bn="500ms",z2={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:bn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:bn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:bn}},R2={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:bn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:bn}},sf={drawer:e=>e==="left"?z2:R2,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:bn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:bn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:bn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:bn},initial:{opacity:.5,scale:.95,animationDuration:bn,type:"spring"},enter:{opacity:1,scale:[1.05,1],animationDuration:bn}}},B2=fo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),kx={top:0,left:0,right:0,bottom:0},Px=e=>e*.65,H2=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=Px(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return y.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:kx,whileDrag:{cursor:"grabbing"},className:Oe("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?y.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ks={drawer:"right",sheet:"none",dialog:"none"},W2=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ks.drawer:Ks[o]:t?Ks[o]:Ks.sheet},q2=[],lf=T.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:m=void 0,overlayClassName:g="",type:h="dialog",position:v,overlayClickClose:b=!1,role:x="dialog",interactions:S=q2,...w},E)=>{const C=af(e,"block-only"),P=T.useId(),I=T.useId(),_=$2("(min-width: 64rem)"),F=h!=="dialog",N=W2(_,f,h,v),V=_||f?sf[h]:sf.sheet,A=typeof V=="function"?V(N):V,M=_||f?h:"sheet",O=gr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),j=aa(O.context),L=eo(O.context,{role:x}),z=Jr(O.context,{escapeKey:!0,referencePress:!0,outsidePress:b}),D=vr([j,L,z].concat(S)),B=o,X=rs(void 0);T.useEffect(()=>{X.set(void 0)},[X,M]);const Q=()=>a(!1);T.useImperativeHandle(E,()=>({context:O.context,floating:C.current}),[O.context,C]);const J=(Z,$)=>{const R=O.refs.floating;if(R.current&&M==="sheet"){const ae=R.current.getBoundingClientRect(),H=X.get()||ae.height,be=Math.abs(H-$.delta.y),Ce=Px(window.outerHeight);return be<Ce?(Q(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(be)}},G={layoutId:m,layout:!0,exit:"exit",animate:"enter",initial:"initial",variants:A},Y=d&&M==="sheet"?{dragElastic:0,onDrag:J,dragConstraints:kx,...G,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:M==="sheet",drag:M==="sheet"?"y":"x"}:G;return y.jsxs(T.Fragment,{children:[o?y.jsx(T.Fragment,{children:r?y.jsx(Vo,{ref:O.refs.setReference,...D.getReferenceProps({layoutId:m}),children:B}):y.jsx(pt.button,{ref:O.refs.setReference,...D.getReferenceProps(),layoutId:m,type:"button",children:B})}):null,y.jsx(Xr,{preserveTabOrder:!0,children:y.jsx(nr,{mode:"wait",propagate:!0,presenceAffectsLayout:!0,initial:!1,children:e?y.jsx(ix,{lockScroll:!0,className:Oe(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${M==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:y.jsx(Xo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:O.context,children:y.jsxs(pt.div,{...w,...Y,...t?{"aria-labelledby":P,"aria-describedby":I}:{"aria-label":s},...D.getFloatingProps({"aria-modal":e,ref:Wn(O.refs.setFloating,C),className:Oe(B2({position:N,type:M}),l,"overscroll-contain")}),"data-component":"modal",style:M==="drawer"?{width:X}:{height:X},children:[t?y.jsx("header",{className:"relative w-full",children:t?y.jsx("h2",{id:P,className:"select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,y.jsx("section",{className:Oe("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?y.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,p?y.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:y.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:y.jsx(Wi,{})})}):null,F&&u?y.jsx(H2,{onChange:a,value:X,sheet:M==="sheet",position:N,parent:O.refs.floating}):null]})})}):null},P)})]})}),U2=e=>y.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Oc(e.item.title)?y.jsx(e.item.title,{text:e.text}):e.item.title}),K2=T.forwardRef((e,t)=>{const n=T.useId(),r=e.active,o=e.item;return o.type==="group"?y.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:y.jsx(U2,{text:e.text,item:o})}):o.type!=="shortcut"?y.jsx(T.Fragment,{}):y.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[y.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,y.jsx("span",{children:Oc(o.title)?y.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?y.jsx(L2,{value:o.shortcut}):null]})}),Y2=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:je.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=je.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=rf(o,"title",n),a=r.filter(s=>je.function(s.enabled)?s.enabled({text:t}):!1);return yn.unique(i.concat(a),s=>s.title)},G2=[0,0,0,0,0],Z2=e=>{const t=e.bind??"Mod + k",n=T.useRef([]),r=Ct(),[o,i]=T.useState(""),a=Nr(o),s=T.useId(),l=T.useRef(null),[c,u]=T.useState(null),d=gr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Wo}),p=Ws(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:b=>u(x=>je.number(b)?b:e.open?x??0:null)}),{getItemProps:f}=vr([p]),m=e.commands.flatMap(b=>b.type==="group"?[b,...b.items]:[b]),g=Y2(m,o),h=o===""?m:[{type:"group",title:"Results",items:[]},...g.filter(b=>b.type!=="group")];T.useEffect(()=>{const b=new M2;return b.add(t,()=>{var x;return(x=e.onChangeVisibility)==null?void 0:x.call(e,!0)}),m.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&b.add(x.shortcut,S=>x.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),b.register()},[t]);const v=e.Icon??Py;return y.jsx(T.Fragment,{children:y.jsxs(lf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[y.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[y.jsx("div",{className:"flex size-10 items-center justify-center",children:y.jsx(v,{Default:Py,text:o,size:16})}),y.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:b=>i(b.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:b=>{var x;if((b.key==="ArrowDown"||b.key==="ArrowUp")&&c!==null&&((x=n.current[c])==null||x.scrollIntoView({block:"start",inline:"start"})),b.key==="Enter"){if(c!==null&&h[c]){b.preventDefault();const S=h[c],w=b.currentTarget.value;if(S.type==="shortcut")return S.action({event:b,setOpen:e.onChangeVisibility,text:w})}if(h.length===1){b.preventDefault();const S=h[0],w=b.currentTarget.value;if(S.type==="shortcut")return S.action({event:b,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[y.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),G2.map((b,x)=>y.jsx("li",{className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:of},`${s}-${x}-skeleton-index`))]}):y.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[h.map((b,x)=>T.createElement(K2,{...f({onMouseEnter:()=>u(x),ref(S){n.current[x]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),b.type==="shortcut"&&b.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:b,text:o,active:c===x,key:`${s}-${b.type}-${x}`})),h.length===1?y.jsx("div",{className:Oe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&je.number(c)?y.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?y.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},Jo=e=>{const t=T.useId(),[n,r]=T.useState(e.open),o=T.useRef(null),i=T.useMemo(()=>[ta(10),Kd({fallbackAxisSideDirection:"end"}),Ud(),F0({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=gr({open:n,middleware:i,transform:!0,whileElementsMounted:Wo,onOpenChange:(m,g)=>{var v;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(v=e.onChange)==null||v.call(e,m))}}),c=aa(l),u=Jr(l),d=eo(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=vr([c,u,d]);return y.jsxs(T.Fragment,{children:[y.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&y.jsx(Xr,{preserveTabOrder:!0,id:`${t}-portal`,children:y.jsx(Xo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:y.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:[y.jsx(H0,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),y.jsx("header",{className:"mb-2",children:y.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},X2=e=>{const t=T.useRef(null),n=T.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=T.useState(e.open??!1);T.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=gr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=aa(s,{enabled:e.disabled??!0}),u=eo(s,{role:"tooltip"}),d=Jr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=vr([c,u,d]);return y.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[y.jsx(Na,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:y.jsx(pt.span,{layoutId:o,children:e.trigger})}),y.jsx(nr,{children:i?y.jsx(Xr,{root:t,children:y.jsx(Xo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:y.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Ax=200,Q2=500,_x=(e="")=>Oe("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),cf=T.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Ix=T.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=T.useState(r??!1),[p,f]=T.useState(!1),[m,g]=T.useState(null),h=T.useRef([]),v=T.useRef([]),b=T.useContext(cf),x=pr(),S=hr(),w=r2(),E=z0(),C=x!==null,{floatingStyles:P,refs:I,context:_}=gr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Wo,placement:C?"right":"bottom-start",middleware:[ta({mainAxis:C?0:4,alignmentAxis:C?-4:0}),Kd(),Ud()]}),F=eo(_,{role:"menu"}),N=Jr(_,{bubbles:!0}),V=Y0(_,{move:!1,enabled:n,delay:{open:Ax},handleClose:yx({blockPointerEvents:!0})}),A=aa(_,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),M=Ws(_,{loop:!0,activeIndex:m,nested:C,listRef:h,onNavigate:g}),O=A2(_,{activeIndex:m,listRef:v,resetMs:Q2,onMatch:u?g:void 0}),{getReferenceProps:j,getFloatingProps:L,getItemProps:z}=vr([V,A,F,N,M,O]);T.useEffect(()=>{if(!S)return;const B=()=>d(!1),X=Q=>{Q.nodeId!==w&&Q.parentId===x&&d(!1)};return S.events.on("click",B),S.events.on("menuopen",X),()=>{S.events.off("click",B),S.events.off("menuopen",X)}},[S,w,x]),T.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:x,nodeId:w})},[S,u,w,x]);const D=o?l.className:Oe(_x(l.className));return y.jsxs(o2,{id:w,children:[y.jsx(T.Fragment,{children:l.asChild?y.jsx(Vo,{...j(b.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),b.setHasFocusInside(!0)}})),children:s,className:D,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Wn(I.setReference,E.ref,c),tabIndex:C?b.activeIndex===E.index?0:-1:void 0}):y.jsxs("button",{type:"button",className:D,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Wn(I.setReference,E.ref,c),tabIndex:C?b.activeIndex===E.index?0:-1:void 0,...j(b.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),b.setHasFocusInside(!0)}})),children:[s,C&&y.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[y.jsx("span",{className:"sr-only",children:"Next menu"}),y.jsx(Wu,{size:14})]})]})}),y.jsx(cf.Provider,{value:{activeIndex:m,setActiveIndex:g,getItemProps:z,setHasFocusInside:f,isOpen:u},children:y.jsx(JN,{elementsRef:h,labelsRef:v,children:u&&y.jsx(Xr,{preserveTabOrder:!0,children:y.jsx(Xo,{context:_,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:y.jsx(t,{...L(),ref:I.setFloating,style:{...l.style,...P},className:Oe("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",a),children:e})})})})})]})}),J2=T.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=T.useContext(cf),s=z0({label:n?null:e}),l=hr(),c=s.index===a.activeIndex;return y.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Wn(s.ref,i),className:_x(`${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?y.jsx(t,{size:16}):null]})}),eF=T.forwardRef((e,t)=>pr()===null?y.jsx(i2,{children:y.jsx(Ix,{...e,isParent:!0,ref:t})}):y.jsx(Ix,{...e,isParent:!1,ref:t})),tF=e=>y.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),uf=T.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=pd,...p},f){const[m,g]=T.useState(i??!1),h=T.useRef(null),v=t||"span",b=A=>{g(A),d==null||d(A)},{refs:x,floatingStyles:S,context:w}=gr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:Wo,onOpenChange:i?void 0:b,middleware:[Ud(),ta(5),Kd({fallbackAxisSideDirection:"start"}),F0({padding:5,element:h})]}),E=Y0(w,{move:!0,delay:{open:Ax},enabled:l?s:!1,handleClose:c?yx():null}),C=T2(w,{enabled:l?a:!1}),P=aa(w,{enabled:l?c:!1}),I=Jr(w,{enabled:l}),_=eo(w,{role:"tooltip",enabled:l}),F=b2(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:V}=vr([_,I,F,a?C:void 0,s?E:void 0,c?P:void 0]);return T.useEffect(()=>g(i===void 0?!1:i),[i]),y.jsxs(T.Fragment,{children:[y.jsx(v,{...N(p),ref:Wn(x.setReference,f),children:n}),m&&y.jsx(Xr,{preserveTabOrder:!0,children:y.jsxs(an,{...V(),ref:x.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[y.jsx(H0,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Ys=0,yr=1,ei=2,Ox=4;function Mx(e){return()=>e}function nF(e){e()}function sa(e,t){return n=>e(t(n))}function Dx(e,t){return()=>e(t)}function Nx(e,t){return n=>e(t,n)}function df(e){return e!==void 0}function rF(...e){return()=>{e.map(nF)}}function ti(){}function Gs(e,t){return t(e),e}function oF(e,t){return t(e)}function ct(...e){return e}function tt(e,t){return e(yr,t)}function Ne(e,t){e(Ys,t)}function ff(e){e(ei)}function zt(e){return e(Ox)}function xe(e,t){return tt(e,Nx(t,Ys))}function Fn(e,t){const n=e(yr,r=>{n(),t(r)});return n}function Fx(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Lx(e,t){return e===t}function ut(e=Lx){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ke(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Ln(e){return t=>()=>{t(e)}}function re(e,...t){const n=iF(...t);return(r,o)=>{switch(r){case ei:ff(e);return;case yr:return tt(e,n(o))}}}function Vn(e,t){return n=>r=>{n(t=e(t,r))}}function ni(e){return t=>n=>{e>0?e--:t(n)}}function br(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Le(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);tt(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function iF(...e){return t=>e.reduceRight(oF,t)}function aF(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case yr:return i?n===i?void 0:(r(),n=i,t=tt(e,i),t):(r(),ti);case ei:r(),n=null;return}}}function se(e){let t=e;const n=He();return(r,o)=>{switch(r){case Ys:t=o;break;case yr:{o(t);break}case Ox:return t}return n(r,o)}}function Rt(e,t){return Gs(se(t),n=>xe(e,n))}function He(){const e=[];return(t,n)=>{switch(t){case Ys:e.slice().forEach(r=>{r(n)});return;case ei:e.splice(0,e.length);return;case yr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Gs(He(),t=>xe(e,t))}function Ye(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:sF(),singleton:n}}const sF=()=>Symbol();function lF(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function _t(...e){const t=He(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);tt(i,l=>{n[a]=l,r=r|s,r===o&&Ne(t,n)})}),function(i,a){switch(i){case ei:{ff(t);return}case yr:return r===o&&a(n),tt(t,a)}}}function Ae(e,t=Lx){return re(e,ut(t))}function Vx(...e){return function(t,n){switch(t){case ei:return;case yr:return rF(...e.map(r=>tt(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const cF={0:"debug",3:"error",1:"log",2:"warn"},uF=()=>typeof globalThis>"u"?window:globalThis,xr=Ye(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=uF().VIRTUOSO_LOG_LEVEL)!=null?o:zt(e);r>=i&&console[cF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function $n(e,t,n){return pf(e,t,n).callbackRef}function pf(e,t,n){const r=T.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=T.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 $x(e,t,n,r,o,i,a,s,l){const c=T.useCallback(u=>{const d=dF(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?jx("column-gap",getComputedStyle(u).columnGap,o):jx("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return pf(c,n,l)}function dF(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 jx(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 hf(e,t,n){const r=T.useRef(null),o=T.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),m=c.top-f.top;p=f.height-Math.max(0,m),d=m+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=pf(o,!0,n),s=T.useCallback(()=>{o(a.current)},[o,a]);return T.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==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=Ye(()=>{const e=He(),t=He(),n=se(0),r=He(),o=se(0),i=He(),a=He(),s=se(0),l=se(0),c=se(0),u=se(0),d=He(),p=He(),f=se(!1),m=se(!1),g=se(!1);return xe(re(e,he(({scrollTop:h})=>h)),t),xe(re(e,he(({scrollHeight:h})=>h)),a),xe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),la={lvl:0};function zx(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 it(e){return e===la}function ca(e,t){if(!it(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function xn(e,t,n="k"){if(it(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=xn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return xn(e.l,t,n)}function nn(e,t,n){return it(e)?Hx(t,n,1):t===e.k?It(e,{k:t,v:n}):t<e.k?Wx(It(e,{l:nn(e.l,t,n)})):Wx(It(e,{r:nn(e.r,t,n)}))}function ri(){return la}function Zs(e,t,n){if(it(e))return[];const r=xn(e,t)[0];return fF(gf(e,r,n))}function mf(e,t){if(it(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(it(r))return o;if(it(o))return r;{const[i,a]=Bx(r);return Xs(It(e,{k:i,l:Rx(r),v:a}))}}else return t<n?Xs(It(e,{l:mf(r,t)})):Xs(It(e,{r:mf(o,t)}))}function to(e){return it(e)?[]:[...to(e.l),{k:e.k,v:e.v},...to(e.r)]}function gf(e,t,n){if(it(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(gf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(gf(i,t,n))),s}function Xs(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(vf(t))return qx(It(e,{lvl:n-1}));if(!it(t)&&!it(t.r))return It(t.r,{l:It(t,{r:t.r.l}),lvl:n,r:It(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(vf(e))return yf(It(e,{lvl:n-1}));if(!it(r)&&!it(r.l)){const o=r.l,i=vf(o)?r.lvl-1:r.lvl;return It(o,{l:It(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:yf(It(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function It(e,t){return Hx(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 Rx(e){return it(e.r)?e.l:Xs(It(e,{r:Rx(e.r)}))}function vf(e){return it(e)||e.lvl>e.r.lvl}function Bx(e){return it(e.r)?[e.k,e.v]:Bx(e.r)}function Hx(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function Wx(e){return yf(qx(e))}function qx(e){const{l:t}=e;return!it(t)&&t.lvl===e.lvl?It(t,{r:It(e,{l:t.r})}):e}function yf(e){const{lvl:t,r:n}=e;return!it(n)&&!it(n.r)&&n.lvl===t&&n.r.lvl===t?It(n,{l:It(e,{r:n.l}),lvl:t+1}):e}function fF(e){return zx(e,({k:t,v:n})=>({index:t,value:n}))}function Ux(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ua(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const bf=Ye(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function Kx(e,t,n){return e[Qs(e,t,n)]}function Qs(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 pF(e,t,n,r){const o=Qs(e,t,r),i=Qs(e,n,r,o);return e.slice(o,i+1)}function wn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Js(e){return!it(e.groupOffsetTree)}function xf({index:e},t){return t===e?0:t<e?-1:1}function hF(){return{groupIndices:[],groupOffsetTree:ri(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ri()}}function mF(e,t){let n=it(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),it(e)){e=nn(e,0,i);continue}const s=Zs(e,a-1,o+1);if(s.some(SF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=mf(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 gF(e){return typeof e.groupIndex<"u"}function vF({offset:e},t){return t===e?0:t<e?-1:1}function da(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=Kx(t,e,xf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Yx(e,t){if(!Js(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Gx(e,t,n){if(gF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Yx(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function yF(e,t,n,r=0){return r>0&&(t=Math.max(t,Kx(e,r,xf).offset)),zx(pF(e,t,n,vF),wF)}function bF(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&&it(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>nn(nn(m,g,p),g+1,f),a)}else[a,s]=mF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=wf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,da(f,d,o)),ri()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function xF(e){return to(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 Zx(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 wf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Qs(o,t-1,xf),s=o[l].offset;const c=xn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===xn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Zs(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 wF(e){return{index:e.index,value:e}}function SF(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 TF={offsetHeight:"height",offsetWidth:"width"},jn=Ye(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),o=Rt(r,0),i=He(),a=He(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,E)=>wn(w,TF[E])),p=se(void 0),f=se(0),m=hF(),g=Rt(re(n,Le(l,e,f),Vn(bF,m),ut()),m),h=Rt(re(l,ut(),Vn((w,E)=>({current:E,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);xe(re(l,ke(w=>w.length>0),Le(g,f),he(([w,E,C])=>{const P=w.reduce((I,_,F)=>nn(I,_,da(_,E.offsetTree,C)||F),ri());return{...E,groupIndices:w,groupOffsetTree:P}})),g),xe(re(r,Le(g),ke(([w,{lastIndex:E}])=>w<E),he(([w,{lastIndex:E,lastSize:C}])=>[{endIndex:E,size:C,startIndex:w}])),n),xe(c,u);const v=Rt(re(c,he(w=>w===void 0)),!0);xe(re(u,ke(w=>w!==void 0&&it(zt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const b=en(re(n,Le(g),Vn(({sizes:w},[E,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));tt(re(s,Vn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:E}=zt(g);if(w>0)Ne(t,!0),Ne(i,w+Zx(w,E));else if(w<0){const C=zt(h);C.length>0&&(w-=Zx(-w,C)),Ne(a,w)}}),tt(re(s,Le(e)),([w,E])=>{w<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},tn.ERROR)});const x=en(i);xe(re(i,Le(g),he(([w,E])=>{const C=E.groupIndices.length>0,P=[],I=E.lastSize;if(C){const _=ca(E.sizeTree,0);let F=0,N=0;for(;F<w;){const A=E.groupIndices[N],M=E.groupIndices.length===N+1?1/0:E.groupIndices[N+1]-A-1;P.push({endIndex:A,size:_,startIndex:A}),P.push({endIndex:A+1+M-1,size:I,startIndex:A+1}),N++,F+=M+1}const V=to(E.sizeTree);return F!==w&&V.shift(),V.reduce((A,{k:M,v:O})=>{let j=A.ranges;return A.prevSize!==0&&(j=[...A.ranges,{endIndex:M+w-1,size:A.prevSize,startIndex:A.prevIndex}]),{prevIndex:M+w,prevSize:O,ranges:j}},{prevIndex:w,prevSize:0,ranges:P}).ranges}return to(E.sizeTree).reduce((_,{k:F,v:N})=>({prevIndex:F+w,prevSize:N,ranges:[..._.ranges,{endIndex:F+w-1,size:_.prevSize,startIndex:_.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(re(a,Le(g,f),he(([w,{offsetTree:E},C])=>{const P=-w;return da(P,E,C)})));return xe(re(a,Le(g,f),he(([w,E,C])=>{if(E.groupIndices.length>0){if(it(E.sizeTree))return E;let P=ri();const I=zt(h);let _=0,F=0,N=0;for(;_<-w;){N=I[F];const V=I[F+1]-N-1;F++,_+=V+1}if(P=to(E.sizeTree).reduce((V,{k:A,v:M})=>nn(V,Math.max(0,A+w),M),P),_!==-w){const V=ca(E.sizeTree,N);P=nn(P,0,V);const A=xn(E.sizeTree,-w+1)[1];P=nn(P,1,A)}return{...E,sizeTree:P,...wf(E.offsetTree,0,P,C)}}else{const P=to(E.sizeTree).reduce((I,{k:_,v:F})=>nn(I,Math.max(0,_+w),F),ri());return{...E,sizeTree:P,...wf(E.offsetTree,0,P,C)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:b,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},ct(xr,bf),{singleton:!0});function EF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Xx=Ye(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=He(),a=He(),s=en(re(i,he(EF)));return xe(re(s,he(l=>l.totalCount)),n),xe(re(s,he(l=>l.groupIndices)),e),xe(re(_t(o,t,r),ke(([l,c])=>Js(c)),he(([l,c,u])=>xn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ut(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ct(jn,Wt)),wr=Ye(([{log:e}])=>{const t=se(!1),n=en(re(t,ke(r=>r),ut()));return tt(t,r=>{r&&zt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},ct(xr),{singleton:!0}),CF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Qx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!CF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const fa=Ye(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=He(),m=He(),g=se(0);let h=null,v=null,b=null;function x(){h&&(h(),h=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),Ne(l,!1)}return xe(re(f,Le(n,d,r,g,s,a,p),Le(e,i,o),he(([[S,w,E,C,P,I,_,F],N,V,A])=>{const M=Qx(S),{align:O,behavior:j,offset:L}=M,z=C-1,D=Gx(M,w,z);let B=da(D,w.offsetTree,N)+I;O==="end"?(B+=V+xn(w.sizeTree,D)[1]-E+A,D===z&&(B+=_)):O==="center"?B+=(V+xn(w.sizeTree,D)[1]-E+A)/2:B-=P,L&&(B+=L);const X=Q=>{x(),Q?(F("retrying to scroll to",{location:S},tn.DEBUG),Ne(f,S)):(Ne(m,!0),F("list did not change, scroll successful",{},tn.DEBUG))};if(x(),j==="smooth"){let Q=!1;b=tt(t,J=>{Q=Q||J}),h=Fn(u,()=>{X(Q)})}else h=Fn(re(t,kF(150)),X);return v=setTimeout(()=>{x()},1200),Ne(l,!0),F("scrolling from index to",{behavior:j,index:D,top:B},tn.DEBUG),{behavior:j,top:B}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},ct(jn,Wt,xr),{singleton:!0});function kF(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 Tf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const pa=Ye(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return xe(re(a,Le(l),ke(([u,d])=>!!d),Ln(!1)),s),xe(re(a,Le(l),ke(([u,d])=>!!d),Ln(!1)),c),tt(re(_t(t,a),Le(s,n,e,c),ke(([[,u],d,{sizeTree:p},f,m])=>u&&(!it(p)||df(f))&&!d&&!m),Le(l)),([,u])=>{Fn(o,()=>{Ne(c,!0)}),Sf(4,()=>{Fn(r,()=>{Ne(s,!0)}),Ne(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ct(jn,Wt,fa,wr),{singleton:!0});function Jx(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",PF="none",AF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},_F=0,ga=Ye(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=He(),c=He(),u=se(4),d=se(_F),p=Rt(re(Vx(re(Ae(o),ni(1),Ln(!0)),re(Ae(o),ni(1),Ln(!1),Fx(100))),ut()),!1),f=Rt(re(Vx(re(n,Ln(!0)),re(n,Ln(!1),Fx(200))),ut()),!1);xe(re(_t(Ae(o),Ae(d)),he(([b,x])=>b<=x),ut()),s),xe(re(s,br(50)),c);const m=en(re(_t(r,Ae(i),Ae(t),Ae(e),Ae(u)),Vn((b,[{scrollHeight:x,scrollTop:S},w,E,C,P])=>{const I=S+w-x>-P,_={scrollHeight:x,scrollTop:S,viewportHeight:w};if(I){let N,V;return S>b.state.scrollTop?(N="SCROLLED_DOWN",V=b.state.scrollTop-S):(N="SIZE_DECREASED",V=b.state.scrollTop-S||b.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:_}}let F;return _.scrollHeight>b.state.scrollHeight?F="SIZE_INCREASED":w<b.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":S<b.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},AF),ut((b,x)=>b&&b.atBottom===x.atBottom))),g=Rt(re(r,Vn((b,{scrollHeight:x,scrollTop:S,viewportHeight:w})=>{if(Jx(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:S};{const E=x-(S+w)<1;return b.scrollTop!==S&&E?{changed:!0,jump:b.scrollTop-S,scrollHeight:x,scrollTop:S}:{changed:!0,jump:0,scrollHeight:x,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ke(b=>b.changed),he(b=>b.jump)),0);xe(re(m,he(b=>b.atBottom)),a),xe(re(a,br(50)),l);const h=se(ma);xe(re(r,he(({scrollTop:b})=>b),ut(),Vn((b,x)=>zt(f)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?ha:ma,prevScrollTop:x},{direction:ma,prevScrollTop:0}),he(b=>b.direction)),h),xe(re(r,br(50),Ln(PF)),h);const v=se(0);return xe(re(p,ke(b=>!b),Ln(0)),v),xe(re(o,br(100),Le(p),ke(([b,x])=>!!x),Vn(([b,x],[S])=>[x,S],[0,0]),he(([b,x])=>x-b)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},ct(Wt)),el="top",tl="bottom",ew="none";function tw(e,t,n){return typeof e=="number"?n===ha&&t===el||n===ma&&t===tl?e:0:n===ha?t===el?e.main:e.reverse:t===tl?e.main:e.reverse}function nw(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Ef=Ye(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=He(),a=se(0),s=se(0),l=se(0),c=Rt(re(_t(Ae(r),Ae(o),Ae(n),Ae(i,ua),Ae(l),Ae(a),Ae(t),Ae(e),Ae(s)),he(([u,d,p,[f,m],g,h,v,b,x])=>{const S=u-b,w=h+v,E=Math.max(p-S,0);let C=ew;const P=nw(x,el),I=nw(x,tl);return f-=b,f+=p+v,m+=p+v,m-=b,f>u+w-P&&(C=ha),m<u-E+d+I&&(C=ma),C!==ew?[Math.max(S-p-tw(g,el,C)-P,0),S-E-v+d+tw(g,tl,C)+I]:null}),ke(u=>u!=null),ut(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ct(Wt),{singleton:!0});function IF(e,t,n){if(Js(t)){const r=Yx(e,t);return[{index:xn(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 nl(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,m=p-u;return{bottom:u,firstItemIndex:i,items:ow(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:ow(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function rw(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=Tf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return nl(c,[],s,o,n,r)}function ow(e,t,n){if(e.length===0)return[];if(!Js(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=Zs(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 no=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=se([]),h=se(0),v=He();xe(i.topItemsIndexes,g);const b=Rt(re(_t(f,m,Ae(l,ua),Ae(o),Ae(r),Ae(c),u,Ae(g),Ae(t),Ae(n),e),ke(([E,C,,P,,,,,,,I])=>{const _=I&&I.length!==P;return E&&!C&&!_}),he(([,,[E,C],P,I,_,F,N,V,A,M])=>{const O=I,{offsetTree:j,sizeTree:L}=O,z=zt(h);if(P===0)return{...Cf,totalCount:P};if(E===0&&C===0)return z===0?{...Cf,totalCount:P}:rw(z,_,I,V,A,M||[]);if(it(L))return z>0?null:nl(IF(Tf(_,P),O,M),[],P,A,O,V);const D=[];if(N.length>0){const G=N[0],Y=N[N.length-1];let Z=0;for(const $ of Zs(L,G,Y)){const R=$.value,K=Math.max($.start,G),ae=Math.min($.end,Y);for(let H=K;H<=ae;H++)D.push({data:M==null?void 0:M[H],index:H,offset:Z,size:R}),Z+=R}}if(!F)return nl([],D,P,A,O,V);const B=N.length>0?N[N.length-1]+1:0,X=yF(j,E,C,B);if(X.length===0)return null;const Q=P-1,J=Gs([],G=>{for(const Y of X){const Z=Y.value;let $=Z.offset,R=Y.start;const K=Z.size;if(Z.offset<E){R+=Math.floor((E-Z.offset+A)/(K+A));const H=R-Y.start;$+=H*K+H*A}R<B&&($+=(B-R)*K,R=B);const ae=Math.min(Y.end,Q);for(let H=R;H<=ae&&!($>=C);H++)G.push({data:M==null?void 0:M[H],index:H,offset:$,size:K}),$+=K+A}});return nl(J,D,P,A,O,V)}),ke(E=>E!==null),ut()),Cf);xe(re(e,ke(df),he(E=>E==null?void 0:E.length)),o),xe(re(b,he(E=>E.topListHeight)),d),xe(d,s),xe(re(b,he(E=>[E.top,E.bottom])),a),xe(re(b,he(E=>E.items)),v);const x=en(re(b,ke(({items:E})=>E.length>0),Le(o,e),ke(([{items:E},C])=>E[E.length-1].originalIndex===C-1),he(([,E,C])=>[E-1,C]),ut(ua),he(([E])=>E))),S=en(re(b,br(200),ke(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),he(({items:E})=>E[0].index),ut())),w=en(re(b,ke(({items:E})=>E.length>0),he(({items:E})=>{let C=0,P=E.length-1;for(;E[C].type==="group"&&C<P;)C++;for(;E[P].type==="group"&&P>C;)P--;return{endIndex:E[P].index,startIndex:E[C].index}}),ut(Ux)));return{endReached:x,initialItemCount:h,itemsRendered:v,listState:b,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},ct(jn,Xx,Ef,pa,fa,ga,wr,bf),{singleton:!0}),iw=Ye(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=He(),a=Rt(re(_t(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(Ae(a),i),{totalListHeight:a,totalListHeightChanged:i}},ct(Wt,no),{singleton:!0}),OF=Ye(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Rt(re(_t(n,e,t),ke(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),br(0),ut()),0);return{alignToBottom:n,paddingTopAddition:r}},ct(Wt,iw),{singleton:!0});function aw(e){return e?e==="smooth"?"smooth":"auto":!1}const MF=(e,t)=>typeof e=="function"?aw(e(t)):t&&aw(e),DF=Ye(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=se(!1),d=He();let p=null;function f(g){Ne(o,{align:"end",behavior:g,index:"LAST"})}tt(re(_t(re(Ae(t),ni(1)),a),Le(Ae(u),r,i,c),he(([[g,h],v,b,x,S])=>{let w=h&&x,E="auto";return w&&(E=MF(v,b||S),w=w&&!!E),{followOutputBehavior:E,shouldFollow:w,totalCount:g}}),ke(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Fn(e,()=>{zt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Fn(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(zt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return tt(re(_t(Ae(u),t,s),ke(([g,,h])=>g&&h),Vn(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),ke(({refreshed:g})=>g),Le(u,t)),([,g])=>{zt(i)&&m(g!==!1)}),tt(d,()=>{m(zt(u)!==!1)}),tt(_t(Ae(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ct(jn,ga,fa,pa,wr,xr,Wt)),NF=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(re(s,Le(i),ke(([,l])=>l!==0),Le(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>rw(l,c,u,d,p,f))),a),{}),ct(jn,pa,no,wr),{singleton:!0}),FF=Ye(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return tt(re(e,Le(r),ke(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Fn(re(n,ni(1),ke(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ne(t,o)})})}),{initialScrollTop:r}},ct(wr,Wt,no),{singleton:!0}),LF=({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,VF=Ye(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=He();return xe(re(u,Le(t,l,n,i,o,r,s),Le(e),he(([[d,p,f,m,g,h,v,b],x])=>{const{align:S,behavior:w,calculateViewLocation:E=LF,done:C,...P}=d,I=Gx(d,p,m-1),_=da(I,p.offsetTree,x)+g+h,F=_+xn(p.sizeTree,I)[1],N=b+h,V=b+f-v,A=E({itemBottom:F,itemTop:_,locationParams:{align:S,behavior:w,...P},viewportBottom:V,viewportTop:N});return A?C&&Fn(re(a,ke(M=>!M),ni(zt(a)?1:2)),C):C&&C(),A}),ke(d=>d!==null)),c),{scrollIntoView:u}},ct(jn,Wt,fa,no,xr),{singleton:!0}),sw=Ye(([{scrollVelocity:e}])=>{const t=se(!1),n=He(),r=se(!1);return xe(re(e,Le(r,t,n),ke(([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}),ut()),t),tt(re(_t(t,e,n),Le(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ct(ga),{singleton:!0}),kf=Ye(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),o=He(),i=se(!1),a=se(void 0);return xe(re(_t(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(re(t,Le(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ct(Wt)),$F=Ye(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=He(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),tt(re(c,Le(t,r,a,d,p,n)),([f,m,g,h,v,b,x])=>{const S=xF(m.sizeTree);h&&v!==null&&b!==null&&(g=v.scrollTop-b.offsetTop),g-=x,f({ranges:S,scrollTop:g})}),xe(re(u,ke(df),he(jF)),o),xe(re(i,Le(u),ke(([,f])=>f!==void 0),ut(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ct(jn,Wt,pa,wr,kf));function jF(e){return{align:"start",index:0,offset:e.scrollTop}}const zF=Ye(([{topItemsIndexes:e}])=>{const t=se(0);return xe(re(t,ke(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ct(no));function lw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const RF=lw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),BF=Ye(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{const g=en(re(l,Le(a),Vn(([,v,b,x],[{bottom:S,items:w,offsetBottom:E,totalCount:C},P])=>{const I=S+E;let _=0;return b===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(_=I-x,_!==0&&(_+=P))),[_,w,C,I]},[0,[],0,0]),ke(([v])=>v!==0),Le(r,s,n,o,f,m),ke(([,v,b,x,,,S])=>!S&&!x&&v!==0&&b===ha),he(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Ne(t,{behavior:"auto",top:-v}),Ne(e,0)):(Ne(e,0),Ne(t,{behavior:"auto",top:-v}))}return tt(re(g,Le(e,i)),([v,b,x])=>{x&&RF()?Ne(e,b-v):h(-v)}),tt(re(_t(Rt(i,!1),e,m),ke(([v,b,x])=>!v&&!x&&b!==0),he(([v,b])=>b),br(1)),h),xe(re(d,he(v=>({top:-v}))),t),tt(re(c,Le(p,u),he(([v,{groupIndices:b,lastSize:x,sizeTree:S},w])=>{function E(C){return C*(x+w)}if(b.length===0)return E(v);{let C=0;const P=ca(S,0);let I=0,_=0;for(;I<v;){I++,C+=P;let F=b.length===_+1?1/0:b[_+1]-b[_]-1;I+F>v&&(C-=P,F=v-I+1),I+=F,C+=E(F),_++}return C}})),v=>{Ne(e,v),requestAnimationFrame(()=>{Ne(t,{top:v}),requestAnimationFrame(()=>{Ne(e,0),Ne(m,!1)})})}),{deviation:e}},ct(Wt,ga,no,jn,xr,bf)),HF=Ye(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ct(Ef,NF,wr,sw,iw,FF,OF,kf,VF,xr)),cw=Ye(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,v,{listState:b,topItemsIndexes:x,...S},{scrollToIndex:w},E,{topItemCount:C},{groupCounts:P},I])=>(xe(S.rangeChanged,I.scrollSeekRangeChanged),xe(re(I.windowViewportRect,he(_=>_.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:P,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:b,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,...I,...g,sizes:l,...h}),ct(jn,pa,Wt,$F,DF,no,fa,BF,zF,Xx,HF));function WF(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 rl=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Pf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=T.createContext({});function l(h,v){h.propsReady&&Ne(h.propsReady,!1);for(const b of r){const x=h[t.required[b]];Ne(x,v[b])}for(const b of o)if(b in v){const x=h[t.optional[b]];Ne(x,v[b])}h.propsReady&&Ne(h.propsReady,!0)}function c(h){return i.reduce((v,b)=>(v[b]=x=>{const S=h[t.methods[b]];Ne(S,x)},v),{})}function u(h){return a.reduce((v,b)=>(v[b]=aF(h[t.events[b]]),v),{})}const d=T.forwardRef((h,v)=>{const{children:b,...x}=h,[S]=T.useState(()=>Gs(lF(e),C=>{l(C,x)})),[w]=T.useState(Dx(u,S));rl(()=>{for(const C of a)C in x&&tt(w[C],x[C]);return()=>{Object.values(w).map(ff)}},[x,w,S]),rl(()=>{l(S,x)}),T.useImperativeHandle(v,Mx(c(S)));const E=n;return y.jsx(s.Provider,{value:S,children:n?y.jsx(E,{...WF([...r,...o,...a],x),children:b}):b})}),p=h=>T.useCallback(Nx(Ne,T.useContext(s)[h]),[h]),f=h=>{const v=T.useContext(s)[h],b=T.useCallback(x=>tt(v,x),[v]);return T.useSyncExternalStore(b,()=>zt(v),()=>zt(v))},m=h=>{const v=T.useContext(s)[h],[b,x]=T.useState(Dx(zt,v));return rl(()=>tt(v,S=>{S!==b&&x(Mx(S))}),[v,b]),b},g=T.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const b=T.useContext(s)[h];rl(()=>tt(b,v),[v,b])},useEmitterValue:g,usePublisher:p}}const ol=T.createContext(void 0),uw=T.createContext(void 0),dw=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Af(e){return"self"in e}function qF(e){return"body"in e}function fw(e,t,n,r=ti,o,i){const a=T.useRef(null),s=T.useRef(null),l=T.useRef(null),c=T.useCallback(p=>{let f,m,g;const h=p.target;if(qF(h)||Af(h)){const b=Af(h)?h:h.defaultView;g=i?b.scrollX:b.scrollY,f=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,m=i?b.innerWidth:b.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?v():xi.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);T.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,v;Af(f)?(h=Math.max(wn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=wn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const b=h-g;if(p.top=Math.ceil(Math.max(Math.min(b,p.top),0)),Jx(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const _f="-webkit-sticky",pw="sticky",hw=lw(()=>{if(typeof document>"u")return pw;const e=document.createElement("div");return e.style.position=_f,e.style.position===_f?_f:pw});function If(e){return e}const UF=Ye(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(If),i=se("div"),a=se(ti),s=(l,c=null)=>Rt(re(r,he(u=>u[l]),ut()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),KF=Ye(([e,t])=>({...e,...t}),ct(cw,UF)),YF=({height:e})=>y.jsx("div",{style:{height:e}}),GF={overflowAnchor:"none",position:hw(),zIndex:1},mw={overflowAnchor:"none"},ZF={...mw,display:"inline-block",height:"100%"},gw=T.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=dn("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=dn("windowScrollContainerState"),a=dn("scrollContainerState"),s=o||r?i:a,l=Ie("itemContent"),c=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),p=Ie("itemSize"),f=Ie("log"),m=dn("gap"),g=Ie("horizontalDirection"),{callbackRef:h}=$x(n,p,d,e?ti:s,f,m,o,g,Ie("skipAnimationFrameInResizeObserver")),[v,b]=T.useState(0);Df("deviation",A=>{v!==A&&b(A)});const x=Ie("EmptyPlaceholder"),S=Ie("ScrollSeekPlaceholder")||YF,w=Ie("ListComponent"),E=Ie("ItemComponent"),C=Ie("GroupComponent"),P=Ie("computeItemKey"),I=Ie("isSeeking"),_=Ie("groupIndices").length>0,F=Ie("alignToBottom"),N=Ie("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...g?{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},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?y.jsx(x,{...dt(x,c)}):y.jsx(w,{...dt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:V,children:(e?t.topItems:t.items).map(A=>{const M=A.originalIndex,O=P(M+t.firstItemIndex,A.data,c);return I?T.createElement(S,{...dt(S,c),height:A.size,index:A.index,key:O,type:A.type||"item",...A.type==="group"?{}:{groupIndex:A.groupIndex}}):A.type==="group"?T.createElement(C,{...dt(C,c),"data-index":M,"data-item-index":A.index,"data-known-size":A.size,key:O,style:GF},u(A.index,c)):T.createElement(E,{...dt(E,c),...vw(E,A.data),"data-index":M,"data-item-group-index":A.groupIndex,"data-item-index":A.index,"data-known-size":A.size,key:O,style:g?ZF:mw},_?l(A.index,A.groupIndex,A.data,c):l(A.index,A.data,c))})})}),XF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},QF={outline:"none",overflowX:"auto",position:"relative"},oi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),JF={position:hw(),top:0,width:"100%",zIndex:1};function dt(e,t){if(typeof e!="string")return{context:t}}function vw(e,t){return{item:typeof e=="string"?void 0:t}}const eL=T.memo(function(){const e=Ie("HeaderComponent"),t=dn("headerHeight"),n=Ie("HeaderFooterTag"),r=$n(T.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...dt(e,o)})}):null}),tL=T.memo(function(){const e=Ie("FooterComponent"),t=dn("footerHeight"),n=Ie("HeaderFooterTag"),r=$n(T.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...dt(e,o)})}):null});function Of({useEmitter:e,useEmitterValue:t,usePublisher:n}){return T.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=fw(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),y.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?QF:XF,...o},tabIndex:0,...i,...dt(s,u),children:r})})}function Mf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return T.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=T.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=fw(a,l,s,m,d);return dw(()=>{var b;return h.current=d||((b=f.current)==null?void 0:b.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),y.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...dt(s,p),children:r})})}const nL=({children:e})=>{const t=T.useContext(ol),n=dn("viewportHeight"),r=dn("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=T.useMemo(()=>sa(n,l=>wn(l,i?"width":"height")),[n,i]),s=$n(a,!0,Ie("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:s,style:oi(o),children:e})},rL=({children:e})=>{const t=T.useContext(ol),n=dn("windowViewportRect"),r=dn("fixedItemHeight"),o=Ie("customScrollParent"),i=hf(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("alignToBottom");return T.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:oi(a),children:e})},oL=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...JF,marginTop:`${n}px`},o=Ie("context");return y.jsx(t,{style:r,...dt(t,o),children:e})},iL=T.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context"),i=r||t?lL:sL,a=r||t?rL:nL;return y.jsxs(i,{...e,...dt(i,o),children:[n&&y.jsx(oL,{children:y.jsx(gw,{showTopList:!0})}),y.jsxs(a,{children:[y.jsx(eL,{}),y.jsx(gw,{}),y.jsx(tL,{})]})]})}),{Component:aL,useEmitter:Df,useEmitterValue:Ie,usePublisher:dn}=Pf(KF,{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:{}},iL),sL=Of({useEmitter:Df,useEmitterValue:Ie,usePublisher:dn}),lL=Mf({useEmitter:Df,useEmitterValue:Ie,usePublisher:dn}),Nf=aL,cL=Ye(()=>{const e=se(l=>y.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(If),a=se(ti),s=(l,c=null)=>Rt(re(o,he(u=>u[l]),ut()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),uL=Ye(([e,t])=>({...e,...t}),ct(cw,cL)),dL=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{height:e}})}),fL=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{border:0,height:e,padding:0}})}),pL={overflowAnchor:"none"},yw=T.memo(function({showTopList:e=!1}){const t=Ve("listState"),n=Ve("computeItemKey"),r=Ve("firstItemIndex"),o=Ve("isSeeking"),i=Ve("ScrollSeekPlaceholder")||dL,a=Ve("context"),s=Ve("TableRowComponent"),l=Ve("fixedHeaderHeight"),c=Ve("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?T.createElement(i,{...dt(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):T.createElement(s,{...dt(s,a),...vw(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:pL},c(p.index,p.data,a))});return y.jsx(y.Fragment,{children:d})}),hL=T.memo(function(){const e=Ve("listState"),t=Ve("topItemsIndexes").length>0,n=Sn("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),i=Sn("windowScrollContainerState"),a=Sn("scrollContainerState"),s=o||r?i:a,l=Ve("trackItemSizes"),c=Ve("itemSize"),u=Ve("log"),{callbackRef:d,ref:p}=$x(n,c,l,s,u,void 0,o,!1,Ve("skipAnimationFrameInResizeObserver")),[f,m]=T.useState(0);Ff("deviation",_=>{f!==_&&(p.current.style.marginTop=`${_}px`,m(_))});const g=Ve("EmptyPlaceholder"),h=Ve("FillerRow")||fL,v=Ve("TableBodyComponent"),b=Ve("paddingTopAddition"),x=Ve("statefulTotalCount"),S=Ve("context");if(x===0&&g)return y.jsx(g,{...dt(g,S)});const w=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),E=e.offsetTop+b+f-w,C=e.offsetBottom,P=E>0?y.jsx(h,{context:S,height:E},"padding-top"):null,I=C>0?y.jsx(h,{context:S,height:C},"padding-bottom"):null;return y.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...dt(v,S),children:[P,t&&y.jsx(yw,{showTopList:!0}),y.jsx(yw,{}),I]})}),mL=({children:e})=>{const t=T.useContext(ol),n=Sn("viewportHeight"),r=Sn("fixedItemHeight"),o=$n(T.useMemo(()=>sa(n,i=>wn(i,"height")),[n]),!0,Ve("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:o,style:oi(!1),children:e})},gL=({children:e})=>{const t=T.useContext(ol),n=Sn("windowViewportRect"),r=Sn("fixedItemHeight"),o=Ve("customScrollParent"),i=hf(n,o,Ve("skipAnimationFrameInResizeObserver"));return T.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:oi(!1),children:e})},vL=T.memo(function(e){const t=Ve("useWindowScroll"),n=Ve("customScrollParent"),r=Sn("fixedHeaderHeight"),o=Sn("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),s=Ve("context"),l=$n(T.useMemo(()=>sa(r,v=>wn(v,"height")),[r]),!0,Ve("skipAnimationFrameInResizeObserver")),c=$n(T.useMemo(()=>sa(o,v=>wn(v,"height")),[o]),!0,Ve("skipAnimationFrameInResizeObserver")),u=n||t?xL:bL,d=n||t?gL:mL,p=Ve("TableComponent"),f=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),g=i?y.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...dt(f,s),children:i()},"TableHead"):null,h=a?y.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...dt(m,s),children:a()},"TableFoot"):null;return y.jsx(u,{...e,...dt(u,s),children:y.jsx(d,{children:y.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...dt(p,s),children:[g,y.jsx(hL,{},"TableBody"),h]})})})}),{Component:yL,useEmitter:Ff,useEmitterValue:Ve,usePublisher:Sn}=Pf(uL,{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:{}},vL),bL=Of({useEmitter:Ff,useEmitterValue:Ve,usePublisher:Sn}),xL=Mf({useEmitter:Ff,useEmitterValue:Ve,usePublisher:Sn}),wL=yL,bw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},SL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:xw,floor:il,max:va,min:Lf,round:ww}=Math;function Sw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function TL(e){return{...SL,items:e}}function al(e,t){return e&&e.width===t.width&&e.height===t.height}function EL(e,t){return e&&e.column===t.column&&e.row===t.row}const CL=Ye(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:S},w])=>{const E=se(0),C=se(0),P=se(bw),I=se({height:0,width:0}),_=se({height:0,width:0}),F=He(),N=He(),V=se(0),A=se(null),M=se({column:0,row:0}),O=He(),j=He(),L=se(!1),z=se(0),D=se(!0),B=se(!1),X=se(!1);tt(re(m,Le(z),ke(([$,R])=>!!R)),()=>{Ne(D,!1)}),tt(re(_t(m,D,_,I,z,B),ke(([$,R,K,ae,,H])=>$&&!R&&K.height!==0&&ae.height!==0&&!H)),([,,,,$])=>{Ne(B,!0),Sf(1,()=>{Ne(F,$)}),Fn(re(c),()=>{Ne(t,[0,0]),Ne(D,!0)})}),xe(re(j,ke($=>$!=null&&$.scrollTop>0),Ln(0)),C),tt(re(m,Le(j),ke(([,$])=>$!=null)),([,$])=>{$&&(Ne(I,$.viewport),Ne(_,$.item),Ne(M,$.gap),$.scrollTop>0&&(Ne(L,!0),Fn(re(c,ni(1)),R=>{Ne(L,!1)}),Ne(l,{top:$.scrollTop})))}),xe(re(I,he(({height:$})=>$)),d),xe(re(_t(Ae(I,al),Ae(_,al),Ae(M,($,R)=>$&&$.column===R.column&&$.row===R.row),Ae(c)),he(([$,R,K,ae])=>({gap:K,item:R,scrollTop:ae,viewport:$}))),O),xe(re(_t(Ae(E),r,Ae(M,EL),Ae(_,al),Ae(I,al),Ae(A),Ae(C),Ae(L),Ae(D),Ae(z)),ke(([,,,,,,,$])=>!$),he(([$,[R,K],ae,H,be,Ce,_e,,Re,le])=>{const{column:we,row:ce}=ae,{height:Se,width:ie}=H,{width:de}=be;if(_e===0&&($===0||de===0))return bw;if(ie===0){const Tn=Tf(le,$),Hn=Tn+Math.max(_e-1,0);return TL(Sw(Tn,Hn,Ce))}const ee=Tw(de,ie,we);let q,ne;Re?R===0&&K===0&&_e>0?(q=0,ne=_e-1):(q=ee*il((R+ce)/(Se+ce)),ne=ee*xw((K+ce)/(Se+ce))-1,ne=Lf($-1,va(ne,ee-1)),q=Lf(ne,va(0,q))):(q=0,ne=-1);const me=Sw(q,ne,Ce),{bottom:De,top:Ue}=Ew(be,ae,H,me),Qe=xw($/ee),Lt=Qe*Se+(Qe-1)*ce-De;return{bottom:De,itemHeight:Se,items:me,itemWidth:ie,offsetBottom:Lt,offsetTop:Ue,top:Ue}})),P),xe(re(A,ke($=>$!==null),he($=>$.length)),E),xe(re(_t(I,_,P,M),ke(([$,R,{items:K}])=>K.length>0&&R.height!==0&&$.height!==0),he(([$,R,{items:K},ae])=>{const{bottom:H,top:be}=Ew($,ae,R,K);return[be,H]}),ut(ua)),t);const Q=se(!1);xe(re(c,Le(Q),he(([$,R])=>R||$!==0)),Q);const J=en(re(_t(P,E),ke(([{items:$}])=>$.length>0),Le(Q),ke(([[$,R],K])=>{const ae=$.items[$.items.length-1].index===R-1;return(K||$.bottom>0&&$.itemHeight>0&&$.offsetBottom===0&&$.items.length===R)&&ae}),he(([[,$]])=>$-1),ut())),G=en(re(Ae(P),ke(({items:$})=>$.length>0&&$[0].index===0),Ln(0),ut())),Y=en(re(Ae(P),Le(L),ke(([{items:$},R])=>$.length>0&&!R),he(([{items:$}])=>({endIndex:$[$.length-1].index,startIndex:$[0].index})),ut(Ux),br(0)));xe(Y,f.scrollSeekRangeChanged),xe(re(F,Le(I,_,E,M),he(([$,R,K,ae,H])=>{const be=Qx($),{align:Ce,behavior:_e,offset:Re}=be;let le=be.index;le==="LAST"&&(le=ae-1),le=va(0,le,Lf(ae-1,le));let we=Vf(R,H,K,le);return Ce==="end"?we=ww(we-R.height+K.height):Ce==="center"&&(we=ww(we-R.height/2+K.height/2)),Re&&(we+=Re),{behavior:_e,top:we}})),l);const Z=Rt(re(P,he($=>$.offsetBottom+$.bottom)),0);return xe(re(S,he($=>({height:$.visibleHeight,width:$.visibleWidth}))),I),{customScrollParent:h,data:A,deviation:V,footerHeight:o,gap:M,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:_,overscan:n,restoreStateFrom:j,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:E,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:S,...f,gridState:P,horizontalDirection:X,initialTopMostItemIndex:z,totalListHeight:Z,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:G,stateChanged:O,stateRestoreInProgress:L,...w}},ct(Ef,Wt,ga,sw,wr,kf,xr));function Tw(e,t,n){return va(1,il((e+n)/(il(t)+n)))}function Ew(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Vf(e,t,n,r[0].index);return{bottom:Vf(e,t,n,r[r.length-1].index)+o,top:i}}function Vf(e,t,n,r){const o=Tw(e.width,n.width,t.column),i=il(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const kL=Ye(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(If),a=se("div"),s=se(ti),l=(d,p=null)=>Rt(re(t,he(f=>f[d]),ut()),p),c=se(!1),u=se(!1);return xe(Ae(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),PL=Ye(([e,t])=>({...e,...t}),ct(CL,kL)),AL=T.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),o=ht("computeItemKey"),i=ht("isSeeking"),a=fn("scrollHeight"),s=ht("ItemComponent"),l=ht("ListComponent"),c=ht("ScrollSeekPlaceholder"),u=ht("context"),d=fn("itemDimensions"),p=fn("gap"),f=ht("log"),m=ht("stateRestoreInProgress"),g=fn("reportReadyState"),h=$n(T.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const x=v.firstChild;if(x){const{height:S,width:w}=x.getBoundingClientRect();d({height:S,width:w})}p({column:kw("column-gap",getComputedStyle(v).columnGap,f),row:kw("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return dw(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:y.jsx(l,{className:t,ref:h,...dt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const b=o(v.index,v.data,u);return i?y.jsx(c,{...dt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},b):T.createElement(s,{...dt(s,u),className:n,"data-index":v.index,key:b},r(v.index,v.data,u))})})}),_L=T.memo(function(){const e=ht("HeaderComponent"),t=fn("headerHeight"),n=ht("headerFooterTag"),r=$n(T.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,!1),o=ht("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...dt(e,o)})}):null}),IL=T.memo(function(){const e=ht("FooterComponent"),t=fn("footerHeight"),n=ht("headerFooterTag"),r=$n(T.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,!1),o=ht("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...dt(e,o)})}):null}),OL=({children:e})=>{const t=T.useContext(uw),n=fn("itemDimensions"),r=fn("viewportDimensions"),o=$n(T.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return T.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),y.jsx("div",{ref:o,style:oi(!1),children:e})},ML=({children:e})=>{const t=T.useContext(uw),n=fn("windowViewportRect"),r=fn("itemDimensions"),o=ht("customScrollParent"),i=hf(n,o,!1);return T.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),y.jsx("div",{ref:i,style:oi(!1),children:e})},DL=T.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?FL:NL,o=n||t?ML:OL,i=ht("context");return y.jsx(r,{...e,...dt(r,i),children:y.jsxs(o,{children:[y.jsx(_L,{}),y.jsx(AL,{}),y.jsx(IL,{})]})})}),{useEmitter:Cw,useEmitterValue:ht,usePublisher:fn}=Pf(PL,{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"}},DL),NL=Of({useEmitter:Cw,useEmitterValue:ht,usePublisher:fn}),FL=Mf({useEmitter:Cw,useEmitterValue:ht,usePublisher:fn});function kw(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 $f=()=>{const e=T.useContext(Fo);return e?e.tweaks:bs},Pw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>y.jsxs("span",{className:Oe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:y.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?y.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?y.jsx(uf,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:y.jsx("span",{className:"cursor-help",children:y.jsx(Ay,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:y.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?y.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[y.jsx(Ty,{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}),y.jsx(C_,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),ya=T.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:m,componentName:g,placeholder:h,hideLeft:v=!1,required:b,disabled:x,reportStatus:S},w)=>{const E=$f(),C=S!==void 0?S:E.input.iconFeedback,P=d??f,I=Ct(),_=e??I.inputOptionalLabel;return y.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Oe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[y.jsxs("label",{form:u,htmlFor:P,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[y.jsx(Pw,{info:s,hideLeft:v,reportStatus:C,title:m,placeholder:h,children:_||n?y.jsxs(T.Fragment,{children:[b?null:y.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:_}),n?y.jsx(T.Fragment,{children:n}):null]}):null}),y.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?y.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?y.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),y.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}),y.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})]})}),LL=e=>y.jsx(T.Fragment,{children:e.children}),VL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},$L=[],jL=T.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(nr,{children:t.children})})}),zL=T.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),RL={List:jL,Item:zL},ii=40,BL=T.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const v=T.useRef(null),b=T.useRef(null),x=T.useRef(null),S=g.value??g.defaultValue??"",w=Ct(),[E,C]=T.useState(()=>Math.min(320,ii*o.length)),[P,I]=T.useState(!1),[_,F]=T.useState(""),[N,V]=T.useState(S),[A,M]=T.useState(()=>{var ie;return((ie=o.find(de=>de.value===S))==null?void 0:ie.label)??S}),[O,j]=T.useState(null),L=T.useRef($L),z=af(P,"block-only"),D=m&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,B=_?rf(D,"value",[{key:"value",value:_},{key:"label",value:_}]):D,X=()=>{I(!1),C(0)},Q=B.filter(ie=>ie.hidden!==!0),J=m?void 0:`^(${o.map(ie=>`${fd(ie.value)}${ie.label?"|"+fd(ie.label):""}`).join("|")})$`,{x:G,y:Y,strategy:Z,refs:$,context:R}=gr({open:P,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:Wo,middleware:[ta(4),N0({padding:10,elementContext:"reference",apply(ie){const de=ie.elements.floating.querySelector("ul"),ee=(de==null?void 0:de.getBoundingClientRect().height)||0,q=Si($.reference.current,window.innerHeight),ne=Math.min(ee<ii?q:ee,q,ie.availableHeight),me=Q.length===0?ii:Math.min(ne,q,ee),De=`${b.current.getBoundingClientRect().width}px`;Object.assign(ie.elements.floating.style,{width:De,maxWidth:De,height:me})}})]}),K=gx(R,VL),{getReferenceProps:ae,getFloatingProps:H,getItemProps:be}=vr([eo(R,{role:"listbox"}),Jr(R),Ws(R,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);T.useEffect(()=>{if(g.value){const ie=o.find(de=>de.value===g.value);V((ie==null?void 0:ie.label)??g.value)}},[g.value]),T.useEffect(()=>{if(!P)return C(0);const ie=$.reference;if(ie.current===null)return;const de=Si(ie.current,window.innerHeight);setTimeout(()=>C(Math.min(de,Q.length*ii)),100)},[_,P,$.reference,Q.length]),T.useEffect(()=>{const ie=$.reference.current;if(ie)return wi(ie)},[]);const Ce=(ie,de)=>{V(ie.value);const ee=$.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",ie.value),ee.value=ie.value;const q=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(q),g.onChange&&g.onChange(q),M(ie.label??""),X(),F(""),j(de)},_e=ie=>{var ee;const de=ie.target.value;return F(de),!P&&de===""?I(!0):(ie.target.name=g.name||"",de?I(!0):(ee=g.onChange)==null?void 0:ee.call(g,ie))},Re=()=>{var ie;I(!0),F(""),(ie=$.reference.current)==null||ie.focus()},le=()=>{j(ie=>ie===null?0:ie),I(!0),F("")},we=()=>{var ie;(ie=$.reference.current)==null||ie.setAttribute("data-value",""),F(""),V(""),M(""),rm($.reference.current),X()},ce=g.id||g.name,Se=Q.length===0;return y.jsxs(ya,{...g,left:e,error:t,ref:b,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:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Re,children:[y.jsx(Hu,{size:20}),y.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),N?y.jsx("button",{type:"button",onClick:we,className:"p-2 transition-colors link:text-danger md:p-1",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.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:[y.jsx("input",{"data-shadow":"true",...ae({...g,onChange:_e,onFocus:le,pattern:J,ref:$.setReference,name:`${ce}-shadow`,id:`${ce}-shadow`,onClick:ie=>ie.currentTarget.focus(),onKeyDown(ie){var de,ee;if(ie.key==="Escape")return ie.currentTarget.blur(),X();if(P){if(ie.key==="ArrowDown"){let q=je.number(O)?O+1:0;return q>Q.length-1&&(q=0),(de=x.current)==null||de.scrollIntoView({index:q}),j(q)}if(ie.key==="ArrowUp"){let q=je.number(O)?O-1:Q.length-1;return q<0&&(q=Q.length-1),(ee=x.current)==null||ee.scrollIntoView({index:q}),j(q)}if(ie.key==="Enter"){if(O!==null&&Q[O])return ie.preventDefault(),Ce(Q[O],O);if(Q.length===1)return ie.preventDefault(),Ce(Q[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":ce,"data-target":ce,required:f,value:P?_:A||N,"aria-autocomplete":"list",autoComplete:"off",className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),y.jsx("input",{id:ce,name:ce,type:"hidden","data-origin":ce,ref:h,required:f,defaultValue:g.value||N||void 0}),y.jsx(Xr,{preserveTabOrder:!0,children:P?y.jsx(Xo,{modal:!0,guards:!0,returnFocus:!1,context:R,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs(pt.div,{...H({ref:Wn(z,$.setFloating),style:{...K.styles,left:G,top:Y??0,position:Z}}),initial:!1,"data-floating":"true",animate:{height:Se?"auto":E},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!P)return C(0);const de=$.floating.current.querySelectorAll("li").item(0),ee=(de?de.getBoundingClientRect().height:ii)*Q.length;return xi.flushSync(()=>C(ee+2))},children:[Se?y.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,y.jsx(Nf,{overscan:40,ref:x,hidden:Se,data:Q,style:{height:E},defaultItemHeight:ii,components:RL,scrollerRef:ie=>void(v.current=ie),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ie,de)=>{const ee=de.Render??LL,q=N===de.value||N===de.label,ne=O===ie,me=de.label??de.value;return y.jsx("button",{"data-value":de.value,...be({ref:De=>void(L.current[ie]=De),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":de.disabled,onClick:()=>Ce(de,ie),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${ne?"bg-floating-hover text-floating-foreground":""}`}),children:y.jsx(ee,{...g,label:de.label,value:de.value,children:me})})}})]})}):null})]})}),jf=T.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return y.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[y.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Oe("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,y.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Aw=(e,t,n,r)=>T.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:b,...x},S)=>{const w=e,E=x.id??x.name,C=T.useRef(null);return T.useEffect(()=>{if(C.current===null)return;const P=C.current,I=wi(C.current),_=r==null?void 0:r(P),F=N=>{const V=N;if(V.key==="Enter"&&P.enterKeyHint==="next"){const A=P.getAttribute("data-next");if(A){const M=document.getElementById(A);if(M)return M.focus(),void V.preventDefault()}}};return P.addEventListener("keydown",F),()=>{_==null||_(),I(),P.removeEventListener("keydown",F)}},[]),y.jsx(ya,{...n,info:i,left:a,error:l,right:c,loading:b,form:x.form,name:x.name,feedback:h,hideLeft:v,title:x.title,container:Oe(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:y.jsx(w,{...n,...x,id:E,name:E,type:m,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Wn(S,C),className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ba=Aw(lb,"input",{type:"text"}),_w=new Date(1970,11,31),zf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Iw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},HL={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")},Rf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},WL=T.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=ud(t),l=T.useId(),c=Ct(),u=T.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=T.useState(e||void 0),[f,m]=T.useState(!1),g=Rf(u,_w).flatMap(C=>je.keyof(zf,C.type)?zf[C.type](C.value):[]),h=Rf(u,_w).reduce((C,P)=>C+(je.keyof(Iw,P.type)?Iw[P.type](P.value):""),""),[v,b]=T.useState(d?Rf(u,d).reduce((C,P)=>C+(je.keyof(zf,P.type)?HL[P.type](d,P.value):""),""):""),x=C=>{const P=C.target.value;if(b(P),g.length===P.length&&g.every((_,F)=>{const N=P.charAt(F);return typeof _=="string"?N===_:_.test(N)})){const _=Oo(RO(P,h,new Date));return p(_),r==null?void 0:r(_)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),b(C?RI(C,h):"")),w=Ku(d),E=w?d.toISOString():void 0;return y.jsx(ba,{...i,mask:g,value:v,id:void 0,name:void 0,"data-value":E,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:y.jsxs(T.Fragment,{children:[y.jsx("input",{"data-origin":i.name,defaultValue:E,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),y.jsx(Jo,{open:f,onChange:m,trigger:y.jsxs("span",{"aria-labelledby":l,children:[y.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),y.jsx(T_,{})]}),buttonProps:{"aria-describedby":l},children:y.jsx(Ib,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),qL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],UL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],KL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],YL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Ow=(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 GL(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?YL:KL:t.binary?UL:qL,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=Ow(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=Ow(Number(e),t.locale,a),c=n[s];return i+l+r+c}var sl={exports:{}},ll={exports:{}},Ze={};/** @license React v16.13.1
217
+ */var QD=["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])"],Ds=QD.join(","),y0=typeof Element>"u",Ho=y0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ns=!y0&&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},Fs=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},JD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},eN=function(t,n,r){if(Fs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ds));return n&&Ho.call(t,Ds)&&o.unshift(t),o=o.filter(r),o},tN=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Fs(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,Ds);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Fs(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},b0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},x0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||JD(t))&&!b0(t)?0:t.tabIndex},nN=function(t,n){var r=x0(t);return r<0&&n&&!b0(t)?0:r},rN=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},w0=function(t){return t.tagName==="INPUT"},oN=function(t){return w0(t)&&t.type==="hidden"},iN=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},aN=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},sN=function(t){if(!t.name)return!0;var n=t.form||Ns(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=aN(o,t.form);return!i||i===t},lN=function(t){return w0(t)&&t.type==="radio"},cN=function(t){return lN(t)&&!sN(t)},uN=function(t){var n,r=t&&Ns(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=Ns(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},S0=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},dN=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=Ns(t);if(l&&!l.shadowRoot&&o(l)===!0)return S0(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(uN(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return S0(t);return!1},fN=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},pN=function(t,n){return!(n.disabled||Fs(n)||oN(n)||dN(n,t)||iN(n)||fN(n))},Rd=function(t,n){return!(cN(n)||x0(n)<0||!pN(t,n))},hN=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},mN=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=nN(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(rN).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ea=function(t,n){n=n||{};var r;return n.getShadowRoot?r=tN([t],n.includeContainer,{filter:Rd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:hN}):r=eN(t,n.includeContainer,Rd.bind(null,n)),mN(r)},gN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,Ds)===!1?!1:Rd(n,t)};function T0(e,t,n){let{reference:r,floating:o}=e;const i=Yr(t),a=jd(t),s=$d(a),l=fr(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 vN=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}=T0(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:v}=s[g],{x:b,y:x,data:S,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=x??d,f={...f,[h]:{...f[h],...S}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=T0(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Bd(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),m=v0(f),h=s[p?d==="floating"?"reference":"floating":d],v=Ms(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},w=Ms(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-w.top+m.top)/S.y,bottom:(w.bottom-v.bottom+m.bottom)/S.y,left:(v.left-w.left+m.left)/S.x,right:(w.right-v.right+m.right)/S.x}}const yN=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=v0(u),p={x:n,y:r},f=jd(o),m=$d(f),g=await a.getDimensions(c),h=f==="y",v=h?"top":"left",b=h?"bottom":"right",x=h?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=T?T[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=s.floating[x]||i.floating[m]);const P=S/2-w/2,I=C/2-g[m]/2-1,A=Nn(d[v],I),L=Nn(d[b],I),N=A,$=C-g[m]-L,_=C/2-g[m]/2+P,M=Vd(N,_,$),D=!l.arrow&&Bo(o)!=null&&_!==M&&i.reference[m]/2-(_<N?A:L)-g[m]/2<0,V=D?_<N?_-N:_-$:0;return{[f]:p[f]+V,data:{[f]:M,centerOffset:_-M-V,...D&&{alignmentOffset:V}},reset:D}}}),bN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=Ro(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=fr(o),b=Yr(s),x=fr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(x||!g?[Os(s)]:YD(s)),T=m!=="none";!p&&T&&w.push(...ZD(s,g,m,S));const C=[s,...w],P=await Bd(t,h),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[v]),d){const _=KD(o,a,S);I.push(P[_[0]],P[_[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(_=>_<=0)){var L,N;const _=(((L=i.flip)==null?void 0:L.index)||0)+1,M=C[_];if(M)return{data:{index:_,overflows:A},reset:{placement:M}};let D=(N=A.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(f){case"bestFit":{var $;const V=($=A.filter(F=>{if(T){const H=Yr(F.placement);return H===b||H==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(H=>H>0).reduce((H,O)=>H+O,0)]).sort((F,H)=>F[1]-H[1])[0])==null?void 0:$[0];V&&(D=V);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function xN(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=fr(n),s=Bo(n),l=Yr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ro(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const wN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await xN(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},SN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:v,y:b}=h;return{x:v,y:b}}},...l}=Ro(e,t),c={x:n,y:r},u=await Bd(t,l),d=Yr(fr(o)),p=g0(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",v=p==="y"?"bottom":"right",b=f+u[h],x=f-u[v];f=Vd(b,f,x)}if(a){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=m+u[h],x=m-u[v];m=Vd(b,m,x)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},TN=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 Bd(t,s),c=fr(n),u=Bo(n),d=Yr(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,v=p-l.left-l.right,b=Nn(f-l[m],h),x=Nn(p-l[g],v),S=!t.middlewareData.shift;let w=b,T=x;if(d?T=u||S?Nn(x,v):v:w=u||S?Nn(b,h):h,S&&!u){const P=Jt(l.left,0),I=Jt(l.right,0),A=Jt(l.top,0),L=Jt(l.bottom,0);d?T=p-2*(P!==0||I!==0?P+I:Jt(l.left,l.right)):w=f-2*(A!==0||L!==0?A+L:Jt(l.top,l.bottom))}await a({...t,availableWidth:T,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function E0(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Is(n)!==i||Is(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Hd(e){return rt(e)?e:e.contextElement}function Wo(e){const t=Hd(e);if(!kt(t))return dr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=E0(t);let a=(i?Is(n.width):n.width)/r,s=(i?Is(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const EN=dr(0);function C0(e){const t=Ht(e);return!_d()||!t.visualViewport?EN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function Gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Hd(e);let a=dr(1);t&&(r?rt(r)&&(a=Wo(r)):a=Wo(e));const s=CN(i,n,r)?C0(i):dr(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&&rt(r)?Ht(r):r;let m=p,g=Id(m);for(;g&&r&&f!==m;){const h=Wo(g),v=g.getBoundingClientRect(),b=Qt(g),x=v.left+(g.clientLeft+parseFloat(b.paddingLeft))*h.x,S=v.top+(g.clientTop+parseFloat(b.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=S,m=Ht(g),g=Id(m)}}return Ms({width:u,height:d,x:l,y:c})}function kN(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Yn(r),s=t?As(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=dr(1);const u=dr(0),d=kt(r);if((d||!d&&!i)&&((lr(r)!=="body"||Ji(a))&&(l=_s(r)),kt(r))){const p=Gr(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 PN(e){return Array.from(e.getClientRects())}function k0(e){return Gr(Yn(e)).left+_s(e).scrollLeft}function AN(e){const t=Yn(e),n=_s(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+k0(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 _N(e,t){const n=Ht(e),r=Yn(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=_d();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function IN(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?Wo(e):dr(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 P0(e,t,n){let r;if(t==="viewport")r=_N(e,n);else if(t==="document")r=AN(Yn(e));else if(rt(t))r=IN(t,n);else{const o=C0(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ms(r)}function A0(e,t){const n=Gn(e);return n===t||!rt(n)||cr(n)?!1:Qt(n).position==="fixed"||A0(n,t)}function ON(e,t){const n=t.get(e);if(n)return n;let r=ur(e,[],!1).filter(s=>rt(s)&&lr(s)!=="body"),o=null;const i=Qt(e).position==="fixed";let a=i?Gn(e):e;for(;rt(a)&&!cr(a);){const s=Qt(a),l=Ad(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ji(a)&&!l&&A0(e,a))?r=r.filter(u=>u!==a):o=s,a=Gn(a)}return t.set(e,r),r}function MN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?As(t)?[]:ON(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=P0(t,u,o);return c.top=Jt(d.top,c.top),c.right=Nn(d.right,c.right),c.bottom=Nn(d.bottom,c.bottom),c.left=Jt(d.left,c.left),c},P0(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function DN(e){const{width:t,height:n}=E0(e);return{width:t,height:n}}function NN(e,t,n){const r=kt(t),o=Yn(t),i=n==="fixed",a=Gr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=dr(0);if(r||!r&&!i)if((lr(t)!=="body"||Ji(o))&&(s=_s(t)),r){const d=Gr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=k0(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 Wd(e){return Qt(e).position==="static"}function _0(e,t){return!kt(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function I0(e,t){const n=Ht(e);if(As(e))return n;if(!kt(e)){let o=Gn(e);for(;o&&!cr(o);){if(rt(o)&&!Wd(o))return o;o=Gn(o)}return n}let r=_0(e,t);for(;r&&jD(r)&&Wd(r);)r=_0(r,t);return r&&cr(r)&&Wd(r)&&!Ad(r)?n:r||zD(e)||n}const FN=async function(e){const t=this.getOffsetParent||I0,n=this.getDimensions,r=await n(e.floating);return{reference:NN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function LN(e){return Qt(e).direction==="rtl"}const VN={convertOffsetParentRelativeRectToViewportRelativeRect:kN,getDocumentElement:Yn,getClippingRect:MN,getOffsetParent:I0,getElementRects:FN,getClientRects:PN,getDimensions:DN,getScale:Wo,isElement:rt,isRTL:LN};function $N(e,t){let n=null,r;const o=Yn(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=zo(u),m=zo(o.clientWidth-(c+d)),g=zo(o.clientHeight-(u+p)),h=zo(c),b={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:Jt(0,Nn(1,l))||1};let x=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),i}function qo(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=Hd(e),u=o||i?[...c?ur(c):[],...ur(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&s?$N(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Gr(e):null;l&&h();function h(){const v=Gr(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const jN=wN,zN=SN,RN=bN,BN=TN,O0=yN,HN=(e,t,n)=>{const r=new Map,o={platform:VN,...n},i={...o.platform,_c:r};return vN(e,t,{...o,platform:i})};var Ls=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Vs(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(!Vs(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)&&!Vs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function M0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function D0(e,t){const n=M0(e);return Math.round(t*n)/n}function qd(e){const t=k.useRef(e);return Ls(()=>{t.current=e}),t}function WN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=k.useState(r);Vs(p,r)||f(r);const[m,g]=k.useState(null),[h,v]=k.useState(null),b=k.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),x=k.useCallback(F=>{F!==C.current&&(C.current=F,v(F))},[]),S=i||m,w=a||h,T=k.useRef(null),C=k.useRef(null),P=k.useRef(u),I=l!=null,A=qd(l),L=qd(o),N=qd(c),$=k.useCallback(()=>{if(!T.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};L.current&&(F.platform=L.current),HN(T.current,C.current,F).then(H=>{const O={...H,isPositioned:N.current!==!1};_.current&&!Vs(P.current,O)&&(P.current=O,Ia.flushSync(()=>{d(O)}))})},[p,t,n,L,N]);Ls(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const _=k.useRef(!1);Ls(()=>(_.current=!0,()=>{_.current=!1}),[]),Ls(()=>{if(S&&(T.current=S),w&&(C.current=w),S&&w){if(A.current)return A.current(S,w,$);$()}},[S,w,$,A,I]);const M=k.useMemo(()=>({reference:T,floating:C,setReference:b,setFloating:x}),[b,x]),D=k.useMemo(()=>({reference:S,floating:w}),[S,w]),V=k.useMemo(()=>{const F={position:n,left:0,top:0};if(!D.floating)return F;const H=D0(D.floating,u.x),O=D0(D.floating,u.y);return s?{...F,transform:"translate("+H+"px, "+O+"px)",...M0(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:O}},[n,s,D.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:$,refs:M,elements:D,floatingStyles:V}),[u,$,M,D,V])}const qN=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?O0({element:r.current,padding:o}).fn(n):{}:r?O0({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...jN(e),options:[e,t]}),Ud=(e,t)=>({...zN(e),options:[e,t]}),Kd=(e,t)=>({...RN(e),options:[e,t]}),N0=(e,t)=>({...BN(e),options:[e,t]}),F0=(e,t)=>({...qN(e),options:[e,t]}),L0={...k},UN=L0.useInsertionEffect||(e=>e());function At(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return UN(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Yd="ArrowUp",na="ArrowDown",Uo="ArrowLeft",Ko="ArrowRight";function $s(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function Gd(e,t){return jt(e,{disabledIndices:t})}function V0(e,t){return jt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function jt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&js(a,s,o));return s}function KN(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===Yd){if(u&&Nt(n),c===-1)d=l;else if(d=jt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}ra(e,d)&&(d=c)}if(n.key===na&&(u&&Nt(n),c===-1?d=s:(d=jt(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=jt(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=c)),r==="both"){const p=zo(c/i);n.key===Ko&&(u&&Nt(n),c%i!==i-1?(d=jt(e,{startingIndex:c,disabledIndices:a}),o&&$s(d,i,p)&&(d=jt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=jt(e,{startingIndex:c-c%i-1,disabledIndices:a})),$s(d,i,p)&&(d=c)),n.key===Uo&&(u&&Nt(n),c%i!==0?(d=jt(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&$s(d,i,p)&&(d=jt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=jt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),$s(d,i,p)&&(d=c));const f=zo(l/i)===p;ra(e,d)&&(o&&f?d=n.key===Uo?l:jt(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function YN(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function GN(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 ZN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function js(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let $0=0;function pr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($0);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():$0=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function XN(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 QN(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 j0=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function JN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=k.useState(()=>new Map),a=k.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=k.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return We(()=>{const l=new Map(o);Array.from(l.keys()).sort(XN).forEach((u,d)=>{l.set(u,d)}),QN(o,l)||i(l)},[o]),k.createElement(j0.Provider,{value:k.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function z0(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=k.useContext(j0),[s,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return We(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),We(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yo.apply(this,arguments)}let R0=!1,e2=0;const B0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+e2++;function t2(){const[e,t]=k.useState(()=>R0?B0():void 0);return We(()=>{e==null&&t(B0())},[]),k.useEffect(()=>{R0=!0},[]),e}const Go=L0.useId||t2;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function zs(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function n2(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const H0=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||zs("The `ref` prop is required for `FloatingArrow`."));const h=Go(),[v,b]=k.useState(!1);if(We(()=>{if(!o)return;Qt(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const x=c*2,S=x/2,w=a/2*(l/-8+1),T=s/2*l/4,[C,P]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",L=u&&P==="end"?"bottom":"top";let N=u&&P==="end"?"right":"left";u&&v&&(N=P==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",_=(i==null?void 0:i.y)!=null?u||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-T))+(" Q"+a/2+","+s+" "+w+","+(s-T))+" Z",D={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Yo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+x,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:$,[L]:_,[C]:A||I?"100%":"calc(100% - "+x/2+"px)",transform:""+D+(f??""),...m}}),x>0&&k.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:x+(p?0:1),d:M}),k.createElement("path",{stroke:x&&!p?g.fill:"none",d:M}),k.createElement("clipPath",{id:h},k.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+x,height:a})))});function W0(){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 q0=k.createContext(null),U0=k.createContext(null),hr=()=>{var e;return((e=k.useContext(q0))==null?void 0:e.id)||null},mr=()=>k.useContext(U0);function r2(e){const t=Go(),n=mr(),o=hr();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function o2(e){const{children:t,id:n}=e,r=hr();return k.createElement(q0.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function i2(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(a=>{n.current=[...n.current,a]},[]),o=k.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=k.useState(()=>W0())[0];return k.createElement(U0.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function gr(e){return"data-floating-ui-"+e}function Ft(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const K0=gr("safe-polygon");function Zd(e,t,n){return n&&!jo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Y0(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=mr(),m=hr(),g=Ft(c),h=Ft(l),v=Ft(n),b=k.useRef(),x=k.useRef(-1),S=k.useRef(),w=k.useRef(-1),T=k.useRef(!0),C=k.useRef(!1),P=k.useRef(()=>{}),I=k.useCallback(()=>{var M;const D=(M=o.current.openEvent)==null?void 0:M.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);k.useEffect(()=>{if(!s)return;function M(D){let{open:V}=D;V||(clearTimeout(x.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),k.useEffect(()=>{if(!s||!g.current||!n)return;function M(V){I()&&r(!1,V,"hover")}const D=Mt(a.floating).documentElement;return D.addEventListener("mouseleave",M),()=>{D.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,I]);const A=k.useCallback(function(M,D,V){D===void 0&&(D=!0),V===void 0&&(V="hover");const F=Zd(h.current,"close",b.current);F&&!S.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,M,V),F)):D&&(clearTimeout(x.current),r(!1,M,V))},[h,r]),L=At(()=>{P.current(),S.current=void 0}),N=At(()=>{if(C.current){const M=Mt(a.floating).body;M.style.pointerEvents="",M.removeAttribute(K0),C.current=!1}});k.useEffect(()=>{if(!s)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(O){if(clearTimeout(x.current),T.current=!1,u&&!jo(b.current)||d>0&&!Zd(h.current,"open"))return;const R=Zd(h.current,"open",b.current);R?x.current=window.setTimeout(()=>{v.current||r(!0,O,"hover")},R):r(!0,O,"hover")}function V(O){if(M())return;P.current();const R=Mt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(x.current),S.current=g.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),L(),A(O,!0,"safe-polygon")}});const Q=S.current;R.addEventListener("mousemove",Q),P.current=()=>{R.removeEventListener("mousemove",Q)};return}(b.current==="touch"?!xt(a.floating,O.relatedTarget):!0)&&A(O)}function F(O){M()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),L(),A(O)}})(O))}if(rt(a.domReference)){var H;const O=a.domReference;return n&&O.addEventListener("mouseleave",F),(H=a.floating)==null||H.addEventListener("mouseleave",F),p&&O.addEventListener("mousemove",D,{once:!0}),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",V),()=>{var R;n&&O.removeEventListener("mouseleave",F),(R=a.floating)==null||R.removeEventListener("mouseleave",F),p&&O.removeEventListener("mousemove",D),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,A,L,N,r,n,v,f,h,g,o]),We(()=>{var M;if(s&&n&&(M=g.current)!=null&&M.__options.blockPointerEvents&&I()){const V=Mt(a.floating).body;V.setAttribute(K0,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(rt(a.domReference)&&F){var D;const H=a.domReference,O=f==null||(D=f.nodesRef.current.find(R=>R.id===m))==null||(D=D.context)==null?void 0:D.elements.floating;return O&&(O.style.pointerEvents=""),H.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{H.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,I]),We(()=>{n||(b.current=void 0,L(),N())},[n,L,N]),k.useEffect(()=>()=>{L(),clearTimeout(x.current),clearTimeout(w.current),N()},[s,a.domReference,L,N]);const $=k.useMemo(()=>{function M(D){b.current=D.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(D){const{nativeEvent:V}=D;function F(){!T.current&&!v.current&&r(!0,V,"hover")}u&&!jo(b.current)||n||d===0||(clearTimeout(w.current),b.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,v,d]),_=k.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(M){A(M.nativeEvent,!1)}}),[A]);return k.useMemo(()=>s?{reference:$,floating:_}:{},[s,$,_])}function a2(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 Zr(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 s2(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Zr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Zo=new WeakMap,Rs=new WeakSet,Bs={},Xd=0;const l2=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,G0=e=>e&&(e.host||G0(e.parentNode)),c2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=G0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function u2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=c2(t,e),s=new Set,l=new Set(a),c=[];Bs[o]||(Bs[o]=new WeakMap);const u=Bs[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,m=>{if(lr(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",v=(Zo.get(m)||0)+1,b=(u.get(m)||0)+1;Zo.set(m,v),u.set(m,b),c.push(m),v===1&&h&&Rs.add(m),b===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return Xd++,()=>{c.forEach(f=>{const m=(Zo.get(f)||0)-1,g=(u.get(f)||0)-1;Zo.set(f,m),u.set(f,g),m||(!Rs.has(f)&&i&&f.removeAttribute(i),Rs.delete(f)),g||f.removeAttribute(o)}),Xd--,Xd||(Zo=new WeakMap,Zo=new WeakMap,Rs=new WeakSet,Bs={})}}function Z0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mt(e[0]).body;return u2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Xo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function X0(e,t){const n=ea(e,Xo());t==="prev"&&n.reverse();const r=n.indexOf(vn(Mt(e)));return n.slice(r+1)[0]}function Q0(){return X0(document.body,"next")}function J0(){return X0(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xt(n,r)}function d2(e){ea(e,Xo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function f2(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 p2(e,t,n){const r=e.indexOf(t);function o(a){const s=gr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||xt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Qd={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 h2;function ex(e){e.key==="Tab"&&(e.target,clearTimeout(h2))}const Hs=k.forwardRef(function(t,n){const[r,o]=k.useState();We(()=>(Dd()&&o("button"),document.addEventListener("keydown",ex),()=>{document.removeEventListener("keydown",ex)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[gr("focus-guard")]:"",style:Qd};return k.createElement("span",Yo({},t,i))}),tx=k.createContext(null),nx=gr("portal");function m2(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Go(),o=rx(),[i,a]=k.useState(null),s=k.useRef(null);return We(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),We(()=>{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(nx,""),l.appendChild(c),s.current=c,a(c)},[t,r]),We(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!rt(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(nx,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Xr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=m2({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?f2:d2)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),k.createElement(tx.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(Hs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=J0()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:Qd}),i&&Ia.createPortal(t,i),p&&i&&k.createElement(Hs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=Q0()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const rx=()=>k.useContext(tx),g2=20;let Qr=[];function Jd(e){Qr=Qr.filter(n=>n.isConnected);let t=e;if(!(!t||lr(t)==="body")){if(!gN(t,Xo())){const n=ea(t,Xo())[0];n&&(t=n)}Qr.push(t),Qr.length>g2&&(Qr=Qr.slice(-20))}}function ox(){return Qr.slice().reverse().find(e=>e.isConnected)}const v2=k.forwardRef(function(t,n){return k.createElement("button",Yo({},t,{type:"button",ref:n,tabIndex:-1,style:Qd}))});function Qo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:v,floatingId:b,elements:{domReference:x,floating:S}}=t,w=typeof a=="number"&&a<0,T=m0(x)&&w,C=l2()?i:!0,P=Ft(o),I=Ft(a),A=Ft(s),L=mr(),N=rx(),$=k.useRef(null),_=k.useRef(null),M=k.useRef(!1),D=k.useRef(!1),V=k.useRef(-1),F=N!=null,H=S==null?void 0:S.firstElementChild,O=(H==null?void 0:H.id)===b?H:S,R=At(function(G){return G===void 0&&(G=O),G?ea(G,Xo()):[]}),X=At(G=>{const Y=R(G);return P.current.map(Z=>x&&Z==="reference"?x:O&&Z==="floating"?O:Y).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function G(Z){if(Z.key==="Tab"){xt(O,vn(Mt(O)))&&R().length===0&&!T&&Nt(Z);const j=X(),z=Dn(Z);P.current[0]==="reference"&&z===x&&(Nt(Z),Z.shiftKey?pr(j[j.length-1]):pr(j[1])),P.current[1]==="floating"&&z===O&&Z.shiftKey&&(Nt(Z),pr(j[0]))}}const Y=Mt(O);return Y.addEventListener("keydown",G),()=>{Y.removeEventListener("keydown",G)}},[r,x,O,c,P,T,R,X]),k.useEffect(()=>{if(r||!S)return;function G(Y){const Z=Dn(Y),z=R().indexOf(Z);z!==-1&&(V.current=z)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,R]),k.useEffect(()=>{if(r||!d)return;function G(){D.current=!0,setTimeout(()=>{D.current=!1})}function Y(Z){const j=Z.relatedTarget;queueMicrotask(()=>{const z=!(xt(x,j)||xt(S,j)||xt(j,S)||xt(N==null?void 0:N.portalNode,j)||j!=null&&j.hasAttribute(gr("focus-guard"))||L&&(Zr(L.nodesRef.current,m).find(K=>{var ae,B;return xt((ae=K.context)==null?void 0:ae.elements.floating,j)||xt((B=K.context)==null?void 0:B.elements.domReference,j)})||a2(L.nodesRef.current,m).find(K=>{var ae,B;return((ae=K.context)==null?void 0:ae.elements.floating)===j||((B=K.context)==null?void 0:B.elements.domReference)===j})));if(l&&z&&vn(Mt(O))===Mt(O).body){kt(O)&&(O==null||O.focus());const K=V.current,ae=R(),B=ae[K]||ae[ae.length-1]||O;kt(B)&&B.focus()}(T||!c)&&j&&z&&!D.current&&j!==ox()&&(M.current=!0,g(!1,Z))})}if(S&&kt(x))return x.addEventListener("focusout",Y),x.addEventListener("pointerdown",G),S.addEventListener("focusout",Y),()=>{x.removeEventListener("focusout",Y),x.removeEventListener("pointerdown",G),S.removeEventListener("focusout",Y)}},[r,x,S,O,c,m,L,N,g,d,l,R,T]),k.useEffect(()=>{var G;if(r)return;const Y=Array.from((N==null||(G=N.portalNode)==null?void 0:G.querySelectorAll("["+gr("portal")+"]"))||[]);if(S){const Z=[S,...Y,$.current,_.current,P.current.includes("reference")||T?x:null].filter(z=>z!=null),j=c||T?Z0(Z,C,!C):Z0(Z);return()=>{j()}}},[r,x,S,c,P,N,T,C]),We(()=>{if(r||!kt(O))return;const G=Mt(O),Y=vn(G);queueMicrotask(()=>{const Z=X(O),j=I.current,z=(typeof j=="number"?Z[j]:j.current)||O,K=xt(O,Y);!w&&!K&&p&&pr(z,{preventScroll:z===O})})},[r,p,O,w,X,I]),We(()=>{if(r||!O)return;let G=!1;const Y=Mt(O),Z=vn(Y);let z=v.current.openEvent;const K=f.domReference.current;Jd(Z);function ae(B){let{open:be,reason:Ce,event:_e,nested:Re}=B;be&&(z=_e),Ce==="escape-key"&&f.domReference.current&&Jd(f.domReference.current),Ce==="hover"&&_e.type==="mouseleave"&&(M.current=!0),Ce==="outside-press"&&(Re?(M.current=!1,G=!0):M.current=!(p0(_e)||Md(_e)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const B=vn(Y),be=xt(S,B)||L&&Zr(L.nodesRef.current,m).some(le=>{var we;return xt((we=le.context)==null?void 0:we.elements.floating,B)});(be||z&&["click","mousedown"].includes(z.type))&&f.domReference.current&&Jd(f.domReference.current);const _e=K||Z,Re=ea(Mt(_e).body,Xo());queueMicrotask(()=>{let le=ox();!le&&kt(_e)&&S&&(le=p2(Re,_e,S)),A.current&&!M.current&&kt(le)&&(!(le!==B&&B!==Y.body)||be)&&le.focus({preventScroll:G})})}},[r,S,O,A,v,f,h,L,m]),We(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,g,f,d]),We(()=>{if(r||!O||typeof MutationObserver!="function"||w)return;const G=()=>{const Z=O.getAttribute("tabindex"),j=R(),z=vn(Mt(S)),K=j.indexOf(z);K!==-1&&(V.current=K),P.current.includes("floating")||z!==f.domReference.current&&j.length===0?Z!=="0"&&O.setAttribute("tabindex","0"):Z!=="-1"&&O.setAttribute("tabindex","-1")};G();const Y=new MutationObserver(G);return Y.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,O,f,P,R,w]);function Q(G){return r||!u||!c?null:k.createElement(v2,{ref:G==="start"?$:_,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!T:!0)&&(F||c);return k.createElement(k.Fragment,null,J&&k.createElement(Hs,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:G=>{if(c){const Z=X();pr(o[0]==="reference"?Z[0]:Z[Z.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(M.current=!1,ia(G,N.portalNode)){const Z=Q0()||x;Z==null||Z.focus()}else{var Y;(Y=N.beforeOutsideRef.current)==null||Y.focus()}}}),!T&&Q("start"),n,Q("end"),J&&k.createElement(Hs,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:G=>{if(c)pr(X()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(M.current=!0),ia(G,N.portalNode)){const Z=J0()||x;Z==null||Z.focus()}else{var Y;(Y=N.afterOutsideRef.current)==null||Y.focus()}}}))}const ef=new Set,ix=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Go();return We(()=>{if(!r)return;ef.add(i);const a=/iP(hone|ad|od)|iOS/.test(Od()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,m;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,h=((m=window.visualViewport)==null?void 0:m.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(h))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{ef.delete(i),ef.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),k.createElement("div",Yo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function ax(e){return kt(e.target)&&e.target.tagName==="BUTTON"}function sx(e){return Ld(e)}function aa(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=k.useRef(),p=k.useRef(!1),f=k.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(jo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}jo(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!u||ax(m))&&(m.key===" "&&!sx(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||ax(m)||sx(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}function y2(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 lx(e){return e!=null&&e.clientX!=null}function b2(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=k.useRef(!1),p=k.useRef(null),[f,m]=k.useState(),[g,h]=k.useState([]),v=At((T,C)=>{d.current||r.current.openEvent&&!lx(r.current.openEvent)||a.setPositionReference(y2(i,{x:T,y:C,axis:l,dataRef:r,pointerType:f}))}),b=At(T=>{c!=null||u!=null||(n?p.current||h([]):v(T.clientX,T.clientY))}),x=jo(f)?o:n,S=k.useCallback(()=>{if(!x||!s||c!=null||u!=null)return;const T=Ht(o);function C(P){const I=Dn(P);xt(o,I)?(T.removeEventListener("mousemove",C),p.current=null):v(P.clientX,P.clientY)}if(!r.current.openEvent||lx(r.current.openEvent)){T.addEventListener("mousemove",C);const P=()=>{T.removeEventListener("mousemove",C),p.current=null};return p.current=P,P}a.setPositionReference(i)},[x,s,c,u,o,r,a,i,v]);k.useEffect(()=>S(),[S,g]),k.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),k.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[s,c,u,v]);const w=k.useMemo(()=>{function T(C){let{pointerType:P}=C;m(P)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:b,onMouseEnter:b}},[b]);return k.useMemo(()=>s?{reference:w}:{},[s,w])}const x2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},w2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},cx=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 Jr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=mr(),h=At(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,b=k.useRef(!1),x=k.useRef(!1),{escapeKey:S,outsidePress:w}=cx(f),{escapeKey:T,outsidePress:C}=cx(m),P=At(_=>{var M;if(!n||!a||!s||_.key!=="Escape")return;const D=(M=i.current.floatingContext)==null?void 0:M.nodeId,V=g?Zr(g.nodesRef.current,D):[];if(!S&&(_.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(H=>{var O;if((O=H.context)!=null&&O.open&&!H.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,BD(_)?_.nativeEvent:_,"escape-key")}),I=At(_=>{var M;const D=()=>{var V;P(_),(V=Dn(_))==null||V.removeEventListener("keydown",D)};(M=Dn(_))==null||M.addEventListener("keydown",D)}),A=At(_=>{var M;const D=b.current;b.current=!1;const V=x.current;if(x.current=!1,c==="click"&&V||D||typeof v=="function"&&!v(_))return;const F=Dn(_),H="["+gr("inert")+"]",O=Mt(o.floating).querySelectorAll(H);let R=rt(F)?F:null;for(;R&&!cr(R);){const G=Gn(R);if(cr(G)||!rt(G))break;R=G}if(O.length&&rt(F)&&!HD(F)&&!xt(F,o.floating)&&Array.from(O).every(G=>!xt(R,G)))return;if(kt(F)&&$){const G=F.clientWidth>0&&F.scrollWidth>F.clientWidth,Y=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let Z=Y&&_.offsetX>F.clientWidth;if(Y&&Qt(F).direction==="rtl"&&(Z=_.offsetX<=F.offsetWidth-F.clientWidth),Z||G&&_.offsetY>F.clientHeight)return}const X=(M=i.current.floatingContext)==null?void 0:M.nodeId,Q=g&&Zr(g.nodesRef.current,X).some(G=>{var Y;return Fd(_,(Y=G.context)==null?void 0:Y.elements.floating)});if(Fd(_,o.floating)||Fd(_,o.domReference)||Q)return;const J=g?Zr(g.nodesRef.current,X):[];if(J.length>0){let G=!0;if(J.forEach(Y=>{var Z;if((Z=Y.context)!=null&&Z.open&&!Y.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,_,"outside-press")}),L=At(_=>{var M;const D=()=>{var V;A(_),(V=Dn(_))==null||V.removeEventListener(c,D)};(M=Dn(_))==null||M.addEventListener(c,D)});k.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function _(V){r(!1,V,"ancestor-scroll")}const M=Mt(o.floating);s&&M.addEventListener("keydown",T?I:P,T),v&&M.addEventListener(c,C?L:A,C);let D=[];return p&&(rt(o.domReference)&&(D=ur(o.domReference)),rt(o.floating)&&(D=D.concat(ur(o.floating))),!rt(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(ur(o.reference.contextElement)))),D=D.filter(V=>{var F;return V!==((F=M.defaultView)==null?void 0:F.visualViewport)}),D.forEach(V=>{V.addEventListener("scroll",_,{passive:!0})}),()=>{s&&M.removeEventListener("keydown",T?I:P,T),v&&M.removeEventListener(c,C?L:A,C),D.forEach(V=>{V.removeEventListener("scroll",_)})}},[i,o,s,v,c,n,r,p,a,S,w,P,T,I,A,C,L]),k.useEffect(()=>{b.current=!1},[v,c]);const N=k.useMemo(()=>({onKeyDown:P,[x2[d]]:_=>{u&&r(!1,_.nativeEvent,"reference-press")}}),[P,r,u,d]),$=k.useMemo(()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[w2[c]]:()=>{b.current=!0}}),[P,c]);return k.useMemo(()=>a?{reference:N,floating:$}:{},[a,N,$])}function S2(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Go(),i=k.useRef({}),[a]=k.useState(()=>W0()),s=hr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!rt(f)&&n2("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=k.useState(r.reference),u=At((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=k.useMemo(()=>({setPositionReference:c}),[]),p=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function vr(e){e===void 0&&(e={});const{nodeId:t}=e,n=S2({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=k.useState(null),[s,l]=k.useState(null),u=(o==null?void 0:o.reference)||i,d=k.useRef(null),p=mr();We(()=>{u&&(d.current=u)},[u]);const f=WN({...e,elements:{...o,...s&&{reference:s}}}),m=k.useCallback(x=>{const S=rt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(S),f.refs.setReference(S)},[f.refs]),g=k.useCallback(x=>{(rt(x)||x===null)&&(d.current=x,a(x)),(rt(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!rt(x))&&f.refs.setReference(x)},[f.refs]),h=k.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),v=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),b=k.useMemo(()=>({...f,...r,refs:h,elements:v,nodeId:t}),[f,h,v,t,r]);return We(()=>{r.dataRef.current.floatingContext=b;const x=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);x&&(x.context=b)}),k.useMemo(()=>({...f,context:b,refs:h,elements:v}),[f,h,v,b])}function T2(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!s)return;const f=Ht(a.domReference);function m(){!n&&kt(a.domReference)&&a.domReference===vn(Mt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),k.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=k.useMemo(()=>({onPointerDown(f){Md(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Dn(f.nativeEvent);if(l&&rt(m))try{if(Dd()&&h0())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Ld(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=rt(m)&&m.hasAttribute(gr("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=vn(a.domReference?a.domReference.ownerDocument:document);!m&&b===a.domReference||xt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||xt(a.domReference,b)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return k.useMemo(()=>s?{reference:p}:{},[s,p])}const ux="active",dx="selected";function tf(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ux]:a,[dx]: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&&[ux,dx].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(h=>h(...m)).find(h=>h!==void 0)}}}else a[c]=u}),a),{})}}function yr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=k.useCallback(s=>tf(s,e,"reference"),t),i=k.useCallback(s=>tf(s,e,"floating"),n),a=k.useCallback(s=>tf(s,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let fx=!1;function Ws(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function px(e,t){return Ws(t,e===Yd||e===na,e===Uo||e===Ko)}function nf(e,t,n){return Ws(t,e===na,n?e===Uo:e===Ko)||e==="Enter"||e===" "||e===""}function E2(e,t,n){return Ws(t,n?e===Uo:e===Ko,e===na)}function hx(e,t,n){return Ws(t,n?e===Ko:e===Uo,e===Yd)}function qs(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:x="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:C,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||zs("`useListNavigation` looping must be enabled to allow escaping."),m||zs("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&S>1&&zs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=hr(),A=mr(),L=At(s),N=k.useRef(g),$=k.useRef(c??-1),_=k.useRef(null),M=k.useRef(!0),D=k.useRef(L),V=k.useRef(!!o.floating),F=k.useRef(n),H=k.useRef(!1),O=k.useRef(!1),R=Ft(b),X=Ft(n),Q=Ft(w),J=Ft(o.floating),G=Ft(c),[Y,Z]=k.useState(),[j,z]=k.useState(),K=At(function(le,we,ce){ce===void 0&&(ce=!1);function Se(de){m?(Z(de.id),A==null||A.events.emit("virtualfocus",de),T&&(T.current=de)):pr(de,{preventScroll:!0,sync:h0()&&Dd()?fx||H.current:!1})}const ie=le.current[we.current];ie&&Se(ie),requestAnimationFrame(()=>{const de=le.current[we.current]||ie;if(!de)return;ie||Se(de);const ee=Q.current;ee&&B&&(ce||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});We(()=>{document.createElement("div").focus({get preventScroll(){return fx=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?N.current&&c!=null&&(O.current=!0,$.current=c,L(c)):V.current&&($.current=-1,D.current(null)))},[l,n,o.floating,c,L]),We(()=>{if(l&&n&&o.floating)if(a==null){if(H.current=!1,G.current!=null)return;if(V.current&&($.current=-1,K(i,$)),(!F.current||!V.current)&&N.current&&(_.current!=null||N.current===!0&&_.current==null)){let le=0;const we=()=>{i.current[0]==null?(le<2&&(le?requestAnimationFrame:queueMicrotask)(we),le++):($.current=_.current==null||nf(_.current,x,f)||p?Gd(i,R.current):V0(i,R.current),_.current=null,L($.current))};we()}}else ra(i,a)||($.current=a,K(i,$,O.current),O.current=!1)},[l,n,o.floating,a,G,p,i,x,f,L,K,R]),We(()=>{var le;if(!l||o.floating||!A||m||!V.current)return;const we=A.nodesRef.current,ce=(le=we.find(de=>de.id===I))==null||(le=le.context)==null?void 0:le.elements.floating,Se=vn(Mt(o.floating)),ie=we.some(de=>de.context&&xt(de.context.elements.floating,Se));ce&&!ie&&M.current&&ce.focus({preventScroll:!0})},[l,o.floating,A,I,m]),We(()=>{if(!l||!A||!m||I)return;function le(we){z(we.id),T&&(T.current=we)}return A.events.on("virtualfocus",le),()=>{A.events.off("virtualfocus",le)}},[l,A,m,I,T]),We(()=>{D.current=L,V.current=!!o.floating}),We(()=>{n||(_.current=null)},[n]),We(()=>{F.current=n},[n]);const ae=a!=null,B=k.useMemo(()=>{function le(ce){if(!n)return;const Se=i.current.indexOf(ce);Se!==-1&&L(Se)}return{onFocus(ce){let{currentTarget:Se}=ce;le(Se)},onClick:ce=>{let{currentTarget:Se}=ce;return Se.focus({preventScroll:!0})},...h&&{onMouseMove(ce){let{currentTarget:Se}=ce;le(Se)},onPointerLeave(ce){let{pointerType:Se}=ce;!M.current||Se==="touch"||($.current=-1,K(i,$),L(null),m||pr(J.current,{preventScroll:!0}))}}}},[n,J,K,h,i,L,m]),be=At(le=>{if(M.current=!1,H.current=!0,!X.current&&le.currentTarget===J.current)return;if(p&&hx(le.key,x,f)){Nt(le),r(!1,le.nativeEvent,"list-navigation"),kt(o.domReference)&&!m&&o.domReference.focus();return}const we=$.current,ce=Gd(i,b),Se=V0(i,b);if(le.key==="Home"&&(Nt(le),$.current=ce,L($.current)),le.key==="End"&&(Nt(le),$.current=Se,L($.current)),S>1){const ie=C||Array.from({length:i.current.length},()=>({width:1,height:1})),de=YN(ie,S,P),ee=de.findIndex(ne=>ne!=null&&!js(i.current,ne,b)),q=de.reduce((ne,me,De)=>me!=null&&!js(i.current,me,b)?De:ne,-1);if($.current=de[KN({current:de.map(ne=>ne!=null?i.current[ne]:null)},{event:le,orientation:x,loop:d,cols:S,disabledIndices:ZN([...b||i.current.map((ne,me)=>js(i.current,me)?me:void 0),void 0],de),minIndex:ee,maxIndex:q,prevIndex:GN($.current>Se?ce:$.current,ie,de,S,le.key===na?"bl":le.key===Ko?"tr":"tl"),stopEvent:!0})],L($.current),x==="both")return}if(px(le.key,x)){if(Nt(le),n&&!m&&vn(le.currentTarget.ownerDocument)===le.currentTarget){$.current=nf(le.key,x,f)?ce:Se,L($.current);return}nf(le.key,x,f)?d?$.current=we>=Se?u&&we!==i.current.length?-1:ce:jt(i,{startingIndex:we,disabledIndices:b}):$.current=Math.min(Se,jt(i,{startingIndex:we,disabledIndices:b})):d?$.current=we<=ce?u&&we!==-1?i.current.length:Se:jt(i,{startingIndex:we,decrement:!0,disabledIndices:b}):$.current=Math.max(ce,jt(i,{startingIndex:we,decrement:!0,disabledIndices:b})),ra(i,$.current)?L(null):L($.current)}}),Ce=k.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":j||Y},[m,n,ae,j,Y]),_e=k.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...!m0(o.domReference)&&Ce,onKeyDown:be,onPointerMove(){M.current=!0}}),[Ce,be,o.domReference,x]),Re=k.useMemo(()=>{function le(ce){g==="auto"&&p0(ce.nativeEvent)&&(N.current=!0)}function we(ce){N.current=g,g==="auto"&&Md(ce.nativeEvent)&&(N.current=!0)}return{...Ce,onKeyDown(ce){M.current=!1;const Se=ce.key.indexOf("Arrow")===0,ie=E2(ce.key,x,f),de=hx(ce.key,x,f),ee=px(ce.key,x),q=(p?ie:ee)||ce.key==="Enter"||ce.key.trim()==="";if(m&&n){const Ue=A==null?void 0:A.nodesRef.current.find(Lt=>Lt.parentId==null),Qe=A&&Ue?s2(A.nodesRef.current,Ue.id):null;if(Se&&Qe&&T){const Lt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ie||de){var ne,me;const Tn=((ne=Qe.context)==null?void 0:ne.elements.domReference)===ce.currentTarget,Hn=de&&!Tn?(me=Qe.context)==null?void 0:me.elements.domReference:ie?i.current.find(Ar=>(Ar==null?void 0:Ar.id)===Y):null;Hn&&(Nt(ce),Hn.dispatchEvent(Lt),z(void 0))}if(ee&&Qe.context&&Qe.context.open&&Qe.parentId&&ce.currentTarget!==Qe.context.elements.domReference){var De;Nt(ce),(De=Qe.context.elements.domReference)==null||De.dispatchEvent(Lt);return}}return be(ce)}if(!(!n&&!v&&Se)){if(q&&(_.current=p&&ee?null:ce.key),p){ie&&(Nt(ce),n?($.current=Gd(i,R.current),L($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}ee&&(c!=null&&($.current=c),Nt(ce),!n&&v?r(!0,ce.nativeEvent,"list-navigation"):be(ce),n&&L($.current))}},onFocus(){n&&!m&&L(null)},onPointerDown:we,onMouseDown:le,onClick:le}},[Y,Ce,be,R,g,i,p,L,r,n,v,x,f,c,A,m,T]);return k.useMemo(()=>l?{reference:Re,floating:_e,item:B}:{},[l,Re,_e,B])}const C2=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function eo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=C2.get(a))!=null?n:a,l=Go(),u=hr()!=null,d=k.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=k.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=k.useCallback(m=>{let{active:g,selected:h}=m;const v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&h};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return k.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const mx=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Jo(e,t){return typeof e=="function"?e(t):e}function k2(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function P2(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=k.useState("unmounted"),c=k2(n,a);return!c&&s==="close"&&l("unmounted"),We(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function gx(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=k.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=k.useState(()=>({...Jo(i,c),...Jo(n,c)})),{isMounted:g,status:h}=P2(e,{duration:a}),v=Ft(n),b=Ft(r),x=Ft(o),S=Ft(i);return We(()=>{const w=Jo(v.current,c),T=Jo(x.current,c),C=Jo(S.current,c),P=Jo(b.current,c)||Object.keys(w).reduce((I,A)=>(I[A]="",I),{});if(h==="initial"&&m(I=>({transitionProperty:I.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(P).map(mx).join(","),transitionDuration:d+"ms",...C,...P}),h==="close"){const I=T||w;m({transitionProperty:Object.keys(I).map(mx).join(","),transitionDuration:p+"ms",...C,...I})}},[p,x,v,b,S,d,h,c]),{isMounted:g,styles:f}}function A2(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=k.useRef(),g=k.useRef(""),h=k.useRef((n=f??a)!=null?n:-1),v=k.useRef(null),b=At(s),x=At(l),S=Ft(u),w=Ft(p);We(()=>{r&&(clearTimeout(m.current),v.current=null,g.current="")},[r]),We(()=>{if(r&&g.current===""){var A;h.current=(A=f??a)!=null?A:-1}},[r,f,a]);const T=At(A=>{A?o.current.typing||(o.current.typing=A,x(A)):o.current.typing&&(o.current.typing=A,x(A))}),C=At(A=>{function L(D,V,F){const H=S.current?S.current(V,F):V.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return H?D.indexOf(H):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(L(N,N,g.current)===-1?T(!1):A.key===" "&&Nt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Nt(A),T(!0)),N.every(D=>{var V,F;return D?((V=D[0])==null?void 0:V.toLocaleLowerCase())!==((F=D[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",h.current=v.current),g.current+=A.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=v.current,T(!1)},d);const _=h.current,M=L(N,[...N.slice((_||0)+1),...N.slice(0,(_||0)+1)],g.current);M!==-1?(b(M),v.current=M):A.key!==" "&&(g.current="",T(!1))}),P=k.useMemo(()=>({onKeyDown:C}),[C]),I=k.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&T(!1)}}),[C,T]);return k.useMemo(()=>c?{reference:P,floating:I}:{},[c,P,I])}function vx(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 _2(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(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,b=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,b}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:v,tree:b}=d;return function(S){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:T,clientY:C}=S,P=[T,C],I=Dn(S),A=S.type==="mouseleave",L=xt(g.floating,I),N=xt(g.domReference,I),$=g.domReference.getBoundingClientRect(),_=g.floating.getBoundingClientRect(),M=m.split("-")[0],D=p>_.right-_.width/2,V=f>_.bottom-_.height/2,F=_2(P,$),H=_.width>$.width,O=_.height>$.height,R=(H?$:_).left,X=(H?$:_).right,Q=(O?$:_).top,J=(O?$:_).bottom;if(L&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&rt(S.relatedTarget)&&xt(g.floating,S.relatedTarget)||b&&Zr(b.nodesRef.current,v).some(Z=>{let{context:j}=Z;return j==null?void 0:j.open}))return;if(M==="top"&&f>=$.bottom-1||M==="bottom"&&f<=$.top+1||M==="left"&&p>=$.right-1||M==="right"&&p<=$.left+1)return w();let G=[];switch(M){case"top":G=[[R,$.top+1],[R,_.bottom-1],[X,_.bottom-1],[X,$.top+1]];break;case"bottom":G=[[R,_.top+1],[R,$.bottom-1],[X,$.bottom-1],[X,_.top+1]];break;case"left":G=[[_.right-1,J],[_.right-1,Q],[$.left+1,Q],[$.left+1,J]];break;case"right":G=[[$.right-1,J],[$.right-1,Q],[_.left+1,Q],[_.left+1,J]];break}function Y(Z){let[j,z]=Z;switch(M){case"top":{const K=[H?j+t/2:D?j+t*4:j-t*4,z+t+1],ae=[H?j-t/2:D?j+t*4:j-t*4,z+t+1],B=[[_.left,D||H?_.bottom-t:_.top],[_.right,D?H?_.bottom-t:_.top:_.bottom-t]];return[K,ae,...B]}case"bottom":{const K=[H?j+t/2:D?j+t*4:j-t*4,z-t],ae=[H?j-t/2:D?j+t*4:j-t*4,z-t],B=[[_.left,D||H?_.top+t:_.bottom],[_.right,D?H?_.top+t:_.bottom:_.top+t]];return[K,ae,...B]}case"left":{const K=[j+t+1,O?z+t/2:V?z+t*4:z-t*4],ae=[j+t+1,O?z-t/2:V?z+t*4:z-t*4];return[...[[V||O?_.right-t:_.left,_.top],[V?O?_.right-t:_.left:_.right-t,_.bottom]],K,ae]}case"right":{const K=[j-t,O?z+t/2:V?z+t*4:z-t*4],ae=[j-t,O?z-t/2:V?z+t*4:z-t*4],B=[[V||O?_.left+t:_.right,_.top],[V?O?_.left+t:_.right:_.left+t,_.bottom]];return[K,ae,...B]}}}if(!vx([T,C],G)){if(i&&!F)return w();if(!A&&r){const Z=c(S.clientX,S.clientY);if(Z!==null&&Z<.1)return w()}vx([T,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const I2=/Mac|iPod|iPhone|iPad/,Us=()=>I2.test(navigator.userAgent),O2=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Us()?"Meta":"Control":n==="Hyper"?Us()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),bx=e=>e.map(t=>t.trim()).join("+");class M2{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=bx(O2(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=bx(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class yn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof yn&&(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 yn(this);return t?t(n):n}static from(t,n){return new yn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(yn.from(t,n).values())}toArray(){return Array.from(this.values())}}const D2=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},xx=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},wx={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Sx=(e,t)=>{const n=xx(t,wx.basic,e);return n!==void 0&&n!==e?n:xx(t,wx.extend,e)},Tx=e=>e.replace(/[^0-9]/g,""),Ks=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),Ex=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?Tx(e).includes(Tx(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?D2(e,t)!==null:!1,N2=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>Ex(e,o,n,r)):Ex(e,t,n,r),rf=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:je.array(i.value)?i.value.map(Ks):Ks(`${i.value}`)}));return e.forEach(i=>{const a=Sx(i,t);o.forEach(s=>{const l=Sx(i,s.key);if(!l)return;const c=Ks(`${s.value}`.toLocaleLowerCase()).trim(),u=Ks(`${l}`.toLocaleLowerCase()).trim();if(N2(u,c,s.score,s.match))return void r.set(a,i);je.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},F2=e=>(e=e.trim(),e==="Alt"?Us()?y.jsx(M_,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Us()?y.jsx(k_,{"aria-label":"Command",size:14}):"Ctrl":e),L2=e=>{const t=e.value.trim().split("+");return y.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return y.jsxs(E.Fragment,{children:[y.jsx("kbd",{"aria-label":n,children:F2(n)}),o?null:y.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},of=y.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),V2=(e,t)=>qr()?t:window.matchMedia(e).matches,$2=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(V2(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},Cx=()=>window.matchMedia("@media (pointer: coarse)"),j2=()=>{var r;const e=E.useRef(qr()?null:Cx()),[t,n]=E.useState(qr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?Cx():e.current).addEventListener("change",i=>n(i.matches))},[]),t},af=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=j2(),o=E.useRef(qr()?"":document.documentElement.style.overflowY);return E.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||Eb())return;document.documentElement.style.padding=om(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),E.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(fT(c.style.height)):null,p=je.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},bn="500ms",z2={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:bn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:bn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:bn}},R2={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:bn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:bn}},sf={drawer:e=>e==="left"?z2:R2,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:bn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:bn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:bn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:bn},initial:{opacity:.5,scale:.95,animationDuration:bn,type:"spring"},enter:{opacity:1,scale:[1.05,1],animationDuration:bn}}},B2=fo("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),kx={top:0,left:0,right:0,bottom:0},Px=e=>e*.65,H2=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=Px(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return y.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:kx,whileDrag:{cursor:"grabbing"},className:Oe("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?y.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ys={drawer:"right",sheet:"none",dialog:"none"},W2=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ys.drawer:Ys[o]:t?Ys[o]:Ys.sheet},q2=[],lf=E.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:m=void 0,overlayClassName:g="",type:h="dialog",position:v,overlayClickClose:b=!1,role:x="dialog",interactions:S=q2,...w},T)=>{const C=af(e,"block-only"),P=E.useId(),I=E.useId(),A=$2("(min-width: 64rem)"),L=h!=="dialog",N=W2(A,f,h,v),$=A||f?sf[h]:sf.sheet,_=typeof $=="function"?$(N):$,M=A||f?h:"sheet",D=vr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),V=aa(D.context),F=eo(D.context,{role:x}),H=Jr(D.context,{escapeKey:!0,referencePress:!0,outsidePress:b}),O=yr([V,F,H].concat(S)),R=o,X=os(void 0);E.useEffect(()=>{X.set(void 0)},[X,M]);const Q=()=>a(!1);E.useImperativeHandle(T,()=>({context:D.context,floating:C.current}),[D.context,C]);const J=(Z,j)=>{const z=D.refs.floating;if(z.current&&M==="sheet"){const ae=z.current.getBoundingClientRect(),B=X.get()||ae.height,be=Math.abs(B-j.delta.y),Ce=Px(window.outerHeight);return be<Ce?(Q(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(be)}},G={layoutId:m,layout:!0,exit:"exit",animate:"enter",initial:"initial",variants:_},Y=d&&M==="sheet"?{dragElastic:0,onDrag:J,dragConstraints:kx,...G,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:M==="sheet",drag:M==="sheet"?"y":"x"}:G;return y.jsxs(E.Fragment,{children:[o?y.jsx(E.Fragment,{children:r?y.jsx($o,{ref:D.refs.setReference,...O.getReferenceProps({layoutId:m}),children:R}):y.jsx(pt.button,{ref:D.refs.setReference,...O.getReferenceProps(),layoutId:m,type:"button",children:R})}):null,y.jsx(Xr,{preserveTabOrder:!0,children:y.jsx(nr,{mode:"wait",propagate:!0,presenceAffectsLayout:!0,initial:!1,children:e?y.jsx(ix,{lockScroll:!0,className:Oe(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${M==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:y.jsx(Qo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:D.context,children:y.jsxs(pt.div,{...w,...Y,...t?{"aria-labelledby":P,"aria-describedby":I}:{"aria-label":s},...O.getFloatingProps({"aria-modal":e,ref:Wn(D.refs.setFloating,C),className:Oe(B2({position:N,type:M}),l,"overscroll-contain")}),"data-component":"modal",style:M==="drawer"?{width:X}:{height:X},children:[t?y.jsx("header",{className:"relative w-full",children:t?y.jsx("h2",{id:P,className:"select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,y.jsx("section",{className:Oe("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?y.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,p?y.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:y.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:y.jsx(qi,{})})}):null,L&&u?y.jsx(H2,{onChange:a,value:X,sheet:M==="sheet",position:N,parent:D.refs.floating}):null]})})}):null},P)})]})}),U2=e=>y.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Mc(e.item.title)?y.jsx(e.item.title,{text:e.text}):e.item.title}),K2=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?y.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:y.jsx(U2,{text:e.text,item:o})}):o.type!=="shortcut"?y.jsx(E.Fragment,{}):y.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[y.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,y.jsx("span",{children:Mc(o.title)?y.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?y.jsx(L2,{value:o.shortcut}):null]})}),Y2=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:je.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=je.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=rf(o,"title",n),a=r.filter(s=>je.function(s.enabled)?s.enabled({text:t}):!1);return yn.unique(i.concat(a),s=>s.title)},G2=[0,0,0,0,0],Z2=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=Ct(),[o,i]=E.useState(""),a=Fr(o),s=E.useId(),l=E.useRef(null),[c,u]=E.useState(null),d=vr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:qo}),p=qs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:b=>u(x=>je.number(b)?b:e.open?x??0:null)}),{getItemProps:f}=yr([p]),m=e.commands.flatMap(b=>b.type==="group"?[b,...b.items]:[b]),g=Y2(m,o),h=o===""?m:[{type:"group",title:"Results",items:[]},...g.filter(b=>b.type!=="group")];E.useEffect(()=>{const b=new M2;return b.add(t,()=>{var x;return(x=e.onChangeVisibility)==null?void 0:x.call(e,!0)}),m.forEach(x=>{x.type!=="group"&&x.type==="shortcut"&&x.shortcut!==void 0&&b.add(x.shortcut,S=>x.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),b.register()},[t]);const v=e.Icon??Py;return y.jsx(E.Fragment,{children:y.jsxs(lf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[y.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[y.jsx("div",{className:"flex size-10 items-center justify-center",children:y.jsx(v,{Default:Py,text:o,size:16})}),y.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:b=>i(b.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:b=>{var x;if((b.key==="ArrowDown"||b.key==="ArrowUp")&&c!==null&&((x=n.current[c])==null||x.scrollIntoView({block:"start",inline:"start"})),b.key==="Enter"){if(c!==null&&h[c]){b.preventDefault();const S=h[c],w=b.currentTarget.value;if(S.type==="shortcut")return S.action({event:b,setOpen:e.onChangeVisibility,text:w})}if(h.length===1){b.preventDefault();const S=h[0],w=b.currentTarget.value;if(S.type==="shortcut")return S.action({event:b,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[y.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),G2.map((b,x)=>y.jsx("li",{className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:of},`${s}-${x}-skeleton-index`))]}):y.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[y.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[h.map((b,x)=>E.createElement(K2,{...f({onMouseEnter:()=>u(x),ref(S){n.current[x]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),b.type==="shortcut"&&b.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:b,text:o,active:c===x,key:`${s}-${b.type}-${x}`})),h.length===1?y.jsx("div",{className:Oe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&je.number(c)?y.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?y.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},ei=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ta(10),Kd({fallbackAxisSideDirection:"end"}),Ud(),F0({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=vr({open:n,middleware:i,transform:!0,whileElementsMounted:qo,onOpenChange:(m,g)=>{var v;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(v=e.onChange)==null||v.call(e,m))}}),c=aa(l),u=Jr(l),d=eo(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=yr([c,u,d]);return y.jsxs(E.Fragment,{children:[y.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&y.jsx(Xr,{preserveTabOrder:!0,id:`${t}-portal`,children:y.jsx(Qo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:y.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[y.jsx(H0,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),y.jsx("header",{className:"mb-2",children:y.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},X2=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}=vr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=aa(s,{enabled:e.disabled??!0}),u=eo(s,{role:"tooltip"}),d=Jr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=yr([c,u,d]);return y.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[y.jsx(Na,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:y.jsx(pt.span,{layoutId:o,children:e.trigger})}),y.jsx(nr,{children:i?y.jsx(Xr,{root:t,children:y.jsx(Qo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:y.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Ax=200,Q2=500,_x=(e="")=>Oe("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),cf=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Ix=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=E.useState(r??!1),[p,f]=E.useState(!1),[m,g]=E.useState(null),h=E.useRef([]),v=E.useRef([]),b=E.useContext(cf),x=hr(),S=mr(),w=r2(),T=z0(),C=x!==null,{floatingStyles:P,refs:I,context:A}=vr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:qo,placement:C?"right":"bottom-start",middleware:[ta({mainAxis:C?0:4,alignmentAxis:C?-4:0}),Kd(),Ud()]}),L=eo(A,{role:"menu"}),N=Jr(A,{bubbles:!0}),$=Y0(A,{move:!1,enabled:n,delay:{open:Ax},handleClose:yx({blockPointerEvents:!0})}),_=aa(A,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),M=qs(A,{loop:!0,activeIndex:m,nested:C,listRef:h,onNavigate:g}),D=A2(A,{activeIndex:m,listRef:v,resetMs:Q2,onMatch:u?g:void 0}),{getReferenceProps:V,getFloatingProps:F,getItemProps:H}=yr([$,_,L,N,M,D]);E.useEffect(()=>{if(!S)return;const R=()=>d(!1),X=Q=>{Q.nodeId!==w&&Q.parentId===x&&d(!1)};return S.events.on("click",R),S.events.on("menuopen",X),()=>{S.events.off("click",R),S.events.off("menuopen",X)}},[S,w,x]),E.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:x,nodeId:w})},[S,u,w,x]);const O=o?l.className:Oe(_x(l.className));return y.jsxs(o2,{id:w,children:[y.jsx(E.Fragment,{children:l.asChild?y.jsx($o,{...V(b.getItemProps({...l,onFocus(R){var X;(X=l.onFocus)==null||X.call(l,R),f(!1),b.setHasFocusInside(!0)}})),children:s,className:O,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Wn(I.setReference,T.ref,c),tabIndex:C?b.activeIndex===T.index?0:-1:void 0}):y.jsxs("button",{type:"button",className:O,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:Wn(I.setReference,T.ref,c),tabIndex:C?b.activeIndex===T.index?0:-1:void 0,...V(b.getItemProps({...l,onFocus(R){var X;(X=l.onFocus)==null||X.call(l,R),f(!1),b.setHasFocusInside(!0)}})),children:[s,C&&y.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[y.jsx("span",{className:"sr-only",children:"Next menu"}),y.jsx(Wu,{size:14})]})]})}),y.jsx(cf.Provider,{value:{activeIndex:m,setActiveIndex:g,getItemProps:H,setHasFocusInside:f,isOpen:u},children:y.jsx(JN,{elementsRef:h,labelsRef:v,children:u&&y.jsx(Xr,{preserveTabOrder:!0,children:y.jsx(Qo,{context:A,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:y.jsx(t,{...F(),ref:I.setFloating,style:{...l.style,...P},className:Oe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),J2=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(cf),s=z0({label:n?null:e}),l=mr(),c=s.index===a.activeIndex;return y.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:Wn(s.ref,i),className:_x(`${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?y.jsx(t,{size:16}):null]})}),eF=E.forwardRef((e,t)=>hr()===null?y.jsx(i2,{children:y.jsx(Ix,{...e,isParent:!0,ref:t})}):y.jsx(Ix,{...e,isParent:!1,ref:t})),tF=e=>y.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),uf=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=pd,...p},f){const[m,g]=E.useState(i??!1),h=E.useRef(null),v=t||"span",b=_=>{g(_),d==null||d(_)},{refs:x,floatingStyles:S,context:w}=vr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:qo,onOpenChange:i?void 0:b,middleware:[Ud(),ta(5),Kd({fallbackAxisSideDirection:"start"}),F0({padding:5,element:h})]}),T=Y0(w,{move:!0,delay:{open:Ax},enabled:l?s:!1,handleClose:c?yx():null}),C=T2(w,{enabled:l?a:!1}),P=aa(w,{enabled:l?c:!1}),I=Jr(w,{enabled:l}),A=eo(w,{role:"tooltip",enabled:l}),L=b2(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:$}=yr([A,I,L,a?C:void 0,s?T:void 0,c?P:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),y.jsxs(E.Fragment,{children:[y.jsx(v,{...N(p),ref:Wn(x.setReference,f),children:n}),m&&y.jsx(Xr,{preserveTabOrder:!0,children:y.jsxs(an,{...$(),ref:x.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[y.jsx(H0,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Gs=0,br=1,ti=2,Ox=4;function Mx(e){return()=>e}function nF(e){e()}function sa(e,t){return n=>e(t(n))}function Dx(e,t){return()=>e(t)}function Nx(e,t){return n=>e(t,n)}function df(e){return e!==void 0}function rF(...e){return()=>{e.map(nF)}}function ni(){}function Zs(e,t){return t(e),e}function oF(e,t){return t(e)}function ct(...e){return e}function tt(e,t){return e(br,t)}function Ne(e,t){e(Gs,t)}function ff(e){e(ti)}function zt(e){return e(Ox)}function xe(e,t){return tt(e,Nx(t,Gs))}function Fn(e,t){const n=e(br,r=>{n(),t(r)});return n}function Fx(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Lx(e,t){return e===t}function ut(e=Lx){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ke(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Ln(e){return t=>()=>{t(e)}}function re(e,...t){const n=iF(...t);return(r,o)=>{switch(r){case ti:ff(e);return;case br:return tt(e,n(o))}}}function Vn(e,t){return n=>r=>{n(t=e(t,r))}}function ri(e){return t=>n=>{e>0?e--:t(n)}}function xr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Le(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);tt(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function iF(...e){return t=>e.reduceRight(oF,t)}function aF(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case br:return i?n===i?void 0:(r(),n=i,t=tt(e,i),t):(r(),ni);case ti:r(),n=null;return}}}function se(e){let t=e;const n=He();return(r,o)=>{switch(r){case Gs:t=o;break;case br:{o(t);break}case Ox:return t}return n(r,o)}}function Rt(e,t){return Zs(se(t),n=>xe(e,n))}function He(){const e=[];return(t,n)=>{switch(t){case Gs:e.slice().forEach(r=>{r(n)});return;case ti:e.splice(0,e.length);return;case br:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return Zs(He(),t=>xe(e,t))}function Ye(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:sF(),singleton:n}}const sF=()=>Symbol();function lF(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function _t(...e){const t=He(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);tt(i,l=>{n[a]=l,r=r|s,r===o&&Ne(t,n)})}),function(i,a){switch(i){case ti:{ff(t);return}case br:return r===o&&a(n),tt(t,a)}}}function Ae(e,t=Lx){return re(e,ut(t))}function Vx(...e){return function(t,n){switch(t){case ti:return;case br:return rF(...e.map(r=>tt(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const cF={0:"debug",3:"error",1:"log",2:"warn"},uF=()=>typeof globalThis>"u"?window:globalThis,wr=Ye(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=uF().VIRTUOSO_LOG_LEVEL)!=null?o:zt(e);r>=i&&console[cF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function $n(e,t,n){return pf(e,t,n).callbackRef}function pf(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 $x(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=dF(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,v=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:v}),i==null||i(s?jx("column-gap",getComputedStyle(u).columnGap,o):jx("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return pf(c,n,l)}function dF(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 jx(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 hf(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),m=c.top-f.top;p=f.height-Math.max(0,m),d=m+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=pf(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=Ye(()=>{const e=He(),t=He(),n=se(0),r=He(),o=se(0),i=He(),a=He(),s=se(0),l=se(0),c=se(0),u=se(0),d=He(),p=He(),f=se(!1),m=se(!1),g=se(!1);return xe(re(e,he(({scrollTop:h})=>h)),t),xe(re(e,he(({scrollHeight:h})=>h)),a),xe(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),la={lvl:0};function zx(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 it(e){return e===la}function ca(e,t){if(!it(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function xn(e,t,n="k"){if(it(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=xn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return xn(e.l,t,n)}function nn(e,t,n){return it(e)?Hx(t,n,1):t===e.k?It(e,{k:t,v:n}):t<e.k?Wx(It(e,{l:nn(e.l,t,n)})):Wx(It(e,{r:nn(e.r,t,n)}))}function oi(){return la}function Xs(e,t,n){if(it(e))return[];const r=xn(e,t)[0];return fF(gf(e,r,n))}function mf(e,t){if(it(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(it(r))return o;if(it(o))return r;{const[i,a]=Bx(r);return Qs(It(e,{k:i,l:Rx(r),v:a}))}}else return t<n?Qs(It(e,{l:mf(r,t)})):Qs(It(e,{r:mf(o,t)}))}function to(e){return it(e)?[]:[...to(e.l),{k:e.k,v:e.v},...to(e.r)]}function gf(e,t,n){if(it(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(gf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(gf(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(vf(t))return qx(It(e,{lvl:n-1}));if(!it(t)&&!it(t.r))return It(t.r,{l:It(t,{r:t.r.l}),lvl:n,r:It(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(vf(e))return yf(It(e,{lvl:n-1}));if(!it(r)&&!it(r.l)){const o=r.l,i=vf(o)?r.lvl-1:r.lvl;return It(o,{l:It(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:yf(It(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function It(e,t){return Hx(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 Rx(e){return it(e.r)?e.l:Qs(It(e,{r:Rx(e.r)}))}function vf(e){return it(e)||e.lvl>e.r.lvl}function Bx(e){return it(e.r)?[e.k,e.v]:Bx(e.r)}function Hx(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function Wx(e){return yf(qx(e))}function qx(e){const{l:t}=e;return!it(t)&&t.lvl===e.lvl?It(t,{r:It(e,{l:t.r})}):e}function yf(e){const{lvl:t,r:n}=e;return!it(n)&&!it(n.r)&&n.lvl===t&&n.r.lvl===t?It(n,{l:It(e,{r:n.l}),lvl:t+1}):e}function fF(e){return zx(e,({k:t,v:n})=>({index:t,value:n}))}function Ux(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ua(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const bf=Ye(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function Kx(e,t,n){return e[Js(e,t,n)]}function Js(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 pF(e,t,n,r){const o=Js(e,t,r),i=Js(e,n,r,o);return e.slice(o,i+1)}function wn(e,t){return Math.round(e.getBoundingClientRect()[t])}function el(e){return!it(e.groupOffsetTree)}function xf({index:e},t){return t===e?0:t<e?-1:1}function hF(){return{groupIndices:[],groupOffsetTree:oi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:oi()}}function mF(e,t){let n=it(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),it(e)){e=nn(e,0,i);continue}const s=Xs(e,a-1,o+1);if(s.some(SF(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=mf(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 gF(e){return typeof e.groupIndex<"u"}function vF({offset:e},t){return t===e?0:t<e?-1:1}function da(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=Kx(t,e,xf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function Yx(e,t){if(!el(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Gx(e,t,n){if(gF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Yx(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function yF(e,t,n,r=0){return r>0&&(t=Math.max(t,Kx(e,r,xf).offset)),zx(pF(e,t,n,vF),wF)}function bF(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&&it(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>nn(nn(m,g,p),g+1,f),a)}else[a,s]=mF(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=wf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>nn(p,f,da(f,d,o)),oi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function xF(e){return to(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 Zx(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 wf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Js(o,t-1,xf),s=o[l].offset;const c=xn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===xn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Xs(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 wF(e){return{index:e.index,value:e}}function SF(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 TF={offsetHeight:"height",offsetWidth:"width"},jn=Ye(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),o=Rt(r,0),i=He(),a=He(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,T)=>wn(w,TF[T])),p=se(void 0),f=se(0),m=hF(),g=Rt(re(n,Le(l,e,f),Vn(bF,m),ut()),m),h=Rt(re(l,ut(),Vn((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);xe(re(l,ke(w=>w.length>0),Le(g,f),he(([w,T,C])=>{const P=w.reduce((I,A,L)=>nn(I,A,da(A,T.offsetTree,C)||L),oi());return{...T,groupIndices:w,groupOffsetTree:P}})),g),xe(re(r,Le(g),ke(([w,{lastIndex:T}])=>w<T),he(([w,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:w}])),n),xe(c,u);const v=Rt(re(c,he(w=>w===void 0)),!0);xe(re(u,ke(w=>w!==void 0&&it(zt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const b=en(re(n,Le(g),Vn(({sizes:w},[T,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));tt(re(s,Vn((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:T}=zt(g);if(w>0)Ne(t,!0),Ne(i,w+Zx(w,T));else if(w<0){const C=zt(h);C.length>0&&(w-=Zx(-w,C)),Ne(a,w)}}),tt(re(s,Le(e)),([w,T])=>{w<0&&T("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},tn.ERROR)});const x=en(i);xe(re(i,Le(g),he(([w,T])=>{const C=T.groupIndices.length>0,P=[],I=T.lastSize;if(C){const A=ca(T.sizeTree,0);let L=0,N=0;for(;L<w;){const _=T.groupIndices[N],M=T.groupIndices.length===N+1?1/0:T.groupIndices[N+1]-_-1;P.push({endIndex:_,size:A,startIndex:_}),P.push({endIndex:_+1+M-1,size:I,startIndex:_+1}),N++,L+=M+1}const $=to(T.sizeTree);return L!==w&&$.shift(),$.reduce((_,{k:M,v:D})=>{let V=_.ranges;return _.prevSize!==0&&(V=[..._.ranges,{endIndex:M+w-1,size:_.prevSize,startIndex:_.prevIndex}]),{prevIndex:M+w,prevSize:D,ranges:V}},{prevIndex:w,prevSize:0,ranges:P}).ranges}return to(T.sizeTree).reduce((A,{k:L,v:N})=>({prevIndex:L+w,prevSize:N,ranges:[...A.ranges,{endIndex:L+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(re(a,Le(g,f),he(([w,{offsetTree:T},C])=>{const P=-w;return da(P,T,C)})));return xe(re(a,Le(g,f),he(([w,T,C])=>{if(T.groupIndices.length>0){if(it(T.sizeTree))return T;let P=oi();const I=zt(h);let A=0,L=0,N=0;for(;A<-w;){N=I[L];const $=I[L+1]-N-1;L++,A+=$+1}if(P=to(T.sizeTree).reduce(($,{k:_,v:M})=>nn($,Math.max(0,_+w),M),P),A!==-w){const $=ca(T.sizeTree,N);P=nn(P,0,$);const _=xn(T.sizeTree,-w+1)[1];P=nn(P,1,_)}return{...T,sizeTree:P,...wf(T.offsetTree,0,P,C)}}else{const P=to(T.sizeTree).reduce((I,{k:A,v:L})=>nn(I,Math.max(0,A+w),L),oi());return{...T,sizeTree:P,...wf(T.offsetTree,0,P,C)}}})),g),{beforeUnshiftWith:x,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:b,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}},ct(wr,bf),{singleton:!0});function EF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Xx=Ye(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=He(),a=He(),s=en(re(i,he(EF)));return xe(re(s,he(l=>l.totalCount)),n),xe(re(s,he(l=>l.groupIndices)),e),xe(re(_t(o,t,r),ke(([l,c])=>el(c)),he(([l,c,u])=>xn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ut(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ct(jn,Wt)),Sr=Ye(([{log:e}])=>{const t=se(!1),n=en(re(t,ke(r=>r),ut()));return tt(t,r=>{r&&zt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},ct(wr),{singleton:!0}),CF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Qx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!CF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const fa=Ye(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=He(),m=He(),g=se(0);let h=null,v=null,b=null;function x(){h&&(h(),h=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),Ne(l,!1)}return xe(re(f,Le(n,d,r,g,s,a,p),Le(e,i,o),he(([[S,w,T,C,P,I,A,L],N,$,_])=>{const M=Qx(S),{align:D,behavior:V,offset:F}=M,H=C-1,O=Gx(M,w,H);let R=da(O,w.offsetTree,N)+I;D==="end"?(R+=$+xn(w.sizeTree,O)[1]-T+_,O===H&&(R+=A)):D==="center"?R+=($+xn(w.sizeTree,O)[1]-T+_)/2:R-=P,F&&(R+=F);const X=Q=>{x(),Q?(L("retrying to scroll to",{location:S},tn.DEBUG),Ne(f,S)):(Ne(m,!0),L("list did not change, scroll successful",{},tn.DEBUG))};if(x(),V==="smooth"){let Q=!1;b=tt(t,J=>{Q=Q||J}),h=Fn(u,()=>{X(Q)})}else h=Fn(re(t,kF(150)),X);return v=setTimeout(()=>{x()},1200),Ne(l,!0),L("scrolling from index to",{behavior:V,index:O,top:R},tn.DEBUG),{behavior:V,top:R}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},ct(jn,Wt,wr),{singleton:!0});function kF(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 Tf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const pa=Ye(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=se(!0),l=se(0),c=se(!0);return xe(re(a,Le(l),ke(([u,d])=>!!d),Ln(!1)),s),xe(re(a,Le(l),ke(([u,d])=>!!d),Ln(!1)),c),tt(re(_t(t,a),Le(s,n,e,c),ke(([[,u],d,{sizeTree:p},f,m])=>u&&(!it(p)||df(f))&&!d&&!m),Le(l)),([,u])=>{Fn(o,()=>{Ne(c,!0)}),Sf(4,()=>{Fn(r,()=>{Ne(s,!0)}),Ne(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ct(jn,Wt,fa,Sr),{singleton:!0});function Jx(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",PF="none",AF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},_F=0,ga=Ye(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=se(!1),s=se(!0),l=He(),c=He(),u=se(4),d=se(_F),p=Rt(re(Vx(re(Ae(o),ri(1),Ln(!0)),re(Ae(o),ri(1),Ln(!1),Fx(100))),ut()),!1),f=Rt(re(Vx(re(n,Ln(!0)),re(n,Ln(!1),Fx(200))),ut()),!1);xe(re(_t(Ae(o),Ae(d)),he(([b,x])=>b<=x),ut()),s),xe(re(s,xr(50)),c);const m=en(re(_t(r,Ae(i),Ae(t),Ae(e),Ae(u)),Vn((b,[{scrollHeight:x,scrollTop:S},w,T,C,P])=>{const I=S+w-x>-P,A={scrollHeight:x,scrollTop:S,viewportHeight:w};if(I){let N,$;return S>b.state.scrollTop?(N="SCROLLED_DOWN",$=b.state.scrollTop-S):(N="SIZE_DECREASED",$=b.state.scrollTop-S||b.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:$,state:A}}let L;return A.scrollHeight>b.state.scrollHeight?L="SIZE_INCREASED":w<b.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":S<b.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:A}},AF),ut((b,x)=>b&&b.atBottom===x.atBottom))),g=Rt(re(r,Vn((b,{scrollHeight:x,scrollTop:S,viewportHeight:w})=>{if(Jx(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:S};{const T=x-(S+w)<1;return b.scrollTop!==S&&T?{changed:!0,jump:b.scrollTop-S,scrollHeight:x,scrollTop:S}:{changed:!0,jump:0,scrollHeight:x,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ke(b=>b.changed),he(b=>b.jump)),0);xe(re(m,he(b=>b.atBottom)),a),xe(re(a,xr(50)),l);const h=se(ma);xe(re(r,he(({scrollTop:b})=>b),ut(),Vn((b,x)=>zt(f)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?ha:ma,prevScrollTop:x},{direction:ma,prevScrollTop:0}),he(b=>b.direction)),h),xe(re(r,xr(50),Ln(PF)),h);const v=se(0);return xe(re(p,ke(b=>!b),Ln(0)),v),xe(re(o,xr(100),Le(p),ke(([b,x])=>!!x),Vn(([b,x],[S])=>[x,S],[0,0]),he(([b,x])=>x-b)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:v}},ct(Wt)),tl="top",nl="bottom",ew="none";function tw(e,t,n){return typeof e=="number"?n===ha&&t===tl||n===ma&&t===nl?e:0:n===ha?t===tl?e.main:e.reverse:t===nl?e.main:e.reverse}function nw(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Ef=Ye(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=He(),a=se(0),s=se(0),l=se(0),c=Rt(re(_t(Ae(r),Ae(o),Ae(n),Ae(i,ua),Ae(l),Ae(a),Ae(t),Ae(e),Ae(s)),he(([u,d,p,[f,m],g,h,v,b,x])=>{const S=u-b,w=h+v,T=Math.max(p-S,0);let C=ew;const P=nw(x,tl),I=nw(x,nl);return f-=b,f+=p+v,m+=p+v,m-=b,f>u+w-P&&(C=ha),m<u-T+d+I&&(C=ma),C!==ew?[Math.max(S-p-tw(g,tl,C)-P,0),S-T-v+d+tw(g,nl,C)+I]:null}),ke(u=>u!=null),ut(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ct(Wt),{singleton:!0});function IF(e,t,n){if(el(t)){const r=Yx(e,t);return[{index:xn(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 rl(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,m=p-u;return{bottom:u,firstItemIndex:i,items:ow(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:ow(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function rw(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=Tf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return rl(c,[],s,o,n,r)}function ow(e,t,n){if(e.length===0)return[];if(!el(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=Xs(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 no=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=se([]),h=se(0),v=He();xe(i.topItemsIndexes,g);const b=Rt(re(_t(f,m,Ae(l,ua),Ae(o),Ae(r),Ae(c),u,Ae(g),Ae(t),Ae(n),e),ke(([T,C,,P,,,,,,,I])=>{const A=I&&I.length!==P;return T&&!C&&!A}),he(([,,[T,C],P,I,A,L,N,$,_,M])=>{const D=I,{offsetTree:V,sizeTree:F}=D,H=zt(h);if(P===0)return{...Cf,totalCount:P};if(T===0&&C===0)return H===0?{...Cf,totalCount:P}:rw(H,A,I,$,_,M||[]);if(it(F))return H>0?null:rl(IF(Tf(A,P),D,M),[],P,_,D,$);const O=[];if(N.length>0){const G=N[0],Y=N[N.length-1];let Z=0;for(const j of Xs(F,G,Y)){const z=j.value,K=Math.max(j.start,G),ae=Math.min(j.end,Y);for(let B=K;B<=ae;B++)O.push({data:M==null?void 0:M[B],index:B,offset:Z,size:z}),Z+=z}}if(!L)return rl([],O,P,_,D,$);const R=N.length>0?N[N.length-1]+1:0,X=yF(V,T,C,R);if(X.length===0)return null;const Q=P-1,J=Zs([],G=>{for(const Y of X){const Z=Y.value;let j=Z.offset,z=Y.start;const K=Z.size;if(Z.offset<T){z+=Math.floor((T-Z.offset+_)/(K+_));const B=z-Y.start;j+=B*K+B*_}z<R&&(j+=(R-z)*K,z=R);const ae=Math.min(Y.end,Q);for(let B=z;B<=ae&&!(j>=C);B++)G.push({data:M==null?void 0:M[B],index:B,offset:j,size:K}),j+=K+_}});return rl(J,O,P,_,D,$)}),ke(T=>T!==null),ut()),Cf);xe(re(e,ke(df),he(T=>T==null?void 0:T.length)),o),xe(re(b,he(T=>T.topListHeight)),d),xe(d,s),xe(re(b,he(T=>[T.top,T.bottom])),a),xe(re(b,he(T=>T.items)),v);const x=en(re(b,ke(({items:T})=>T.length>0),Le(o,e),ke(([{items:T},C])=>T[T.length-1].originalIndex===C-1),he(([,T,C])=>[T-1,C]),ut(ua),he(([T])=>T))),S=en(re(b,xr(200),ke(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),he(({items:T})=>T[0].index),ut())),w=en(re(b,ke(({items:T})=>T.length>0),he(({items:T})=>{let C=0,P=T.length-1;for(;T[C].type==="group"&&C<P;)C++;for(;T[P].type==="group"&&P>C;)P--;return{endIndex:T[P].index,startIndex:T[C].index}}),ut(Ux)));return{endReached:x,initialItemCount:h,itemsRendered:v,listState:b,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},ct(jn,Xx,Ef,pa,fa,ga,Sr,bf),{singleton:!0}),iw=Ye(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=He(),a=Rt(re(_t(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(Ae(a),i),{totalListHeight:a,totalListHeightChanged:i}},ct(Wt,no),{singleton:!0}),OF=Ye(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Rt(re(_t(n,e,t),ke(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),xr(0),ut()),0);return{alignToBottom:n,paddingTopAddition:r}},ct(Wt,iw),{singleton:!0});function aw(e){return e?e==="smooth"?"smooth":"auto":!1}const MF=(e,t)=>typeof e=="function"?aw(e(t)):t&&aw(e),DF=Ye(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=se(!1),d=He();let p=null;function f(g){Ne(o,{align:"end",behavior:g,index:"LAST"})}tt(re(_t(re(Ae(t),ri(1)),a),Le(Ae(u),r,i,c),he(([[g,h],v,b,x,S])=>{let w=h&&x,T="auto";return w&&(T=MF(v,b||S),w=w&&!!T),{followOutputBehavior:T,shouldFollow:w,totalCount:g}}),ke(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Fn(e,()=>{zt(l)("following output to ",{totalCount:h},tn.DEBUG),f(g),p=null})});function m(g){const h=Fn(n,v=>{g&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(zt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(h,100)}return tt(re(_t(Ae(u),t,s),ke(([g,,h])=>g&&h),Vn(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),ke(({refreshed:g})=>g),Le(u,t)),([,g])=>{zt(i)&&m(g!==!1)}),tt(d,()=>{m(zt(u)!==!1)}),tt(_t(Ae(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ct(jn,ga,fa,pa,Sr,wr,Wt)),NF=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(re(s,Le(i),ke(([,l])=>l!==0),Le(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>rw(l,c,u,d,p,f))),a),{}),ct(jn,pa,no,Sr),{singleton:!0}),FF=Ye(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return tt(re(e,Le(r),ke(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Fn(re(n,ri(1),ke(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ne(t,o)})})}),{initialScrollTop:r}},ct(Sr,Wt,no),{singleton:!0}),LF=({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,VF=Ye(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=He();return xe(re(u,Le(t,l,n,i,o,r,s),Le(e),he(([[d,p,f,m,g,h,v,b],x])=>{const{align:S,behavior:w,calculateViewLocation:T=LF,done:C,...P}=d,I=Gx(d,p,m-1),A=da(I,p.offsetTree,x)+g+h,L=A+xn(p.sizeTree,I)[1],N=b+h,$=b+f-v,_=T({itemBottom:L,itemTop:A,locationParams:{align:S,behavior:w,...P},viewportBottom:$,viewportTop:N});return _?C&&Fn(re(a,ke(M=>!M),ri(zt(a)?1:2)),C):C&&C(),_}),ke(d=>d!==null)),c),{scrollIntoView:u}},ct(jn,Wt,fa,no,wr),{singleton:!0}),sw=Ye(([{scrollVelocity:e}])=>{const t=se(!1),n=He(),r=se(!1);return xe(re(e,Le(r,t,n),ke(([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}),ut()),t),tt(re(_t(t,e,n),Le(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ct(ga),{singleton:!0}),kf=Ye(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),o=He(),i=se(!1),a=se(void 0);return xe(re(_t(n,r),he(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),xe(re(t,Le(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ct(Wt)),$F=Ye(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=He(),u=se(void 0),d=se(null),p=se(null);return xe(s,d),xe(l,p),tt(re(c,Le(t,r,a,d,p,n)),([f,m,g,h,v,b,x])=>{const S=xF(m.sizeTree);h&&v!==null&&b!==null&&(g=v.scrollTop-b.offsetTop),g-=x,f({ranges:S,scrollTop:g})}),xe(re(u,ke(df),he(jF)),o),xe(re(i,Le(u),ke(([,f])=>f!==void 0),ut(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ct(jn,Wt,pa,Sr,kf));function jF(e){return{align:"start",index:0,offset:e.scrollTop}}const zF=Ye(([{topItemsIndexes:e}])=>{const t=se(0);return xe(re(t,ke(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ct(no));function lw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const RF=lw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),BF=Ye(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{const g=en(re(l,Le(a),Vn(([,v,b,x],[{bottom:S,items:w,offsetBottom:T,totalCount:C},P])=>{const I=S+T;let A=0;return b===C&&v.length>0&&w.length>0&&(w[0].originalIndex===0&&v[0].originalIndex===0||(A=I-x,A!==0&&(A+=P))),[A,w,C,I]},[0,[],0,0]),ke(([v])=>v!==0),Le(r,s,n,o,f,m),ke(([,v,b,x,,,S])=>!S&&!x&&v!==0&&b===ha),he(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},tn.DEBUG),v))));function h(v){v>0?(Ne(t,{behavior:"auto",top:-v}),Ne(e,0)):(Ne(e,0),Ne(t,{behavior:"auto",top:-v}))}return tt(re(g,Le(e,i)),([v,b,x])=>{x&&RF()?Ne(e,b-v):h(-v)}),tt(re(_t(Rt(i,!1),e,m),ke(([v,b,x])=>!v&&!x&&b!==0),he(([v,b])=>b),xr(1)),h),xe(re(d,he(v=>({top:-v}))),t),tt(re(c,Le(p,u),he(([v,{groupIndices:b,lastSize:x,sizeTree:S},w])=>{function T(C){return C*(x+w)}if(b.length===0)return T(v);{let C=0;const P=ca(S,0);let I=0,A=0;for(;I<v;){I++,C+=P;let L=b.length===A+1?1/0:b[A+1]-b[A]-1;I+L>v&&(C-=P,L=v-I+1),I+=L,C+=T(L),A++}return C}})),v=>{Ne(e,v),requestAnimationFrame(()=>{Ne(t,{top:v}),requestAnimationFrame(()=>{Ne(e,0),Ne(m,!1)})})}),{deviation:e}},ct(Wt,ga,no,jn,wr,bf)),HF=Ye(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ct(Ef,NF,Sr,sw,iw,FF,OF,kf,VF,wr)),cw=Ye(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,v,{listState:b,topItemsIndexes:x,...S},{scrollToIndex:w},T,{topItemCount:C},{groupCounts:P},I])=>(xe(S.rangeChanged,I.scrollSeekRangeChanged),xe(re(I.windowViewportRect,he(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:P,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:x,totalCount:u,...v,groupIndices:i,itemSize:a,listState:b,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,...I,...g,sizes:l,...h}),ct(jn,pa,Wt,$F,DF,no,fa,BF,zF,Xx,HF));function WF(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 ol=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Pf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(h,v){h.propsReady&&Ne(h.propsReady,!1);for(const b of r){const x=h[t.required[b]];Ne(x,v[b])}for(const b of o)if(b in v){const x=h[t.optional[b]];Ne(x,v[b])}h.propsReady&&Ne(h.propsReady,!0)}function c(h){return i.reduce((v,b)=>(v[b]=x=>{const S=h[t.methods[b]];Ne(S,x)},v),{})}function u(h){return a.reduce((v,b)=>(v[b]=aF(h[t.events[b]]),v),{})}const d=E.forwardRef((h,v)=>{const{children:b,...x}=h,[S]=E.useState(()=>Zs(lF(e),C=>{l(C,x)})),[w]=E.useState(Dx(u,S));ol(()=>{for(const C of a)C in x&&tt(w[C],x[C]);return()=>{Object.values(w).map(ff)}},[x,w,S]),ol(()=>{l(S,x)}),E.useImperativeHandle(v,Mx(c(S)));const T=n;return y.jsx(s.Provider,{value:S,children:n?y.jsx(T,{...WF([...r,...o,...a],x),children:b}):b})}),p=h=>E.useCallback(Nx(Ne,E.useContext(s)[h]),[h]),f=h=>{const v=E.useContext(s)[h],b=E.useCallback(x=>tt(v,x),[v]);return E.useSyncExternalStore(b,()=>zt(v),()=>zt(v))},m=h=>{const v=E.useContext(s)[h],[b,x]=E.useState(Dx(zt,v));return ol(()=>tt(v,S=>{S!==b&&x(Mx(S))}),[v,b]),b},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,v)=>{const b=E.useContext(s)[h];ol(()=>tt(b,v),[v,b])},useEmitterValue:g,usePublisher:p}}const il=E.createContext(void 0),uw=E.createContext(void 0),dw=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Af(e){return"self"in e}function qF(e){return"body"in e}function fw(e,t,n,r=ni,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,m,g;const h=p.target;if(qF(h)||Af(h)){const b=Af(h)?h:h.defaultView;g=i?b.scrollX:b.scrollY,f=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,m=i?b.innerWidth:b.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?v():wi.flushSync(v),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,v;Af(f)?(h=Math.max(wn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,v=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=wn(f,i?"width":"height"),v=f[i?"scrollLeft":"scrollTop"]);const b=h-g;if(p.top=Math.ceil(Math.max(Math.min(b,p.top),0)),Jx(g,h)||p.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const _f="-webkit-sticky",pw="sticky",hw=lw(()=>{if(typeof document>"u")return pw;const e=document.createElement("div");return e.style.position=_f,e.style.position===_f?_f:pw});function If(e){return e}const UF=Ye(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(If),i=se("div"),a=se(ni),s=(l,c=null)=>Rt(re(r,he(u=>u[l]),ut()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),KF=Ye(([e,t])=>({...e,...t}),ct(cw,UF)),YF=({height:e})=>y.jsx("div",{style:{height:e}}),GF={overflowAnchor:"none",position:hw(),zIndex:1},mw={overflowAnchor:"none"},ZF={...mw,display:"inline-block",height:"100%"},gw=E.memo(function({showTopList:e=!1}){const t=Ie("listState"),n=dn("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=dn("windowScrollContainerState"),a=dn("scrollContainerState"),s=o||r?i:a,l=Ie("itemContent"),c=Ie("context"),u=Ie("groupContent"),d=Ie("trackItemSizes"),p=Ie("itemSize"),f=Ie("log"),m=dn("gap"),g=Ie("horizontalDirection"),{callbackRef:h}=$x(n,p,d,e?ni:s,f,m,o,g,Ie("skipAnimationFrameInResizeObserver")),[v,b]=E.useState(0);Df("deviation",_=>{v!==_&&b(_)});const x=Ie("EmptyPlaceholder"),S=Ie("ScrollSeekPlaceholder")||YF,w=Ie("ListComponent"),T=Ie("ItemComponent"),C=Ie("GroupComponent"),P=Ie("computeItemKey"),I=Ie("isSeeking"),A=Ie("groupIndices").length>0,L=Ie("alignToBottom"),N=Ie("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:L?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:L?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?y.jsx(x,{...dt(x,c)}):y.jsx(w,{...dt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(_=>{const M=_.originalIndex,D=P(M+t.firstItemIndex,_.data,c);return I?E.createElement(S,{...dt(S,c),height:_.size,index:_.index,key:D,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?E.createElement(C,{...dt(C,c),"data-index":M,"data-item-index":_.index,"data-known-size":_.size,key:D,style:GF},u(_.index,c)):E.createElement(T,{...dt(T,c),...vw(T,_.data),"data-index":M,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:D,style:g?ZF:mw},A?l(_.index,_.groupIndex,_.data,c):l(_.index,_.data,c))})})}),XF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},QF={outline:"none",overflowX:"auto",position:"relative"},ii=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),JF={position:hw(),top:0,width:"100%",zIndex:1};function dt(e,t){if(typeof e!="string")return{context:t}}function vw(e,t){return{item:typeof e=="string"?void 0:t}}const eL=E.memo(function(){const e=Ie("HeaderComponent"),t=dn("headerHeight"),n=Ie("HeaderFooterTag"),r=$n(E.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...dt(e,o)})}):null}),tL=E.memo(function(){const e=Ie("FooterComponent"),t=dn("footerHeight"),n=Ie("HeaderFooterTag"),r=$n(E.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,Ie("skipAnimationFrameInResizeObserver")),o=Ie("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...dt(e,o)})}):null});function Of({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=fw(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),y.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?QF:XF,...o},tabIndex:0,...i,...dt(s,u),children:r})})}function Mf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:v}=fw(a,l,s,m,d);return dw(()=>{var b;return h.current=d||((b=f.current)==null?void 0:b.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",v),e("scrollBy",g),y.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...dt(s,p),children:r})})}const nL=({children:e})=>{const t=E.useContext(il),n=dn("viewportHeight"),r=dn("fixedItemHeight"),o=Ie("alignToBottom"),i=Ie("horizontalDirection"),a=E.useMemo(()=>sa(n,l=>wn(l,i?"width":"height")),[n,i]),s=$n(a,!0,Ie("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:s,style:ii(o),children:e})},rL=({children:e})=>{const t=E.useContext(il),n=dn("windowViewportRect"),r=dn("fixedItemHeight"),o=Ie("customScrollParent"),i=hf(n,o,Ie("skipAnimationFrameInResizeObserver")),a=Ie("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:ii(a),children:e})},oL=({children:e})=>{const t=Ie("TopItemListComponent")||"div",n=Ie("headerHeight"),r={...JF,marginTop:`${n}px`},o=Ie("context");return y.jsx(t,{style:r,...dt(t,o),children:e})},iL=E.memo(function(e){const t=Ie("useWindowScroll"),n=Ie("topItemsIndexes").length>0,r=Ie("customScrollParent"),o=Ie("context"),i=r||t?lL:sL,a=r||t?rL:nL;return y.jsxs(i,{...e,...dt(i,o),children:[n&&y.jsx(oL,{children:y.jsx(gw,{showTopList:!0})}),y.jsxs(a,{children:[y.jsx(eL,{}),y.jsx(gw,{}),y.jsx(tL,{})]})]})}),{Component:aL,useEmitter:Df,useEmitterValue:Ie,usePublisher:dn}=Pf(KF,{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:{}},iL),sL=Of({useEmitter:Df,useEmitterValue:Ie,usePublisher:dn}),lL=Mf({useEmitter:Df,useEmitterValue:Ie,usePublisher:dn}),Nf=aL,cL=Ye(()=>{const e=se(l=>y.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(If),a=se(ni),s=(l,c=null)=>Rt(re(o,he(u=>u[l]),ut()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),uL=Ye(([e,t])=>({...e,...t}),ct(cw,cL)),dL=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{height:e}})}),fL=({height:e})=>y.jsx("tr",{children:y.jsx("td",{style:{border:0,height:e,padding:0}})}),pL={overflowAnchor:"none"},yw=E.memo(function({showTopList:e=!1}){const t=Ve("listState"),n=Ve("computeItemKey"),r=Ve("firstItemIndex"),o=Ve("isSeeking"),i=Ve("ScrollSeekPlaceholder")||dL,a=Ve("context"),s=Ve("TableRowComponent"),l=Ve("fixedHeaderHeight"),c=Ve("itemContent"),u=(e?t.topItems:[]).reduce((p,f,m)=>(m===0?p.push(f.size):p.push(p[m-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,m=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...dt(i,a),height:p.size,index:p.index,key:m,type:p.type||"item"}):E.createElement(s,{...dt(s,a),...vw(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:m,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:pL},c(p.index,p.data,a))});return y.jsx(y.Fragment,{children:d})}),hL=E.memo(function(){const e=Ve("listState"),t=Ve("topItemsIndexes").length>0,n=Sn("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),i=Sn("windowScrollContainerState"),a=Sn("scrollContainerState"),s=o||r?i:a,l=Ve("trackItemSizes"),c=Ve("itemSize"),u=Ve("log"),{callbackRef:d,ref:p}=$x(n,c,l,s,u,void 0,o,!1,Ve("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);Ff("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=Ve("EmptyPlaceholder"),h=Ve("FillerRow")||fL,v=Ve("TableBodyComponent"),b=Ve("paddingTopAddition"),x=Ve("statefulTotalCount"),S=Ve("context");if(x===0&&g)return y.jsx(g,{...dt(g,S)});const w=(t?e.topItems:[]).reduce((A,L)=>A+L.size,0),T=e.offsetTop+b+f-w,C=e.offsetBottom,P=T>0?y.jsx(h,{context:S,height:T},"padding-top"):null,I=C>0?y.jsx(h,{context:S,height:C},"padding-bottom"):null;return y.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...dt(v,S),children:[P,t&&y.jsx(yw,{showTopList:!0}),y.jsx(yw,{}),I]})}),mL=({children:e})=>{const t=E.useContext(il),n=Sn("viewportHeight"),r=Sn("fixedItemHeight"),o=$n(E.useMemo(()=>sa(n,i=>wn(i,"height")),[n]),!0,Ve("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),y.jsx("div",{"data-viewport-type":"element",ref:o,style:ii(!1),children:e})},gL=({children:e})=>{const t=E.useContext(il),n=Sn("windowViewportRect"),r=Sn("fixedItemHeight"),o=Ve("customScrollParent"),i=hf(n,o,Ve("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),y.jsx("div",{"data-viewport-type":"window",ref:i,style:ii(!1),children:e})},vL=E.memo(function(e){const t=Ve("useWindowScroll"),n=Ve("customScrollParent"),r=Sn("fixedHeaderHeight"),o=Sn("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),s=Ve("context"),l=$n(E.useMemo(()=>sa(r,v=>wn(v,"height")),[r]),!0,Ve("skipAnimationFrameInResizeObserver")),c=$n(E.useMemo(()=>sa(o,v=>wn(v,"height")),[o]),!0,Ve("skipAnimationFrameInResizeObserver")),u=n||t?xL:bL,d=n||t?gL:mL,p=Ve("TableComponent"),f=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),g=i?y.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...dt(f,s),children:i()},"TableHead"):null,h=a?y.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...dt(m,s),children:a()},"TableFoot"):null;return y.jsx(u,{...e,...dt(u,s),children:y.jsx(d,{children:y.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...dt(p,s),children:[g,y.jsx(hL,{},"TableBody"),h]})})})}),{Component:yL,useEmitter:Ff,useEmitterValue:Ve,usePublisher:Sn}=Pf(uL,{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:{}},vL),bL=Of({useEmitter:Ff,useEmitterValue:Ve,usePublisher:Sn}),xL=Mf({useEmitter:Ff,useEmitterValue:Ve,usePublisher:Sn}),wL=yL,bw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},SL={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:xw,floor:al,max:va,min:Lf,round:ww}=Math;function Sw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function TL(e){return{...SL,items:e}}function sl(e,t){return e&&e.width===t.width&&e.height===t.height}function EL(e,t){return e&&e.column===t.column&&e.row===t.row}const CL=Ye(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:S},w])=>{const T=se(0),C=se(0),P=se(bw),I=se({height:0,width:0}),A=se({height:0,width:0}),L=He(),N=He(),$=se(0),_=se(null),M=se({column:0,row:0}),D=He(),V=He(),F=se(!1),H=se(0),O=se(!0),R=se(!1),X=se(!1);tt(re(m,Le(H),ke(([j,z])=>!!z)),()=>{Ne(O,!1)}),tt(re(_t(m,O,A,I,H,R),ke(([j,z,K,ae,,B])=>j&&!z&&K.height!==0&&ae.height!==0&&!B)),([,,,,j])=>{Ne(R,!0),Sf(1,()=>{Ne(L,j)}),Fn(re(c),()=>{Ne(t,[0,0]),Ne(O,!0)})}),xe(re(V,ke(j=>j!=null&&j.scrollTop>0),Ln(0)),C),tt(re(m,Le(V),ke(([,j])=>j!=null)),([,j])=>{j&&(Ne(I,j.viewport),Ne(A,j.item),Ne(M,j.gap),j.scrollTop>0&&(Ne(F,!0),Fn(re(c,ri(1)),z=>{Ne(F,!1)}),Ne(l,{top:j.scrollTop})))}),xe(re(I,he(({height:j})=>j)),d),xe(re(_t(Ae(I,sl),Ae(A,sl),Ae(M,(j,z)=>j&&j.column===z.column&&j.row===z.row),Ae(c)),he(([j,z,K,ae])=>({gap:K,item:z,scrollTop:ae,viewport:j}))),D),xe(re(_t(Ae(T),r,Ae(M,EL),Ae(A,sl),Ae(I,sl),Ae(_),Ae(C),Ae(F),Ae(O),Ae(H)),ke(([,,,,,,,j])=>!j),he(([j,[z,K],ae,B,be,Ce,_e,,Re,le])=>{const{column:we,row:ce}=ae,{height:Se,width:ie}=B,{width:de}=be;if(_e===0&&(j===0||de===0))return bw;if(ie===0){const Tn=Tf(le,j),Hn=Tn+Math.max(_e-1,0);return TL(Sw(Tn,Hn,Ce))}const ee=Tw(de,ie,we);let q,ne;Re?z===0&&K===0&&_e>0?(q=0,ne=_e-1):(q=ee*al((z+ce)/(Se+ce)),ne=ee*xw((K+ce)/(Se+ce))-1,ne=Lf(j-1,va(ne,ee-1)),q=Lf(ne,va(0,q))):(q=0,ne=-1);const me=Sw(q,ne,Ce),{bottom:De,top:Ue}=Ew(be,ae,B,me),Qe=xw(j/ee),Lt=Qe*Se+(Qe-1)*ce-De;return{bottom:De,itemHeight:Se,items:me,itemWidth:ie,offsetBottom:Lt,offsetTop:Ue,top:Ue}})),P),xe(re(_,ke(j=>j!==null),he(j=>j.length)),T),xe(re(_t(I,A,P,M),ke(([j,z,{items:K}])=>K.length>0&&z.height!==0&&j.height!==0),he(([j,z,{items:K},ae])=>{const{bottom:B,top:be}=Ew(j,ae,z,K);return[be,B]}),ut(ua)),t);const Q=se(!1);xe(re(c,Le(Q),he(([j,z])=>z||j!==0)),Q);const J=en(re(_t(P,T),ke(([{items:j}])=>j.length>0),Le(Q),ke(([[j,z],K])=>{const ae=j.items[j.items.length-1].index===z-1;return(K||j.bottom>0&&j.itemHeight>0&&j.offsetBottom===0&&j.items.length===z)&&ae}),he(([[,j]])=>j-1),ut())),G=en(re(Ae(P),ke(({items:j})=>j.length>0&&j[0].index===0),Ln(0),ut())),Y=en(re(Ae(P),Le(F),ke(([{items:j},z])=>j.length>0&&!z),he(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),ut(Ux),xr(0)));xe(Y,f.scrollSeekRangeChanged),xe(re(L,Le(I,A,T,M),he(([j,z,K,ae,B])=>{const be=Qx(j),{align:Ce,behavior:_e,offset:Re}=be;let le=be.index;le==="LAST"&&(le=ae-1),le=va(0,le,Lf(ae-1,le));let we=Vf(z,B,K,le);return Ce==="end"?we=ww(we-z.height+K.height):Ce==="center"&&(we=ww(we-z.height/2+K.height/2)),Re&&(we+=Re),{behavior:_e,top:we}})),l);const Z=Rt(re(P,he(j=>j.offsetBottom+j.bottom)),0);return xe(re(S,he(j=>({height:j.visibleHeight,width:j.visibleWidth}))),I),{customScrollParent:h,data:_,deviation:$,footerHeight:o,gap:M,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:L,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:S,...f,gridState:P,horizontalDirection:X,initialTopMostItemIndex:H,totalListHeight:Z,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:G,stateChanged:D,stateRestoreInProgress:F,...w}},ct(Ef,Wt,ga,sw,Sr,kf,wr));function Tw(e,t,n){return va(1,al((e+n)/(al(t)+n)))}function Ew(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Vf(e,t,n,r[0].index);return{bottom:Vf(e,t,n,r[r.length-1].index)+o,top:i}}function Vf(e,t,n,r){const o=Tw(e.width,n.width,t.column),i=al(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const kL=Ye(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(If),a=se("div"),s=se(ni),l=(d,p=null)=>Rt(re(t,he(f=>f[d]),ut()),p),c=se(!1),u=se(!1);return xe(Ae(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),PL=Ye(([e,t])=>({...e,...t}),ct(CL,kL)),AL=E.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),o=ht("computeItemKey"),i=ht("isSeeking"),a=fn("scrollHeight"),s=ht("ItemComponent"),l=ht("ListComponent"),c=ht("ScrollSeekPlaceholder"),u=ht("context"),d=fn("itemDimensions"),p=fn("gap"),f=ht("log"),m=ht("stateRestoreInProgress"),g=fn("reportReadyState"),h=$n(E.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const x=v.firstChild;if(x){const{height:S,width:w}=x.getBoundingClientRect();d({height:S,width:w})}p({column:kw("column-gap",getComputedStyle(v).columnGap,f),row:kw("row-gap",getComputedStyle(v).rowGap,f)})},[a,d,p,f]),!0,!1);return dw(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:y.jsx(l,{className:t,ref:h,...dt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const b=o(v.index,v.data,u);return i?y.jsx(c,{...dt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},b):E.createElement(s,{...dt(s,u),className:n,"data-index":v.index,key:b},r(v.index,v.data,u))})})}),_L=E.memo(function(){const e=ht("HeaderComponent"),t=fn("headerHeight"),n=ht("headerFooterTag"),r=$n(E.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,!1),o=ht("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...dt(e,o)})}):null}),IL=E.memo(function(){const e=ht("FooterComponent"),t=fn("footerHeight"),n=ht("headerFooterTag"),r=$n(E.useMemo(()=>i=>{t(wn(i,"height"))},[t]),!0,!1),o=ht("context");return e?y.jsx(n,{ref:r,children:y.jsx(e,{...dt(e,o)})}):null}),OL=({children:e})=>{const t=E.useContext(uw),n=fn("itemDimensions"),r=fn("viewportDimensions"),o=$n(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),y.jsx("div",{ref:o,style:ii(!1),children:e})},ML=({children:e})=>{const t=E.useContext(uw),n=fn("windowViewportRect"),r=fn("itemDimensions"),o=ht("customScrollParent"),i=hf(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]),y.jsx("div",{ref:i,style:ii(!1),children:e})},DL=E.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?FL:NL,o=n||t?ML:OL,i=ht("context");return y.jsx(r,{...e,...dt(r,i),children:y.jsxs(o,{children:[y.jsx(_L,{}),y.jsx(AL,{}),y.jsx(IL,{})]})})}),{useEmitter:Cw,useEmitterValue:ht,usePublisher:fn}=Pf(PL,{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"}},DL),NL=Of({useEmitter:Cw,useEmitterValue:ht,usePublisher:fn}),FL=Mf({useEmitter:Cw,useEmitterValue:ht,usePublisher:fn});function kw(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 $f=()=>{const e=E.useContext(Lo);return e?e.tweaks:xs},Pw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>y.jsxs("span",{className:Oe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:y.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?y.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?y.jsx(uf,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:y.jsx("span",{className:"cursor-help",children:y.jsx(Ay,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:y.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?y.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[y.jsx(Ty,{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}),y.jsx(C_,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),ya=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:m,componentName:g,placeholder:h,hideLeft:v=!1,required:b,disabled:x,reportStatus:S},w)=>{const T=$f(),C=S!==void 0?S:T.input.iconFeedback,P=d??f,I=Ct(),A=e??I.inputOptionalLabel;return y.jsxs("fieldset",{ref:w,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":g,"data-interactive":!!i,className:Oe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[y.jsxs("label",{form:u,htmlFor:P,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[y.jsx(Pw,{info:s,hideLeft:v,reportStatus:C,title:m,placeholder:h,children:A||n?y.jsxs(E.Fragment,{children:[b?null:y.jsx("span",{"aria-disabled":x,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:A}),n?y.jsx(E.Fragment,{children:n}):null]}):null}),y.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?y.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?y.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),y.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}),y.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})]})}),LL=e=>y.jsx(E.Fragment,{children:e.children}),VL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},$L=[],jL=E.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(nr,{children:t.children})})}),zL=E.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),RL={List:jL,Item:zL},ai=40,BL=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const v=E.useRef(null),b=E.useRef(null),x=E.useRef(null),S=g.value??g.defaultValue??"",w=Ct(),[T,C]=E.useState(()=>Math.min(320,ai*o.length)),[P,I]=E.useState(!1),[A,L]=E.useState(""),[N,$]=E.useState(S),[_,M]=E.useState(()=>{var ie;return((ie=o.find(de=>de.value===S))==null?void 0:ie.label)??S}),[D,V]=E.useState(null),F=E.useRef($L),H=af(P,"block-only"),O=m&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,R=A?rf(O,"value",[{key:"value",value:A},{key:"label",value:A}]):O,X=()=>{I(!1),C(0)},Q=R.filter(ie=>ie.hidden!==!0),J=m?void 0:`^(${o.map(ie=>`${fd(ie.value)}${ie.label?"|"+fd(ie.label):""}`).join("|")})$`,{x:G,y:Y,strategy:Z,refs:j,context:z}=vr({open:P,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:qo,middleware:[ta(4),N0({padding:10,elementContext:"reference",apply(ie){const de=ie.elements.floating.querySelector("ul"),ee=(de==null?void 0:de.getBoundingClientRect().height)||0,q=Ti(j.reference.current,window.innerHeight),ne=Math.min(ee<ai?q:ee,q,ie.availableHeight),me=Q.length===0?ai:Math.min(ne,q,ee),De=`${b.current.getBoundingClientRect().width}px`;Object.assign(ie.elements.floating.style,{width:De,maxWidth:De,height:me})}})]}),K=gx(z,VL),{getReferenceProps:ae,getFloatingProps:B,getItemProps:be}=yr([eo(z,{role:"listbox"}),Jr(z),qs(z,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:D,selectedIndex:D,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const ie=o.find(de=>de.value===g.value);$((ie==null?void 0:ie.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!P)return C(0);const ie=j.reference;if(ie.current===null)return;const de=Ti(ie.current,window.innerHeight);setTimeout(()=>C(Math.min(de,Q.length*ai)),100)},[A,P,j.reference,Q.length]),E.useEffect(()=>{const ie=j.reference.current;if(ie)return Si(ie)},[]);const Ce=(ie,de)=>{$(ie.value);const ee=j.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",ie.value),ee.value=ie.value;const q=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(q),g.onChange&&g.onChange(q),M(ie.label??""),X(),L(""),V(de)},_e=ie=>{var ee;const de=ie.target.value;return L(de),!P&&de===""?I(!0):(ie.target.name=g.name||"",de?I(!0):(ee=g.onChange)==null?void 0:ee.call(g,ie))},Re=()=>{var ie;I(!0),L(""),(ie=j.reference.current)==null||ie.focus()},le=()=>{V(ie=>ie===null?0:ie),I(!0),L("")},we=()=>{var ie;(ie=j.reference.current)==null||ie.setAttribute("data-value",""),L(""),$(""),M(""),rm(j.reference.current),X()},ce=g.id||g.name,Se=Q.length===0;return y.jsxs(ya,{...g,left:e,error:t,ref:b,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:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Re,children:[y.jsx(Hu,{size:20}),y.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),N?y.jsx("button",{type:"button",onClick:we,className:"p-2 transition-colors link:text-danger md:p-1",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.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:[y.jsx("input",{"data-shadow":"true",...ae({...g,onChange:_e,onFocus:le,pattern:J,ref:j.setReference,name:`${ce}-shadow`,id:`${ce}-shadow`,onClick:ie=>ie.currentTarget.focus(),onKeyDown(ie){var de,ee;if(ie.key==="Escape")return ie.currentTarget.blur(),X();if(P){if(ie.key==="ArrowDown"){let q=je.number(D)?D+1:0;return q>Q.length-1&&(q=0),(de=x.current)==null||de.scrollIntoView({index:q}),V(q)}if(ie.key==="ArrowUp"){let q=je.number(D)?D-1:Q.length-1;return q<0&&(q=Q.length-1),(ee=x.current)==null||ee.scrollIntoView({index:q}),V(q)}if(ie.key==="Enter"){if(D!==null&&Q[D])return ie.preventDefault(),Ce(Q[D],D);if(Q.length===1)return ie.preventDefault(),Ce(Q[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":ce,"data-target":ce,required:f,value:P?A:_||N,"aria-autocomplete":"list",autoComplete:"off",className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),y.jsx("input",{id:ce,name:ce,type:"hidden","data-origin":ce,ref:h,required:f,defaultValue:g.value||N||void 0}),y.jsx(Xr,{preserveTabOrder:!0,children:P?y.jsx(Qo,{modal:!0,guards:!0,returnFocus:!1,context:z,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs(pt.div,{...B({ref:Wn(H,j.setFloating),style:{...K.styles,left:G,top:Y??0,position:Z}}),initial:!1,"data-floating":"true",animate:{height:Se?"auto":T},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!P)return C(0);const de=j.floating.current.querySelectorAll("li").item(0),ee=(de?de.getBoundingClientRect().height:ai)*Q.length;return wi.flushSync(()=>C(ee+2))},children:[Se?y.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,y.jsx(Nf,{overscan:40,ref:x,hidden:Se,data:Q,style:{height:T},defaultItemHeight:ai,components:RL,scrollerRef:ie=>void(v.current=ie),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ie,de)=>{const ee=de.Render??LL,q=N===de.value||N===de.label,ne=D===ie,me=de.label??de.value;return y.jsx("button",{"data-value":de.value,...be({ref:De=>void(F.current[ie]=De),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":de.disabled,onClick:()=>Ce(de,ie),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${ne?"bg-floating-hover text-floating-foreground":""}`}),children:y.jsx(ee,{...g,label:de.label,value:de.value,children:me})})}})]})}):null})]})}),jf=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 y.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[y.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Oe("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,y.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Aw=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:v=!1,loading:b,...x},S)=>{const w=e,T=x.id??x.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const P=C.current,I=Si(C.current),A=r==null?void 0:r(P),L=N=>{const $=N;if($.key==="Enter"&&P.enterKeyHint==="next"){const _=P.getAttribute("data-next");if(_){const M=document.getElementById(_);if(M)return M.focus(),void $.preventDefault()}}};return P.addEventListener("keydown",L),()=>{A==null||A(),I(),P.removeEventListener("keydown",L)}},[]),y.jsx(ya,{...n,info:i,left:a,error:l,right:c,loading:b,form:x.form,name:x.name,feedback:h,hideLeft:v,title:x.title,container:Oe(u,n.container),rightLabel:d,disabled:x.disabled,interactive:p,required:x.required,componentName:t,id:x.name||x.id,optionalText:f,labelClassName:g,placeholder:x.placeholder,children:y.jsx(w,{...n,...x,id:T,name:T,type:m,"data-next":s,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Wn(S,C),className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),ba=Aw(lb,"input",{type:"text"}),_w=new Date(1970,11,31),zf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Iw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},HL={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")},Rf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},WL=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=ud(t),l=E.useId(),c=Ct(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,m]=E.useState(!1),g=Rf(u,_w).flatMap(C=>je.keyof(zf,C.type)?zf[C.type](C.value):[]),h=Rf(u,_w).reduce((C,P)=>C+(je.keyof(Iw,P.type)?Iw[P.type](P.value):""),""),[v,b]=E.useState(d?Rf(u,d).reduce((C,P)=>C+(je.keyof(zf,P.type)?HL[P.type](d,P.value):""),""):""),x=C=>{const P=C.target.value;if(b(P),g.length===P.length&&g.every((A,L)=>{const N=P.charAt(L);return typeof A=="string"?N===A:A.test(N)})){const A=Oo(RO(P,h,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),b(C?RI(C,h):"")),w=Ku(d),T=w?d.toISOString():void 0;return y.jsx(ba,{...i,mask:g,value:v,id:void 0,name:void 0,"data-value":T,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:x,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:y.jsxs(E.Fragment,{children:[y.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),y.jsx(ei,{open:f,onChange:m,trigger:y.jsxs("span",{"aria-labelledby":l,children:[y.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),y.jsx(T_,{})]}),buttonProps:{"aria-describedby":l},children:y.jsx(Ib,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),qL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],UL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],KL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],YL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Ow=(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 GL(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?YL:KL:t.binary?UL:qL,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=Ow(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=Ow(Number(e),t.locale,a),c=n[s];return i+l+r+c}var ll={exports:{}},cl={exports:{}},Ze={};/** @license React v16.13.1
218
218
  * react-is.production.min.js
219
219
  *
220
220
  * Copyright (c) Facebook, Inc. and its affiliates.
221
221
  *
222
222
  * This source code is licensed under the MIT license found in the
223
223
  * LICENSE file in the root directory of this source tree.
224
- */var Mw;function ZL(){if(Mw)return Ze;Mw=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case m:case f:case a:return w;default:return E}}case n:return E}}}function S(w){return x(w)===c}return Ze.AsyncMode=l,Ze.ConcurrentMode=c,Ze.ContextConsumer=s,Ze.ContextProvider=a,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=r,Ze.Lazy=m,Ze.Memo=f,Ze.Portal=n,Ze.Profiler=i,Ze.StrictMode=o,Ze.Suspense=d,Ze.isAsyncMode=function(w){return S(w)||x(w)===l},Ze.isConcurrentMode=S,Ze.isContextConsumer=function(w){return x(w)===s},Ze.isContextProvider=function(w){return x(w)===a},Ze.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ze.isForwardRef=function(w){return x(w)===u},Ze.isFragment=function(w){return x(w)===r},Ze.isLazy=function(w){return x(w)===m},Ze.isMemo=function(w){return x(w)===f},Ze.isPortal=function(w){return x(w)===n},Ze.isProfiler=function(w){return x(w)===i},Ze.isStrictMode=function(w){return x(w)===o},Ze.isSuspense=function(w){return x(w)===d},Ze.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===v||w.$$typeof===b||w.$$typeof===g)},Ze.typeOf=x,Ze}var Xe={};/** @license React v16.13.1
224
+ */var Mw;function ZL(){if(Mw)return Ze;Mw=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case m:case f:case a:return w;default:return T}}case n:return T}}}function S(w){return x(w)===c}return Ze.AsyncMode=l,Ze.ConcurrentMode=c,Ze.ContextConsumer=s,Ze.ContextProvider=a,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=r,Ze.Lazy=m,Ze.Memo=f,Ze.Portal=n,Ze.Profiler=i,Ze.StrictMode=o,Ze.Suspense=d,Ze.isAsyncMode=function(w){return S(w)||x(w)===l},Ze.isConcurrentMode=S,Ze.isContextConsumer=function(w){return x(w)===s},Ze.isContextProvider=function(w){return x(w)===a},Ze.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ze.isForwardRef=function(w){return x(w)===u},Ze.isFragment=function(w){return x(w)===r},Ze.isLazy=function(w){return x(w)===m},Ze.isMemo=function(w){return x(w)===f},Ze.isPortal=function(w){return x(w)===n},Ze.isProfiler=function(w){return x(w)===i},Ze.isStrictMode=function(w){return x(w)===o},Ze.isSuspense=function(w){return x(w)===d},Ze.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===v||w.$$typeof===b||w.$$typeof===g)},Ze.typeOf=x,Ze}var Xe={};/** @license React v16.13.1
225
225
  * react-is.development.js
226
226
  *
227
227
  * Copyright (c) Facebook, Inc. and its affiliates.
228
228
  *
229
229
  * This source code is licensed under the MIT license found in the
230
230
  * LICENSE file in the root directory of this source tree.
231
- */var Dw;function XL(){return Dw||(Dw=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===p||typeof H=="object"&&H!==null&&(H.$$typeof===m||H.$$typeof===f||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===h||H.$$typeof===v||H.$$typeof===b||H.$$typeof===g)}function S(H){if(typeof H=="object"&&H!==null){var be=H.$$typeof;switch(be){case t:var Ce=H.type;switch(Ce){case l:case c:case r:case i:case o:case d:return Ce;default:var _e=Ce&&Ce.$$typeof;switch(_e){case s:case u:case m:case f:case a:return _e;default:return be}}case n:return be}}}var w=l,E=c,C=s,P=a,I=t,_=u,F=r,N=m,V=f,A=n,M=i,O=o,j=d,L=!1;function z(H){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(H)||S(H)===l}function D(H){return S(H)===c}function B(H){return S(H)===s}function X(H){return S(H)===a}function Q(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function J(H){return S(H)===u}function G(H){return S(H)===r}function Y(H){return S(H)===m}function Z(H){return S(H)===f}function $(H){return S(H)===n}function R(H){return S(H)===i}function K(H){return S(H)===o}function ae(H){return S(H)===d}Xe.AsyncMode=w,Xe.ConcurrentMode=E,Xe.ContextConsumer=C,Xe.ContextProvider=P,Xe.Element=I,Xe.ForwardRef=_,Xe.Fragment=F,Xe.Lazy=N,Xe.Memo=V,Xe.Portal=A,Xe.Profiler=M,Xe.StrictMode=O,Xe.Suspense=j,Xe.isAsyncMode=z,Xe.isConcurrentMode=D,Xe.isContextConsumer=B,Xe.isContextProvider=X,Xe.isElement=Q,Xe.isForwardRef=J,Xe.isFragment=G,Xe.isLazy=Y,Xe.isMemo=Z,Xe.isPortal=$,Xe.isProfiler=R,Xe.isStrictMode=K,Xe.isSuspense=ae,Xe.isValidElementType=x,Xe.typeOf=S}()),Xe}var Nw;function Fw(){return Nw||(Nw=1,process.env.NODE_ENV==="production"?ll.exports=ZL():ll.exports=XL()),ll.exports}/*
231
+ */var Dw;function XL(){return Dw||(Dw=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===f||B.$$typeof===a||B.$$typeof===s||B.$$typeof===u||B.$$typeof===h||B.$$typeof===v||B.$$typeof===b||B.$$typeof===g)}function S(B){if(typeof B=="object"&&B!==null){var be=B.$$typeof;switch(be){case t:var Ce=B.type;switch(Ce){case l:case c:case r:case i:case o:case d:return Ce;default:var _e=Ce&&Ce.$$typeof;switch(_e){case s:case u:case m:case f:case a:return _e;default:return be}}case n:return be}}}var w=l,T=c,C=s,P=a,I=t,A=u,L=r,N=m,$=f,_=n,M=i,D=o,V=d,F=!1;function H(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.")),O(B)||S(B)===l}function O(B){return S(B)===c}function R(B){return S(B)===s}function X(B){return S(B)===a}function Q(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return S(B)===u}function G(B){return S(B)===r}function Y(B){return S(B)===m}function Z(B){return S(B)===f}function j(B){return S(B)===n}function z(B){return S(B)===i}function K(B){return S(B)===o}function ae(B){return S(B)===d}Xe.AsyncMode=w,Xe.ConcurrentMode=T,Xe.ContextConsumer=C,Xe.ContextProvider=P,Xe.Element=I,Xe.ForwardRef=A,Xe.Fragment=L,Xe.Lazy=N,Xe.Memo=$,Xe.Portal=_,Xe.Profiler=M,Xe.StrictMode=D,Xe.Suspense=V,Xe.isAsyncMode=H,Xe.isConcurrentMode=O,Xe.isContextConsumer=R,Xe.isContextProvider=X,Xe.isElement=Q,Xe.isForwardRef=J,Xe.isFragment=G,Xe.isLazy=Y,Xe.isMemo=Z,Xe.isPortal=j,Xe.isProfiler=z,Xe.isStrictMode=K,Xe.isSuspense=ae,Xe.isValidElementType=x,Xe.typeOf=S}()),Xe}var Nw;function Fw(){return Nw||(Nw=1,process.env.NODE_ENV==="production"?cl.exports=ZL():cl.exports=XL()),cl.exports}/*
232
232
  object-assign
233
233
  (c) Sindre Sorhus
234
234
  @license MIT
235
- */var Bf,Lw;function QL(){if(Lw)return Bf;Lw=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 Bf=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},Bf}var Hf,Vw;function Wf(){if(Vw)return Hf;Vw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hf=e,Hf}var qf,$w;function jw(){return $w||($w=1,qf=Function.call.bind(Object.prototype.hasOwnProperty)),qf}var Uf,zw;function JL(){if(zw)return Uf;zw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wf(),n={},r=jw();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Uf=o,Uf}var Kf,Rw;function eV(){if(Rw)return Kf;Rw=1;var e=Fw(),t=QL(),n=Wf(),r=jw(),o=JL(),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 Kf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var B=D&&(c&&D[c]||D[u]);if(typeof B=="function")return B}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:S(),elementType:w(),instanceOf:E,node:_(),objectOf:P,oneOf:C,oneOfType:I,shape:N,exact:V};function m(D,B){return D===B?D!==0||1/D===1/B:D!==D&&B!==B}function g(D,B){this.message=D,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function h(D){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q(G,Y,Z,$,R,K,ae){if($=$||p,K=K||Z,ae!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var be=$+":"+Z;!B[be]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+$+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[be]=!0,X++)}}return Y[Z]==null?G?Y[Z]===null?new g("The "+R+" `"+K+"` is marked as required "+("in `"+$+"`, but its value is `null`.")):new g("The "+R+" `"+K+"` is marked as required in "+("`"+$+"`, but its value is `undefined`.")):null:D(Y,Z,$,R,K)}var J=Q.bind(null,!1);return J.isRequired=Q.bind(null,!0),J}function v(D){function B(X,Q,J,G,Y,Z){var $=X[Q],R=O($);if(R!==D){var K=j($);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return h(B)}function b(){return h(a)}function x(D){function B(X,Q,J,G,Y){if(typeof D!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=X[Q];if(!Array.isArray(Z)){var $=O(Z);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+$+"` supplied to `"+J+"`, expected an array."))}for(var R=0;R<Z.length;R++){var K=D(Z,R,J,G,Y+"["+R+"]",n);if(K instanceof Error)return K}return null}return h(B)}function S(){function D(B,X,Q,J,G){var Y=B[X];if(!s(Y)){var Z=O(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return h(D)}function w(){function D(B,X,Q,J,G){var Y=B[X];if(!e.isValidElementType(Y)){var Z=O(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return h(D)}function E(D){function B(X,Q,J,G,Y){if(!(X[Q]instanceof D)){var Z=D.name||p,$=z(X[Q]);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+$+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return h(B)}function C(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(X,Q,J,G,Y){for(var Z=X[Q],$=0;$<D.length;$++)if(m(Z,D[$]))return null;var R=JSON.stringify(D,function(ae,H){var be=j(H);return be==="symbol"?String(H):H});return new g("Invalid "+G+" `"+Y+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+R+"."))}return h(B)}function P(D){function B(X,Q,J,G,Y){if(typeof D!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=X[Q],$=O(Z);if($!=="object")return new g("Invalid "+G+" `"+Y+"` of type "+("`"+$+"` supplied to `"+J+"`, expected an object."));for(var R in Z)if(r(Z,R)){var K=D(Z,R,J,G,Y+"."+R,n);if(K instanceof Error)return K}return null}return h(B)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<D.length;B++){var X=D[B];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+L(X)+" at index "+B+"."),a}function Q(J,G,Y,Z,$){for(var R=[],K=0;K<D.length;K++){var ae=D[K],H=ae(J,G,Y,Z,$,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&R.push(H.data.expectedType)}var be=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new g("Invalid "+Z+" `"+$+"` supplied to "+("`"+Y+"`"+be+"."))}return h(Q)}function _(){function D(B,X,Q,J,G){return A(B[X])?null:new g("Invalid "+J+" `"+G+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return h(D)}function F(D,B,X,Q,J){return new g((D||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function N(D){function B(X,Q,J,G,Y){var Z=X[Q],$=O(Z);if($!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+$+"` "+("supplied to `"+J+"`, expected `object`."));for(var R in D){var K=D[R];if(typeof K!="function")return F(J,G,Y,R,j(K));var ae=K(Z,R,J,G,Y+"."+R,n);if(ae)return ae}return null}return h(B)}function V(D){function B(X,Q,J,G,Y){var Z=X[Q],$=O(Z);if($!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+$+"` "+("supplied to `"+J+"`, expected `object`."));var R=t({},X[Q],D);for(var K in R){var ae=D[K];if(r(D,K)&&typeof ae!="function")return F(J,G,Y,K,j(ae));if(!ae)return new g("Invalid "+G+" `"+Y+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
236
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var H=ae(Z,K,J,G,Y+"."+K,n);if(H)return H}return null}return h(B)}function A(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(A);if(D===null||s(D))return!0;var B=d(D);if(B){var X=B.call(D),Q;if(B!==D.entries){for(;!(Q=X.next()).done;)if(!A(Q.value))return!1}else for(;!(Q=X.next()).done;){var J=Q.value;if(J&&!A(J[1]))return!1}}else return!1;return!0;default:return!1}}function M(D,B){return D==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function O(D){var B=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":M(B,D)?"symbol":B}function j(D){if(typeof D>"u"||D===null)return""+D;var B=O(D);if(B==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return B}function L(D){var B=j(D);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function z(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Kf}var Yf,Bw;function tV(){if(Bw)return Yf;Bw=1;var e=Wf();function t(){}function n(){}return n.resetWarningCache=t,Yf=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},Yf}var Hw;function nV(){if(Hw)return sl.exports;if(Hw=1,process.env.NODE_ENV!=="production"){var e=Fw(),t=!0;sl.exports=eV()(e.isElement,t)}else sl.exports=tV()();return sl.exports}var rV=nV();const at=Gp(rV);function ro(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 oV=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=iV(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Ww(r,"path",i),Ww(r,"relativePath",i),r}function iV(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=oV.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Ww(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const aV=[".DS_Store","Thumbs.db"];function sV(e){return ro(this,void 0,void 0,function*(){return cl(e)&&lV(e.dataTransfer)?fV(e.dataTransfer,e.type):cV(e)?uV(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?dV(e):[]})}function lV(e){return cl(e)}function cV(e){return cl(e)&&cl(e.target)}function cl(e){return typeof e=="object"&&e!==null}function uV(e){return Gf(e.target.files).map(t=>ai(t))}function dV(e){return ro(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ai(n))})}function fV(e,t){return ro(this,void 0,void 0,function*(){if(e.items){const n=Gf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(pV));return qw(Uw(r))}return qw(Gf(e.files).map(n=>ai(n)))})}function qw(e){return e.filter(t=>aV.indexOf(t.name)===-1)}function Gf(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 pV(e){if(typeof e.webkitGetAsEntry!="function")return Kw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Yw(t):Kw(e,t)}function Uw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Uw(n):[n]],[])}function Kw(e,t){return ro(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 hV(e){return ro(this,void 0,void 0,function*(){return e.isDirectory?Yw(e):mV(e)})}function Yw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>ro(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(hV));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function mV(e){return ro(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 ul={},Gw;function gV(){return Gw||(Gw=1,ul.__esModule=!0,ul.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}),ul}var vV=gV();const Zf=Gp(vV);function Zw(e){return xV(e)||bV(e)||e1(e)||yV()}function yV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
235
+ */var Bf,Lw;function QL(){if(Lw)return Bf;Lw=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 Bf=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},Bf}var Hf,Vw;function Wf(){if(Vw)return Hf;Vw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hf=e,Hf}var qf,$w;function jw(){return $w||($w=1,qf=Function.call.bind(Object.prototype.hasOwnProperty)),qf}var Uf,zw;function JL(){if(zw)return Uf;zw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Wf(),n={},r=jw();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Uf=o,Uf}var Kf,Rw;function eV(){if(Rw)return Kf;Rw=1;var e=Fw(),t=QL(),n=Wf(),r=jw(),o=JL(),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 Kf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(O){var R=O&&(c&&O[c]||O[u]);if(typeof R=="function")return R}var p="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:S(),elementType:w(),instanceOf:T,node:A(),objectOf:P,oneOf:C,oneOfType:I,shape:N,exact:$};function m(O,R){return O===R?O!==0||1/O===1/R:O!==O&&R!==R}function g(O,R){this.message=O,this.data=R&&typeof R=="object"?R:{},this.stack=""}g.prototype=Error.prototype;function h(O){if(process.env.NODE_ENV!=="production")var R={},X=0;function Q(G,Y,Z,j,z,K,ae){if(j=j||p,K=K||Z,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 be=j+":"+Z;!R[be]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+j+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[be]=!0,X++)}}return Y[Z]==null?G?Y[Z]===null?new g("The "+z+" `"+K+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new g("The "+z+" `"+K+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:O(Y,Z,j,z,K)}var J=Q.bind(null,!1);return J.isRequired=Q.bind(null,!0),J}function v(O){function R(X,Q,J,G,Y,Z){var j=X[Q],z=D(j);if(z!==O){var K=V(j);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return h(R)}function b(){return h(a)}function x(O){function R(X,Q,J,G,Y){if(typeof O!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=X[Q];if(!Array.isArray(Z)){var j=D(Z);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an array."))}for(var z=0;z<Z.length;z++){var K=O(Z,z,J,G,Y+"["+z+"]",n);if(K instanceof Error)return K}return null}return h(R)}function S(){function O(R,X,Q,J,G){var Y=R[X];if(!s(Y)){var Z=D(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return h(O)}function w(){function O(R,X,Q,J,G){var Y=R[X];if(!e.isValidElementType(Y)){var Z=D(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return h(O)}function T(O){function R(X,Q,J,G,Y){if(!(X[Q]instanceof O)){var Z=O.name||p,j=H(X[Q]);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return h(R)}function C(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function R(X,Q,J,G,Y){for(var Z=X[Q],j=0;j<O.length;j++)if(m(Z,O[j]))return null;var z=JSON.stringify(O,function(ae,B){var be=V(B);return be==="symbol"?String(B):B});return new g("Invalid "+G+" `"+Y+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+z+"."))}return h(R)}function P(O){function R(X,Q,J,G,Y){if(typeof O!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an object."));for(var z in Z)if(r(Z,z)){var K=O(Z,z,J,G,Y+"."+z,n);if(K instanceof Error)return K}return null}return h(R)}function I(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var R=0;R<O.length;R++){var X=O[R];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(X)+" at index "+R+"."),a}function Q(J,G,Y,Z,j){for(var z=[],K=0;K<O.length;K++){var ae=O[K],B=ae(J,G,Y,Z,j,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&z.push(B.data.expectedType)}var be=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new g("Invalid "+Z+" `"+j+"` supplied to "+("`"+Y+"`"+be+"."))}return h(Q)}function A(){function O(R,X,Q,J,G){return _(R[X])?null:new g("Invalid "+J+" `"+G+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return h(O)}function L(O,R,X,Q,J){return new g((O||"React class")+": "+R+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function N(O){function R(X,Q,J,G,Y){var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));for(var z in O){var K=O[z];if(typeof K!="function")return L(J,G,Y,z,V(K));var ae=K(Z,z,J,G,Y+"."+z,n);if(ae)return ae}return null}return h(R)}function $(O){function R(X,Q,J,G,Y){var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));var z=t({},X[Q],O);for(var K in z){var ae=O[K];if(r(O,K)&&typeof ae!="function")return L(J,G,Y,K,V(ae));if(!ae)return new g("Invalid "+G+" `"+Y+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
236
+ Valid keys: `+JSON.stringify(Object.keys(O),null," "));var B=ae(Z,K,J,G,Y+"."+K,n);if(B)return B}return null}return h(R)}function _(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(_);if(O===null||s(O))return!0;var R=d(O);if(R){var X=R.call(O),Q;if(R!==O.entries){for(;!(Q=X.next()).done;)if(!_(Q.value))return!1}else for(;!(Q=X.next()).done;){var J=Q.value;if(J&&!_(J[1]))return!1}}else return!1;return!0;default:return!1}}function M(O,R){return O==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function D(O){var R=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":M(R,O)?"symbol":R}function V(O){if(typeof O>"u"||O===null)return""+O;var R=D(O);if(R==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return R}function F(O){var R=V(O);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function H(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Kf}var Yf,Bw;function tV(){if(Bw)return Yf;Bw=1;var e=Wf();function t(){}function n(){}return n.resetWarningCache=t,Yf=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},Yf}var Hw;function nV(){if(Hw)return ll.exports;if(Hw=1,process.env.NODE_ENV!=="production"){var e=Fw(),t=!0;ll.exports=eV()(e.isElement,t)}else ll.exports=tV()();return ll.exports}var rV=nV();const at=Gp(rV);function ro(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 oV=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function si(e,t,n){const r=iV(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Ww(r,"path",i),Ww(r,"relativePath",i),r}function iV(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=oV.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Ww(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const aV=[".DS_Store","Thumbs.db"];function sV(e){return ro(this,void 0,void 0,function*(){return ul(e)&&lV(e.dataTransfer)?fV(e.dataTransfer,e.type):cV(e)?uV(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?dV(e):[]})}function lV(e){return ul(e)}function cV(e){return ul(e)&&ul(e.target)}function ul(e){return typeof e=="object"&&e!==null}function uV(e){return Gf(e.target.files).map(t=>si(t))}function dV(e){return ro(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>si(n))})}function fV(e,t){return ro(this,void 0,void 0,function*(){if(e.items){const n=Gf(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(pV));return qw(Uw(r))}return qw(Gf(e.files).map(n=>si(n)))})}function qw(e){return e.filter(t=>aV.indexOf(t.name)===-1)}function Gf(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 pV(e){if(typeof e.webkitGetAsEntry!="function")return Kw(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Yw(t):Kw(e,t)}function Uw(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Uw(n):[n]],[])}function Kw(e,t){return ro(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,si(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return si(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function hV(e){return ro(this,void 0,void 0,function*(){return e.isDirectory?Yw(e):mV(e)})}function Yw(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>ro(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(hV));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function mV(e){return ro(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=si(r,e.fullPath);t(o)},r=>{n(r)})})})}var dl={},Gw;function gV(){return Gw||(Gw=1,dl.__esModule=!0,dl.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}),dl}var vV=gV();const Zf=Gp(vV);function Zw(e){return xV(e)||bV(e)||e1(e)||yV()}function yV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
237
237
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xV(e){if(Array.isArray(e))return Xf(e)}function Xw(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 Qw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xw(Object(n),!0).forEach(function(r){Jw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e,t){return TV(e)||SV(e,t)||e1(e,t)||wV()}function wV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
238
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e1(e,t){if(e){if(typeof e=="string")return Xf(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 Xf(e,t)}}function Xf(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 SV(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 TV(e){if(Array.isArray(e))return e}var EV=typeof Zf=="function"?Zf:Zf.default,CV="file-invalid-type",kV="file-too-large",PV="file-too-small",AV="too-many-files",_V=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:CV,message:"File type must be ".concat(r)}},t1=function(t){return{code:kV,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},n1=function(t){return{code:PV,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},IV={code:AV,message:"Too many files"};function r1(e,t){var n=e.type==="application/x-moz-file"||EV(e,t);return[n,n?null:_V(t)]}function o1(e,t,n){if(oo(e.size))if(oo(t)&&oo(n)){if(e.size>n)return[!1,t1(n)];if(e.size<t)return[!1,n1(t)]}else{if(oo(t)&&e.size<t)return[!1,n1(t)];if(oo(n)&&e.size>n)return[!1,t1(n)]}return[!0,null]}function oo(e){return e!=null}function OV(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=r1(l,n),u=xa(c,1),d=u[0],p=o1(l,r,o),f=xa(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function dl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function fl(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 i1(e){e.preventDefault()}function MV(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function DV(e){return e.indexOf("Edge/")!==-1}function NV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return MV(e)||DV(e)}function zn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!dl(r)&&s&&s.apply(void 0,[r].concat(i)),dl(r)})}}function FV(){return"showOpenFilePicker"in window}function LV(e){if(oo(e)){var t=Object.entries(e).filter(function(n){var r=xa(n,2),o=r[0],i=r[1],a=!0;return a1(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(s1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=xa(r,2),i=o[0],a=o[1];return Qw(Qw({},n),{},Jw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function VV(e){if(oo(e))return Object.entries(e).reduce(function(t,n){var r=xa(n,2),o=r[0],i=r[1];return[].concat(Zw(t),[o],Zw(i))},[]).filter(function(t){return a1(t)||s1(t)}).join(",")}function $V(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function jV(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function a1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function s1(e){return/^.*\.[\w]+$/.test(e)}var zV=["children"],RV=["open"],BV=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],HV=["refKey","onChange","onClick"];function WV(e){return KV(e)||UV(e)||l1(e)||qV()}function qV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
238
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e1(e,t){if(e){if(typeof e=="string")return Xf(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 Xf(e,t)}}function Xf(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 SV(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 TV(e){if(Array.isArray(e))return e}var EV=typeof Zf=="function"?Zf:Zf.default,CV="file-invalid-type",kV="file-too-large",PV="file-too-small",AV="too-many-files",_V=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:CV,message:"File type must be ".concat(r)}},t1=function(t){return{code:kV,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},n1=function(t){return{code:PV,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},IV={code:AV,message:"Too many files"};function r1(e,t){var n=e.type==="application/x-moz-file"||EV(e,t);return[n,n?null:_V(t)]}function o1(e,t,n){if(oo(e.size))if(oo(t)&&oo(n)){if(e.size>n)return[!1,t1(n)];if(e.size<t)return[!1,n1(t)]}else{if(oo(t)&&e.size<t)return[!1,n1(t)];if(oo(n)&&e.size>n)return[!1,t1(n)]}return[!0,null]}function oo(e){return e!=null}function OV(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=r1(l,n),u=xa(c,1),d=u[0],p=o1(l,r,o),f=xa(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function fl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function pl(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 i1(e){e.preventDefault()}function MV(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function DV(e){return e.indexOf("Edge/")!==-1}function NV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return MV(e)||DV(e)}function zn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!fl(r)&&s&&s.apply(void 0,[r].concat(i)),fl(r)})}}function FV(){return"showOpenFilePicker"in window}function LV(e){if(oo(e)){var t=Object.entries(e).filter(function(n){var r=xa(n,2),o=r[0],i=r[1],a=!0;return a1(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(s1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=xa(r,2),i=o[0],a=o[1];return Qw(Qw({},n),{},Jw({},i,a))},{});return[{description:"Files",accept:t}]}return e}function VV(e){if(oo(e))return Object.entries(e).reduce(function(t,n){var r=xa(n,2),o=r[0],i=r[1];return[].concat(Zw(t),[o],Zw(i))},[]).filter(function(t){return a1(t)||s1(t)}).join(",")}function $V(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function jV(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function a1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function s1(e){return/^.*\.[\w]+$/.test(e)}var zV=["children"],RV=["open"],BV=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],HV=["refKey","onChange","onClick"];function WV(e){return KV(e)||UV(e)||l1(e)||qV()}function qV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
239
239
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KV(e){if(Array.isArray(e))return Jf(e)}function Qf(e,t){return ZV(e)||GV(e,t)||l1(e,t)||YV()}function YV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
240
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l1(e,t){if(e){if(typeof e=="string")return Jf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jf(e,t)}}function Jf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GV(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 ZV(e){if(Array.isArray(e))return e}function c1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c1(Object(n),!0).forEach(function(r){ep(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ep(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pl(e,t){if(e==null)return{};var n=XV(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 XV(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 tp=T.forwardRef(function(e,t){var n=e.children,r=pl(e,zV),o=d1(r),i=o.open,a=pl(o,RV);return T.useImperativeHandle(t,function(){return{open:i}},[i]),T.createElement(T.Fragment,null,n(vt(vt({},a),{},{open:i})))});tp.displayName="Dropzone";var u1={disabled:!1,getFilesFromEvent:sV,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};tp.defaultProps=u1,tp.propTypes={children:at.func,accept:at.objectOf(at.arrayOf(at.string)),multiple:at.bool,preventDropOnDocument:at.bool,noClick:at.bool,noKeyboard:at.bool,noDrag:at.bool,noDragEventsBubbling:at.bool,minSize:at.number,maxSize:at.number,maxFiles:at.number,disabled:at.bool,getFilesFromEvent:at.func,onFileDialogCancel:at.func,onFileDialogOpen:at.func,useFsAccessApi:at.bool,autoFocus:at.bool,onDragEnter:at.func,onDragLeave:at.func,onDragOver:at.func,onDrop:at.func,onDropAccepted:at.func,onDropRejected:at.func,onError:at.func,validator:at.func};var np={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function d1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},u1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,P=t.onError,I=t.validator,_=T.useMemo(function(){return VV(n)},[n]),F=T.useMemo(function(){return LV(n)},[n]),N=T.useMemo(function(){return typeof h=="function"?h:f1},[h]),V=T.useMemo(function(){return typeof g=="function"?g:f1},[g]),A=T.useRef(null),M=T.useRef(null),O=T.useReducer(QV,np),j=Qf(O,2),L=j[0],z=j[1],D=L.isFocused,B=L.isFileDialogActive,X=T.useRef(typeof window<"u"&&window.isSecureContext&&v&&FV()),Q=function(){!X.current&&B&&setTimeout(function(){if(M.current){var ne=M.current.files;ne.length||(z({type:"closeDialog"}),V())}},300)};T.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[M,B,V,X]);var J=T.useRef([]),G=function(ne){A.current&&A.current.contains(ne.target)||(ne.preventDefault(),J.current=[])};T.useEffect(function(){return x&&(document.addEventListener("dragover",i1,!1),document.addEventListener("drop",G,!1)),function(){x&&(document.removeEventListener("dragover",i1),document.removeEventListener("drop",G))}},[A,x]),T.useEffect(function(){return!r&&b&&A.current&&A.current.focus(),function(){}},[A,b,r]);var Y=T.useCallback(function(q){P?P(q):console.error(q)},[P]),Z=T.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[].concat(WV(J.current),[q.target]),fl(q)&&Promise.resolve(o(q)).then(function(ne){if(!(dl(q)&&!C)){var me=ne.length,De=me>0&&OV({files:ne,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ue=me>0&&!De;z({isDragAccept:De,isDragReject:Ue,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(ne){return Y(ne)})},[o,c,Y,C,_,a,i,s,l,I]),$=T.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=fl(q);if(ne&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return ne&&d&&d(q),!1},[d,C]),R=T.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=J.current.filter(function(De){return A.current&&A.current.contains(De)}),me=ne.indexOf(q.target);me!==-1&&ne.splice(me,1),J.current=ne,!(ne.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),fl(q)&&u&&u(q))},[A,u,C]),K=T.useCallback(function(q,ne){var me=[],De=[];q.forEach(function(Ue){var Qe=r1(Ue,_),Lt=Qf(Qe,2),Tn=Lt[0],Hn=Lt[1],Pr=o1(Ue,a,i),Ar=Qf(Pr,2),_r=Ar[0],W=Ar[1],U=I?I(Ue):null;if(Tn&&_r&&!U)me.push(Ue);else{var Be=[Hn,W];U&&(Be=Be.concat(U)),De.push({file:Ue,errors:Be.filter(function(ot){return ot})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(Ue){De.push({file:Ue,errors:[IV]})}),me.splice(0)),z({acceptedFiles:me,fileRejections:De,isDragReject:De.length>0,type:"setFiles"}),p&&p(me,De,ne),De.length>0&&m&&m(De,ne),me.length>0&&f&&f(me,ne)},[z,s,_,a,i,l,p,f,m,I]),ae=T.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[],fl(q)&&Promise.resolve(o(q)).then(function(ne){dl(q)&&!C||K(ne,q)}).catch(function(ne){return Y(ne)}),z({type:"reset"})},[o,K,Y,C]),H=T.useCallback(function(){if(X.current){z({type:"openDialog"}),N();var q={multiple:s,types:F};window.showOpenFilePicker(q).then(function(ne){return o(ne)}).then(function(ne){K(ne,null),z({type:"closeDialog"})}).catch(function(ne){$V(ne)?(V(ne),z({type:"closeDialog"})):jV(ne)?(X.current=!1,M.current?(M.current.value=null,M.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(ne)});return}M.current&&(z({type:"openDialog"}),N(),M.current.value=null,M.current.click())},[z,N,V,v,K,Y,F,s]),be=T.useCallback(function(q){!A.current||!A.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),H())},[A,H]),Ce=T.useCallback(function(){z({type:"focus"})},[]),_e=T.useCallback(function(){z({type:"blur"})},[]),Re=T.useCallback(function(){S||(NV()?setTimeout(H,0):H())},[S,H]),le=function(ne){return r?null:ne},we=function(ne){return w?null:le(ne)},ce=function(ne){return E?null:le(ne)},Se=function(ne){C&&ne.stopPropagation()},ie=T.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.role,Ue=q.onKeyDown,Qe=q.onFocus,Lt=q.onBlur,Tn=q.onClick,Hn=q.onDragEnter,Pr=q.onDragOver,Ar=q.onDragLeave,_r=q.onDrop,W=pl(q,BV);return vt(vt(ep({onKeyDown:we(zn(Ue,be)),onFocus:we(zn(Qe,Ce)),onBlur:we(zn(Lt,_e)),onClick:le(zn(Tn,Re)),onDragEnter:ce(zn(Hn,Z)),onDragOver:ce(zn(Pr,$)),onDragLeave:ce(zn(Ar,R)),onDrop:ce(zn(_r,ae)),role:typeof De=="string"&&De!==""?De:"presentation"},me,A),!r&&!w?{tabIndex:0}:{}),W)}},[A,be,Ce,_e,Re,Z,$,R,ae,w,E,r]),de=T.useCallback(function(q){q.stopPropagation()},[]),ee=T.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.onChange,Ue=q.onClick,Qe=pl(q,HV),Lt=ep({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:le(zn(De,ae)),onClick:le(zn(Ue,de)),tabIndex:-1},me,M);return vt(vt({},Lt),Qe)}},[M,n,s,ae,r]);return vt(vt({},L),{},{isFocused:D&&!r,getRootProps:ie,getInputProps:ee,rootRef:A,inputRef:M,open:le(H)})}function QV(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},np),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},np);default:return e}}function f1(){}const p1=T.createContext([null,()=>{}]),JV=()=>T.useContext(p1),e$=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,t$={csv:Uu,xls:Uu,mov:Cy,mp4:Cy,xlsx:Uu,pdf:Ey,txt:Ey,json:P_,mp3:S_},n$=e=>{const[,t]=JV(),[n,r]=T.useState({url:"",type:"",size:""});T.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:e$(l),size:GL(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{var c;l.preventDefault(),l.stopPropagation(),(c=e.onDeleteFile)==null||c.call(e,e.file)},a=t$[e.file.name.split(".").at(-1)]??ky,s=n.type==="img"?y.jsx("img",{src:n.url,className:"block w-full",alt:e.file.name}):y.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return y.jsxs("li",{className:"flex flex-row gap-4 justify-between items-center pb-6 w-full border-b border-card-border last:border-b-transparent",children:[y.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[y.jsx("button",{type:"button",onClick:o,className:"flex justify-center items-center size-20",children:s}),y.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[y.jsx("span",{children:e.file.name}),y.jsx("span",{className:"text-sm italic",children:n.size})]})]}),y.jsx("button",{onClick:i,type:"button",className:"p-2 transition-colors duration-300 ease-linear hover:text-danger-hover",children:y.jsx(Wi,{size:16})})]})},r$=e=>y.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>y.jsx(n$,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),h1=e=>{const t=Ct(),n=e.dragging?A_:__;return y.jsxs("div",{className:"flex flex-col justify-center items-center",children:[y.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:y.jsx(n,{className:"text-primary",size:80})}),y.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[y.jsx("p",{children:t.uploadIdle}),y.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},o$=e=>e.isDragActive?y.jsx(h1,{files:e.files,dragging:!0}):e.files.length>0?y.jsx(r$,{onDeleteFile:e.onDeleteFile,files:e.files}):y.jsx(T.Fragment,{children:e.idle}),i$=y.jsx(h1,{dragging:!1}),a$=e=>{const t=e.item.file,n=e.item.type;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),y.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?y.jsx("img",{className:"container block w-80",src:e.item.url,alt:t.name}):n==="video"?y.jsx("video",{className:"container block w-80",src:e.item.url,controls:!0,muted:!0}):n==="audio"?y.jsx("figure",{children:y.jsx("audio",{controls:!0,src:e.item.url})}):null]})},s$=({idle:e=i$,onDeleteFile:t,onDrop:n,...r})=>{const o=Ct(),i=T.useState(null),[a,s]=T.useState([]),l=r.files??a,c=()=>i[1](null),u=m=>{n==null||n(m),s(g=>g.concat(m))},{getRootProps:d,getInputProps:p,isDragActive:f}=d1({onDrop:u});return y.jsxs(p1.Provider,{value:i,children:[y.jsx(lf,{overlayClickClose:!0,title:o.uploadDialogTitle,ariaTitle:o.uploadDialogTitle,open:i[0]!==null,onChange:c,children:i[0]?y.jsx(a$,{item:i[0]}):null}),y.jsxs("div",{...d(),"data-active":l?l.length>0:!1,className:"flex flex-col border items-center justify-center rounded-lg border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background data-[active=true]:border-transparent",children:[y.jsx("input",{...p(r),name:r.name,id:r.name}),y.jsx(o$,{onDeleteFile:t,isDragActive:f,idle:e,files:l})]})]})},l$=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return y.jsx("form",{...e,onSubmit:t})},m1=40,c$=e=>y.jsx(T.Fragment,{children:e.children}),u$={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},g1=[],d$=T.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(nr,{children:t.children})})}),f$=T.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),p$={List:d$,Item:f$},h$=e=>{const t=Ct(),n=T.useRef(null),r=T.Children.count(e.children),[o,i]=T.useState(!1);return T.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),y.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?y.jsxs(Mc,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},m$=T.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},v)=>{const b=T.useMemo(()=>new yn(r.map(ee=>[ee.value,ee])),[r]),x=T.useRef(null),S=T.useRef(null),w=h.value??h.defaultValue??g1,E=Ct(),[C,P]=T.useState(0),[I,_]=T.useState(!1),[F,N]=T.useState(""),[V,A]=T.useState(()=>{const ee=new yn;return w.forEach(q=>{const ne=b.get(q);return ne?ee.set(q,ne):void 0}),ee}),M=T.useMemo(()=>Array.from(V.keys()),[V]),[O,j]=T.useState(()=>{const ee=new Set(w);return r.reduce((q,ne)=>ee.has(ne.value)?[...q,ne.label??ne.value]:q,[])??w}),[L,z]=T.useState(null),D=T.useRef(g1),B=m&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,X=F.length===0?B:rf(B,"value",[{key:"value",value:F},{key:"label",value:F}]),Q=af(I,"block-only"),J=X.filter(ee=>ee.hidden!==!0),G=J.length===0,{x:Y,y:Z,strategy:$,refs:R,context:K}=gr({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Wo,middleware:[ta(4),N0({padding:10,elementContext:"reference",apply(ee){const q=ee.elements.floating.querySelector("ul"),ne=(q==null?void 0:q.getBoundingClientRect().height)||0,me=Si(R.reference.current,window.innerHeight),De=Math.min(ne<m1?me:ne,me,ee.availableHeight),Ue=J.length===0?m1:Math.min(De,me,ne),Qe=`${x.current.getBoundingClientRect().width}px`;Object.assign(ee.elements.floating.style,{width:Qe,maxWidth:Qe,height:Ue})}})]}),ae=gx(K,u$),{getReferenceProps:H,getFloatingProps:be,getItemProps:Ce}=vr([eo(K,{role:"listbox"}),Jr(K),Ws(K,{cols:0,listRef:D,loop:!0,virtual:!0,allowEscape:!0,activeIndex:L,selectedIndex:L,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ee=>z(q=>ee??q)})]);T.useEffect(()=>{if(!I)return P(0);const ee=R.reference;if(ee.current===null)return;const q=Si(ee.current,window.innerHeight);setTimeout(()=>P(Math.min(q,J.length*40)),100)},[F,I,R.reference]),T.useEffect(()=>{h.value&&A(new yn(h.value.map(ee=>[ee,b.get(ee)])))},[h.value,b]),T.useEffect(()=>{const ee=R.reference.current;if(ee)return wi(ee)},[]);const _e=(ee,q)=>{const ne=V.clone(Ue=>Ue.has(ee.value)?Ue.remove(ee.value):Ue.set(ee.value,ee));A(ne);const me=R.reference.current;if(!me)return;const De=ne.map(Ue=>Ue.value);me==null||me.setAttribute("data-value",JSON.stringify(De)),g&&g(De),j(Ue=>Ue.concat(ee.label??"")),N(""),z(q)},Re=ee=>{const q=ee.target.value;return N(q),!I&&q===""?_(!0):(ee.target.name=h.name||"",q?_(!0):void 0)},le=()=>{var ee;_(!0),N(""),(ee=R.reference.current)==null||ee.focus()},we=()=>{_(!0),N("")},ce=()=>{var ee;(ee=R.reference.current)==null||ee.setAttribute("data-value","[]"),N(""),_(!1),A(new yn),g==null||g([])},Se=h.id||h.name,ie=V.map((ee,q)=>y.jsx(Mc,{size:"small",icon:y.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),_e(ee,q)},children:y.jsx(Wi,{size:14})}),children:ee.label??ee.value},`MultiSelect-${ee.value}-x`)),de={height:G?"0":V.size===0?C-49:C-86};return y.jsxs(ya,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:le,children:[y.jsx(Hu,{size:20}),y.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),V?y.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.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:[y.jsxs("ul",{...H({...h,onFocus:we,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:R.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":M.join(","),className:Oe("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[M.length>0?null:y.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),y.jsx(h$,{label:c,children:ie})]}),y.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:v,required:f,defaultValue:h.value||M||void 0}),y.jsx(Xr,{preserveTabOrder:!0,children:I?y.jsx(ix,{lockScroll:!0,children:y.jsx(Xo,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs("div",{...be({ref:R.setFloating,style:{...ae.styles,top:Z??0,position:$,left:Y,height:C-(M.length===0?65:30)}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[y.jsx("input",{autoFocus:!0,value:F,onChange:Re,title:h.title,placeholder:E.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:ee=>{var q,ne;if(ee.key==="ArrowDown"){let me=L+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),z(me)}if(ee.key==="ArrowUp"){let me=L-1;return me<0&&(me=J.length-1),(ne=S.current)==null||ne.scrollIntoView({index:me}),z(me)}if(ee.key==="Escape")return ee.currentTarget.blur(),_(!1);if(ee.key==="Enter"){if(L!==null&&J[L])return ee.preventDefault(),_e(J[L],L);if(J.length===1)return ee.preventDefault(),_e(J[0],0)}}}),G?y.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||E.autocompleteEmpty})}):null,G?null:y.jsx(pt.div,{initial:!1,"data-floating":"true",ref:Q,animate:{height:G?"auto":C},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return P(0);const q=R.floating.current.querySelectorAll("li").item(0),ne=(q?q.getBoundingClientRect().height:40)*J.length;return xi.flushSync(()=>P(ne+2))},children:y.jsx(Nf,{ref:S,hidden:G,data:J,components:p$,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ee,q)=>{const ne=q.Render??c$,me=V.has(q.value)||V.has(q.label??""),De=L===ee,Ue=q.label??q.value;return y.jsxs("button",{"data-value":q.value,...Ce({ref:Qe=>void(D.current[ee]=Qe),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>_e(q,ee)}),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 ${me||De?"bg-floating-hover text-floating-foreground":""}`,children:[y.jsx(jf,{onChange:pd,checked:me,"aria-checked":me,onClick:Qe=>{Qe.stopPropagation(),_e(q,ee)}}),y.jsx(ne,{...h,label:q.label,value:q.value,children:Ue})]})}})}),V.size===0?null:y.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:ie})]})})}):null})]})}),g$=({children:e,className:t="",size:n,...r})=>y.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:[y.jsx("input",{...r,type:"radio",className:Oe("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]}),io=T.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const v=Ct(),b=T.useRef(null),x=g.id??g.name;T.useImperativeHandle(h,()=>b.current),T.useEffect(()=>{if(b.current===null)return;const w=new AbortController,E=b.current,C=wi(b.current);return E.addEventListener("change",()=>E.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=b.current)==null?void 0:w.focus()};return y.jsx(ya,{info:n,left:f,error:m,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:y.jsxs("label",{htmlFor:x,children:[p,y.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[y.jsx(Hu,{size:20}),y.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:y.jsxs("select",{...g,id:x,name:x,required:e,ref:Wn(h,b),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Oe("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:[y.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>T.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})});function v1(e,[t,n]){return Math.min(n,Math.max(t,e))}function si(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 y1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function b1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=y1(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():y1(e[o],null)}}}}function ao(...e){return k.useCallback(b1(...e),e)}function x1(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,v$(o,...t)]}function v$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function w1(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function y$({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=b$({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=w1(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function b$({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=w1(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var x$=k.createContext(void 0);function w$(e){const t=k.useContext(x$);return e||t||"ltr"}function S$(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var T$=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function E$(e){const[t,n]=k.useState(void 0);return T$(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function rp(e){const t=C$(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(P$);if(l){const c=l.props.children,u=s.map(d=>d===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:d);return y.jsx(t,{...a,ref:o,children:k.isValidElement(c)?k.cloneElement(c,void 0,u):null})}return y.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function C$(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=_$(o),s=A$(i,o.props);return o.type!==k.Fragment&&(s.ref=r?b1(r,a):a),k.cloneElement(o,s)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var k$=Symbol("radix.slottable");function P$(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===k$}function A$(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 _$(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var I$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],hl=I$.reduce((e,t)=>{const n=rp(`Primitive.${t}`),r=k.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function O$(e){const t=e+"CollectionProvider",[n,r]=x1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,b=T.useRef(null),x=T.useRef(new Map).current;return y.jsx(o,{scope:h,itemMap:x,collectionRef:b,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=rp(s),c=T.forwardRef((g,h)=>{const{scope:v,children:b}=g,x=i(s,v),S=ao(h,x.collectionRef);return y.jsx(l,{ref:S,children:b})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=rp(u),f=T.forwardRef((g,h)=>{const{scope:v,children:b,...x}=g,S=T.useRef(null),w=ao(h,S),E=i(u,v);return T.useEffect(()=>(E.itemMap.set(S,{ref:S,...x}),()=>void E.itemMap.delete(S))),y.jsx(p,{[d]:"",ref:w,children:b})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return T.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((E,C)=>x.indexOf(E.ref.current)-x.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var S1=["PageUp","PageDown"],T1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],E1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},li="Slider",[op,M$,D$]=O$(li),[C1,qR]=x1(li,[D$]),[N$,ml]=C1(li),k1=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=k.useRef(new Set),v=k.useRef(0),x=a==="horizontal"?F$:L$,[S=[],w]=y$({prop:u,defaultProp:c,onChange:F=>{var V;(V=[...h.current][v.current])==null||V.focus(),d(F)}}),E=k.useRef(S);function C(F){const N=R$(S,F);_(F,N)}function P(F){_(F,v.current)}function I(){const F=E.current[v.current];S[v.current]!==F&&p(S)}function _(F,N,{commit:V}={commit:!1}){const A=q$(i),M=U$(Math.round((F-r)/i)*i+r,A),O=v1(M,[r,o]);w((j=[])=>{const L=j$(j,O,N);if(W$(L,l*i)){v.current=L.indexOf(O);const z=String(L)!==String(j);return z&&V&&p(L),z?L:j}else return j})}return y.jsx(N$,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:S,orientation:a,form:m,children:y.jsx(op.Provider,{scope:e.__scopeSlider,children:y.jsx(op.Slot,{scope:e.__scopeSlider,children:y.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:si(g.onPointerDown,()=>{s||(E.current=S)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:P,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&_(r,0,{commit:!0}),onEndKeyDown:()=>!s&&_(o,S.length-1,{commit:!0}),onStepKeyDown:({event:F,direction:N})=>{if(!s){const M=S1.includes(F.key)||F.shiftKey&&T1.includes(F.key)?10:1,O=v.current,j=S[O],L=i*M*N;_(j+L,O,{commit:!0})}}})})})})});k1.displayName=li;var[P1,A1]=C1(li,{startEdge:"left",endEdge:"right",size:"width",direction:1}),F$=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=k.useState(null),f=ao(t,x=>p(x)),m=k.useRef(void 0),g=w$(o),h=g==="ltr",v=h&&!i||!h&&i;function b(x){const S=m.current||d.getBoundingClientRect(),w=[0,S.width],C=sp(w,v?[n,r]:[r,n]);return m.current=S,C(x-S.left)}return y.jsx(P1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:y.jsx(_1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=b(x.clientX);a==null||a(S)},onSlideMove:x=>{const S=b(x.clientX);s==null||s(S)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:x=>{const w=E1[v?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:w?-1:1})}})})}),L$=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=k.useRef(null),d=ao(t,u),p=k.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],x=sp(v,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return y.jsx(P1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:y.jsx(_1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=E1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),_1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=ml(li,n);return y.jsx(hl.span,{...c,ref:t,onKeyDown:si(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):S1.concat(T1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:si(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:si(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:si(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),I1="SliderTrack",O1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ml(I1,n);return y.jsx(hl.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});O1.displayName=I1;var ip="SliderRange",M1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ml(ip,n),i=A1(ip,n),a=k.useRef(null),s=ao(t,a),l=o.values.length,c=o.values.map(p=>N1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return y.jsx(hl.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});M1.displayName=ip;var ap="SliderThumb",D1=k.forwardRef((e,t)=>{const n=M$(e.__scopeSlider),[r,o]=k.useState(null),i=ao(t,s=>o(s)),a=k.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return y.jsx(V$,{...e,ref:i,index:a})}),V$=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=ml(ap,n),s=A1(ap,n),[l,c]=k.useState(null),u=ao(t,b=>c(b)),d=l?a.form||!!l.closest("form"):!0,p=E$(l),f=a.values[r],m=f===void 0?0:N1(f,a.min,a.max),g=z$(r,a.values.length),h=p==null?void 0:p[s.size],v=h?B$(h,m,s.direction):0;return k.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),y.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${v}px)`},children:[y.jsx(op.ItemSlot,{scope:e.__scopeSlider,children:y.jsx(hl.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:si(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&y.jsx($$,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});D1.displayName=ap;var $$=e=>{const{value:t,...n}=e,r=k.useRef(null),o=S$(t);return k.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),y.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function j$(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function N1(e,t,n){const i=100/(n-t)*(e-t);return v1(i,[0,100])}function z$(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function R$(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function B$(e,t,n){const r=e/2,i=sp([0,50],[0,r]);return(r-i(t)*n)*n}function H$(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function W$(e,t){if(t>0){const n=H$(e);return Math.min(...n)>=t}return!0}function sp(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function q$(e){return(String(e).split(".")[1]||"").length}function U$(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var K$=k1,Y$=O1,G$=M1,Z$=D1;const X$=e=>{const[t,n]=T.useState(null),r=T.useRef(null);return T.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));je.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(je.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),y.jsx(uf,{title:"",ref:r,as:Z$,enabled:e.tooltip,className:"block bg-input-switch size-5 cursor-grab rounded-full border-1 border-input-border shadow active:cursor-grabbing",children:t})},Q$=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=T.useRef(Lo()),s=r||o||[];return y.jsxs(K$,{...i,defaultValue:r,value:o,className:Oe("relative flex h-5 w-full touch-none select-none items-center",n),children:[y.jsx(Y$,{className:"relative h-2 grow rounded-full bg-background",children:y.jsx(G$,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>y.jsx(X$,{tooltip:t??!1},`${a.current}-${c}`))]})},J$=T.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=T.useId(),[s,l]=T.useState(o.checked??!1),c=s,u=T.useRef(null),d=Nr(o.onChange);T.useImperativeHandle(i,()=>u.current),T.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return y.jsxs("fieldset",{className:Oe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[y.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[y.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)}),y.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:y.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"})}),y.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:y.jsx("span",{className:"font-medium text-foreground",children:e})})]}),y.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ej=e=>{const[t,n]=i_();return T.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:u_(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),y.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},tj=Aw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
241
- `);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)}),nj=e=>{const[t,n]=T.useState(0);return T.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},rj={Item:T.forwardRef(function(t,n){return y.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:T.forwardRef(function(t,n){return y.jsx("ul",{...t,ref:n,className:"space-y-3"})})},oj=e=>{const t=T.useRef(null),n=nj(t);return y.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[y.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:[y.jsx("header",{className:"border-b border-card-border pb-2"}),y.jsxs("div",{className:"px-8 space-y-2",children:[y.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),y.jsx(Nf,{height:n,useWindowScroll:!0,data:e.source,components:rj,itemContent:(r,o)=>y.jsx(T.Fragment,{children:y.jsx(jf,{children:y.jsx(e.Item,{data:o})})})})]})]}),y.jsx("div",{children:y.jsx(Na,{children:y.jsx(Wu,{})})}),y.jsx("div",{})]})};var ij=Object.defineProperty,F1=Object.getOwnPropertySymbols,aj=Object.prototype.hasOwnProperty,sj=Object.prototype.propertyIsEnumerable,L1=(e,t,n)=>t in e?ij(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lj=(e,t)=>{for(var n in t||(t={}))aj.call(t,n)&&L1(e,n,t[n]);if(F1)for(var n of F1(t))sj.call(t,n)&&L1(e,n,t[n]);return e},lp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},cj=(e,t,n,r)=>vl(lp,e,t,n,r),ci=e=>typeof e=="object",Sr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ci(e)&&!ci(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Sr(e[r],t[r]))},uj=(e,t)=>(ci(e)||Array.isArray(e))&&t?e[t]:e,dj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,gl=e=>/[0-9.]+/.test(e),V1=e=>["string","number"].includes(typeof e),$1=e=>e==null||(e==null?void 0:e.length)===0||e==="",j1={eq:Sr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:$1,notEmpty:e=>!$1(e),in:(e,t)=>lp(t,n=>Sr(e,n)),notIn:(e,t)=>z1(t,n=>!Sr(e,n))},fj=e=>{if(e in j1)return j1[e];throw new Error("Linq - Symbol not found")},ui=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},vl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=fj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},pj=(e,t,n,r)=>vl(ui,e,t,n,r),z1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},hj=(e,t,n,r)=>vl(z1,e,t,n,r),R1=e=>{if(e===null)return null;const t=lj({},e);return Object.keys(t).forEach(n=>t[n]=ci(e[n])?R1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},B1=(e,t)=>{if(ci(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Sr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Sr(t,r))return!0}return!1},mj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},gj=e=>ui(e,(t,n,r)=>ci(t)?n===r.findIndex(o=>Sr(o,t)):n===r.indexOf(t)),vj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},H1=(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())},yj=(e,t)=>H1(e,n=>n[t]),W1=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},bj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},xj=(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 gl(e)&&gl(t)?r.map(a=>Number.parseInt(a)):r},cp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&gl(e)&&gl(t)){const o=[],[i,a]=bj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return xj(e,t,r)},wj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?cp(r,o,1):cp(r,i,Number.parseInt(o,10))}return V1(e)&&V1(t)?cp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},up=(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},q1=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},Sj=(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)},Tj=(e,t,n,r)=>vl(Sj,e,t,n,r),U1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(dj(t))},K1=(e=>(e.Asc="asc",e.Desc="desc",e))(K1||{}),Ej=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),Cj=(e,t)=>e.sort(Ej(t)),kj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ui(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Pj=class Bp{constructor(t=[]){this.array=t}static Range(...t){return wj(...t)}static New(t){return new Bp(t)}Where(t,n,r){return this.array=pj(this.array,t,n,r),this}Some(t,n,r){return cj(this.array,t,n,r)}All(t,n,r){return hj(this.array,t,n,r)}Reverse(){return this.array=q1(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=Tj(this.array,t,n,r),this}Distinct(){return this.array=gj(this.array),this}First(t){return t===void 0?this.array[0]:vj(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?up((n,r)=>n+r,0,this.array):up((n,r)=>n+uj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return yj(this.array,t)}GroupWith(t){return H1(this.array,t)}Except(t){return ui(this.array,n=>!B1(t,n))}Intersect(t){return ui(this.array,n=>B1(t,n))}OrderBy(t,n){let r;return r=t?U1(this.array,t):this.array.toSorted(),this.array=n==="desc"?q1(r):r,this}Includes(t){return lp(this.array,n=>Sr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return up(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(W1(this.array,n=>[t,n]))}Zip(t,n){return W1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ui(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Bp(R1(this.array))}ToObject(t){return mj(this.array,t)}Sort(t){return Array.isArray(t)?Cj(this.array,t):U1(this.array,t)}Unique(t){return kj(this.array,t)}},Y1=Pj,dp={},G1;function Aj(){return G1||(G1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const b=v.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((v,b)=>({...v,[b]:o(b,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((w,E)=>{const C=E.parse(b);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=S,u()}},f=h=>{const v=new Set,b=x=>{h().removeItem(x);const S=i(h());v.forEach(w=>w(S))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const S=h().getItem(x);return!n(S)},deleteAll:()=>{t(h(),b),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,S)=>{h().setItem(x,JSON.stringify(S)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(dp)),dp}var wa=Aj();const fp=e=>e.headerLabel??e.thead??e.id,pp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var di=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(di||{});const hp=e=>e.type==="number"?e.valueAsNumber:e.value,_j=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},Ij={},Oj=(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})},Mj=(e,t,n=Ij)=>{const r=qr()?null:wa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=ld({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:Oj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return qr()||wa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Dj=e=>{const t=Nr(e),n=T.useRef(null),r=T.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]},mp=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??di.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:Lo(),operation:l,label:fp(e),name:o,type:i,value:"",...r}},gp=()=>{const e=Ct(),t=T.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:T.useMemo(()=>({[di.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[di.Boolean]:[t.is,t.isNot],[di.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},Nj=e=>{const t=Ct(),n=gp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,mp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(m=>u===m.id);return mp(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=hp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return y.jsx(T.Fragment,{children:y.jsx(Jo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(O_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(io,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),y.jsx(io,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),y.jsx(ba,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),y.jsx("div",{className:"mt-5 flex items-center justify-center",children:y.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:y.jsx(os,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[y.jsx(qu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Fj=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=gp(),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=hp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return y.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[y.jsx(io,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),y.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),y.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:y.jsx(os,{className:"text-danger",size:14})})]})},Lj=({item:e,onPointerDown:t})=>{const n=rs(0);return y.jsxs(by,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[y.jsx("button",{type:"button",className:"cursor-grab",children:y.jsx(I_,{size:14})}),y.jsx("span",{children:e.groupName})]},e.groupId)},Vj=e=>{var l;const t=Ct(),n=pp(e.cols),r=l_(),[o,i]=T.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new Y1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(dT(m).map((v,b)=>{const x=m[v];return{...g,groupId:Lo(),groupKey:d,index:b,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return y.jsx(T.Fragment,{children:y.jsxs(Jo,{arrow:!1,title:t.tableGroupLabel,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(L_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[y.jsxs("div",{className:"flex flex-nowrap items-center",children:[y.jsx(io,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),y.jsx(Na,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:y.jsx(os,{size:16,className:"text-danger"})})]}),e.groups.length>0?y.jsxs("section",{className:"my-4",children:[y.jsx("header",{children:y.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),y.jsx(xE,{children:y.jsx(vy,{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=>y.jsx(Lj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},$j=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),jj=(e,t)=>e.toSorted($j(t)),Z1=(e,t,n)=>({label:t,id:Lo(),type:n,value:e.id}),zj=e=>{const t=Ct(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,Z1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(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 y.jsx(T.Fragment,{children:y.jsx(Jo,{title:t.tableSortDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(Sy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(io,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),y.jsx(io,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),y.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:y.jsx(os,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[y.jsx(qu,{size:14})," ",t.tableSortAddButton]})})]})})})},Rj=e=>{const t=Ct(),[n,r]=T.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");T.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=Z1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=fp(e.col);return y.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[y.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?y.jsx(w_,{size:14}):null,n==="desc"?y.jsx(x_,{size:14}):null,n==="undefined"?y.jsx(Sy,{size:14}):null]})},Bj=e=>y.jsx("header",{className:"min-w-full mb-1",children:y.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[y.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[y.jsx("span",{children:y.jsx(Nj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),y.jsx("span",{children:y.jsx(zj,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),y.jsx("span",{children:y.jsx(Vj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),y.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=>y.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[y.jsxs("span",{children:[y.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),y.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[y.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),y.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=hp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function Hj(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 Wj=e=>{const t=T.useId(),n=Ct(),r=T.useMemo(()=>Hj(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return y.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[y.jsx("p",{children:y.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?y.jsxs(T.Fragment,{children:[y.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),y.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=>y.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),y.jsx("nav",{children:y.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?y.jsx("li",{children:y.jsx(an,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:y.jsx(T.Fragment,{children:typeof i=="string"?y.jsx("li",{children:"..."}):y.jsx("li",{children:y.jsx(an,{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?y.jsx("li",{children:y.jsx(an,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},qj=e=>{const t=T.useRef(null),n=T.useRef(null),[r,o]=T.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return T.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),y.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:y.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},Uj=(e,t,n)=>{const r=n.cols,o=n.loading;return y.jsx(T.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=dd(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return T.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?y.jsx(qj,{children:y.jsx(p,{col:i,row:t,rowIndex:e})}):null,y.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),y.jsx("span",{className:"relative",children:o?of:c?y.jsx(T.Fragment,{children:y.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):y.jsx(T.Fragment,{children:je.nil(l)?"":l})}))})})},Kj={top:0,left:0,right:0,bottom:-1},Yj=e=>{var g;const t=$f(),n=Ct(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=gp(),l=o?D_:N_,c=T.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(x=>x.id!==v))},d=T.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===K1.Asc?"ascending":"descending":"none",m=fp(e.header);return y.jsxs(by,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[y.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:y.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?y.jsx(Jo,{arrow:!0,trigger:y.jsxs("span",{children:[y.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),y.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:y.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",y.jsx("span",{className:"font-medium",children:m})]}),children:y.jsxs("ul",{className:"font-medium",children:[r.length===0?null:y.jsx(T.Fragment,{children:r.map(h=>y.jsx("li",{className:"my-1",children:y.jsx(Fj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),y.jsx("li",{children:y.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(mp(e.header,s.options,s.operations))),children:[y.jsx(qu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,y.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?y.jsx(Rj,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:y.jsx(pt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:Kj,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const b=c.current.getBoundingClientRect().width,x=v.delta.x;c.current.style.width=`${Math.abs(b+x)}px`}})]})},Gj=e=>{const[t,n]=Dj(e.setCols);return y.jsx(vy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:y.jsx(nr,{children:e.headers.map((r,o)=>y.jsx(Yj,{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}`))})})},X1=T.createContext({}),Zj=()=>T.useContext(X1),Xj=T.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:y.jsx(nr,{children:n.children})})),Qj=T.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse text-left ${t??""}`})),Jj=T.forwardRef(({context:e,...t},n)=>{const r=Zj(),o={...t==null?void 0:t.style,top:je.number(r.sticky)?`${r.sticky}px`:void 0};return y.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs hidden md:table-header-group group:sticky top-0 bg-transparent",ref:n})}),ez=T.forwardRef(({context:e,item:t,...n},r)=>y.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row h-fit flex flex-wrap gap-1 flex-col justify-center md:table-row ${(n==null?void 0:n.className)??""}`})),tz=T.forwardRef((e,t)=>e.context.loadingMore?y.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:y.jsx("tr",{role:"row",className:"bg-card-background",children:y.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:y.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),nz={TableHead:Jj,Table:Qj,TableBody:Xj,TableRow:ez,TableFoot:tz},rz=[0,0,0,0,0,0,0,0,0,0],oz=e=>y.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?of:y.jsx(Ob,{})}),iz=()=>y.jsx(T.Fragment,{}),az=()=>y.jsx(T.Fragment,{}),sz=[],Q1=({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=T.useRef(null),[p,f]=T.useState(!1),m=Nr(a),g=Nr(u.loadingMore),h=T.useMemo(()=>{if(u.loading)return rz;if(c)return u.rows;const x=new Y1(u.rows);return t.length>0&&t.forEach(S=>S.value===""||Number.isNaN(S.value)?void 0:x.Where(S.name,S.operation.symbol,S.value)),r.length===0?x.Select():jj(x.Select(),r)},[u.loading,u.rows,c,t,r]);T.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,S=new IntersectionObserver(w=>{var P;return w[w.length-1].isIntersecting&&g.current?((P=m.current)==null||P.call(m),void f(!0)):f(!1)});return S.observe(x),()=>S.disconnect()},[g,m]);const v=h.length===0,b={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return y.jsxs("div",{className:"min-w-full",children:[y.jsxs("div",{className:`group w-full rounded-lg ${s?"border border-table-border":""}`,children:[y.jsx(wL,{useWindowScroll:!0,context:b,components:nz,totalCount:h.length,itemContent:v?iz:Uj,data:v?sz:h,fixedFooterContent:p?az:null,fixedHeaderContent:()=>y.jsx(Gj,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?y.jsx(oz,{loading:u.loading}):null,y.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?y.jsx(Wj,{...l}):null]})},lz=(e,t)=>typeof t=="function"?t(e):t,yl=(e,t,n)=>e===t||n==null?void 0:n(t),cz=e=>{const t=T.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=$f(),r=e.operations??n.table.operations??!0,o=T.useMemo(()=>pp(e.cols),[e.cols]),[i,a]=ld({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:lz(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),yl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),yl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),yl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),yl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return y.jsx(X1.Provider,{value:t,children:y.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?y.jsx(Bj,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?y.jsx(Q1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):y.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>y.jsx("div",{className:"min-w-full",children:y.jsx(Q1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},uz=["INPUT","SELECT"],J1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{uz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var vp,eS;function yp(){if(eS)return vp;eS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return vp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},vp}var bp,tS;function nS(){if(tS)return bp;tS=1;var e=yp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var b=v.pop(),x=b.obj[b.prop];if(n(x)){for(var S=[],w=0;w<x.length;++w)typeof x[w]<"u"&&S.push(x[w]);b.obj[b.prop]=S}}},i=function(v,b){for(var x=b&&b.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(x[S]=v[S]);return x},a=function h(v,b,x){if(!b)return v;if(typeof b!="object"&&typeof b!="function"){if(n(v))v.push(b);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,b))&&(v[b]=!0);else return[v,b];return v}if(!v||typeof v!="object")return[v].concat(b);var S=v;return n(v)&&!n(b)&&(S=i(v,x)),n(v)&&n(b)?(b.forEach(function(w,E){if(t.call(v,E)){var C=v[E];C&&typeof C=="object"&&w&&typeof w=="object"?v[E]=h(C,w,x):v.push(w)}else v[E]=w}),v):Object.keys(b).reduce(function(w,E){var C=b[E];return t.call(w,E)?w[E]=h(w[E],C,x):w[E]=C,w},S)},s=function(v,b){return Object.keys(b).reduce(function(x,S){return x[S]=b[S],x},v)},l=function(h,v,b){var x=h.replace(/\+/g," ");if(b==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,b,x,S,w){if(v.length===0)return v;var E=v;if(typeof v=="symbol"?E=Symbol.prototype.toString.call(v):typeof v!="string"&&(E=String(v)),x==="iso-8859-1")return escape(E).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",P=0;P<E.length;P+=c){for(var I=E.length>=c?E.slice(P,P+c):E,_=[],F=0;F<I.length;++F){var N=I.charCodeAt(F);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){_[_.length]=I.charAt(F);continue}if(N<128){_[_.length]=r[N];continue}if(N<2048){_[_.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){_[_.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}F+=1,N=65536+((N&1023)<<10|I.charCodeAt(F)&1023),_[_.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=_.join("")}return C},d=function(v){for(var b=[{obj:{o:v},prop:"o"}],x=[],S=0;S<b.length;++S)for(var w=b[S],E=w.obj[w.prop],C=Object.keys(E),P=0;P<C.length;++P){var I=C[P],_=E[I];typeof _=="object"&&_!==null&&x.indexOf(_)===-1&&(b.push({obj:E,prop:I}),x.push(_))}return o(b),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,b){return[].concat(v,b)},g=function(v,b){if(n(v)){for(var x=[],S=0;S<v.length;S+=1)x.push(b(v[S]));return x}return b(v)};return bp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},bp}var xp,rS;function dz(){if(rS)return xp;rS=1;var e=aT(),t=nS(),n=yp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,b,x,S,w,E,C,P,I,_,F,N,V,A,M,O,j){for(var L=h,z=j,D=0,B=!1;(z=z.get(p))!==void 0&&!B;){var X=z.get(h);if(D+=1,typeof X<"u"){if(X===D)throw new RangeError("Cyclic object value");B=!0}typeof z.get(p)>"u"&&(D=0)}if(typeof I=="function"?L=I(v,L):L instanceof Date?L=N(L):b==="comma"&&i(L)&&(L=t.maybeMap(L,function(_e){return _e instanceof Date?N(_e):_e})),L===null){if(w)return P&&!M?P(v,u.encoder,O,"key",V):v;L=""}if(d(L)||t.isBuffer(L)){if(P){var Q=M?v:P(v,u.encoder,O,"key",V);return[A(Q)+"="+A(P(L,u.encoder,O,"value",V))]}return[A(v)+"="+A(String(L))]}var J=[];if(typeof L>"u")return J;var G;if(b==="comma"&&i(L))M&&P&&(L=t.maybeMap(L,P)),G=[{value:L.length>0?L.join(",")||null:void 0}];else if(i(I))G=I;else{var Y=Object.keys(L);G=_?Y.sort(_):Y}var Z=C?String(v).replace(/\./g,"%2E"):String(v),$=x&&i(L)&&L.length===1?Z+"[]":Z;if(S&&i(L)&&L.length===0)return $+"[]";for(var R=0;R<G.length;++R){var K=G[R],ae=typeof K=="object"&&K&&typeof K.value<"u"?K.value:L[K];if(!(E&&ae===null)){var H=F&&C?String(K).replace(/\./g,"%2E"):String(K),be=i(L)?typeof b=="function"?b($,H):$:$+(F?"."+H:"["+H+"]");j.set(h,D);var Ce=e();Ce.set(p,j),s(J,g(ae,be,b,x,S,w,E,C,b==="comma"&&M&&i(L)?null:P,I,_,F,N,V,A,M,O,Ce))}}return J},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");b=h.format}var x=n.formatters[b],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var E=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:E,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:b,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return xp=function(g,h){var v=g,b=m(h),x,S;typeof b.filter=="function"?(S=b.filter,v=S("",v)):i(b.filter)&&(S=b.filter,x=S);var w=[];if(typeof v!="object"||v===null)return"";var E=o[b.arrayFormat],C=E==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var P=e(),I=0;I<x.length;++I){var _=x[I],F=v[_];b.skipNulls&&F===null||s(w,f(F,_,E,C,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,P))}var N=w.join(b.delimiter),V=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},xp}var wp,oS;function fz(){if(oS)return wp;oS=1;var e=nS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,b=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&b.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,S,w=m.charset;if(m.charsetSentinel)for(S=0;S<b.length;++S)b[S].indexOf("utf8=")===0&&(b[S]===s?w="utf-8":b[S]===a&&(w="iso-8859-1"),x=S,S=b.length);for(S=0;S<b.length;++S)if(S!==x){var E=b[S],C=E.indexOf("]="),P=C===-1?E.indexOf("="):C+1,I,_;P===-1?(I=m.decoder(E,r.decoder,w,"key"),_=m.strictNullHandling?null:""):(I=m.decoder(E.slice(0,P),r.decoder,w,"key"),_=e.maybeMap(i(E.slice(P+1),m,n(g[I])?g[I].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),_&&m.interpretNumericEntities&&w==="iso-8859-1"&&(_=o(String(_))),E.indexOf("[]=")>-1&&(_=n(_)?[_]:_);var F=t.call(g,I);F&&m.duplicates==="combine"?g[I]=e.combine(g[I],_):(!F||m.duplicates==="last")&&(g[I]=_)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var b=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var S,w=p[x];if(w==="[]"&&m.parseArrays)S=m.allowEmptyArrays&&(b===""||m.strictNullHandling&&b===null)?[]:e.combine([],b);else{S=m.plainObjects?{__proto__:null}:{};var E=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?E.replace(/%2E/g,"."):E,P=parseInt(C,10);!m.parseArrays&&C===""?S={0:b}:!isNaN(P)&&w!==C&&String(P)===C&&P>=0&&m.parseArrays&&P<=m.arrayLimit?(S=[],S[P]=b):C!=="__proto__"&&(S[C]=b)}b=S}return b},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,b=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,S=g.depth>0&&b.exec(v),w=S?v.slice(0,S.index):v,E=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;E.push(w)}for(var C=0;g.depth>0&&(S=x.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;E.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");E.push("["+v.slice(S.index)+"]")}return c(E,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return wp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),b=0;b<v.length;++b){var x=v[b],S=u(x,g[x],m,typeof p=="string");h=e.merge(h,S,m)}return m.allowSparse===!0?h:e.compact(h)},wp}var Sp,iS;function pz(){if(iS)return Sp;iS=1;var e=dz(),t=fz(),n=yp();return Sp={formats:n,parse:t,stringify:e},Sp}var hz=pz(),qe;(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})(qe||(qe={}));var aS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aS||(aS={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Tr=e=>{switch(typeof e){case"undefined":return 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=qe.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 pn 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 pn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.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()}}pn.create=e=>new pn(e);const Sa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${qe.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}"`:qe.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,qe.assertNever(e)}return{message:n}};let mz=Sa;function Tp(){return mz}const Ep=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=Tp(),r=Ep({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Sa?void 0:Sa].filter(o=>!!o)});e.common.issues.push(r)}class qt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Pe;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 Pe;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 Pe=Object.freeze({status:"aborted"}),Ta=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),sS=e=>e.status==="aborted",lS=e=>e.status==="dirty",fi=e=>e.status==="valid",bl=e=>typeof Promise<"u"&&e instanceof Promise;function xl(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 cS(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 Ea,Ca;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 uS=(e,t)=>{if(fi(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 pn(e.common.issues);return this._error=n,this._error}}};function Me(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 $e{get description(){return this._def.description}_getType(t){return Tr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Tr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qt,ctx:{common:t.parent.common,data:t.data,parsedType:Tr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(bl(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:Tr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return uS(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:Tr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return fi(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=>fi(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:Tr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(bl(o)?o:Promise.resolve(o));return uS(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code: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 Jn({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return er.create(this,this._def)}nullable(){return co.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bn.create(this)}promise(){return Aa.create(this,this._def)}or(t){return Tl.create([this,t],this._def)}and(t){return El.create(this,t,this._def)}transform(t){return new Jn({...Me(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new _l({...Me(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new hS({typeName:Ee.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Il({...Me(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ol.create(this,t)}readonly(){return Ml.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const gz=/^c[^\s-]{8,}$/i,vz=/^[0-9a-z]+$/,yz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,bz=/^[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,xz=/^[a-z0-9_-]{21}$/i,wz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Sz=/^[-+]?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)?)??$/,Tz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ez="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cp;const Cz=/^(?:(?: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])$/,kz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Pz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Az=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_z=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Iz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Oz=new RegExp(`^${dS}$`);function fS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Mz(e){return new RegExp(`^${fS(e)}$`)}function Dz(e){let t=`${dS}T${fS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Nz(e,t){return!!((t==="v4"||!t)&&Cz.test(e)||(t==="v6"||!t)&&Pz.test(e))}function Fz(e,t){if(!wz.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 Lz(e,t){return!!((t==="v4"||!t)&&kz.test(e)||(t==="v6"||!t)&&Az.test(e))}class Zn extends $e{_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:oe.invalid_type,expected:fe.string,received:i.parsedType}),Pe}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: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),ue(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?ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Tz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Cp||(Cp=new RegExp(Ez,"u")),Cp.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")xz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")gz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")vz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(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),ue(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),ue(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),ue(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),ue(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),ue(o,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Dz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Oz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Mz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Sz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Nz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Fz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Lz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?_z.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Iz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:oe.invalid_string,message:i.message}),r.dirty()):qe.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,...ye.errToObj(r)})}_addCheck(t){return new Zn({...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 Zn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Zn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Zn({...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}}Zn.create=e=>{var t;return new Zn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function Vz(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 so extends $e{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:oe.invalid_type,expected:fe.number,received:i.parsedType}),Pe}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(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),ue(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),ue(r,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Vz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(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),ue(r,{code:oe.not_finite,message:i.message}),o.dirty()):qe.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 so({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new so({...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"&&qe.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)}}so.create=e=>new so({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class pi extends $e{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: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),ue(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),ue(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),Pe}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 pi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new pi({...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}}pi.create=e=>{var t;return new pi({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class kp extends $e{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),Pe}return Zt(t.data)}}kp.create=e=>new kp({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class ka extends $e{_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:oe.invalid_type,expected:fe.date,received:i.parsedType}),Pe}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_date}),Pe}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: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),ue(o,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):qe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ka({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message: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}}ka.create=e=>new ka({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,...Me(e)});class Pp extends $e{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),Pe}return Zt(t.data)}}Pp.create=e=>new Pp({typeName:Ee.ZodSymbol,...Me(e)});class wl extends $e{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),Pe}return Zt(t.data)}}wl.create=e=>new wl({typeName:Ee.ZodUndefined,...Me(e)});class Sl extends $e{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),Pe}return Zt(t.data)}}Sl.create=e=>new Sl({typeName:Ee.ZodNull,...Me(e)});class Ap extends $e{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}Ap.create=e=>new Ap({typeName:Ee.ZodAny,...Me(e)});class hi extends $e{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}hi.create=e=>new hi({typeName:Ee.ZodUnknown,...Me(e)});class Er extends $e{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),Pe}}Er.create=e=>new Er({typeName:Ee.ZodNever,...Me(e)});class _p extends $e{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),Pe}return Zt(t.data)}}_p.create=e=>new _p({typeName:Ee.ZodVoid,...Me(e)});class Bn extends $e{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),Pe;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?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&&(ue(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&&(ue(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 Bn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Bn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Bn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Bn.create=(e,t)=>new Bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...Me(t)});function mi(e){if(e instanceof wt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=er.create(mi(r))}return new wt({...e._def,shape:()=>t})}else return e instanceof Bn?new Bn({...e._def,type:mi(e.element)}):e instanceof er?er.create(mi(e.unwrap())):e instanceof co?co.create(mi(e.unwrap())):e instanceof Qn?Qn.create(e.items.map(t=>mi(t))):e}class wt extends $e{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=qe.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:oe.invalid_type,expected:fe.object,received:c.parsedType}),Pe}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Er&&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 Er){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: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 ye.errToObj,new wt({...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 wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new wt({...this._def,catchall:t})}pick(t){const n={};return qe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}deepPartial(){return mi(this)}partial(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new wt({...this._def,shape:()=>n})}required(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof er;)i=i._def.innerType;n[r]=i}}),new wt({...this._def,shape:()=>n})}keyof(){return pS(qe.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Er.create(),typeName:Ee.ZodObject,...Me(t)}),wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Er.create(),typeName:Ee.ZodObject,...Me(t)}),wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Er.create(),typeName:Ee.ZodObject,...Me(t)});class Tl extends $e{_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 pn(s.ctx.common.issues));return ue(n,{code:oe.invalid_union,unionErrors:a}),Pe}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 pn(l));return ue(n,{code:oe.invalid_union,unionErrors:s}),Pe}}get options(){return this._def.options}}Tl.create=(e,t)=>new Tl({options:e,typeName:Ee.ZodUnion,...Me(t)});const Xn=e=>e instanceof kl?Xn(e.schema):e instanceof Jn?Xn(e.innerType()):e instanceof Pl?[e.value]:e instanceof lo?e.options:e instanceof Al?qe.objectValues(e.enum):e instanceof _l?Xn(e._def.innerType):e instanceof wl?[void 0]:e instanceof Sl?[null]:e instanceof er?[void 0,...Xn(e.unwrap())]:e instanceof co?[null,...Xn(e.unwrap())]:e instanceof hS||e instanceof Ml?Xn(e.unwrap()):e instanceof Il?Xn(e._def.innerType):[];class Ip extends $e{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),Pe;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:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Pe)}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=Xn(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 Ip({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Op(e,t){const n=Tr(e),r=Tr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=qe.objectKeys(t),i=qe.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Op(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=Op(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 El extends $e{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(sS(i)||sS(a))return Pe;const s=Op(i.value,a.value);return s.valid?((lS(i)||lS(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:oe.invalid_intersection_types}),Pe)};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}))}}El.create=(e,t,n)=>new El({left:e,right:t,typeName:Ee.ZodIntersection,...Me(n)});class Qn extends $e{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),Pe;if(r.data.length<this._def.items.length)return ue(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pe;!this._def.rest&&r.data.length>this._def.items.length&&(ue(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 Qn({...this._def,rest:t})}}Qn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qn({items:e,typeName:Ee.ZodTuple,rest:null,...Me(t)})};class Cl extends $e{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:oe.invalid_type,expected:fe.object,received:r.parsedType}),Pe;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 $e?new Cl({keyType:t,valueType:n,typeName:Ee.ZodRecord,...Me(r)}):new Cl({keyType:Zn.create(),valueType:t,typeName:Ee.ZodRecord,...Me(n)})}}class Mp extends $e{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:oe.invalid_type,expected:fe.map,received:r.parsedType}),Pe;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 Pe;(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 Pe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Mp.create=(e,t,n)=>new Mp({valueType:t,keyType:e,typeName:Ee.ZodMap,...Me(n)});class gi extends $e{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),Pe;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(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&&(ue(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 Pe;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 gi({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new gi({...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)}}gi.create=(e,t)=>new gi({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,...Me(t)});class Pa extends $e{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),Pe;function r(s,l){return Ep({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return Ep({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Aa){const s=this;return Zt(async function(...l){const c=new pn([]),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 pn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new pn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pa({...this._def,args:Qn.create(t).rest(hi.create())})}returns(t){return new Pa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pa({args:t||Qn.create([]).rest(hi.create()),returns:n||hi.create(),typeName:Ee.ZodFunction,...Me(r)})}}class kl extends $e{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})}}kl.create=(e,t)=>new kl({getter:e,typeName:Ee.ZodLazy,...Me(t)});class Pl extends $e{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),Pe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Pl.create=(e,t)=>new Pl({value:e,typeName:Ee.ZodLiteral,...Me(t)});function pS(e,t){return new lo({values:e,typeName:Ee.ZodEnum,...Me(t)})}class lo extends $e{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:qe.joinValues(r),received:n.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ea)||cS(this,Ea,new Set(this._def.values)),!xl(this,Ea).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:oe.invalid_enum_value,options:r}),Pe}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 lo.create(t,{...this._def,...n})}exclude(t,n=this._def){return lo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ea=new WeakMap,lo.create=pS;class Al extends $e{constructor(){super(...arguments),Ca.set(this,void 0)}_parse(t){const n=qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=qe.objectValues(n);return ue(r,{expected:qe.joinValues(o),received:r.parsedType,code:oe.invalid_type}),Pe}if(xl(this,Ca)||cS(this,Ca,new Set(qe.getValidEnumValues(this._def.values))),!xl(this,Ca).has(t.data)){const o=qe.objectValues(n);return ue(r,{received:r.data,code:oe.invalid_enum_value,options:o}),Pe}return Zt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,Al.create=(e,t)=>new Al({values:e,typeName:Ee.ZodNativeEnum,...Me(t)});class Aa extends $e{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:oe.invalid_type,expected:fe.promise,received:n.parsedType}),Pe;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Ee.ZodPromise,...Me(t)});class Jn extends $e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.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 Pe;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Pe:l.status==="dirty"||n.value==="dirty"?Ta(l.value):l});{if(n.value==="aborted")return Pe;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Pe:s.status==="dirty"||n.value==="dirty"?Ta(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Pe:(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"?Pe:(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(!fi(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=>fi(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);qe.assertNever(o)}}Jn.create=(e,t,n)=>new Jn({schema:e,typeName:Ee.ZodEffects,effect:t,...Me(n)}),Jn.createWithPreprocess=(e,t,n)=>new Jn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Me(n)});class er extends $e{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}er.create=(e,t)=>new er({innerType:e,typeName:Ee.ZodOptional,...Me(t)});class co extends $e{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}co.create=(e,t)=>new co({innerType:e,typeName:Ee.ZodNullable,...Me(t)});class _l extends $e{_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}}_l.create=(e,t)=>new _l({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Il extends $e{_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 bl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new pn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new pn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Il.create=(e,t)=>new Il({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Dp extends $e{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),Pe}return{status:"valid",value:t.data}}}Dp.create=e=>new Dp({typeName:Ee.ZodNaN,...Me(e)});class hS extends $e{_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 Ol extends $e{_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"?Pe:i.status==="dirty"?(n.dirty(),Ta(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Pe: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 Ol({in:t,out:n,typeName:Ee.ZodPipeline})}}class Ml extends $e{_parse(t){const n=this._def.innerType._parse(t),r=o=>(fi(o)&&(o.value=Object.freeze(o.value)),o);return bl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Ee.ZodReadonly,...Me(t)}),wt.lazycreate;var Ee;(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"})(Ee||(Ee={})),Zn.create,so.create,Dp.create,pi.create,kp.create,ka.create,Pp.create,wl.create,Sl.create,Ap.create,hi.create,Er.create,_p.create,Bn.create,wt.create,wt.strictCreate,Tl.create,Ip.create,El.create,Qn.create,Cl.create,Mp.create,gi.create,Pa.create,kl.create,Pl.create,lo.create,Al.create,Aa.create,Jn.create,er.create,co.create,Jn.createWithPreprocess,Ol.create;const $z=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},jz=(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]}}},mS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),rn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):mS(t),o=structuredClone(e);return jz(o,r,n),o},zz=(e,t)=>e.localeCompare(t),vi={},gS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return vS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=gS(e._def.innerType);return t==="ZodArray"?n??[]:n}},vS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,gS(n)])),yS=(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]=yS(i,o):n[r]=o||i)}return n},Rz={sort:zz,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},bS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return hz.parse(n.toString(),Rz)},Cr=(e,t)=>mS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),kr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Np=e=>{const t=e.dataset.target;if(!t)return kr(e);const n=document.querySelector(`[data-origin="${t}"]`);return kr(n||e)},Bz={state:{},loading:!1,useOnChange:!1},xS=e=>e.dataset.target||e.name,Hz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return $z(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},Wz=(e,t,n=Bz)=>{const[r,o]=T.useState(null),i=T.useRef({}),[a,s]=T.useState(()=>je.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??vS(e)??{}),l=T.useCallback(x=>{var _;const S=x.target,w=x.currentTarget;if(S.dataset.optional==="true")return;const C=xS(S),P=Np(S)||(w?kr(w):""),I=Cr(C,e);if(S.setAttribute("data-initialized","true"),I){const F=I.safeParse(P),N=F.success?void 0:((_=F.error.issues[0])==null?void 0:_.message)??"";o(V=>rn(V??{},C,N))}},[e]),c=T.useCallback(x=>S=>{const w=S.currentTarget,E=Object.values(i.current).reduce((P,I)=>{var A;const _=I.element,F=I.schema.safeParse(kr(_));if(_.dataset.ignore==="ignore"||F.success)return P;const N=(A=F.error.issues[0])==null?void 0:A.message;_.setAttribute("data-initialized","true");const V=_.dataset.name||_.name||"";return rn(P,V,N)},{}),C=je.empty(E)?null:E;o(C),console.error(C),x==null||x({form:w,errors:C||{}})},[]),u=(x,S=vi)=>{const w=Cr(x,e),E=C=>{var I;if(!Ku(C))return;s(_=>rn(_,x,C.toISOString())),o(_=>rn(_,x,void 0));const P=i.current[x].element;if(P){const _=P.getAttribute("data-origin"),F=document.querySelector(`input[data-target="${_}"]`);F&&F.setCustomValidity("")}(I=S==null?void 0:S.onChange)==null||I.call(S,C)};return{...S,loading:n.loading,name:x,id:x,onChange:E,form:t,date:je.string(a[x])?new Date(a[x]):a[x],required:S.required??!w.isOptional(),error:Cn(r,x),ref:C=>{C!==null&&(i.current[x]={element:C,schema:w})}}},d=(x,S=vi)=>{const w=Cr(x,e);return{...S,name:x,id:x,onChange:C=>{var I;const P=C.target.value;s(_=>rn(_,x,P)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Cn(r,x,void 0),value:Cn(a,x,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[x]={element:C,schema:w}:void 0}},p=(x,S=vi)=>{const w=Cr(x,e);return{...S,name:x,id:x,onChange:C=>{var I;const P=C.target.checked;s(_=>rn(_??{},x,P)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Cn(r,x,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[x]={element:C,schema:w}):void 0}},f=(x,S=vi)=>{const w=Cr(x,e),E=C=>{var I,_;(I=C.persist)==null||I.call(C);const P=C.target.value;(_=S==null?void 0:S.onChange)==null||_.call(S,C),s(F=>rn(F,x,P))};return{...S,loading:n.loading,name:x,id:x,onChange:E,form:t,onInvalid:l,error:Cn(r,x,void 0),required:S.required??!w.isOptional(),value:Cn(a,x,void 0)||(S==null?void 0:S.value)||"",type:je.instance(w,so)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[x]={element:C,schema:w}}},m=(x,S=vi)=>{const w=Cr(x,e);return{...S,name:x,id:x,onChangeOptions:C=>{s(P=>rn(P,x,C))},form:t,loading:n.loading,onInvalid:l,error:Cn(r,x,void 0),required:S.required??!w.isOptional(),value:Cn(a,x,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}},g=(x,S=vi)=>{const w=Cr(x,e),E=w._def.typeName==="ZodNumber";return{...S,name:x,id:x,onChange:P=>{var _,F;(_=P.persist)==null||_.call(P);const I=E?P.target.valueAsNumber:P.target.value;(F=S==null?void 0:S.onChange)==null||F.call(S,P),s(N=>rn(N,x,I))},form:t,loading:n.loading,onInvalid:l,error:Cn(r,x,void 0),required:S.required??!w.isOptional(),type:E?"number":(S==null?void 0:S.type)??"text",value:Cn(a,x,void 0)||(S==null?void 0:S.value)||"",ref:P=>P===null?void 0:void(i.current[x]={element:P,schema:w})}};T.useEffect(()=>{const x=Object.values(i.current).map(w=>{const E=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(kr(E)),P=N=>{var j;const V=xS(N.target);if(!V)return!1;const A=N.target,M=Np(N.target)||(N.relatedTarget?kr(N.relatedTarget):""),O=w.schema.safeParse(M);if(A.setAttribute("value",M),O.success)return E.setCustomValidity&&E.setCustomValidity(""),o(L=>{if(je.null(L))return null;const z=rn(L,V,void 0);return je.empty(L)||je.nil(L)||je.empty(z)?null:z}),!1;if(E.required){const L=((j=O.error.issues[0])==null?void 0:j.message)||"";E.setCustomValidity&&E.setCustomValidity(L),o(z=>{if(je.null(z))return null;const D=rn(z,V,L||void 0);return je.empty(D)?null:D})}return!1},I=new AbortController,_=E.getAttribute("data-trigger")||"blur";E.addEventListener(_,P,{signal:I.signal});const F=E.dataset.shadow?!1:E.required?!C.success:!1;return{input:w,hasInitialError:F,unsubscribe:()=>I.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const h=x=>S=>{var F;S.preventDefault();const w=S.currentTarget;let E=bS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(N=>{if(N.tagName==="SELECT"){const V=N;E=rn(E,V.name,V.value)}if(N.tagName==="INPUT"){const V=N,A=Np(V)||(V?kr(V):"");E=rn(E,V.dataset.target||V.name,A)}});const P=yS(E,a),I=e.safeParse(P),_=()=>{var N;J1(w),(N=n.interceptor)==null||N.clear()};if(I.success){const N=JSON.stringify(I.data);return w.setAttribute("data-json",N),(F=n.interceptor)==null||F.clear(),x==null?void 0:x(S,{form:w,event:S,reset:_,setErrors:o,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),w.reportValidity(),x==null?void 0:x(S,{form:w,json:E,event:S,reset:_,setErrors:o,data:E,success:!1,errors:I.error.issues.map(N=>({message:N.message,path:N.path.map(V=>String(V))}))})},v=x=>dd(a,x)||"",b=x=>({...x,id:t,name:t});return T.useEffect(()=>{var x;n.interceptor&&((x=n.interceptor)==null||x.set(a))},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:m,disabled:r!==null}},qz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Uz=e=>{const t=T.useRef(void 0);return T.useEffect(()=>{t.current=e},[e]),t.current},wS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},SS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},TS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Kz={name:"dark",zIndex:TS,rounded:wS,spacing:SS,shadow:{floating:"0 1px 1px 0 rgb(0 0 0 / 0.02)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},Yz={rounded:wS,spacing:SS,name:"light",shadow:{floating:"0 1px 1px 0 rgb(0 0 0 / 0.02)"},zIndex:TS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 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%)"}}}},Gz=Kz,Zz=Yz,Xz=e=>{const t=T.useMemo(()=>({locale:e.locale,tweaks:{...bs,...e.tweaks},parser:e.parser||gs.hsla,map:{...ys,...e.map}}),[e]);return y.jsx(Fo.Provider,{value:t,children:e.children})},Qz=()=>{const e=T.useContext(Fo);return e?e.parser:gs.hsla};te.Alert=j_,te.Autocomplete=BL,te.Button=Na,te.Calendar=Ib,te.Card=md,te.Checkbox=jf,te.ColType=di,te.Collapse=Iy,te.CommandPalette=Z2,te.ComponentsProvider=Xz,te.Context=Fo,te.DatePicker=WL,te.Dict=yn,te.Dropdown=Jo,te.Empty=Ob,te.Expand=X2,te.FileUpload=s$,te.Form=l$,te.Input=ba,te.InputFeedback=Pw,te.InputField=ya,te.Menu=eF,te.MenuItem=J2,te.Modal=lf,te.MultiSelect=m$,te.Notifications=MD,te.Polymorph=an,te.Radiobox=g$,te.RenderOnView=oE,te.Select=io,te.Slider=Q$,te.Stats=DD,te.Switch=J$,te.Tab=VD,te.Table=cz,te.Tabs=FD,te.Tag=Mc,te.TaskList=ej,te.Textarea=tj,te.Timeline=$D,te.TimelineItem=Cs,te.Toolbar=tF,te.Tooltip=uf,te.TransferList=oj,te.createColumns=_j,te.createCssProperties=CM,te.createDesignTokens=bb,te.createFormStorage=Hz,te.createOptionCols=pp,te.createStyles=SM,te.createTheme=EM,te.createTokenStyles=kM,te.css=Oe,te.defaultDarkTheme=Gz,te.defaultLightTheme=Zz,te.defaultTranslations=ys,te.defaultTweaks=bs,te.dispatchInput=rm,te.formReset=J1,te.formToJson=bS,te.getCoords=eE,te.getJsonForm=qz,te.getRemainingSize=Si,te.getSchemaShape=Cr,te.hasVerticalScroll=om,te.initializeInputDataset=wi,te.isMobile=Eb,te.isReactComponent=JT,te.isReactFC=Oc,te.isSsr=qr,te.mergeRefs=Wn,te.negate=AM,te.noop=pd,te.parsers=gs,te.path=dd,te.reduceTokens=Wr,te.safeRegex=fd,te.splitInto=Tb,te.useColorParser=Qz,te.useForm=Wz,te.useLocale=ud,te.useNotification=ID,te.usePrevious=Uz,te.useReactive=i0,te.useTablePreferences=Mj,te.useTranslations=Ct,te.uuid=Lo,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
240
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l1(e,t){if(e){if(typeof e=="string")return Jf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jf(e,t)}}function Jf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GV(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 ZV(e){if(Array.isArray(e))return e}function c1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c1(Object(n),!0).forEach(function(r){ep(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ep(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hl(e,t){if(e==null)return{};var n=XV(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 XV(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 tp=E.forwardRef(function(e,t){var n=e.children,r=hl(e,zV),o=d1(r),i=o.open,a=hl(o,RV);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(vt(vt({},a),{},{open:i})))});tp.displayName="Dropzone";var u1={disabled:!1,getFilesFromEvent:sV,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};tp.defaultProps=u1,tp.propTypes={children:at.func,accept:at.objectOf(at.arrayOf(at.string)),multiple:at.bool,preventDropOnDocument:at.bool,noClick:at.bool,noKeyboard:at.bool,noDrag:at.bool,noDragEventsBubbling:at.bool,minSize:at.number,maxSize:at.number,maxFiles:at.number,disabled:at.bool,getFilesFromEvent:at.func,onFileDialogCancel:at.func,onFileDialogOpen:at.func,useFsAccessApi:at.bool,autoFocus:at.bool,onDragEnter:at.func,onDragLeave:at.func,onDragOver:at.func,onDrop:at.func,onDropAccepted:at.func,onDropRejected:at.func,onError:at.func,validator:at.func};var np={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function d1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},u1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,P=t.onError,I=t.validator,A=E.useMemo(function(){return VV(n)},[n]),L=E.useMemo(function(){return LV(n)},[n]),N=E.useMemo(function(){return typeof h=="function"?h:f1},[h]),$=E.useMemo(function(){return typeof g=="function"?g:f1},[g]),_=E.useRef(null),M=E.useRef(null),D=E.useReducer(QV,np),V=Qf(D,2),F=V[0],H=V[1],O=F.isFocused,R=F.isFileDialogActive,X=E.useRef(typeof window<"u"&&window.isSecureContext&&v&&FV()),Q=function(){!X.current&&R&&setTimeout(function(){if(M.current){var ne=M.current.files;ne.length||(H({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[M,R,$,X]);var J=E.useRef([]),G=function(ne){_.current&&_.current.contains(ne.target)||(ne.preventDefault(),J.current=[])};E.useEffect(function(){return x&&(document.addEventListener("dragover",i1,!1),document.addEventListener("drop",G,!1)),function(){x&&(document.removeEventListener("dragover",i1),document.removeEventListener("drop",G))}},[_,x]),E.useEffect(function(){return!r&&b&&_.current&&_.current.focus(),function(){}},[_,b,r]);var Y=E.useCallback(function(q){P?P(q):console.error(q)},[P]),Z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[].concat(WV(J.current),[q.target]),pl(q)&&Promise.resolve(o(q)).then(function(ne){if(!(fl(q)&&!C)){var me=ne.length,De=me>0&&OV({files:ne,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),Ue=me>0&&!De;H({isDragAccept:De,isDragReject:Ue,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(ne){return Y(ne)})},[o,c,Y,C,A,a,i,s,l,I]),j=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=pl(q);if(ne&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return ne&&d&&d(q),!1},[d,C]),z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=J.current.filter(function(De){return _.current&&_.current.contains(De)}),me=ne.indexOf(q.target);me!==-1&&ne.splice(me,1),J.current=ne,!(ne.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),pl(q)&&u&&u(q))},[_,u,C]),K=E.useCallback(function(q,ne){var me=[],De=[];q.forEach(function(Ue){var Qe=r1(Ue,A),Lt=Qf(Qe,2),Tn=Lt[0],Hn=Lt[1],Ar=o1(Ue,a,i),_r=Qf(Ar,2),Ir=_r[0],W=_r[1],U=I?I(Ue):null;if(Tn&&Ir&&!U)me.push(Ue);else{var Be=[Hn,W];U&&(Be=Be.concat(U)),De.push({file:Ue,errors:Be.filter(function(ot){return ot})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(Ue){De.push({file:Ue,errors:[IV]})}),me.splice(0)),H({acceptedFiles:me,fileRejections:De,isDragReject:De.length>0,type:"setFiles"}),p&&p(me,De,ne),De.length>0&&m&&m(De,ne),me.length>0&&f&&f(me,ne)},[H,s,A,a,i,l,p,f,m,I]),ae=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[],pl(q)&&Promise.resolve(o(q)).then(function(ne){fl(q)&&!C||K(ne,q)}).catch(function(ne){return Y(ne)}),H({type:"reset"})},[o,K,Y,C]),B=E.useCallback(function(){if(X.current){H({type:"openDialog"}),N();var q={multiple:s,types:L};window.showOpenFilePicker(q).then(function(ne){return o(ne)}).then(function(ne){K(ne,null),H({type:"closeDialog"})}).catch(function(ne){$V(ne)?($(ne),H({type:"closeDialog"})):jV(ne)?(X.current=!1,M.current?(M.current.value=null,M.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(ne)});return}M.current&&(H({type:"openDialog"}),N(),M.current.value=null,M.current.click())},[H,N,$,v,K,Y,L,s]),be=E.useCallback(function(q){!_.current||!_.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),B())},[_,B]),Ce=E.useCallback(function(){H({type:"focus"})},[]),_e=E.useCallback(function(){H({type:"blur"})},[]),Re=E.useCallback(function(){S||(NV()?setTimeout(B,0):B())},[S,B]),le=function(ne){return r?null:ne},we=function(ne){return w?null:le(ne)},ce=function(ne){return T?null:le(ne)},Se=function(ne){C&&ne.stopPropagation()},ie=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.role,Ue=q.onKeyDown,Qe=q.onFocus,Lt=q.onBlur,Tn=q.onClick,Hn=q.onDragEnter,Ar=q.onDragOver,_r=q.onDragLeave,Ir=q.onDrop,W=hl(q,BV);return vt(vt(ep({onKeyDown:we(zn(Ue,be)),onFocus:we(zn(Qe,Ce)),onBlur:we(zn(Lt,_e)),onClick:le(zn(Tn,Re)),onDragEnter:ce(zn(Hn,Z)),onDragOver:ce(zn(Ar,j)),onDragLeave:ce(zn(_r,z)),onDrop:ce(zn(Ir,ae)),role:typeof De=="string"&&De!==""?De:"presentation"},me,_),!r&&!w?{tabIndex:0}:{}),W)}},[_,be,Ce,_e,Re,Z,j,z,ae,w,T,r]),de=E.useCallback(function(q){q.stopPropagation()},[]),ee=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.onChange,Ue=q.onClick,Qe=hl(q,HV),Lt=ep({accept:A,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:le(zn(De,ae)),onClick:le(zn(Ue,de)),tabIndex:-1},me,M);return vt(vt({},Lt),Qe)}},[M,n,s,ae,r]);return vt(vt({},F),{},{isFocused:O&&!r,getRootProps:ie,getInputProps:ee,rootRef:_,inputRef:M,open:le(B)})}function QV(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},np),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return vt({},np);default:return e}}function f1(){}const p1=E.createContext([null,()=>{}]),JV=()=>E.useContext(p1),e$=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,t$={csv:Uu,xls:Uu,mov:Cy,mp4:Cy,xlsx:Uu,pdf:Ey,txt:Ey,json:P_,mp3:S_},n$=e=>{const[,t]=JV(),[n,r]=E.useState({url:"",type:"",size:""});E.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:e$(l),size:GL(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{var c;l.preventDefault(),l.stopPropagation(),(c=e.onDeleteFile)==null||c.call(e,e.file)},a=t$[e.file.name.split(".").at(-1)]??ky,s=n.type==="img"?y.jsx("img",{src:n.url,className:"block w-full",alt:e.file.name}):y.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return y.jsxs("li",{className:"flex flex-row gap-4 justify-between items-center pb-6 w-full border-b border-card-border last:border-b-transparent",children:[y.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[y.jsx("button",{type:"button",onClick:o,className:"flex justify-center items-center size-20",children:s}),y.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[y.jsx("span",{children:e.file.name}),y.jsx("span",{className:"text-sm italic",children:n.size})]})]}),y.jsx("button",{onClick:i,type:"button",className:"p-2 transition-colors duration-300 ease-linear hover:text-danger-hover",children:y.jsx(qi,{size:16})})]})},r$=e=>y.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>y.jsx(n$,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),h1=e=>{const t=Ct(),n=e.dragging?A_:__;return y.jsxs("div",{className:"flex flex-col justify-center items-center",children:[y.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:y.jsx(n,{className:"text-primary",size:80})}),y.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[y.jsx("p",{children:t.uploadIdle}),y.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},o$=e=>e.isDragActive?y.jsx(h1,{files:e.files,dragging:!0}):e.files.length>0?y.jsx(r$,{onDeleteFile:e.onDeleteFile,files:e.files}):y.jsx(E.Fragment,{children:e.idle}),i$=y.jsx(h1,{dragging:!1}),a$=e=>{const t=e.item.file,n=e.item.type;return y.jsxs("div",{className:"flex flex-col gap-4",children:[y.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),y.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?y.jsx("img",{className:"container block w-80",src:e.item.url,alt:t.name}):n==="video"?y.jsx("video",{className:"container block w-80",src:e.item.url,controls:!0,muted:!0}):n==="audio"?y.jsx("figure",{children:y.jsx("audio",{controls:!0,src:e.item.url})}):null]})},s$=({idle:e=i$,onDeleteFile:t,onDrop:n,...r})=>{const o=Ct(),i=E.useState(null),[a,s]=E.useState([]),l=r.files??a,c=()=>i[1](null),u=m=>{n==null||n(m),s(g=>g.concat(m))},{getRootProps:d,getInputProps:p,isDragActive:f}=d1({onDrop:u});return y.jsxs(p1.Provider,{value:i,children:[y.jsx(lf,{overlayClickClose:!0,title:o.uploadDialogTitle,ariaTitle:o.uploadDialogTitle,open:i[0]!==null,onChange:c,children:i[0]?y.jsx(a$,{item:i[0]}):null}),y.jsxs("div",{...d(),"data-active":l?l.length>0:!1,className:"flex flex-col border items-center justify-center rounded-lg border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background data-[active=true]:border-transparent",children:[y.jsx("input",{...p(r),name:r.name,id:r.name}),y.jsx(o$,{onDeleteFile:t,isDragActive:f,idle:e,files:l})]})]})},l$=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return y.jsx("form",{...e,onSubmit:t})},m1=40,c$=e=>y.jsx(E.Fragment,{children:e.children}),u$={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},g1=[],d$=E.forwardRef(function(t,n){return y.jsx(pt.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:y.jsx(nr,{children:t.children})})}),f$=E.forwardRef(function({item:t,context:n,...r},o){return y.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),p$={List:d$,Item:f$},h$=e=>{const t=Ct(),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]),y.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?y.jsxs(Fa,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},m$=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},v)=>{const b=E.useMemo(()=>new yn(r.map(ee=>[ee.value,ee])),[r]),x=E.useRef(null),S=E.useRef(null),w=h.value??h.defaultValue??g1,T=Ct(),[C,P]=E.useState(0),[I,A]=E.useState(!1),[L,N]=E.useState(""),[$,_]=E.useState(()=>{const ee=new yn;return w.forEach(q=>{const ne=b.get(q);return ne?ee.set(q,ne):void 0}),ee}),M=E.useMemo(()=>Array.from($.keys()),[$]),[D,V]=E.useState(()=>{const ee=new Set(w);return r.reduce((q,ne)=>ee.has(ne.value)?[...q,ne.label??ne.value]:q,[])??w}),[F,H]=E.useState(null),O=E.useRef(g1),R=m&&L!==""?[{value:L,label:L,"data-dynamic":"true"},...r]:r,X=L.length===0?R:rf(R,"value",[{key:"value",value:L},{key:"label",value:L}]),Q=af(I,"block-only"),J=X.filter(ee=>ee.hidden!==!0),G=J.length===0,{x:Y,y:Z,strategy:j,refs:z,context:K}=vr({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:qo,middleware:[ta(4),N0({padding:10,elementContext:"reference",apply(ee){const q=ee.elements.floating.querySelector("ul"),ne=(q==null?void 0:q.getBoundingClientRect().height)||0,me=Ti(z.reference.current,window.innerHeight),De=Math.min(ne<m1?me:ne,me,ee.availableHeight),Ue=J.length===0?m1:Math.min(De,me,ne),Qe=`${x.current.getBoundingClientRect().width}px`;Object.assign(ee.elements.floating.style,{width:Qe,maxWidth:Qe,height:Ue})}})]}),ae=gx(K,u$),{getReferenceProps:B,getFloatingProps:be,getItemProps:Ce}=yr([eo(K,{role:"listbox"}),Jr(K),qs(K,{cols:0,listRef:O,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ee=>H(q=>ee??q)})]);E.useEffect(()=>{if(!I)return P(0);const ee=z.reference;if(ee.current===null)return;const q=Ti(ee.current,window.innerHeight);setTimeout(()=>P(Math.min(q,J.length*40)),100)},[L,I,z.reference]),E.useEffect(()=>{h.value&&_(new yn(h.value.map(ee=>[ee,b.get(ee)])))},[h.value,b]),E.useEffect(()=>{const ee=z.reference.current;if(ee)return Si(ee)},[]);const _e=(ee,q)=>{const ne=$.clone(Ue=>Ue.has(ee.value)?Ue.remove(ee.value):Ue.set(ee.value,ee));_(ne);const me=z.reference.current;if(!me)return;const De=ne.map(Ue=>Ue.value);me==null||me.setAttribute("data-value",JSON.stringify(De)),g&&g(De),V(Ue=>Ue.concat(ee.label??"")),N(""),H(q)},Re=ee=>{const q=ee.target.value;return N(q),!I&&q===""?A(!0):(ee.target.name=h.name||"",q?A(!0):void 0)},le=()=>{var ee;A(!0),N(""),(ee=z.reference.current)==null||ee.focus()},we=()=>{A(!0),N("")},ce=()=>{var ee;(ee=z.reference.current)==null||ee.setAttribute("data-value","[]"),N(""),A(!1),_(new yn),g==null||g([])},Se=h.id||h.name,ie=$.map((ee,q)=>y.jsx(Fa,{size:"small",icon:y.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),_e(ee,q)},children:y.jsx(qi,{size:14})}),children:ee.label??ee.value},`MultiSelect-${ee.value}-x`)),de={height:G?"0":$.size===0?C-49:C-86};return y.jsxs(ya,{...h,left:e,error:t,ref:x,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:y.jsxs("span",{className:"flex items-center gap-0.5",children:[n,y.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:le,children:[y.jsx(Hu,{size:20}),y.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),$?y.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:y.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.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:[y.jsxs("ul",{...B({...h,onFocus:we,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:z.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":M.join(","),className:Oe("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[M.length>0?null:y.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),y.jsx(h$,{label:c,children:ie})]}),y.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:v,required:f,defaultValue:h.value||M||void 0}),y.jsx(Xr,{preserveTabOrder:!0,children:I?y.jsx(ix,{lockScroll:!0,children:y.jsx(Qo,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:y.jsxs("div",{...be({ref:z.setFloating,style:{...ae.styles,top:Z??0,position:j,left:Y,height:C-(M.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[y.jsx("input",{autoFocus:!0,value:L,onChange:Re,title:h.title,placeholder:T.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:ee=>{var q,ne;if(ee.key==="ArrowDown"){let me=F+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),H(me)}if(ee.key==="ArrowUp"){let me=F-1;return me<0&&(me=J.length-1),(ne=S.current)==null||ne.scrollIntoView({index:me}),H(me)}if(ee.key==="Escape")return ee.currentTarget.blur(),A(!1);if(ee.key==="Enter"){if(F!==null&&J[F])return ee.preventDefault(),_e(J[F],F);if(J.length===1)return ee.preventDefault(),_e(J[0],0)}}}),G?y.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:y.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,G?null:y.jsx(pt.div,{initial:!1,"data-floating":"true",ref:Q,animate:{height:G?"auto":C},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return P(0);const q=z.floating.current.querySelectorAll("li").item(0),ne=(q?q.getBoundingClientRect().height:40)*J.length;return wi.flushSync(()=>P(ne+2))},children:y.jsx(Nf,{ref:S,hidden:G,data:J,components:p$,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ee,q)=>{const ne=q.Render??c$,me=$.has(q.value)||$.has(q.label??""),De=F===ee,Ue=q.label??q.value;return y.jsxs("button",{"data-value":q.value,...Ce({ref:Qe=>void(O.current[ee]=Qe),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>_e(q,ee)}),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 ${me||De?"bg-floating-hover text-floating-foreground":""}`,children:[y.jsx(jf,{onChange:pd,checked:me,"aria-checked":me,onClick:Qe=>{Qe.stopPropagation(),_e(q,ee)}}),y.jsx(ne,{...h,label:q.label,value:q.value,children:Ue})]})}})}),y.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:$.size===0?y.jsx(Fa,{theme:"muted",size:"small",children:T.autocompleteEmpty}):ie})]})})}):null})]})}),g$=({children:e,className:t="",size:n,...r})=>y.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:[y.jsx("input",{...r,type:"radio",className:Oe("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]}),io=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const v=Ct(),b=E.useRef(null),x=g.id??g.name;E.useImperativeHandle(h,()=>b.current),E.useEffect(()=>{if(b.current===null)return;const w=new AbortController,T=b.current,C=Si(b.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=b.current)==null?void 0:w.focus()};return y.jsx(ya,{info:n,left:f,error:m,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:y.jsxs("label",{htmlFor:x,children:[p,y.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[y.jsx(Hu,{size:20}),y.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})]}),children:y.jsxs("select",{...g,id:x,name:x,required:e,ref:Wn(h,b),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Oe("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:[y.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${x}-select-option-${w.value}`}))]})})});function v1(e,[t,n]){return Math.min(n,Math.max(t,e))}function li(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 y1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function b1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=y1(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():y1(e[o],null)}}}}function ao(...e){return k.useCallback(b1(...e),e)}function x1(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];const c=d=>{var v;const{scope:p,children:f,...m}=d,g=((v=p==null?void 0:p[e])==null?void 0:v[l])||s,h=k.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,v$(o,...t)]}function v$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function w1(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function y$({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=b$({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=w1(n),l=k.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function b$({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=w1(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var x$=k.createContext(void 0);function w$(e){const t=k.useContext(x$);return e||t||"ltr"}function S$(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var T$=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function E$(e){const[t,n]=k.useState(void 0);return T$(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function rp(e){const t=C$(e),n=k.forwardRef((r,o)=>{const{children:i,...a}=r,s=k.Children.toArray(i),l=s.find(P$);if(l){const c=l.props.children,u=s.map(d=>d===l?k.Children.count(c)>1?k.Children.only(null):k.isValidElement(c)?c.props.children:null:d);return y.jsx(t,{...a,ref:o,children:k.isValidElement(c)?k.cloneElement(c,void 0,u):null})}return y.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function C$(e){const t=k.forwardRef((n,r)=>{const{children:o,...i}=n;if(k.isValidElement(o)){const a=_$(o),s=A$(i,o.props);return o.type!==k.Fragment&&(s.ref=r?b1(r,a):a),k.cloneElement(o,s)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var k$=Symbol("radix.slottable");function P$(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===k$}function A$(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 _$(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var I$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ml=I$.reduce((e,t)=>{const n=rp(`Primitive.${t}`),r=k.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function O$(e){const t=e+"CollectionProvider",[n,r]=x1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:v}=g,b=E.useRef(null),x=E.useRef(new Map).current;return y.jsx(o,{scope:h,itemMap:x,collectionRef:b,children:v})};a.displayName=t;const s=e+"CollectionSlot",l=rp(s),c=E.forwardRef((g,h)=>{const{scope:v,children:b}=g,x=i(s,v),S=ao(h,x.collectionRef);return y.jsx(l,{ref:S,children:b})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=rp(u),f=E.forwardRef((g,h)=>{const{scope:v,children:b,...x}=g,S=E.useRef(null),w=ao(h,S),T=i(u,v);return E.useEffect(()=>(T.itemMap.set(S,{ref:S,...x}),()=>void T.itemMap.delete(S))),y.jsx(p,{[d]:"",ref:w,children:b})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((T,C)=>x.indexOf(T.ref.current)-x.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}var S1=["PageUp","PageDown"],T1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],E1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ci="Slider",[op,M$,D$]=O$(ci),[C1,qR]=x1(ci,[D$]),[N$,gl]=C1(ci),k1=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=k.useRef(new Set),v=k.useRef(0),x=a==="horizontal"?F$:L$,[S=[],w]=y$({prop:u,defaultProp:c,onChange:L=>{var $;($=[...h.current][v.current])==null||$.focus(),d(L)}}),T=k.useRef(S);function C(L){const N=R$(S,L);A(L,N)}function P(L){A(L,v.current)}function I(){const L=T.current[v.current];S[v.current]!==L&&p(S)}function A(L,N,{commit:$}={commit:!1}){const _=q$(i),M=U$(Math.round((L-r)/i)*i+r,_),D=v1(M,[r,o]);w((V=[])=>{const F=j$(V,D,N);if(W$(F,l*i)){v.current=F.indexOf(D);const H=String(F)!==String(V);return H&&$&&p(F),H?F:V}else return V})}return y.jsx(N$,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:v,thumbs:h.current,values:S,orientation:a,form:m,children:y.jsx(op.Provider,{scope:e.__scopeSlider,children:y.jsx(op.Slot,{scope:e.__scopeSlider,children:y.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:li(g.onPointerDown,()=>{s||(T.current=S)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:P,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,S.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:N})=>{if(!s){const M=S1.includes(L.key)||L.shiftKey&&T1.includes(L.key)?10:1,D=v.current,V=S[D],F=i*M*N;A(V+F,D,{commit:!0})}}})})})})});k1.displayName=ci;var[P1,A1]=C1(ci,{startEdge:"left",endEdge:"right",size:"width",direction:1}),F$=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=k.useState(null),f=ao(t,x=>p(x)),m=k.useRef(void 0),g=w$(o),h=g==="ltr",v=h&&!i||!h&&i;function b(x){const S=m.current||d.getBoundingClientRect(),w=[0,S.width],C=sp(w,v?[n,r]:[r,n]);return m.current=S,C(x-S.left)}return y.jsx(P1,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:y.jsx(_1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=b(x.clientX);a==null||a(S)},onSlideMove:x=>{const S=b(x.clientX);s==null||s(S)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:x=>{const w=E1[v?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:w?-1:1})}})})}),L$=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=k.useRef(null),d=ao(t,u),p=k.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),v=[0,h.height],x=sp(v,f?[r,n]:[n,r]);return p.current=h,x(g-h.top)}return y.jsx(P1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:y.jsx(_1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const v=E1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:v?-1:1})}})})}),_1=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=gl(ci,n);return y.jsx(ml.span,{...c,ref:t,onKeyDown:li(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):S1.concat(T1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:li(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:li(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:li(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),I1="SliderTrack",O1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=gl(I1,n);return y.jsx(ml.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});O1.displayName=I1;var ip="SliderRange",M1=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=gl(ip,n),i=A1(ip,n),a=k.useRef(null),s=ao(t,a),l=o.values.length,c=o.values.map(p=>N1(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return y.jsx(ml.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});M1.displayName=ip;var ap="SliderThumb",D1=k.forwardRef((e,t)=>{const n=M$(e.__scopeSlider),[r,o]=k.useState(null),i=ao(t,s=>o(s)),a=k.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return y.jsx(V$,{...e,ref:i,index:a})}),V$=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=gl(ap,n),s=A1(ap,n),[l,c]=k.useState(null),u=ao(t,b=>c(b)),d=l?a.form||!!l.closest("form"):!0,p=E$(l),f=a.values[r],m=f===void 0?0:N1(f,a.min,a.max),g=z$(r,a.values.length),h=p==null?void 0:p[s.size],v=h?B$(h,m,s.direction):0;return k.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),y.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${v}px)`},children:[y.jsx(op.ItemSlot,{scope:e.__scopeSlider,children:y.jsx(ml.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:li(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&y.jsx($$,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});D1.displayName=ap;var $$=e=>{const{value:t,...n}=e,r=k.useRef(null),o=S$(t);return k.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),y.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function j$(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function N1(e,t,n){const i=100/(n-t)*(e-t);return v1(i,[0,100])}function z$(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function R$(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function B$(e,t,n){const r=e/2,i=sp([0,50],[0,r]);return(r-i(t)*n)*n}function H$(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function W$(e,t){if(t>0){const n=H$(e);return Math.min(...n)>=t}return!0}function sp(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function q$(e){return(String(e).split(".")[1]||"").length}function U$(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var K$=k1,Y$=O1,G$=M1,Z$=D1;const X$=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));je.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(je.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),y.jsx(uf,{title:"",ref:r,as:Z$,enabled:e.tooltip,className:"block bg-input-switch size-5 cursor-grab rounded-full border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},Q$=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(Vo()),s=r||o||[];return y.jsxs(K$,{...i,defaultValue:r,value:o,className:Oe("relative flex h-5 w-full touch-none select-none items-center",n),children:[y.jsx(Y$,{className:"relative h-2 grow rounded-full bg-background",children:y.jsx(G$,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>y.jsx(X$,{tooltip:t??!1},`${a.current}-${c}`))]})},J$=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=Fr(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return y.jsxs("fieldset",{className:Oe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[y.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[y.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)}),y.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:y.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"})}),y.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:y.jsx("span",{className:"font-medium text-foreground",children:e})})]}),y.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ej=e=>{const[t,n]=i_();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:u_(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),y.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},tj=Aw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
241
+ `);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)}),nj=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},rj={Item:E.forwardRef(function(t,n){return y.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return y.jsx("ul",{...t,ref:n,className:"space-y-3"})})},oj=e=>{const t=E.useRef(null),n=nj(t);return y.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[y.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:[y.jsx("header",{className:"border-b border-card-border pb-2"}),y.jsxs("div",{className:"px-8 space-y-2",children:[y.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),y.jsx(Nf,{height:n,useWindowScroll:!0,data:e.source,components:rj,itemContent:(r,o)=>y.jsx(E.Fragment,{children:y.jsx(jf,{children:y.jsx(e.Item,{data:o})})})})]})]}),y.jsx("div",{children:y.jsx(Na,{children:y.jsx(Wu,{})})}),y.jsx("div",{})]})};var ij=Object.defineProperty,F1=Object.getOwnPropertySymbols,aj=Object.prototype.hasOwnProperty,sj=Object.prototype.propertyIsEnumerable,L1=(e,t,n)=>t in e?ij(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lj=(e,t)=>{for(var n in t||(t={}))aj.call(t,n)&&L1(e,n,t[n]);if(F1)for(var n of F1(t))sj.call(t,n)&&L1(e,n,t[n]);return e},lp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},cj=(e,t,n,r)=>yl(lp,e,t,n,r),ui=e=>typeof e=="object",Tr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ui(e)&&!ui(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=>Tr(e[r],t[r]))},uj=(e,t)=>(ui(e)||Array.isArray(e))&&t?e[t]:e,dj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,vl=e=>/[0-9.]+/.test(e),V1=e=>["string","number"].includes(typeof e),$1=e=>e==null||(e==null?void 0:e.length)===0||e==="",j1={eq:Tr,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:$1,notEmpty:e=>!$1(e),in:(e,t)=>lp(t,n=>Tr(e,n)),notIn:(e,t)=>z1(t,n=>!Tr(e,n))},fj=e=>{if(e in j1)return j1[e];throw new Error("Linq - Symbol not found")},di=(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},yl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=fj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},pj=(e,t,n,r)=>yl(di,e,t,n,r),z1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},hj=(e,t,n,r)=>yl(z1,e,t,n,r),R1=e=>{if(e===null)return null;const t=lj({},e);return Object.keys(t).forEach(n=>t[n]=ui(e[n])?R1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},B1=(e,t)=>{if(ui(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Tr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Tr(t,r))return!0}return!1},mj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},gj=e=>di(e,(t,n,r)=>ui(t)?n===r.findIndex(o=>Tr(o,t)):n===r.indexOf(t)),vj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},H1=(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())},yj=(e,t)=>H1(e,n=>n[t]),W1=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},bj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},xj=(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 vl(e)&&vl(t)?r.map(a=>Number.parseInt(a)):r},cp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&vl(e)&&vl(t)){const o=[],[i,a]=bj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return xj(e,t,r)},wj=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?cp(r,o,1):cp(r,i,Number.parseInt(o,10))}return V1(e)&&V1(t)?cp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},up=(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},q1=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},Sj=(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)},Tj=(e,t,n,r)=>yl(Sj,e,t,n,r),U1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(dj(t))},K1=(e=>(e.Asc="asc",e.Desc="desc",e))(K1||{}),Ej=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),Cj=(e,t)=>e.sort(Ej(t)),kj=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:di(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Pj=class Bp{constructor(t=[]){this.array=t}static Range(...t){return wj(...t)}static New(t){return new Bp(t)}Where(t,n,r){return this.array=pj(this.array,t,n,r),this}Some(t,n,r){return cj(this.array,t,n,r)}All(t,n,r){return hj(this.array,t,n,r)}Reverse(){return this.array=q1(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=Tj(this.array,t,n,r),this}Distinct(){return this.array=gj(this.array),this}First(t){return t===void 0?this.array[0]:vj(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?up((n,r)=>n+r,0,this.array):up((n,r)=>n+uj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return yj(this.array,t)}GroupWith(t){return H1(this.array,t)}Except(t){return di(this.array,n=>!B1(t,n))}Intersect(t){return di(this.array,n=>B1(t,n))}OrderBy(t,n){let r;return r=t?U1(this.array,t):this.array.toSorted(),this.array=n==="desc"?q1(r):r,this}Includes(t){return lp(this.array,n=>Tr(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 up(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(W1(this.array,n=>[t,n]))}Zip(t,n){return W1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:di(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Bp(R1(this.array))}ToObject(t){return mj(this.array,t)}Sort(t){return Array.isArray(t)?Cj(this.array,t):U1(this.array,t)}Unique(t){return kj(this.array,t)}},Y1=Pj,dp={},G1;function Aj(){return G1||(G1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const b=v.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((v,b)=>({...v,[b]:o(b,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=p.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((w,T)=>{const C=T.parse(b);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=S,u()}},f=h=>{const v=new Set,b=x=>{h().removeItem(x);const S=i(h());v.forEach(w=>w(S))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const S=h().getItem(x);return!n(S)},deleteAll:()=>{t(h(),b),v.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,S)=>{h().setItem(x,JSON.stringify(S)),v.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(dp)),dp}var wa=Aj();const fp=e=>e.headerLabel??e.thead??e.id,pp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var fi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(fi||{});const hp=e=>e.type==="number"?e.valueAsNumber:e.value,_j=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},Ij={},Oj=(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})},Mj=(e,t,n=Ij)=>{const r=qr()?null:wa.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=ld({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:Oj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return qr()||wa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Dj=e=>{const t=Fr(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]},mp=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??fi.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:Vo(),operation:l,label:fp(e),name:o,type:i,value:"",...r}},gp=()=>{const e=Ct(),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(()=>({[fi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[fi.Boolean]:[t.is,t.isNot],[fi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},Nj=e=>{const t=Ct(),n=gp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,mp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(m=>u===m.id);return mp(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=hp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return y.jsx(E.Fragment,{children:y.jsx(ei,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(O_,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(io,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),y.jsx(io,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),y.jsx(ba,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),y.jsx("div",{className:"mt-5 flex items-center justify-center",children:y.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:y.jsx(is,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[y.jsx(qu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Fj=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=gp(),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=hp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return y.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[y.jsx(io,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),y.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),y.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:y.jsx(is,{className:"text-danger",size:14})})]})},Lj=({item:e,onPointerDown:t})=>{const n=os(0);return y.jsxs(by,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[y.jsx("button",{type:"button",className:"cursor-grab",children:y.jsx(I_,{size:14})}),y.jsx("span",{children:e.groupName})]},e.groupId)},Vj=e=>{var l;const t=Ct(),n=pp(e.cols),r=l_(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var h;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((h=u.options.item(p))==null?void 0:h.label)||"";i(f);const m=new Y1(e.rows).GroupBy(d),g=e.cols.find(v=>v.id===d);e.setGroups(dT(m).map((v,b)=>{const x=m[v];return{...g,groupId:Vo(),groupKey:d,index:b,rows:x,groupName:v}}))},s=()=>e.setGroups([]);return y.jsx(E.Fragment,{children:y.jsxs(ei,{arrow:!1,title:t.tableGroupLabel,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(L_,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[y.jsxs("div",{className:"flex flex-nowrap items-center",children:[y.jsx(io,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),y.jsx(Na,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:y.jsx(is,{size:16,className:"text-danger"})})]}),e.groups.length>0?y.jsxs("section",{className:"my-4",children:[y.jsx("header",{children:y.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),y.jsx(xE,{children:y.jsx(vy,{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=>y.jsx(Lj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},$j=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),jj=(e,t)=>e.toSorted($j(t)),Z1=(e,t,n)=>({label:t,id:Vo(),type:n,value:e.id}),zj=e=>{const t=Ct(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,Z1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(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 y.jsx(E.Fragment,{children:y.jsx(ei,{title:t.tableSortDropdownTitle,trigger:y.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[y.jsx(Sy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:y.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>y.jsxs("li",{className:"flex flex-nowrap gap-3",children:[y.jsx(io,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),y.jsx(io,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),y.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:y.jsx(is,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),y.jsx("li",{children:y.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[y.jsx(qu,{size:14})," ",t.tableSortAddButton]})})]})})})},Rj=e=>{const t=Ct(),[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=Z1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=fp(e.col);return y.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[y.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?y.jsx(w_,{size:14}):null,n==="desc"?y.jsx(x_,{size:14}):null,n==="undefined"?y.jsx(Sy,{size:14}):null]})},Bj=e=>y.jsx("header",{className:"min-w-full mb-1",children:y.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[y.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[y.jsx("span",{children:y.jsx(Nj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),y.jsx("span",{children:y.jsx(zj,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),y.jsx("span",{children:y.jsx(Vj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),y.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=>y.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[y.jsxs("span",{children:[y.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),y.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[y.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),y.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=hp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function Hj(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 Wj=e=>{const t=E.useId(),n=Ct(),r=E.useMemo(()=>Hj(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return y.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[y.jsx("p",{children:y.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?y.jsxs(E.Fragment,{children:[y.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),y.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=>y.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),y.jsx("nav",{children:y.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?y.jsx("li",{children:y.jsx(an,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:y.jsx(E.Fragment,{children:typeof i=="string"?y.jsx("li",{children:"..."}):y.jsx("li",{children:y.jsx(an,{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?y.jsx("li",{children:y.jsx(an,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},qj=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),y.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:y.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},Uj=(e,t,n)=>{const r=n.cols,o=n.loading;return y.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=dd(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?y.jsx(qj,{children:y.jsx(p,{col:i,row:t,rowIndex:e})}):null,y.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),y.jsx("span",{className:"relative",children:o?of:c?y.jsx(E.Fragment,{children:y.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):y.jsx(E.Fragment,{children:je.nil(l)?"":l})}))})})},Kj={top:0,left:0,right:0,bottom:-1},Yj=e=>{var g;const t=$f(),n=Ct(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=gp(),l=o?D_:N_,c=E.useRef(null),u=h=>{const v=h.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(x=>x.id!==v))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const v=new AbortController;return h.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===K1.Asc?"ascending":"descending":"none",m=fp(e.header);return y.jsxs(by,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[y.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:y.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?y.jsx(ei,{arrow:!0,trigger:y.jsxs("span",{children:[y.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),y.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:y.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",y.jsx("span",{className:"font-medium",children:m})]}),children:y.jsxs("ul",{className:"font-medium",children:[r.length===0?null:y.jsx(E.Fragment,{children:r.map(h=>y.jsx("li",{className:"my-1",children:y.jsx(Fj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),y.jsx("li",{children:y.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(mp(e.header,s.options,s.operations))),children:[y.jsx(qu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,y.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?y.jsx(Rj,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:y.jsx(pt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:Kj,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(v+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,v)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const b=c.current.getBoundingClientRect().width,x=v.delta.x;c.current.style.width=`${Math.abs(b+x)}px`}})]})},Gj=e=>{const[t,n]=Dj(e.setCols);return y.jsx(vy,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:y.jsx(nr,{children:e.headers.map((r,o)=>y.jsx(Yj,{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}`))})})},X1=E.createContext({}),Zj=()=>E.useContext(X1),Xj=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:y.jsx(nr,{children:n.children})})),Qj=E.forwardRef(({context:e,className:t="",...n},r)=>y.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse text-left ${t??""}`})),Jj=E.forwardRef(({context:e,...t},n)=>{const r=Zj(),o={...t==null?void 0:t.style,top:je.number(r.sticky)?`${r.sticky}px`:void 0};return y.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-shadow-card group:sticky top-0 hidden bg-transparent md:table-header-group",ref:n})}),ez=E.forwardRef(({context:e,item:t,...n},r)=>y.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${(n==null?void 0:n.className)??""}`})),tz=E.forwardRef((e,t)=>e.context.loadingMore?y.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:y.jsx("tr",{role:"row",className:"bg-card-background",children:y.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:y.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),nz={TableHead:Jj,Table:Qj,TableBody:Xj,TableRow:ez,TableFoot:tz},rz=[0,0,0,0,0,0,0,0,0,0],oz=e=>y.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?of:y.jsx(Ob,{})}),iz=()=>y.jsx(E.Fragment,{}),az=()=>y.jsx(E.Fragment,{}),sz=[],Q1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),m=Fr(a),g=Fr(u.loadingMore),h=E.useMemo(()=>{if(u.loading)return rz;if(c)return u.rows;const x=new Y1(u.rows);return t.length>0&&t.forEach(S=>S.value===""||Number.isNaN(S.value)?void 0:x.Where(S.name,S.operation.symbol,S.value)),r.length===0?x.Select():jj(x.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,S=new IntersectionObserver(w=>{var P;return w[w.length-1].isIntersecting&&g.current?((P=m.current)==null||P.call(m),void f(!0)):f(!1)});return S.observe(x),()=>S.disconnect()},[g,m]);const v=h.length===0,b={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return y.jsxs("div",{className:"min-w-full",children:[y.jsxs("div",{className:`group w-full rounded-lg ${s?"border border-table-border":""}`,children:[y.jsx(wL,{useWindowScroll:!0,context:b,components:nz,totalCount:h.length,itemContent:v?iz:Uj,data:v?sz:h,fixedFooterContent:p?az:null,fixedHeaderContent:()=>y.jsx(Gj,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),v?y.jsx(oz,{loading:u.loading}):null,y.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?y.jsx(Wj,{...l}):null]})},lz=(e,t)=>typeof t=="function"?t(e):t,bl=(e,t,n)=>e===t||n==null?void 0:n(t),cz=e=>{const t=$f(),n=E.useMemo(()=>({sticky:e.sticky||t.table.sticky}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=E.useMemo(()=>pp(e.cols),[e.cols]),[i,a]=ld({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:lz(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),bl((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),bl((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),bl((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),bl((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return y.jsx(X1.Provider,{value:n,children:y.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?y.jsx(Bj,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?y.jsx(Q1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):y.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>y.jsx("div",{className:"min-w-full",children:y.jsx(Q1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},uz=["INPUT","SELECT"],J1=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{uz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var vp,eS;function yp(){if(eS)return vp;eS=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return vp={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},vp}var bp,tS;function nS(){if(tS)return bp;tS=1;var e=yp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],v=0;v<256;++v)h.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return h}(),o=function(v){for(;v.length>1;){var b=v.pop(),x=b.obj[b.prop];if(n(x)){for(var S=[],w=0;w<x.length;++w)typeof x[w]<"u"&&S.push(x[w]);b.obj[b.prop]=S}}},i=function(v,b){for(var x=b&&b.plainObjects?{__proto__:null}:{},S=0;S<v.length;++S)typeof v[S]<"u"&&(x[S]=v[S]);return x},a=function h(v,b,x){if(!b)return v;if(typeof b!="object"&&typeof b!="function"){if(n(v))v.push(b);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!t.call(Object.prototype,b))&&(v[b]=!0);else return[v,b];return v}if(!v||typeof v!="object")return[v].concat(b);var S=v;return n(v)&&!n(b)&&(S=i(v,x)),n(v)&&n(b)?(b.forEach(function(w,T){if(t.call(v,T)){var C=v[T];C&&typeof C=="object"&&w&&typeof w=="object"?v[T]=h(C,w,x):v.push(w)}else v[T]=w}),v):Object.keys(b).reduce(function(w,T){var C=b[T];return t.call(w,T)?w[T]=h(w[T],C,x):w[T]=C,w},S)},s=function(v,b){return Object.keys(b).reduce(function(x,S){return x[S]=b[S],x},v)},l=function(h,v,b){var x=h.replace(/\+/g," ");if(b==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},c=1024,u=function(v,b,x,S,w){if(v.length===0)return v;var T=v;if(typeof v=="symbol"?T=Symbol.prototype.toString.call(v):typeof v!="string"&&(T=String(v)),x==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",P=0;P<T.length;P+=c){for(var I=T.length>=c?T.slice(P,P+c):T,A=[],L=0;L<I.length;++L){var N=I.charCodeAt(L);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){A[A.length]=I.charAt(L);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}L+=1,N=65536+((N&1023)<<10|I.charCodeAt(L)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(v){for(var b=[{obj:{o:v},prop:"o"}],x=[],S=0;S<b.length;++S)for(var w=b[S],T=w.obj[w.prop],C=Object.keys(T),P=0;P<C.length;++P){var I=C[P],A=T[I];typeof A=="object"&&A!==null&&x.indexOf(A)===-1&&(b.push({obj:T,prop:I}),x.push(A))}return o(b),v},p=function(v){return Object.prototype.toString.call(v)==="[object RegExp]"},f=function(v){return!v||typeof v!="object"?!1:!!(v.constructor&&v.constructor.isBuffer&&v.constructor.isBuffer(v))},m=function(v,b){return[].concat(v,b)},g=function(v,b){if(n(v)){for(var x=[],S=0;S<v.length;S+=1)x.push(b(v[S]));return x}return b(v)};return bp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},bp}var xp,rS;function dz(){if(rS)return xp;rS=1;var e=aT(),t=nS(),n=yp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,v,b,x,S,w,T,C,P,I,A,L,N,$,_,M,D,V){for(var F=h,H=V,O=0,R=!1;(H=H.get(p))!==void 0&&!R;){var X=H.get(h);if(O+=1,typeof X<"u"){if(X===O)throw new RangeError("Cyclic object value");R=!0}typeof H.get(p)>"u"&&(O=0)}if(typeof I=="function"?F=I(v,F):F instanceof Date?F=N(F):b==="comma"&&i(F)&&(F=t.maybeMap(F,function(_e){return _e instanceof Date?N(_e):_e})),F===null){if(w)return P&&!M?P(v,u.encoder,D,"key",$):v;F=""}if(d(F)||t.isBuffer(F)){if(P){var Q=M?v:P(v,u.encoder,D,"key",$);return[_(Q)+"="+_(P(F,u.encoder,D,"value",$))]}return[_(v)+"="+_(String(F))]}var J=[];if(typeof F>"u")return J;var G;if(b==="comma"&&i(F))M&&P&&(F=t.maybeMap(F,P)),G=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(I))G=I;else{var Y=Object.keys(F);G=A?Y.sort(A):Y}var Z=C?String(v).replace(/\./g,"%2E"):String(v),j=x&&i(F)&&F.length===1?Z+"[]":Z;if(S&&i(F)&&F.length===0)return j+"[]";for(var z=0;z<G.length;++z){var K=G[z],ae=typeof K=="object"&&K&&typeof K.value<"u"?K.value:F[K];if(!(T&&ae===null)){var B=L&&C?String(K).replace(/\./g,"%2E"):String(K),be=i(F)?typeof b=="function"?b(j,B):j:j+(L?"."+B:"["+B+"]");V.set(h,O);var Ce=e();Ce.set(p,V),s(J,g(ae,be,b,x,S,w,T,C,b==="comma"&&M&&i(F)?null:P,I,A,L,N,$,_,M,D,Ce))}}return J},m=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");b=h.format}var x=n.formatters[b],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:b,formatter:x,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return xp=function(g,h){var v=g,b=m(h),x,S;typeof b.filter=="function"?(S=b.filter,v=S("",v)):i(b.filter)&&(S=b.filter,x=S);var w=[];if(typeof v!="object"||v===null)return"";var T=o[b.arrayFormat],C=T==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var P=e(),I=0;I<x.length;++I){var A=x[I],L=v[A];b.skipNulls&&L===null||s(w,f(L,A,T,C,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,P))}var N=w.join(b.delimiter),$=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},xp}var wp,oS;function fz(){if(oS)return wp;oS=1;var e=nS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=m.parameterLimit===1/0?void 0:m.parameterLimit,b=h.split(m.delimiter,m.throwOnLimitExceeded?v+1:v);if(m.throwOnLimitExceeded&&b.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var x=-1,S,w=m.charset;if(m.charsetSentinel)for(S=0;S<b.length;++S)b[S].indexOf("utf8=")===0&&(b[S]===s?w="utf-8":b[S]===a&&(w="iso-8859-1"),x=S,S=b.length);for(S=0;S<b.length;++S)if(S!==x){var T=b[S],C=T.indexOf("]="),P=C===-1?T.indexOf("="):C+1,I,A;P===-1?(I=m.decoder(T,r.decoder,w,"key"),A=m.strictNullHandling?null:""):(I=m.decoder(T.slice(0,P),r.decoder,w,"key"),A=e.maybeMap(i(T.slice(P+1),m,n(g[I])?g[I].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),A&&m.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),T.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var L=t.call(g,I);L&&m.duplicates==="combine"?g[I]=e.combine(g[I],A):(!L||m.duplicates==="last")&&(g[I]=A)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var v=p.slice(0,-1).join("");h=Array.isArray(f)&&f[v]?f[v].length:0}for(var b=g?f:i(f,m,h),x=p.length-1;x>=0;--x){var S,w=p[x];if(w==="[]"&&m.parseArrays)S=m.allowEmptyArrays&&(b===""||m.strictNullHandling&&b===null)?[]:e.combine([],b);else{S=m.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?T.replace(/%2E/g,"."):T,P=parseInt(C,10);!m.parseArrays&&C===""?S={0:b}:!isNaN(P)&&w!==C&&String(P)===C&&P>=0&&m.parseArrays&&P<=m.arrayLimit?(S=[],S[P]=b):C!=="__proto__"&&(S[C]=b)}b=S}return b},u=function(f,m,g,h){if(f){var v=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,b=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,S=g.depth>0&&b.exec(v),w=S?v.slice(0,S.index):v,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=x.exec(v))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+v.slice(S.index)+"]")}return c(T,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return wp=function(p,f){var m=d(f);if(p===""||p===null||typeof p>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,m):p,h=m.plainObjects?{__proto__:null}:{},v=Object.keys(g),b=0;b<v.length;++b){var x=v[b],S=u(x,g[x],m,typeof p=="string");h=e.merge(h,S,m)}return m.allowSparse===!0?h:e.compact(h)},wp}var Sp,iS;function pz(){if(iS)return Sp;iS=1;var e=dz(),t=fz(),n=yp();return Sp={formats:n,parse:t,stringify:e},Sp}var hz=pz(),qe;(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})(qe||(qe={}));var aS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aS||(aS={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Er=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=qe.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 pn 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 pn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.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()}}pn.create=e=>new pn(e);const Sa=(e,t)=>{let n;switch(e.code){case oe.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case oe.invalid_union:n="Invalid input";break;case oe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case oe.invalid_enum_value:n=`Invalid enum value. Expected ${qe.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}"`:qe.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,qe.assertNever(e)}return{message:n}};let mz=Sa;function Tp(){return mz}const Ep=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=Tp(),r=Ep({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Sa?void 0:Sa].filter(o=>!!o)});e.common.issues.push(r)}class qt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Pe;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 Pe;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 Pe=Object.freeze({status:"aborted"}),Ta=e=>({status:"dirty",value:e}),Zt=e=>({status:"valid",value:e}),sS=e=>e.status==="aborted",lS=e=>e.status==="dirty",pi=e=>e.status==="valid",xl=e=>typeof Promise<"u"&&e instanceof Promise;function wl(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 cS(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 Ea,Ca;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 uS=(e,t)=>{if(pi(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 pn(e.common.issues);return this._error=n,this._error}}};function Me(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 $e{get description(){return this._def.description}_getType(t){return Er(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Er(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:Er(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(xl(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:Er(t)},i=this._parseSync({data:t,path:o.path,parent:o});return uS(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:Er(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return pi(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=>pi(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:Er(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(xl(o)?o:Promise.resolve(o));return uS(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code: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 Jn({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return er.create(this,this._def)}nullable(){return co.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bn.create(this)}promise(){return Aa.create(this,this._def)}or(t){return El.create([this,t],this._def)}and(t){return Cl.create(this,t,this._def)}transform(t){return new Jn({...Me(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Il({...Me(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new hS({typeName:Ee.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ol({...Me(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ml.create(this,t)}readonly(){return Dl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const gz=/^c[^\s-]{8,}$/i,vz=/^[0-9a-z]+$/,yz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,bz=/^[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,xz=/^[a-z0-9_-]{21}$/i,wz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Sz=/^[-+]?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)?)??$/,Tz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ez="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cp;const Cz=/^(?:(?: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])$/,kz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Pz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Az=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_z=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Iz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Oz=new RegExp(`^${dS}$`);function fS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Mz(e){return new RegExp(`^${fS(e)}$`)}function Dz(e){let t=`${dS}T${fS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Nz(e,t){return!!((t==="v4"||!t)&&Cz.test(e)||(t==="v6"||!t)&&Pz.test(e))}function Fz(e,t){if(!wz.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 Lz(e,t){return!!((t==="v4"||!t)&&kz.test(e)||(t==="v6"||!t)&&Az.test(e))}class Zn extends $e{_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:oe.invalid_type,expected:fe.string,received:i.parsedType}),Pe}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: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),ue(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?ue(o,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ue(o,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Tz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"email",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Cp||(Cp=new RegExp(Ez,"u")),Cp.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"emoji",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"uuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")xz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"nanoid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")gz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")vz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cuid2",code:oe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")yz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(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),ue(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),ue(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),ue(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),ue(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),ue(o,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Dz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Oz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Mz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Sz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Nz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"ip",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Fz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"jwt",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Lz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"cidr",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?_z.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Iz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64url",code:oe.invalid_string,message:i.message}),r.dirty()):qe.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,...ye.errToObj(r)})}_addCheck(t){return new Zn({...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 Zn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Zn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Zn({...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}}Zn.create=e=>{var t;return new Zn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function Vz(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 so extends $e{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:oe.invalid_type,expected:fe.number,received:i.parsedType}),Pe}let r;const o=new qt;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(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),ue(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),ue(r,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Vz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(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),ue(r,{code:oe.not_finite,message:i.message}),o.dirty()):qe.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 so({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new so({...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"&&qe.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)}}so.create=e=>new so({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class hi extends $e{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: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),ue(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),ue(r,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.bigint,received:n.parsedType}),Pe}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 hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ye.toString(o)}]})}_addCheck(t){return new hi({...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}}hi.create=e=>{var t;return new hi({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class kp extends $e{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.boolean,received:r.parsedType}),Pe}return Zt(t.data)}}kp.create=e=>new kp({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class ka extends $e{_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:oe.invalid_type,expected:fe.date,received:i.parsedType}),Pe}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:oe.invalid_date}),Pe}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: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),ue(o,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):qe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ka({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message: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}}ka.create=e=>new ka({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,...Me(e)});class Pp extends $e{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.symbol,received:r.parsedType}),Pe}return Zt(t.data)}}Pp.create=e=>new Pp({typeName:Ee.ZodSymbol,...Me(e)});class Sl extends $e{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.undefined,received:r.parsedType}),Pe}return Zt(t.data)}}Sl.create=e=>new Sl({typeName:Ee.ZodUndefined,...Me(e)});class Tl extends $e{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.null,received:r.parsedType}),Pe}return Zt(t.data)}}Tl.create=e=>new Tl({typeName:Ee.ZodNull,...Me(e)});class Ap extends $e{constructor(){super(...arguments),this._any=!0}_parse(t){return Zt(t.data)}}Ap.create=e=>new Ap({typeName:Ee.ZodAny,...Me(e)});class mi extends $e{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zt(t.data)}}mi.create=e=>new mi({typeName:Ee.ZodUnknown,...Me(e)});class Cr extends $e{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),Pe}}Cr.create=e=>new Cr({typeName:Ee.ZodNever,...Me(e)});class _p extends $e{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.void,received:r.parsedType}),Pe}return Zt(t.data)}}_p.create=e=>new _p({typeName:Ee.ZodVoid,...Me(e)});class Bn extends $e{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ue(n,{code:oe.invalid_type,expected:fe.array,received:n.parsedType}),Pe;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?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&&(ue(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&&(ue(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 Bn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Bn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Bn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Bn.create=(e,t)=>new Bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,...Me(t)});function gi(e){if(e instanceof wt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=er.create(gi(r))}return new wt({...e._def,shape:()=>t})}else return e instanceof Bn?new Bn({...e._def,type:gi(e.element)}):e instanceof er?er.create(gi(e.unwrap())):e instanceof co?co.create(gi(e.unwrap())):e instanceof Qn?Qn.create(e.items.map(t=>gi(t))):e}class wt extends $e{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=qe.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:oe.invalid_type,expected:fe.object,received:c.parsedType}),Pe}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Cr&&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 Cr){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: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 ye.errToObj,new wt({...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 wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(t){return new wt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new wt({...this._def,catchall:t})}pick(t){const n={};return qe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new wt({...this._def,shape:()=>n})}deepPartial(){return gi(this)}partial(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new wt({...this._def,shape:()=>n})}required(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof er;)i=i._def.innerType;n[r]=i}}),new wt({...this._def,shape:()=>n})}keyof(){return pS(qe.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Cr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Cr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Cr.create(),typeName:Ee.ZodObject,...Me(t)});class El extends $e{_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 pn(s.ctx.common.issues));return ue(n,{code:oe.invalid_union,unionErrors:a}),Pe}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 pn(l));return ue(n,{code:oe.invalid_union,unionErrors:s}),Pe}}get options(){return this._def.options}}El.create=(e,t)=>new El({options:e,typeName:Ee.ZodUnion,...Me(t)});const Xn=e=>e instanceof Pl?Xn(e.schema):e instanceof Jn?Xn(e.innerType()):e instanceof Al?[e.value]:e instanceof lo?e.options:e instanceof _l?qe.objectValues(e.enum):e instanceof Il?Xn(e._def.innerType):e instanceof Sl?[void 0]:e instanceof Tl?[null]:e instanceof er?[void 0,...Xn(e.unwrap())]:e instanceof co?[null,...Xn(e.unwrap())]:e instanceof hS||e instanceof Dl?Xn(e.unwrap()):e instanceof Ol?Xn(e._def.innerType):[];class Ip extends $e{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ue(n,{code:oe.invalid_type,expected:fe.object,received:n.parsedType}),Pe;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:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Pe)}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=Xn(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 Ip({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Op(e,t){const n=Er(e),r=Er(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=qe.objectKeys(t),i=qe.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Op(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=Op(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 Cl extends $e{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(sS(i)||sS(a))return Pe;const s=Op(i.value,a.value);return s.valid?((lS(i)||lS(a))&&n.dirty(),{status:n.value,value:s.data}):(ue(r,{code:oe.invalid_intersection_types}),Pe)};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}))}}Cl.create=(e,t,n)=>new Cl({left:e,right:t,typeName:Ee.ZodIntersection,...Me(n)});class Qn extends $e{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ue(r,{code:oe.invalid_type,expected:fe.array,received:r.parsedType}),Pe;if(r.data.length<this._def.items.length)return ue(r,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pe;!this._def.rest&&r.data.length>this._def.items.length&&(ue(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 Qn({...this._def,rest:t})}}Qn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qn({items:e,typeName:Ee.ZodTuple,rest:null,...Me(t)})};class kl extends $e{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:oe.invalid_type,expected:fe.object,received:r.parsedType}),Pe;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 $e?new kl({keyType:t,valueType:n,typeName:Ee.ZodRecord,...Me(r)}):new kl({keyType:Zn.create(),valueType:t,typeName:Ee.ZodRecord,...Me(n)})}}class Mp extends $e{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:oe.invalid_type,expected:fe.map,received:r.parsedType}),Pe;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 Pe;(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 Pe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}Mp.create=(e,t,n)=>new Mp({valueType:t,keyType:e,typeName:Ee.ZodMap,...Me(n)});class vi extends $e{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ue(r,{code:oe.invalid_type,expected:fe.set,received:r.parsedType}),Pe;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ue(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&&(ue(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 Pe;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 vi({...this._def,minSize:{value:t,message:ye.toString(n)}})}max(t,n){return new vi({...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)}}vi.create=(e,t)=>new vi({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,...Me(t)});class Pa extends $e{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ue(n,{code:oe.invalid_type,expected:fe.function,received:n.parsedType}),Pe;function r(s,l){return Ep({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function o(s,l){return Ep({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tp(),Sa].filter(c=>!!c),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Aa){const s=this;return Zt(async function(...l){const c=new pn([]),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 pn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new pn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Pa({...this._def,args:Qn.create(t).rest(mi.create())})}returns(t){return new Pa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Pa({args:t||Qn.create([]).rest(mi.create()),returns:n||mi.create(),typeName:Ee.ZodFunction,...Me(r)})}}class Pl extends $e{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})}}Pl.create=(e,t)=>new Pl({getter:e,typeName:Ee.ZodLazy,...Me(t)});class Al extends $e{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:oe.invalid_literal,expected:this._def.value}),Pe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Al.create=(e,t)=>new Al({value:e,typeName:Ee.ZodLiteral,...Me(t)});function pS(e,t){return new lo({values:e,typeName:Ee.ZodEnum,...Me(t)})}class lo extends $e{constructor(){super(...arguments),Ea.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:qe.joinValues(r),received:n.parsedType,code:oe.invalid_type}),Pe}if(wl(this,Ea)||cS(this,Ea,new Set(this._def.values)),!wl(this,Ea).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:oe.invalid_enum_value,options:r}),Pe}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 lo.create(t,{...this._def,...n})}exclude(t,n=this._def){return lo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ea=new WeakMap,lo.create=pS;class _l extends $e{constructor(){super(...arguments),Ca.set(this,void 0)}_parse(t){const n=qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=qe.objectValues(n);return ue(r,{expected:qe.joinValues(o),received:r.parsedType,code:oe.invalid_type}),Pe}if(wl(this,Ca)||cS(this,Ca,new Set(qe.getValidEnumValues(this._def.values))),!wl(this,Ca).has(t.data)){const o=qe.objectValues(n);return ue(r,{received:r.data,code:oe.invalid_enum_value,options:o}),Pe}return Zt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,_l.create=(e,t)=>new _l({values:e,typeName:Ee.ZodNativeEnum,...Me(t)});class Aa extends $e{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:oe.invalid_type,expected:fe.promise,received:n.parsedType}),Pe;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Ee.ZodPromise,...Me(t)});class Jn extends $e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.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 Pe;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Pe:l.status==="dirty"||n.value==="dirty"?Ta(l.value):l});{if(n.value==="aborted")return Pe;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Pe:s.status==="dirty"||n.value==="dirty"?Ta(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Pe:(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"?Pe:(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(!pi(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=>pi(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);qe.assertNever(o)}}Jn.create=(e,t,n)=>new Jn({schema:e,typeName:Ee.ZodEffects,effect:t,...Me(n)}),Jn.createWithPreprocess=(e,t,n)=>new Jn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Me(n)});class er extends $e{_parse(t){return this._getType(t)===fe.undefined?Zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}er.create=(e,t)=>new er({innerType:e,typeName:Ee.ZodOptional,...Me(t)});class co extends $e{_parse(t){return this._getType(t)===fe.null?Zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}co.create=(e,t)=>new co({innerType:e,typeName:Ee.ZodNullable,...Me(t)});class Il extends $e{_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}}Il.create=(e,t)=>new Il({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Ol extends $e{_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 xl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new pn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new pn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ol.create=(e,t)=>new Ol({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Dp extends $e{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:oe.invalid_type,expected:fe.nan,received:r.parsedType}),Pe}return{status:"valid",value:t.data}}}Dp.create=e=>new Dp({typeName:Ee.ZodNaN,...Me(e)});class hS extends $e{_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 Ml extends $e{_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"?Pe:i.status==="dirty"?(n.dirty(),Ta(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Pe: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 Ml({in:t,out:n,typeName:Ee.ZodPipeline})}}class Dl extends $e{_parse(t){const n=this._def.innerType._parse(t),r=o=>(pi(o)&&(o.value=Object.freeze(o.value)),o);return xl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Dl.create=(e,t)=>new Dl({innerType:e,typeName:Ee.ZodReadonly,...Me(t)}),wt.lazycreate;var Ee;(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"})(Ee||(Ee={})),Zn.create,so.create,Dp.create,hi.create,kp.create,ka.create,Pp.create,Sl.create,Tl.create,Ap.create,mi.create,Cr.create,_p.create,Bn.create,wt.create,wt.strictCreate,El.create,Ip.create,Cl.create,Qn.create,kl.create,Mp.create,vi.create,Pa.create,Pl.create,Al.create,lo.create,_l.create,Aa.create,Jn.create,er.create,co.create,Jn.createWithPreprocess,Ml.create;const $z=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},jz=(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]}}},mS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),rn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):mS(t),o=structuredClone(e);return jz(o,r,n),o},zz=(e,t)=>e.localeCompare(t),yi={},gS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return vS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=gS(e._def.innerType);return t==="ZodArray"?n??[]:n}},vS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,gS(n)])),yS=(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]=yS(i,o):n[r]=o||i)}return n},Rz={sort:zz,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},bS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return hz.parse(n.toString(),Rz)},kr=(e,t)=>mS(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),Pr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Np=e=>{const t=e.dataset.target;if(!t)return Pr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Pr(n||e)},Bz={state:{},loading:!1,useOnChange:!1},xS=e=>e.dataset.target||e.name,Hz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return $z(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},Wz=(e,t,n=Bz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>je.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??vS(e)??{}),l=E.useCallback(x=>{var A;const S=x.target,w=x.currentTarget;if(S.dataset.optional==="true")return;const C=xS(S),P=Np(S)||(w?Pr(w):""),I=kr(C,e);if(S.setAttribute("data-initialized","true"),I){const L=I.safeParse(P),N=L.success?void 0:((A=L.error.issues[0])==null?void 0:A.message)??"";o($=>rn($??{},C,N))}},[e]),c=E.useCallback(x=>S=>{const w=S.currentTarget,T=Object.values(i.current).reduce((P,I)=>{var _;const A=I.element,L=I.schema.safeParse(Pr(A));if(A.dataset.ignore==="ignore"||L.success)return P;const N=(_=L.error.issues[0])==null?void 0:_.message;A.setAttribute("data-initialized","true");const $=A.dataset.name||A.name||"";return rn(P,$,N)},{}),C=je.empty(T)?null:T;o(C),console.error(C),x==null||x({form:w,errors:C||{}})},[]),u=(x,S=yi)=>{const w=kr(x,e),T=C=>{var I;if(!Ku(C))return;s(A=>rn(A,x,C.toISOString())),o(A=>rn(A,x,void 0));const P=i.current[x].element;if(P){const A=P.getAttribute("data-origin"),L=document.querySelector(`input[data-target="${A}"]`);L&&L.setCustomValidity("")}(I=S==null?void 0:S.onChange)==null||I.call(S,C)};return{...S,loading:n.loading,name:x,id:x,onChange:T,form:t,date:je.string(a[x])?new Date(a[x]):a[x],required:S.required??!w.isOptional(),error:Cn(r,x),ref:C=>{C!==null&&(i.current[x]={element:C,schema:w})}}},d=(x,S=yi)=>{const w=kr(x,e);return{...S,name:x,id:x,onChange:C=>{var I;const P=C.target.value;s(A=>rn(A,x,P)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Cn(r,x,void 0),value:Cn(a,x,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[x]={element:C,schema:w}:void 0}},p=(x,S=yi)=>{const w=kr(x,e);return{...S,name:x,id:x,onChange:C=>{var I;const P=C.target.checked;s(A=>rn(A??{},x,P)),(I=S==null?void 0:S.onChange)==null||I.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Cn(r,x,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[x]={element:C,schema:w}):void 0}},f=(x,S=yi)=>{const w=kr(x,e),T=C=>{var I,A;(I=C.persist)==null||I.call(C);const P=C.target.value;(A=S==null?void 0:S.onChange)==null||A.call(S,C),s(L=>rn(L,x,P))};return{...S,loading:n.loading,name:x,id:x,onChange:T,form:t,onInvalid:l,error:Cn(r,x,void 0),required:S.required??!w.isOptional(),value:Cn(a,x,void 0)||(S==null?void 0:S.value)||"",type:je.instance(w,so)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[x]={element:C,schema:w}}},m=(x,S=yi)=>{const w=kr(x,e);return{...S,name:x,id:x,onChangeOptions:C=>{s(P=>rn(P,x,C))},form:t,loading:n.loading,onInvalid:l,error:Cn(r,x,void 0),required:S.required??!w.isOptional(),value:Cn(a,x,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:w})}},g=(x,S=yi)=>{const w=kr(x,e),T=w._def.typeName==="ZodNumber";return{...S,name:x,id:x,onChange:P=>{var A,L;(A=P.persist)==null||A.call(P);const I=T?P.target.valueAsNumber:P.target.value;(L=S==null?void 0:S.onChange)==null||L.call(S,P),s(N=>rn(N,x,I))},form:t,loading:n.loading,onInvalid:l,error:Cn(r,x,void 0),required:S.required??!w.isOptional(),type:T?"number":(S==null?void 0:S.type)??"text",value:Cn(a,x,void 0)||(S==null?void 0:S.value)||"",ref:P=>P===null?void 0:void(i.current[x]={element:P,schema:w})}};E.useEffect(()=>{const x=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(Pr(T)),P=N=>{var V;const $=xS(N.target);if(!$)return!1;const _=N.target,M=Np(N.target)||(N.relatedTarget?Pr(N.relatedTarget):""),D=w.schema.safeParse(M);if(_.setAttribute("value",M),D.success)return T.setCustomValidity&&T.setCustomValidity(""),o(F=>{if(je.null(F))return null;const H=rn(F,$,void 0);return je.empty(F)||je.nil(F)||je.empty(H)?null:H}),!1;if(T.required){const F=((V=D.error.issues[0])==null?void 0:V.message)||"";T.setCustomValidity&&T.setCustomValidity(F),o(H=>{if(je.null(H))return null;const O=rn(H,$,F||void 0);return je.empty(O)?null:O})}return!1},I=new AbortController,A=T.getAttribute("data-trigger")||"blur";T.addEventListener(A,P,{signal:I.signal});const L=T.dataset.shadow?!1:T.required?!C.success:!1;return{input:w,hasInitialError:L,unsubscribe:()=>I.abort()}});return x.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>x.forEach(w=>w.unsubscribe())});const h=x=>S=>{var L;S.preventDefault();const w=S.currentTarget;let T=bS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(N=>{if(N.tagName==="SELECT"){const $=N;T=rn(T,$.name,$.value)}if(N.tagName==="INPUT"){const $=N,_=Np($)||($?Pr($):"");T=rn(T,$.dataset.target||$.name,_)}});const P=yS(T,a),I=e.safeParse(P),A=()=>{var N;J1(w),(N=n.interceptor)==null||N.clear()};if(I.success){const N=JSON.stringify(I.data);return w.setAttribute("data-json",N),(L=n.interceptor)==null||L.clear(),x==null?void 0:x(S,{form:w,event:S,reset:A,setErrors:o,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),w.reportValidity(),x==null?void 0:x(S,{form:w,json:T,event:S,reset:A,setErrors:o,data:T,success:!1,errors:I.error.issues.map(N=>({message:N.message,path:N.path.map($=>String($))}))})},v=x=>dd(a,x)||"",b=x=>({...x,id:t,name:t});return E.useEffect(()=>{var x;n.interceptor&&((x=n.interceptor)==null||x.set(a))},[a]),{get:v,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:m,disabled:r!==null}},qz=e=>e?JSON.parse(e.getAttribute("data-json")):{},Uz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},wS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},SS={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},TS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},Kz={name:"dark",zIndex:TS,rounded:wS,spacing:SS,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},Yz={rounded:wS,spacing:SS,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},zIndex:TS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},Gz=Kz,Zz=Yz,Xz=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...xs,...e.tweaks},parser:e.parser||vs.hsla,map:{...bs,...e.map}}),[e]);return y.jsx(Lo.Provider,{value:t,children:e.children})},Qz=()=>{const e=E.useContext(Lo);return e?e.parser:vs.hsla};te.Alert=j_,te.Autocomplete=BL,te.Button=Na,te.Calendar=Ib,te.Card=md,te.Checkbox=jf,te.ColType=fi,te.Collapse=Iy,te.CommandPalette=Z2,te.ComponentsProvider=Xz,te.Context=Lo,te.DatePicker=WL,te.Dict=yn,te.Dropdown=ei,te.Empty=Ob,te.Expand=X2,te.FileUpload=s$,te.Form=l$,te.Input=ba,te.InputFeedback=Pw,te.InputField=ya,te.Menu=eF,te.MenuItem=J2,te.Modal=lf,te.MultiSelect=m$,te.Notifications=MD,te.Polymorph=an,te.Radiobox=g$,te.RenderOnView=oE,te.Select=io,te.Slider=Q$,te.Stats=DD,te.Switch=J$,te.Tab=VD,te.Table=cz,te.Tabs=FD,te.Tag=Fa,te.TaskList=ej,te.Textarea=tj,te.Timeline=$D,te.TimelineItem=ks,te.Toolbar=tF,te.Tooltip=uf,te.TransferList=oj,te.createColumns=_j,te.createCssProperties=CM,te.createDesignTokens=bb,te.createFormStorage=Hz,te.createOptionCols=pp,te.createStyles=SM,te.createTheme=EM,te.createTokenStyles=kM,te.css=Oe,te.defaultDarkTheme=Gz,te.defaultLightTheme=Zz,te.defaultTranslations=bs,te.defaultTweaks=xs,te.dispatchInput=rm,te.formReset=J1,te.formToJson=bS,te.getCoords=eE,te.getJsonForm=qz,te.getRemainingSize=Ti,te.getSchemaShape=kr,te.hasVerticalScroll=om,te.initializeInputDataset=Si,te.isMobile=Eb,te.isReactComponent=JT,te.isReactFC=Mc,te.isSsr=qr,te.mergeRefs=Wn,te.negate=AM,te.noop=pd,te.parsers=vs,te.path=dd,te.reduceTokens=sr,te.safeRegex=fd,te.splitInto=Tb,te.useColorParser=Qz,te.useForm=Wz,te.useLocale=ud,te.useNotification=ID,te.usePrevious=Uz,te.useReactive=i0,te.useTablePreferences=Mj,te.useTranslations=Ct,te.uuid=Vo,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
242
242
  //# sourceMappingURL=index.umd.js.map