@g4rcez/components 1.3.2 → 2.0.0

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 (43) hide show
  1. package/dist/components/core/button.js +2 -2
  2. package/dist/components/display/notifications.js +4 -4
  3. package/dist/components/display/skeleton.d.ts.map +1 -1
  4. package/dist/components/display/skeleton.js +1 -1
  5. package/dist/components/display/tabs.js +1 -1
  6. package/dist/components/floating/command-palette.js +1 -1
  7. package/dist/components/floating/menu.js +2 -2
  8. package/dist/components/floating/modal.js +1 -1
  9. package/dist/components/form/autocomplete.d.ts.map +1 -1
  10. package/dist/components/form/autocomplete.js +1 -1
  11. package/dist/components/form/checkbox.js +1 -1
  12. package/dist/components/form/free-text.d.ts.map +1 -1
  13. package/dist/components/form/free-text.js +3 -2
  14. package/dist/components/form/input-field.js +2 -2
  15. package/dist/components/form/multi-select.d.ts.map +1 -1
  16. package/dist/components/form/multi-select.js +2 -2
  17. package/dist/components/form/select.js +1 -1
  18. package/dist/components/form/slider.js +1 -1
  19. package/dist/components/form/switch.js +1 -1
  20. package/dist/components/table/index.js +1 -1
  21. package/dist/components/table/metadata.js +1 -1
  22. package/dist/components/table/thead.js +1 -1
  23. package/dist/flow/flow.js +1 -1
  24. package/dist/hooks/use-input-id.d.ts +4 -0
  25. package/dist/hooks/use-input-id.d.ts.map +1 -0
  26. package/dist/hooks/use-input-id.js +5 -0
  27. package/dist/index.css +3581 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +4249 -4249
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/index.umd.js +14 -14
  32. package/dist/index.umd.js.map +1 -1
  33. package/dist/preset/plugin.tailwind.d.ts +6 -0
  34. package/dist/preset/plugin.tailwind.d.ts.map +1 -0
  35. package/dist/preset/plugin.tailwind.js +20 -0
  36. package/dist/preset/preset.tailwind.d.ts +2 -5
  37. package/dist/preset/preset.tailwind.d.ts.map +1 -1
  38. package/dist/preset/preset.tailwind.js +2 -21
  39. package/dist/preset/src/styles/common.d.ts +1 -1
  40. package/dist/preset/src/styles/common.js +1 -1
  41. package/dist/styles/common.d.ts +1 -1
  42. package/dist/styles/common.js +1 -1
  43. package/package.json +3 -2
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(ee,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(ee=typeof globalThis<"u"?globalThis:ee||self,E(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,E,v,wi){"use strict";var dB=Object.defineProperty;var fB=(ee,E,v)=>E in ee?dB(ee,E,{enumerable:!0,configurable:!0,writable:!0,value:v}):ee[E]=v;var pe=(ee,E,v)=>fB(ee,typeof E!="symbol"?E+"":E,v);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 P=Hp(E),_a=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 NS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Ml,Zp;function po(){return Zp||(Zp=1,Ml=TypeError),Ml}const FS=NS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Dl,Xp;function Oa(){if(Xp)return Dl;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,y=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,_=Array.prototype.slice,A=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,I=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function F(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||T.call(/e/,U))return U;var Re=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var rt=W<0?-A(-W):A(W);if(rt!==W){var ft=String(rt),Fe=x.call(U,ft.length+1);return b.call(ft,Re,"$&_")+"."+b.call(b.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(U,Re,"$&_")}var H=FS,O=H.custom,B=Ce(O)?O:null,X={__proto__:null,double:'"',single:"'"},Q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Dl=function W(U,Re,rt,ft){var Fe=Re||{};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 Nr=le(Fe,"customInspect")?Fe.customInspect:!0;if(typeof Nr!="boolean"&&Nr!=="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 ln=String(U);return uo?F(U,ln):ln}if(typeof U=="bigint"){var Fr=String(U)+"n";return uo?F(U,Fr):Fr}var Fp=typeof Fe.depth>"u"?5:Fe.depth;if(typeof rt>"u"&&(rt=0),rt>=Fp&&Fp>0&&typeof U=="object")return Z(U)?"[Array]":"[Object]";var bi=Or(Fe,rt);if(typeof ft>"u")ft=[];else if(Se(ft,U)>=0)return"[Circular]";function An(xi,Ol,uB){if(Ol&&(ft=_.call(ft),ft.push(Ol)),uB){var DS={depth:Fe.depth};return le(Fe,"quoteStyle")&&(DS.quoteStyle=Fe.quoteStyle),W(xi,DS,rt+1,ft)}return W(xi,Fe,rt+1,ft)}if(typeof U=="function"&&!z(U)){var kS=ce(U),AS=Dr(U,An);return"[Function"+(kS?": "+kS:" (anonymous)")+"]"+(AS.length>0?" { "+k.call(AS,", ")+" }":"")}if(Ce(U)){var PS=I?b.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(U);return typeof U=="object"&&!I?Qe(PS):PS}if(me(U)){for(var Ia="<"+w.call(String(U.nodeName)),Lp=U.attributes||[],_l=0;_l<Lp.length;_l++)Ia+=" "+Lp[_l].name+"="+J(G(Lp[_l].value),"double",Fe);return Ia+=">",U.childNodes&&U.childNodes.length&&(Ia+="..."),Ia+="</"+w.call(String(U.nodeName))+">",Ia}if(Z(U)){if(U.length===0)return"[]";var Vp=Dr(U,An);return bi&&!Wn(Vp)?"["+Mr(Vp,bi)+"]":"[ "+k.call(Vp,", ")+" ]"}if(K(U)){var $p=Dr(U,An);return!("cause"in Error.prototype)&&"cause"in U&&!D.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+An(U.cause),$p),", ")+" }":$p.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call($p,", ")+" }"}if(typeof U=="object"&&Nr){if(B&&typeof U[B]=="function"&&H)return H(U,{depth:Fp-rt});if(Nr!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(ie(U)){var IS=[];return r&&r.call(U,function(xi,Ol){IS.push(An(Ol,U,!0)+" => "+An(xi,U))}),kn("Map",n.call(U),IS,bi)}if(q(U)){var _S=[];return s&&s.call(U,function(xi){_S.push(An(xi,U))}),kn("Set",a.call(U),_S,bi)}if(de(U))return jt("WeakMap");if(ne(U))return jt("WeakSet");if(te(U))return jt("WeakRef");if(R(U))return Qe(An(Number(U)));if(_e(U))return Qe(An(L.call(U)));if(be(U))return Qe(m.call(U));if(ae(U))return Qe(An(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=Dr(U,An),OS=V?V(U)===Object.prototype:U instanceof Object||U.constructor===Object,zp=U instanceof Object?"":"null prototype",MS=!OS&&M&&Object(U)===U&&M in U?x.call(we(U),8,-1):zp?"Object":"",cB=OS||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",Bp=cB+(MS||zp?"["+k.call(C.call([],MS||[],zp||[]),": ")+"] ":"");return jp.length===0?Bp+"{}":bi?Bp+"{"+Mr(jp,bi)+"}":Bp+"{ "+k.call(jp,", ")+" }"}return String(U)};function J(W,U,Re){var rt=Re.quoteStyle||U,ft=X[rt];return ft+W+ft}function G(W){return b.call(String(W),/"/g,"&quot;")}function Y(W){return!M||!(typeof W=="object"&&(M in W||typeof W[M]<"u"))}function Z(W){return we(W)==="[object Array]"&&Y(W)}function j(W){return we(W)==="[object Date]"&&Y(W)}function z(W){return we(W)==="[object RegExp]"&&Y(W)}function K(W){return we(W)==="[object Error]"&&Y(W)}function ae(W){return we(W)==="[object String]"&&Y(W)}function R(W){return we(W)==="[object Number]"&&Y(W)}function be(W){return we(W)==="[object Boolean]"&&Y(W)}function Ce(W){if(I)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function _e(W){if(!W||typeof W!="object"||!L)return!1;try{return L.call(W),!0}catch{}return!1}var Be=Object.prototype.hasOwnProperty||function(W){return W in this};function le(W,U){return Be.call(W,U)}function we(W){return g.call(W)}function ce(W){if(W.name)return W.name;var U=y.call(h.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function Se(W,U){if(W.indexOf)return W.indexOf(U);for(var Re=0,rt=W.length;Re<rt;Re++)if(W[Re]===U)return Re;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 te(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function ne(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function 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 Re=W.length-U.maxStringLength,rt="... "+Re+" more character"+(Re>1?"s":"");return De(x.call(W,0,U.maxStringLength),U)+rt}var ft=Q[U.quoteStyle||"single"];ft.lastIndex=0;var Fe=b.call(b.call(W,ft,"\\$1"),/[\x00-\x1f]/g,Ue);return J(Fe,"single",U)}function Ue(W){var U=W.charCodeAt(0),Re={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Re?"\\"+Re:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Qe(W){return"Object("+W+")"}function jt(W){return W+" { ? }"}function kn(W,U,Re,rt){var ft=rt?Mr(Re,rt):k.call(Re,", ");return W+" ("+U+") {"+ft+"}"}function Wn(W){for(var U=0;U<W.length;U++)if(Se(W[U],`
1
+ (function(ee,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],E):(ee=typeof globalThis<"u"?globalThis:ee||self,E(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,E,v,wi){"use strict";var fB=Object.defineProperty;var pB=(ee,E,v)=>E in ee?fB(ee,E,{enumerable:!0,configurable:!0,writable:!0,value:v}):ee[E]=v;var pe=(ee,E,v)=>pB(ee,typeof E!="symbol"?E+"":E,v);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 P=Hp(E),_a=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 NS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Ml,Zp;function po(){return Zp||(Zp=1,Ml=TypeError),Ml}const FS=NS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Dl,Xp;function Oa(){if(Xp)return Dl;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,y=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,_=Array.prototype.slice,A=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,I=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function F(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||T.call(/e/,U))return U;var Re=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var rt=W<0?-A(-W):A(W);if(rt!==W){var ft=String(rt),Fe=x.call(U,ft.length+1);return b.call(ft,Re,"$&_")+"."+b.call(b.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(U,Re,"$&_")}var H=FS,O=H.custom,B=Ce(O)?O:null,X={__proto__:null,double:'"',single:"'"},Q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Dl=function W(U,Re,rt,ft){var Fe=Re||{};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 Nr=le(Fe,"customInspect")?Fe.customInspect:!0;if(typeof Nr!="boolean"&&Nr!=="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 ln=String(U);return uo?F(U,ln):ln}if(typeof U=="bigint"){var Fr=String(U)+"n";return uo?F(U,Fr):Fr}var Fp=typeof Fe.depth>"u"?5:Fe.depth;if(typeof rt>"u"&&(rt=0),rt>=Fp&&Fp>0&&typeof U=="object")return Z(U)?"[Array]":"[Object]";var bi=Or(Fe,rt);if(typeof ft>"u")ft=[];else if(Se(ft,U)>=0)return"[Circular]";function An(xi,Ol,dB){if(Ol&&(ft=_.call(ft),ft.push(Ol)),dB){var DS={depth:Fe.depth};return le(Fe,"quoteStyle")&&(DS.quoteStyle=Fe.quoteStyle),W(xi,DS,rt+1,ft)}return W(xi,Fe,rt+1,ft)}if(typeof U=="function"&&!z(U)){var kS=ce(U),AS=Dr(U,An);return"[Function"+(kS?": "+kS:" (anonymous)")+"]"+(AS.length>0?" { "+k.call(AS,", ")+" }":"")}if(Ce(U)){var PS=I?b.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(U);return typeof U=="object"&&!I?Qe(PS):PS}if(me(U)){for(var Ia="<"+w.call(String(U.nodeName)),Lp=U.attributes||[],_l=0;_l<Lp.length;_l++)Ia+=" "+Lp[_l].name+"="+J(G(Lp[_l].value),"double",Fe);return Ia+=">",U.childNodes&&U.childNodes.length&&(Ia+="..."),Ia+="</"+w.call(String(U.nodeName))+">",Ia}if(Z(U)){if(U.length===0)return"[]";var Vp=Dr(U,An);return bi&&!Wn(Vp)?"["+Mr(Vp,bi)+"]":"[ "+k.call(Vp,", ")+" ]"}if(K(U)){var $p=Dr(U,An);return!("cause"in Error.prototype)&&"cause"in U&&!D.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+An(U.cause),$p),", ")+" }":$p.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call($p,", ")+" }"}if(typeof U=="object"&&Nr){if(B&&typeof U[B]=="function"&&H)return H(U,{depth:Fp-rt});if(Nr!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(ie(U)){var IS=[];return r&&r.call(U,function(xi,Ol){IS.push(An(Ol,U,!0)+" => "+An(xi,U))}),kn("Map",n.call(U),IS,bi)}if(q(U)){var _S=[];return s&&s.call(U,function(xi){_S.push(An(xi,U))}),kn("Set",a.call(U),_S,bi)}if(de(U))return jt("WeakMap");if(ne(U))return jt("WeakSet");if(te(U))return jt("WeakRef");if(R(U))return Qe(An(Number(U)));if(_e(U))return Qe(An(L.call(U)));if(be(U))return Qe(m.call(U));if(ae(U))return Qe(An(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=Dr(U,An),OS=V?V(U)===Object.prototype:U instanceof Object||U.constructor===Object,zp=U instanceof Object?"":"null prototype",MS=!OS&&M&&Object(U)===U&&M in U?x.call(we(U),8,-1):zp?"Object":"",uB=OS||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",Bp=uB+(MS||zp?"["+k.call(C.call([],MS||[],zp||[]),": ")+"] ":"");return jp.length===0?Bp+"{}":bi?Bp+"{"+Mr(jp,bi)+"}":Bp+"{ "+k.call(jp,", ")+" }"}return String(U)};function J(W,U,Re){var rt=Re.quoteStyle||U,ft=X[rt];return ft+W+ft}function G(W){return b.call(String(W),/"/g,"&quot;")}function Y(W){return!M||!(typeof W=="object"&&(M in W||typeof W[M]<"u"))}function Z(W){return we(W)==="[object Array]"&&Y(W)}function j(W){return we(W)==="[object Date]"&&Y(W)}function z(W){return we(W)==="[object RegExp]"&&Y(W)}function K(W){return we(W)==="[object Error]"&&Y(W)}function ae(W){return we(W)==="[object String]"&&Y(W)}function R(W){return we(W)==="[object Number]"&&Y(W)}function be(W){return we(W)==="[object Boolean]"&&Y(W)}function Ce(W){if(I)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function _e(W){if(!W||typeof W!="object"||!L)return!1;try{return L.call(W),!0}catch{}return!1}var Be=Object.prototype.hasOwnProperty||function(W){return W in this};function le(W,U){return Be.call(W,U)}function we(W){return g.call(W)}function ce(W){if(W.name)return W.name;var U=y.call(h.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function Se(W,U){if(W.indexOf)return W.indexOf(U);for(var Re=0,rt=W.length;Re<rt;Re++)if(W[Re]===U)return Re;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 te(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function ne(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function 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 Re=W.length-U.maxStringLength,rt="... "+Re+" more character"+(Re>1?"s":"");return De(x.call(W,0,U.maxStringLength),U)+rt}var ft=Q[U.quoteStyle||"single"];ft.lastIndex=0;var Fe=b.call(b.call(W,ft,"\\$1"),/[\x00-\x1f]/g,Ue);return J(Fe,"single",U)}function Ue(W){var U=W.charCodeAt(0),Re={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return Re?"\\"+Re:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Qe(W){return"Object("+W+")"}function jt(W){return W+" { ? }"}function kn(W,U,Re,rt){var ft=rt?Mr(Re,rt):k.call(Re,", ");return W+" ("+U+") {"+ft+"}"}function Wn(W){for(var U=0;U<W.length;U++)if(Se(W[U],`
2
2
  `)>=0)return!1;return!0}function Or(W,U){var Re;if(W.indent===" ")Re=" ";else if(typeof W.indent=="number"&&W.indent>0)Re=k.call(Array(W.indent+1)," ");else return null;return{base:Re,prev:k.call(Array(U+1),Re)}}function Mr(W,U){if(W.length===0)return"";var Re=`
3
3
  `+U.prev+U.base;return Re+k.call(W,","+Re)+`
4
- `+U.prev}function Dr(W,U){var Re=Z(W),rt=[];if(Re){rt.length=W.length;for(var ft=0;ft<W.length;ft++)rt[ft]=le(W,ft)?U(W[ft],W):""}var Fe=typeof N=="function"?N(W):[],Nr;if(I){Nr={};for(var uo=0;uo<Fe.length;uo++)Nr["$"+Fe[uo]]=Fe[uo]}for(var ln in W)le(W,ln)&&(Re&&String(Number(ln))===ln&&ln<W.length||I&&Nr["$"+ln]instanceof Symbol||(T.call(/[^\w$]/,ln)?rt.push(U(ln,W)+": "+U(W[ln],W)):rt.push(ln+": "+U(W[ln],W))));if(typeof N=="function")for(var Fr=0;Fr<Fe.length;Fr++)D.call(W,Fe[Fr])&&rt.push("["+U(Fe[Fr])+"]: "+U(W[Fe[Fr]],W));return rt}return Dl}var Nl,Qp;function LS(){if(Qp)return Nl;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 Nl=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},Nl}var Fl,Jp;function eh(){return Jp||(Jp=1,Fl=Object),Fl}var Ll,th;function VS(){return th||(th=1,Ll=Error),Ll}var Vl,nh;function $S(){return nh||(nh=1,Vl=EvalError),Vl}var $l,rh;function jS(){return rh||(rh=1,$l=RangeError),$l}var jl,oh;function zS(){return oh||(oh=1,jl=ReferenceError),jl}var zl,ih;function BS(){return ih||(ih=1,zl=SyntaxError),zl}var Bl,ah;function RS(){return ah||(ah=1,Bl=URIError),Bl}var Rl,sh;function HS(){return sh||(sh=1,Rl=Math.abs),Rl}var Hl,lh;function WS(){return lh||(lh=1,Hl=Math.floor),Hl}var Wl,ch;function qS(){return ch||(ch=1,Wl=Math.max),Wl}var ql,uh;function US(){return uh||(uh=1,ql=Math.min),ql}var Ul,dh;function KS(){return dh||(dh=1,Ul=Math.pow),Ul}var Kl,fh;function YS(){return fh||(fh=1,Kl=Math.round),Kl}var Yl,ph;function GS(){return ph||(ph=1,Yl=Number.isNaN||function(t){return t!==t}),Yl}var Gl,hh;function ZS(){if(hh)return Gl;hh=1;var e=GS();return Gl=function(n){return e(n)||n===0?n:n<0?-1:1},Gl}var Zl,mh;function XS(){return mh||(mh=1,Zl=Object.getOwnPropertyDescriptor),Zl}var Xl,gh;function vh(){if(gh)return Xl;gh=1;var e=XS();if(e)try{e([],"length")}catch{e=null}return Xl=e,Xl}var Ql,yh;function QS(){if(yh)return Ql;yh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Ql=e,Ql}var Jl,bh;function JS(){return bh||(bh=1,Jl=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}),Jl}var ec,xh;function eT(){if(xh)return ec;xh=1;var e=typeof Symbol<"u"&&Symbol,t=JS();return ec=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},ec}var tc,wh;function Sh(){return wh||(wh=1,tc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),tc}var nc,Th;function Eh(){if(Th)return nc;Th=1;var e=eh();return nc=e.getPrototypeOf||null,nc}var rc,Ch;function tT(){if(Ch)return rc;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 rc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},rc}var oc,kh;function Ma(){if(kh)return oc;kh=1;var e=tT();return oc=Function.prototype.bind||e,oc}var ic,Ah;function ac(){return Ah||(Ah=1,ic=Function.prototype.call),ic}var sc,Ph;function Ih(){return Ph||(Ph=1,sc=Function.prototype.apply),sc}var lc,_h;function nT(){return _h||(_h=1,lc=typeof Reflect<"u"&&Reflect&&Reflect.apply),lc}var cc,Oh;function rT(){if(Oh)return cc;Oh=1;var e=Ma(),t=Ih(),n=ac(),r=nT();return cc=r||e.call(n,t),cc}var uc,Mh;function Dh(){if(Mh)return uc;Mh=1;var e=Ma(),t=po(),n=ac(),r=rT();return uc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},uc}var dc,Nh;function oT(){if(Nh)return dc;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 dc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,dc}var fc,Fh;function iT(){if(Fh)return fc;Fh=1;var e=Sh(),t=Eh(),n=oT();return fc=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,fc}var pc,Lh;function aT(){if(Lh)return pc;Lh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ma();return pc=n.call(e,t),pc}var hc,Vh;function mc(){if(Vh)return hc;Vh=1;var e,t=eh(),n=VS(),r=$S(),o=jS(),i=zS(),a=BS(),s=po(),l=RS(),c=HS(),u=WS(),d=qS(),p=US(),f=KS(),m=YS(),g=ZS(),h=Function,y=function(z){try{return h('"use strict"; return ('+z+").constructor;")()}catch{}},x=vh(),b=QS(),S=function(){throw new s},w=x?function(){try{return arguments.callee,S}catch{try{return x(arguments,"callee").get}catch{return S}}}():S,T=eT()(),C=iT(),k=Eh(),_=Sh(),A=Ih(),L=ac(),N={},$=typeof Uint8Array>"u"||!C?e:C(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&C?C(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":$,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":A,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":_};if(C)try{null.error}catch(z){var M=C(C(z));I["%Error.prototype%"]=M}var D=function z(K){var ae;if(K==="%AsyncFunction%")ae=y("async function () {}");else if(K==="%GeneratorFunction%")ae=y("function* () {}");else if(K==="%AsyncGeneratorFunction%")ae=y("async function* () {}");else if(K==="%AsyncGenerator%"){var R=z("%AsyncGeneratorFunction%");R&&(ae=R.prototype)}else if(K==="%AsyncIteratorPrototype%"){var be=z("%AsyncGenerator%");be&&C&&(ae=C(be.prototype))}return I[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=aT(),O=F.call(L,Array.prototype.concat),B=F.call(A,Array.prototype.splice),X=F.call(L,String.prototype.replace),Q=F.call(L,String.prototype.slice),J=F.call(L,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,Z=function(K){var ae=Q(K,0,1),R=Q(K,-1);if(ae==="%"&&R!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(R==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return X(K,G,function(Ce,_e,Be,le){be[be.length]=Be?X(le,Y,"$1"):_e||Ce}),be},j=function(K,ae){var R=K,be;if(H(V,R)&&(be=V[R],R="%"+be[0]+"%"),H(I,R)){var Ce=I[R];if(Ce===N&&(Ce=D(R)),typeof Ce>"u"&&!ae)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:be,name:R,value:Ce}}throw new a("intrinsic "+K+" does not exist!")};return hc=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 R=Z(K),be=R.length>0?R[0]:"",Ce=j("%"+be+"%",ae),_e=Ce.name,Be=Ce.value,le=!1,we=Ce.alias;we&&(be=we[0],B(R,O([0,1],we)));for(var ce=1,Se=!0;ce<R.length;ce+=1){var ie=R[ce],de=Q(ie,0,1),te=Q(ie,-1);if((de==='"'||de==="'"||de==="`"||te==='"'||te==="'"||te==="`")&&de!==te)throw new a("property names with quotes must have matching quotes");if((ie==="constructor"||!Se)&&(le=!0),be+="."+ie,_e="%"+be+"%",H(I,_e))Be=I[_e];else if(Be!=null){if(!(ie in Be)){if(!ae)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(x&&ce+1>=R.length){var q=x(Be,ie);Se=!!q,Se&&"get"in q&&!("originalValue"in q.get)?Be=q.get:Be=Be[ie]}else Se=H(Be,ie),Be=Be[ie];Se&&!le&&(I[_e]=Be)}}return Be},hc}var gc,$h;function jh(){if($h)return gc;$h=1;var e=mc(),t=Dh(),n=t([e("%String.prototype.indexOf%")]);return gc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},gc}var vc,zh;function Bh(){if(zh)return vc;zh=1;var e=mc(),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 vc=!!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},vc}var yc,Rh;function sT(){if(Rh)return yc;Rh=1;var e=mc(),t=jh(),n=Oa(),r=Bh(),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 yc=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,yc}var bc,Hh;function lT(){if(Hh)return bc;Hh=1;var e=po(),t=Oa(),n=LS(),r=Bh(),o=sT(),i=o||r||n;return bc=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},bc}var Wh=e=>Array.isArray(e),xc=e=>e===void 0,wc=e=>e===null,cT=Function.bind.call(Function.call,Object.prototype.toString),uT=e=>!!e&&cT(e)==="[object Error]"||e instanceof Error,qh=(e,t)=>e instanceof t,dT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},fT=e=>Object.prototype.toString.call(e)==="[object Date]"&&qh(e,Date),Le={array:Wh,date:fT,empty:e=>wc(e)||xc(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:uT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>wc(e)||xc(e),null:wc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wh(e)&&typeof e=="object",primitive:dT,string:e=>typeof e=="string",undefined:xc},pT=e=>Object.keys(e),Pn=(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},hT=e=>e.replace(/[^0-9]/g,"");const Sc="-",mT=e=>{const t=vT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Sc);return s[0]===""&&s.length!==1&&s.shift(),Uh(s,t)||gT(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(Sc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Kh=/^\[(.+)\]$/,gT=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}},vT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Tc(n[o],r,o,t);return r},Tc=(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(yT(o)){Tc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Tc(a,Yh(t,i),n,r)})})},Yh=(e,t)=>{let n=e;return t.split(Sc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yT=e=>e.isThemeGetter,bT=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)}}},Ec="!",Cc=":",xT=Cc.length,wT=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===Cc){i.push(o.slice(l,m)),l=m+xT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=ST(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Cc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},ST=e=>e.endsWith(Ec)?e.substring(0,e.length-1):e.startsWith(Ec)?e.substring(1):e,TT=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}},ET=e=>({cache:bT(e.cacheSize),parseClassName:wT(e),sortModifiers:TT(e),...mT(e)}),CT=/\s+/,kT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(CT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,y=r(h?m.substring(0,g):m);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=r(m),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const x=i(p).join(":"),b=f?x+Ec:x,S=b+y;if(a.includes(S))continue;a.push(S);const w=o(y,h);for(let T=0;T<w.length;++T){const C=w[T];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function AT(){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 PT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=ET(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=kT(l,n);return o(l,u),u}return function(){return i(AT.apply(null,arguments))}}const Dt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IT=/^\d+\/\d+$/,_T=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OT=/\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$/,MT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,DT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>IT.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),Lr=e=>!!e&&Number.isInteger(Number(e)),Qh=e=>e.endsWith("%")&&ze(e.slice(0,-1)),nr=e=>_T.test(e),FT=()=>!0,LT=e=>OT.test(e)&&!MT.test(e),kc=()=>!1,VT=e=>DT.test(e),$T=e=>NT.test(e),jT=e=>!ge(e)&&!ve(e),zT=e=>mo(e,tm,kc),ge=e=>Zh.test(e),Vr=e=>mo(e,nm,LT),Ac=e=>mo(e,XT,ze),BT=e=>mo(e,Jh,kc),RT=e=>mo(e,em,$T),HT=e=>mo(e,kc,VT),ve=e=>Xh.test(e),Da=e=>go(e,nm),WT=e=>go(e,QT),qT=e=>go(e,Jh),UT=e=>go(e,tm),KT=e=>go(e,em),YT=e=>go(e,JT,!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",GT=new Set(["image","url"]),em=e=>GT.has(e),ZT=new Set(["length","size","percentage"]),tm=e=>ZT.has(e),nm=e=>e==="length",XT=e=>e==="number",QT=e=>e==="family-name",JT=e=>e==="shadow",eE=PT(()=>{const e=Dt("color"),t=Dt("font"),n=Dt("text"),r=Dt("font-weight"),o=Dt("tracking"),i=Dt("leading"),a=Dt("breakpoint"),s=Dt("container"),l=Dt("spacing"),c=Dt("radius"),u=Dt("shadow"),d=Dt("inset-shadow"),p=Dt("drop-shadow"),f=Dt("blur"),m=Dt("perspective"),g=Dt("aspect"),h=Dt("ease"),y=Dt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],T=()=>[ve,ge,l],C=()=>[ho,"full","auto",...T()],k=()=>[Lr,"none","subgrid",ve,ge],_=()=>["auto",{span:["full",Lr,ve,ge]},ve,ge],A=()=>[Lr,"auto",ve,ge],L=()=>["auto","min","max","fr",ve,ge],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],I=()=>["auto",...T()],M=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],D=()=>[e,ve,ge],V=()=>[Qh,Vr],F=()=>["","none","full",c,ve,ge],H=()=>["",ze,Da,Vr],O=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["","none",f,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:[nr],breakpoint:[nr],color:[FT],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[jT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nr],shadow:[nr],spacing:["px",ze],text:[nr],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":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...b(),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:[Lr,"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:[Lr,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen",...M()]}],"min-h":[{"min-h":["screen","none",...M()]}],"max-h":[{"max-h":["screen",...M()]}],"font-size":[{text:["base",n,Da,Vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ve,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qh,ge]}],"font-family":[{font:[WT,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,Ac]}],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,Vr]}],"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:[...b(),qT,BT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",UT,zT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Lr,ve,ge],radial:["",ve,ge],conic:[Lr,ve,ge]},KT,RT]}],"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,Vr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,YT,HT]}],"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,Vr]}],"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":[...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":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",y,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,Vr,Ac]}],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","*","**"]}}),qn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},tE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Pc=e=>Le.function(e),ke=(...e)=>eE(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)},nE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},rE="span",cn=E.forwardRef(function(t,n){const r=t.as||rE;return v.jsx(r,{ref:n,...t,as:void 0})}),oE=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 v.jsxs(cn,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:ke(oE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),rr=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function iE(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 aE=({children:e,...t})=>{const n=rr(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:iE(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),v.jsx("div",{...t,ref:r,children:o?e:null})},sE={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"}},lE=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"}}}),cE=fo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:sE,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 v.jsxs(cn,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:ke(cE({size:a,theme:i}),t),children:[n?v.jsx("span",{"aria-hidden":"true",className:lE({theme:n})}):null,r,s.children]})}),Ei=E.createContext({});function yn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ic=typeof window<"u",La=Ic?E.useLayoutEffect:E.useEffect,Va=E.createContext(null),vo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function im(e){return typeof e=="object"&&e!==null}function _c(e){return im(e)&&"offsetHeight"in e}class uE extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=_c(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function dE({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(`
4
+ `+U.prev}function Dr(W,U){var Re=Z(W),rt=[];if(Re){rt.length=W.length;for(var ft=0;ft<W.length;ft++)rt[ft]=le(W,ft)?U(W[ft],W):""}var Fe=typeof N=="function"?N(W):[],Nr;if(I){Nr={};for(var uo=0;uo<Fe.length;uo++)Nr["$"+Fe[uo]]=Fe[uo]}for(var ln in W)le(W,ln)&&(Re&&String(Number(ln))===ln&&ln<W.length||I&&Nr["$"+ln]instanceof Symbol||(T.call(/[^\w$]/,ln)?rt.push(U(ln,W)+": "+U(W[ln],W)):rt.push(ln+": "+U(W[ln],W))));if(typeof N=="function")for(var Fr=0;Fr<Fe.length;Fr++)D.call(W,Fe[Fr])&&rt.push("["+U(Fe[Fr])+"]: "+U(W[Fe[Fr]],W));return rt}return Dl}var Nl,Qp;function LS(){if(Qp)return Nl;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 Nl=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},Nl}var Fl,Jp;function eh(){return Jp||(Jp=1,Fl=Object),Fl}var Ll,th;function VS(){return th||(th=1,Ll=Error),Ll}var Vl,nh;function $S(){return nh||(nh=1,Vl=EvalError),Vl}var $l,rh;function jS(){return rh||(rh=1,$l=RangeError),$l}var jl,oh;function zS(){return oh||(oh=1,jl=ReferenceError),jl}var zl,ih;function BS(){return ih||(ih=1,zl=SyntaxError),zl}var Bl,ah;function RS(){return ah||(ah=1,Bl=URIError),Bl}var Rl,sh;function HS(){return sh||(sh=1,Rl=Math.abs),Rl}var Hl,lh;function WS(){return lh||(lh=1,Hl=Math.floor),Hl}var Wl,ch;function qS(){return ch||(ch=1,Wl=Math.max),Wl}var ql,uh;function US(){return uh||(uh=1,ql=Math.min),ql}var Ul,dh;function KS(){return dh||(dh=1,Ul=Math.pow),Ul}var Kl,fh;function YS(){return fh||(fh=1,Kl=Math.round),Kl}var Yl,ph;function GS(){return ph||(ph=1,Yl=Number.isNaN||function(t){return t!==t}),Yl}var Gl,hh;function ZS(){if(hh)return Gl;hh=1;var e=GS();return Gl=function(n){return e(n)||n===0?n:n<0?-1:1},Gl}var Zl,mh;function XS(){return mh||(mh=1,Zl=Object.getOwnPropertyDescriptor),Zl}var Xl,gh;function vh(){if(gh)return Xl;gh=1;var e=XS();if(e)try{e([],"length")}catch{e=null}return Xl=e,Xl}var Ql,yh;function QS(){if(yh)return Ql;yh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Ql=e,Ql}var Jl,bh;function JS(){return bh||(bh=1,Jl=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}),Jl}var ec,xh;function eT(){if(xh)return ec;xh=1;var e=typeof Symbol<"u"&&Symbol,t=JS();return ec=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},ec}var tc,wh;function Sh(){return wh||(wh=1,tc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),tc}var nc,Th;function Eh(){if(Th)return nc;Th=1;var e=eh();return nc=e.getPrototypeOf||null,nc}var rc,Ch;function tT(){if(Ch)return rc;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 rc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},rc}var oc,kh;function Ma(){if(kh)return oc;kh=1;var e=tT();return oc=Function.prototype.bind||e,oc}var ic,Ah;function ac(){return Ah||(Ah=1,ic=Function.prototype.call),ic}var sc,Ph;function Ih(){return Ph||(Ph=1,sc=Function.prototype.apply),sc}var lc,_h;function nT(){return _h||(_h=1,lc=typeof Reflect<"u"&&Reflect&&Reflect.apply),lc}var cc,Oh;function rT(){if(Oh)return cc;Oh=1;var e=Ma(),t=Ih(),n=ac(),r=nT();return cc=r||e.call(n,t),cc}var uc,Mh;function Dh(){if(Mh)return uc;Mh=1;var e=Ma(),t=po(),n=ac(),r=rT();return uc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},uc}var dc,Nh;function oT(){if(Nh)return dc;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 dc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,dc}var fc,Fh;function iT(){if(Fh)return fc;Fh=1;var e=Sh(),t=Eh(),n=oT();return fc=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,fc}var pc,Lh;function aT(){if(Lh)return pc;Lh=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ma();return pc=n.call(e,t),pc}var hc,Vh;function mc(){if(Vh)return hc;Vh=1;var e,t=eh(),n=VS(),r=$S(),o=jS(),i=zS(),a=BS(),s=po(),l=RS(),c=HS(),u=WS(),d=qS(),p=US(),f=KS(),m=YS(),g=ZS(),h=Function,y=function(z){try{return h('"use strict"; return ('+z+").constructor;")()}catch{}},x=vh(),b=QS(),S=function(){throw new s},w=x?function(){try{return arguments.callee,S}catch{try{return x(arguments,"callee").get}catch{return S}}}():S,T=eT()(),C=iT(),k=Eh(),_=Sh(),A=Ih(),L=ac(),N={},$=typeof Uint8Array>"u"||!C?e:C(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&C?C(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":$,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":A,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":g,"%Reflect.getPrototypeOf%":_};if(C)try{null.error}catch(z){var M=C(C(z));I["%Error.prototype%"]=M}var D=function z(K){var ae;if(K==="%AsyncFunction%")ae=y("async function () {}");else if(K==="%GeneratorFunction%")ae=y("function* () {}");else if(K==="%AsyncGeneratorFunction%")ae=y("async function* () {}");else if(K==="%AsyncGenerator%"){var R=z("%AsyncGeneratorFunction%");R&&(ae=R.prototype)}else if(K==="%AsyncIteratorPrototype%"){var be=z("%AsyncGenerator%");be&&C&&(ae=C(be.prototype))}return I[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=aT(),O=F.call(L,Array.prototype.concat),B=F.call(A,Array.prototype.splice),X=F.call(L,String.prototype.replace),Q=F.call(L,String.prototype.slice),J=F.call(L,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,Z=function(K){var ae=Q(K,0,1),R=Q(K,-1);if(ae==="%"&&R!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(R==="%"&&ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var be=[];return X(K,G,function(Ce,_e,Be,le){be[be.length]=Be?X(le,Y,"$1"):_e||Ce}),be},j=function(K,ae){var R=K,be;if(H(V,R)&&(be=V[R],R="%"+be[0]+"%"),H(I,R)){var Ce=I[R];if(Ce===N&&(Ce=D(R)),typeof Ce>"u"&&!ae)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:be,name:R,value:Ce}}throw new a("intrinsic "+K+" does not exist!")};return hc=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 R=Z(K),be=R.length>0?R[0]:"",Ce=j("%"+be+"%",ae),_e=Ce.name,Be=Ce.value,le=!1,we=Ce.alias;we&&(be=we[0],B(R,O([0,1],we)));for(var ce=1,Se=!0;ce<R.length;ce+=1){var ie=R[ce],de=Q(ie,0,1),te=Q(ie,-1);if((de==='"'||de==="'"||de==="`"||te==='"'||te==="'"||te==="`")&&de!==te)throw new a("property names with quotes must have matching quotes");if((ie==="constructor"||!Se)&&(le=!0),be+="."+ie,_e="%"+be+"%",H(I,_e))Be=I[_e];else if(Be!=null){if(!(ie in Be)){if(!ae)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(x&&ce+1>=R.length){var q=x(Be,ie);Se=!!q,Se&&"get"in q&&!("originalValue"in q.get)?Be=q.get:Be=Be[ie]}else Se=H(Be,ie),Be=Be[ie];Se&&!le&&(I[_e]=Be)}}return Be},hc}var gc,$h;function jh(){if($h)return gc;$h=1;var e=mc(),t=Dh(),n=t([e("%String.prototype.indexOf%")]);return gc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},gc}var vc,zh;function Bh(){if(zh)return vc;zh=1;var e=mc(),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 vc=!!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},vc}var yc,Rh;function sT(){if(Rh)return yc;Rh=1;var e=mc(),t=jh(),n=Oa(),r=Bh(),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 yc=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,yc}var bc,Hh;function lT(){if(Hh)return bc;Hh=1;var e=po(),t=Oa(),n=LS(),r=Bh(),o=sT(),i=o||r||n;return bc=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},bc}var Wh=e=>Array.isArray(e),xc=e=>e===void 0,wc=e=>e===null,cT=Function.bind.call(Function.call,Object.prototype.toString),uT=e=>!!e&&cT(e)==="[object Error]"||e instanceof Error,qh=(e,t)=>e instanceof t,dT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},fT=e=>Object.prototype.toString.call(e)==="[object Date]"&&qh(e,Date),Le={array:Wh,date:fT,empty:e=>wc(e)||xc(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:uT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>wc(e)||xc(e),null:wc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wh(e)&&typeof e=="object",primitive:dT,string:e=>typeof e=="string",undefined:xc},pT=e=>Object.keys(e),Pn=(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},hT=e=>e.replace(/[^0-9]/g,"");const Sc="-",mT=e=>{const t=vT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Sc);return s[0]===""&&s.length!==1&&s.shift(),Uh(s,t)||gT(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(Sc);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Kh=/^\[(.+)\]$/,gT=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}},vT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Tc(n[o],r,o,t);return r},Tc=(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(yT(o)){Tc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Tc(a,Yh(t,i),n,r)})})},Yh=(e,t)=>{let n=e;return t.split(Sc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yT=e=>e.isThemeGetter,bT=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)}}},Ec="!",Cc=":",xT=Cc.length,wT=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===Cc){i.push(o.slice(l,m)),l=m+xT;continue}if(g==="/"){c=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=ST(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Cc,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},ST=e=>e.endsWith(Ec)?e.substring(0,e.length-1):e.startsWith(Ec)?e.substring(1):e,TT=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}},ET=e=>({cache:bT(e.cacheSize),parseClassName:wT(e),sortModifiers:TT(e),...mT(e)}),CT=/\s+/,kT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(CT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!g,y=r(h?m.substring(0,g):m);if(!y){if(!h){l=u+(l.length>0?" "+l:l);continue}if(y=r(m),!y){l=u+(l.length>0?" "+l:l);continue}h=!1}const x=i(p).join(":"),b=f?x+Ec:x,S=b+y;if(a.includes(S))continue;a.push(S);const w=o(y,h);for(let T=0;T<w.length;++T){const C=w[T];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function AT(){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 PT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=ET(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=kT(l,n);return o(l,u),u}return function(){return i(AT.apply(null,arguments))}}const Dt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IT=/^\d+\/\d+$/,_T=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OT=/\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$/,MT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,DT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,NT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>IT.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),Lr=e=>!!e&&Number.isInteger(Number(e)),Qh=e=>e.endsWith("%")&&ze(e.slice(0,-1)),nr=e=>_T.test(e),FT=()=>!0,LT=e=>OT.test(e)&&!MT.test(e),kc=()=>!1,VT=e=>DT.test(e),$T=e=>NT.test(e),jT=e=>!ge(e)&&!ve(e),zT=e=>mo(e,tm,kc),ge=e=>Zh.test(e),Vr=e=>mo(e,nm,LT),Ac=e=>mo(e,XT,ze),BT=e=>mo(e,Jh,kc),RT=e=>mo(e,em,$T),HT=e=>mo(e,kc,VT),ve=e=>Xh.test(e),Da=e=>go(e,nm),WT=e=>go(e,QT),qT=e=>go(e,Jh),UT=e=>go(e,tm),KT=e=>go(e,em),YT=e=>go(e,JT,!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",GT=new Set(["image","url"]),em=e=>GT.has(e),ZT=new Set(["length","size","percentage"]),tm=e=>ZT.has(e),nm=e=>e==="length",XT=e=>e==="number",QT=e=>e==="family-name",JT=e=>e==="shadow",eE=PT(()=>{const e=Dt("color"),t=Dt("font"),n=Dt("text"),r=Dt("font-weight"),o=Dt("tracking"),i=Dt("leading"),a=Dt("breakpoint"),s=Dt("container"),l=Dt("spacing"),c=Dt("radius"),u=Dt("shadow"),d=Dt("inset-shadow"),p=Dt("drop-shadow"),f=Dt("blur"),m=Dt("perspective"),g=Dt("aspect"),h=Dt("ease"),y=Dt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],T=()=>[ve,ge,l],C=()=>[ho,"full","auto",...T()],k=()=>[Lr,"none","subgrid",ve,ge],_=()=>["auto",{span:["full",Lr,ve,ge]},ve,ge],A=()=>[Lr,"auto",ve,ge],L=()=>["auto","min","max","fr",ve,ge],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],$=()=>["start","end","center","stretch"],I=()=>["auto",...T()],M=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],D=()=>[e,ve,ge],V=()=>[Qh,Vr],F=()=>["","none","full",c,ve,ge],H=()=>["",ze,Da,Vr],O=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["","none",f,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:[nr],breakpoint:[nr],color:[FT],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[jT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nr],shadow:[nr],spacing:["px",ze],text:[nr],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":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...b(),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:[Lr,"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:[Lr,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...$(),"baseline"]}],"align-self":[{self:["auto",...$(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen",...M()]}],"min-h":[{"min-h":["screen","none",...M()]}],"max-h":[{"max-h":["screen",...M()]}],"font-size":[{text:["base",n,Da,Vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ve,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qh,ge]}],"font-family":[{font:[WT,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,Ac]}],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,Vr]}],"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:[...b(),qT,BT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",UT,zT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Lr,ve,ge],radial:["",ve,ge],conic:[Lr,ve,ge]},KT,RT]}],"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,Vr]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,YT,HT]}],"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,Vr]}],"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":[...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":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",y,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,Vr,Ac]}],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","*","**"]}}),qn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},tE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Pc=e=>Le.function(e),ke=(...e)=>eE(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)},nE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},rE="span",cn=E.forwardRef(function(t,n){const r=t.as||rE;return v.jsx(r,{ref:n,...t,as:void 0})}),oE=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-hidden 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-xs",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 v.jsxs(cn,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:ke(oE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),rr=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function iE(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 aE=({children:e,...t})=>{const n=rr(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:iE(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),v.jsx("div",{...t,ref:r,children:o?e:null})},sE={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"}},lE=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"}}}),cE=fo("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:sE,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 v.jsxs(cn,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:ke(cE({size:a,theme:i}),t),children:[n?v.jsx("span",{"aria-hidden":"true",className:lE({theme:n})}):null,r,s.children]})}),Ei=E.createContext({});function yn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ic=typeof window<"u",La=Ic?E.useLayoutEffect:E.useEffect,Va=E.createContext(null),vo=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function im(e){return typeof e=="object"&&e!==null}function _c(e){return im(e)&&"offsetHeight"in e}class uE extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=_c(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function dE({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;
@@ -211,37 +211,37 @@
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var ub;function TM(){return ub||(ub=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=lb(),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 y(T){if(!x){if(x=!0,b=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(b,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(b=T,C):(b=T,S=k)}var x=!1,b,S,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),sd}var db;function EM(){return db||(db=1,process.env.NODE_ENV==="production"?ds.exports=SM():ds.exports=TM()),ds.exports}EM();var No=function(){return No=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},No.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 fb(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 Fo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},CM=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},kM=function(e){return Object.entries(e)},pb=function(e){return e instanceof Promise},hb=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)},No(No({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},AM=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,fb([],Xi(a),!1)),u=function(d,p){return n(function(f){return hb(d,f,i,p)})};return pb(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))}},PM=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,fb([],Xi(a),!1)),c=function(u){return n(function(d){return hb(u,d,i,o.current)})};return pb(l)?l.then(function(u){return c(u)}):c(l)}},ld=function(e,t,n){var r,o,i,a=Xi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Fo(s),u=Fo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Fo(t),p=Fo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Fo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=CM(s),h=Fo(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var S=y.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var x=Xi(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 kM(w).reduce(function(T,C){var k,_=Xi(C,2),A=_[0],L=_[1];return No(No({},T),(k={},k[A]=n!=null&&n.debug?AM(A,L,l,S,y,f.current):PM(A,L,l,S,y,f.current),k))},{})}),1),b=x[0];return[s,b,u.current]};const IM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function _M(e,t){return E.useRef(IM(e,t)).current}const ps={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>)`},cr=(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(cr(a,t,n,s))},[]),mb=(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]:mb(a,t,n,s)}},{}),gb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},hs=(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)},OM={default:e=>hs(e,{result:gb.default}),dark:e=>hs(e,{result:gb.dark})},Lo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},MM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),cd=(e,t)=>{const n=cr(e.colors,Lo(t==null?void 0:t.colors)),r=cr(e.spacing,Lo(t==null?void 0:t.spacing)),o=cr(e.rounded,Lo(t==null?void 0:t.rounded)),i=cr(e.shadow,Lo(t==null?void 0:t.rounded)),a=cr(e.zIndex,Lo((t==null?void 0:t.zIndex)??MM)),s=e.custom?cr(e.custom,Lo(t==null?void 0:t.customTokens)):[];return n.concat(r,o,s,a,i)},DM=(e,t)=>hs(cd(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),NM=(e,t)=>cd(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),FM=(e,t)=>hs(cd(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ms={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>v.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file"},gs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Vo=E.createContext({tweaks:gs,parser:ps.hsla,map:ms,locale:void 0}),ud=e=>{const t=E.useContext(Vo);if(e)return e;if(t)return t.locale||e};function vb(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(Vo);return e?e.map:ms},hn=(e,t=2)=>e.toString(16).padStart(t,"0"),$o=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${hn(t,4)+hn(n,3)}-${hn(r[0])+hn(r[1])}-${hn(r[2])+hn(r[3])}-${hn(r[4])+hn(r[5])}-${hn(r[6])+hn(r[7])+hn(r[8])+hn(r[9])}`},yb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),bb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},dd=(e,t)=>{const n=yb(t,bb.basic,e)||yb(t,bb.extend,e);return n===void 0||n===e?void 0:n},ur=()=>typeof window>"u",fd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),xb=(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},LM=e=>!e,pd=()=>{},wb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},VM={type:"spring",bounce:.3,duration:.6},Sb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Tb={enter:Sb(1),exit:Sb(-1),middle:{x:"0%",opacity:1}},Eb={exit:{visibility:"hidden"}},$M=e=>{const t=On(My(e));return Oy({start:t,end:_o(t,{days:41})})},Cb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),jM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=My(new Date(1970,o,1).setMonth(o)),a=Cb(i,n);return v.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})},kb=(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)},Kr=e=>e.getFullYear().toString().padStart(4,"0"),zM=(e,t,n)=>e===void 0||n===void 0?!1:eO(t,e)&&tO(t,n),BM=e=>{var n;const t=Ct();return v.jsx(pt.tbody,{layout:!0,variants:Tb,custom:e.direction,onKeyDown:e.onKeyDown,className:ke((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=Le.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return v.jsx("tr",{className:i,children:r.map(c=>{var y,x,b,S,w,T,C,k,_,A,L,N,$,I,M,D,V,F;const u=c.toISOString(),d=e.rangeMode?u===((x=(y=e.range)==null?void 0:y.to)==null?void 0:x.toISOString())||u===((S=(b=e.range)==null?void 0:b.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=JO(c)&&e.markToday,f=((T=e.disabledDate)==null?void 0:T.call(e,c))||!1,m=QO(c,e.stateDate),g=!m||f,h=e.rangeMode?zM((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return v.jsxs("td",{align:"center",className:ke("relative",Le.function((_=e.styles)==null?void 0:_.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(L=e.styles)==null?void 0:L.dayFrame),children:[v.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:ke(`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":"",Le.function((N=e.styles)==null?void 0:N.day)?($=e.styles)==null?void 0:$.day(c):(I=e.styles)==null?void 0:I.day),children:[c.getDate(),d&&((M=e.stateRange.from)==null?void 0:M.toISOString())===u?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?v.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},RM=()=>Mo(new Date),Ab=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...p})=>{const f=E.useRef($o()),m=Ct(),g=ud(o),h=E.useRef(null),{date:y,range:x}=p,b=y||new Date,S=E.useRef(null),[w,T]=ld({date:b,isAnimating:!1,year:Kr(b),direction:void 0,range:{from:x==null?void 0:x.from,to:x==null?void 0:x.to},months:jM(f.current,b,g),selectMode:l?"from":void 0,week:Oy({start:On(b),end:s_(b)})},M=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(kb(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:Kr(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:Kr(F)}},previousMonth:D=>{D&&(S.current=D.currentTarget);const V=M.state();if(V.isAnimating)return V;const F=Ki(V.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Kr(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:Kr(O),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:F?{from:V.selectMode==="from"?O:V.range.from,to:V.selectMode==="to"?O:V.range.to}:V.range}},onChangeMonth:D=>{const V=D.target.value,H=Array.from(D.target.options).find(B=>B.value===V),O=M.state();if(H){const B=H.dataset.index||"",X=new Date(M.state().date);return X.setMonth(+B),{...O,date:X,year:Kr(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=Le.keyof(hd,V)?hd[V](H,D.shiftKey?"month":"days"):null;if(O!==null)return kb(D.target,h,O),{...F,date:O,year:Kr(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=$M(w.date),k=xb(C,7),_=w.date.toISOString(),A=Cb(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[_,t]);const L=_M(M=>T.date(D=>tM(new Date(D),+M)),1200),N=M=>{const D=M.currentTarget.value;T.onChangeYear(D),s==null||s(new Date(D)),L(D)},$=vb((M,D)=>(M.preventDefault(),D==="right"?T.previousMonth():T.nextMonth()),10),I=()=>{const M=RM();T.date(()=>M),c==null||c(M)};return v.jsx(CE,{transition:VM,children:v.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:ke("relative overflow-hidden",Le.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[v.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:v.jsx(or,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:v.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[v.jsxs("header",{className:"relative flex justify-between",children:[v.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Eb,onClick:T.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(DI,{className:"h-4 w-4"})}),v.jsx(pt.span,{layout:!0,variants:Tb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:v.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[v.jsx("select",{value:A,onChange:T.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),v.jsx(ob,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),v.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Eb,onClick:T.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(Wu,{className:"h-4 w-4"})}),v.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),v.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[v.jsx("thead",{children:v.jsx("tr",{children:w.week.map(M=>v.jsx("th",{role:"columnheader",className:ke("py-2 text-sm font-medium capitalize",Le.function(u==null?void 0:u.weekDay)?u.weekDay(M):u==null?void 0:u.weekDay),children:M.toLocaleDateString(g,{weekday:"short"})},M.toString()))})}),v.jsx(BM,{zip:k,range:x,styles:u,date:y||null,dispatch:T,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:T.onKeyDown})]})]},A)})}),v.jsx("footer",{className:"mt-2 text-center text-primary",children:v.jsx("button",{type:"button",onClick:I,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},md=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>v.jsxs(cn,{...s,as:r,"data-component":"card",className:ke("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8",o),children:[t?v.jsx("header",{"data-component":"card-title",className:ke("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,v.jsx("div",{"data-component":"card-body",className:ke("min-w-full px-4 lg:px-8",a),children:e})]});md.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return v.jsxs(i,{...o,title:Le.string(o.title)?o.title:void 0,className:ke("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[v.jsx(a,{className:"font-semibold",children:o.title}),r?v.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const Pb=e=>{const t=e.Icon??Sy,n=Ct();return v.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[v.jsx(t,{size:64,className:"text-disabled"}),v.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})};function Ib(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _b(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ib(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():Ib(e[o],null)}}}}function en(...e){return P.useCallback(_b(...e),e)}function vs(e){const t=HM(e),n=P.forwardRef((r,o)=>{const{children:i,...a}=r,s=P.Children.toArray(i),l=s.find(qM);if(l){const c=l.props.children,u=s.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return v.jsx(t,{...a,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Ob=vs("Slot");function HM(e){const t=P.forwardRef((n,r)=>{const{children:o,...i}=n;if(P.isValidElement(o)){const a=KM(o),s=UM(i,o.props);return o.type!==P.Fragment&&(s.ref=r?_b(r,a):a),P.cloneElement(o,s)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WM=Symbol("radix.slottable");function qM(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WM}function UM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function KM(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 YM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lt=YM.reduce((e,t)=>{const n=vs(`Primitive.${t}`),r=P.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mb(e,t){e&&_a.flushSync(()=>e.dispatchEvent(t))}var GM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ZM="VisuallyHidden",gd=P.forwardRef((e,t)=>v.jsx(Lt.span,{...e,ref:t,style:{...GM,...e.style}}));gd.displayName=ZM;function ys(e,t=[]){let n=[];function r(i,a){const s=P.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...m}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,h=P.useMemo(()=>m,Object.values(m));return v.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=P.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>P.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,XM(o,...t)]}function XM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Db(e){const t=e+"CollectionProvider",[n,r]=ys(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:y}=g,x=E.useRef(null),b=E.useRef(new Map).current;return v.jsx(o,{scope:h,itemMap:b,collectionRef:x,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=vs(s),c=E.forwardRef((g,h)=>{const{scope:y,children:x}=g,b=i(s,y),S=en(h,b.collectionRef);return v.jsx(l,{ref:S,children:x})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=vs(u),f=E.forwardRef((g,h)=>{const{scope:y,children:x,...b}=g,S=E.useRef(null),w=en(h,S),T=i(u,y);return E.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),v.jsx(p,{[d]:"",ref:w,children:x})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((T,C)=>b.indexOf(T.ref.current)-b.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}function It(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var jo=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},QM=P[" useInsertionEffect ".trim().toString()]||jo;function Nb({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=JM({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=P.useRef(e!==void 0);P.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=P.useCallback(u=>{var d;if(s){const p=eD(u)?u(e):u;p!==e&&((d=a.current)==null||d.call(a,p))}else i(u)},[s,e,i,a]);return[l,c]}function JM({defaultProp:e,onChange:t}){const[n,r]=P.useState(e),o=P.useRef(n),i=P.useRef(t);return QM(()=>{i.current=t},[t]),P.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function eD(e){return typeof e=="function"}function tD(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var Fb=e=>{const{present:t,children:n}=e,r=nD(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),i=en(r.ref,rD(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:i}):null};Fb.displayName="Presence";function nD(e){const[t,n]=P.useState(),r=P.useRef(null),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[s,l]=tD(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=bs(r.current);i.current=s==="mounted"?c:"none"},[s]),jo(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=bs(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]),jo(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=bs(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=bs(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:P.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function bs(e){return(e==null?void 0:e.animationName)||"none"}function rD(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 oD=P.createContext(void 0);function iD(e){const t=P.useContext(oD);return e||t||"ltr"}function Yr(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function aD(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e);P.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var sD="DismissableLayer",vd="dismissableLayer.update",lD="dismissableLayer.pointerDownOutside",cD="dismissableLayer.focusOutside",Lb,Vb=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$b=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=P.useContext(Vb),[u,d]=P.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=P.useState({}),m=en(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(h),x=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,w=dD(C=>{const k=C.target,_=[...c.branches].some(A=>A.contains(k));!S||_||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),T=fD(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return aD(C=>{x===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),P.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(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]),P.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),zb())},[u,c]),P.useEffect(()=>{const C=()=>f({});return document.addEventListener(vd,C),()=>document.removeEventListener(vd,C)},[]),v.jsx(Lt.div,{...l,ref:m,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:It(e.onFocusCapture,T.onFocusCapture),onBlurCapture:It(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:It(e.onPointerDownCapture,w.onPointerDownCapture)})});$b.displayName=sD;var uD="DismissableLayerBranch",jb=P.forwardRef((e,t)=>{const n=P.useContext(Vb),r=P.useRef(null),o=en(t,r);return P.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(Lt.div,{...e,ref:o})});jb.displayName=uD;function dD(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Bb(lD,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 fD(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e),r=P.useRef(!1);return P.useEffect(()=>{const o=i=>{i.target&&!r.current&&Bb(cD,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 Bb(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Mb(o,i):o.dispatchEvent(i)}var pD=$b,hD=jb,mD="Portal",Rb=P.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=P.useState(!1);jo(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?wi.createPortal(v.jsx(Lt.div,{...r,ref:t}),a):null});Rb.displayName=mD;function gD(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function vD(e){const[t,n]=P.useState(void 0);return jo(()=>{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 Hb(e,[t,n]){return Math.min(n,Math.max(t,e))}var yd="Progress",bd=100,[yD,QB]=ys(yd),[bD,xD]=yD(yd),Wb=P.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=wD,...a}=e;(o||o===0)&&!Yb(o)&&console.error(SD(`${o}`,"Progress"));const s=Yb(o)?o:bd;r!==null&&!Gb(r,s)&&console.error(TD(`${r}`,"Progress"));const l=Gb(r,s)?r:null,c=xs(l)?i(l,s):void 0;return v.jsx(bD,{scope:n,value:l,max:s,children:v.jsx(Lt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":xs(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":Kb(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});Wb.displayName=yd;var qb="ProgressIndicator",Ub=P.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=xD(qb,n);return v.jsx(Lt.div,{"data-state":Kb(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Ub.displayName=qb;function wD(e,t){return`${Math.round(e/t*100)}%`}function Kb(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function xs(e){return typeof e=="number"}function Yb(e){return xs(e)&&!isNaN(e)&&e>0}function Gb(e,t){return xs(e)&&!isNaN(e)&&e<=t&&e>=0}function SD(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bd}\`.`}function TD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
214
+ */var ub;function TM(){return ub||(ub=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=lb(),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 y(T){if(!x){if(x=!0,b=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(b,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(b=T,C):(b=T,S=k)}var x=!1,b,S,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var h=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),sd}var db;function EM(){return db||(db=1,process.env.NODE_ENV==="production"?ds.exports=SM():ds.exports=TM()),ds.exports}EM();var No=function(){return No=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},No.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 fb(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 Fo=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},CM=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},kM=function(e){return Object.entries(e)},pb=function(e){return e instanceof Promise},hb=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)},No(No({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},AM=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,fb([],Xi(a),!1)),u=function(d,p){return n(function(f){return hb(d,f,i,p)})};return pb(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))}},PM=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,fb([],Xi(a),!1)),c=function(u){return n(function(d){return hb(u,d,i,o.current)})};return pb(l)?l.then(function(u){return c(u)}):c(l)}},ld=function(e,t,n){var r,o,i,a=Xi(E.useState(function(){return e}),2),s=a[0],l=a[1],c=Fo(s),u=Fo((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=Fo(t),p=Fo((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=Fo((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),m=E.useRef(e),g=CM(s),h=Fo(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var S=y.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var x=Xi(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 kM(w).reduce(function(T,C){var k,_=Xi(C,2),A=_[0],L=_[1];return No(No({},T),(k={},k[A]=n!=null&&n.debug?AM(A,L,l,S,y,f.current):PM(A,L,l,S,y,f.current),k))},{})}),1),b=x[0];return[s,b,u.current]};const IM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function _M(e,t){return E.useRef(IM(e,t)).current}const ps={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>)`},cr=(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(cr(a,t,n,s))},[]),mb=(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]:mb(a,t,n,s)}},{}),gb={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},hs=(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)},OM={default:e=>hs(e,{result:gb.default}),dark:e=>hs(e,{result:gb.dark})},Lo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},MM=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),cd=(e,t)=>{const n=cr(e.colors,Lo(t==null?void 0:t.colors)),r=cr(e.spacing,Lo(t==null?void 0:t.spacing)),o=cr(e.rounded,Lo(t==null?void 0:t.rounded)),i=cr(e.shadow,Lo(t==null?void 0:t.rounded)),a=cr(e.zIndex,Lo((t==null?void 0:t.zIndex)??MM)),s=e.custom?cr(e.custom,Lo(t==null?void 0:t.customTokens)):[];return n.concat(r,o,s,a,i)},DM=(e,t)=>hs(cd(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),NM=(e,t)=>cd(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),FM=(e,t)=>hs(cd(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ms={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>v.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file"},gs={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Vo=E.createContext({tweaks:gs,parser:ps.hsla,map:ms,locale:void 0}),ud=e=>{const t=E.useContext(Vo);if(e)return e;if(t)return t.locale||e};function vb(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(Vo);return e?e.map:ms},hn=(e,t=2)=>e.toString(16).padStart(t,"0"),$o=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${hn(t,4)+hn(n,3)}-${hn(r[0])+hn(r[1])}-${hn(r[2])+hn(r[3])}-${hn(r[4])+hn(r[5])}-${hn(r[6])+hn(r[7])+hn(r[8])+hn(r[9])}`},yb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),bb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},dd=(e,t)=>{const n=yb(t,bb.basic,e)||yb(t,bb.extend,e);return n===void 0||n===e?void 0:n},ur=()=>typeof window>"u",fd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),xb=(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},LM=e=>!e,pd=()=>{},wb=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},VM={type:"spring",bounce:.3,duration:.6},Sb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Tb={enter:Sb(1),exit:Sb(-1),middle:{x:"0%",opacity:1}},Eb={exit:{visibility:"hidden"}},$M=e=>{const t=On(My(e));return Oy({start:t,end:_o(t,{days:41})})},Cb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),jM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=My(new Date(1970,o,1).setMonth(o)),a=Cb(i,n);return v.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})},kb=(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)},Kr=e=>e.getFullYear().toString().padStart(4,"0"),zM=(e,t,n)=>e===void 0||n===void 0?!1:eO(t,e)&&tO(t,n),BM=e=>{var n;const t=Ct();return v.jsx(pt.tbody,{layout:!0,variants:Tb,custom:e.direction,onKeyDown:e.onKeyDown,className:ke((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=Le.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return v.jsx("tr",{className:i,children:r.map(c=>{var y,x,b,S,w,T,C,k,_,A,L,N,$,I,M,D,V,F;const u=c.toISOString(),d=e.rangeMode?u===((x=(y=e.range)==null?void 0:y.to)==null?void 0:x.toISOString())||u===((S=(b=e.range)==null?void 0:b.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=JO(c)&&e.markToday,f=((T=e.disabledDate)==null?void 0:T.call(e,c))||!1,m=QO(c,e.stateDate),g=!m||f,h=e.rangeMode?zM((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return v.jsxs("td",{align:"center",className:ke("relative",Le.function((_=e.styles)==null?void 0:_.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(L=e.styles)==null?void 0:L.dayFrame),children:[v.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":m,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:ke(`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":"",Le.function((N=e.styles)==null?void 0:N.day)?($=e.styles)==null?void 0:$.day(c):(I=e.styles)==null?void 0:I.day),children:[c.getDate(),d&&((M=e.stateRange.from)==null?void 0:M.toISOString())===u?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:((D=e.labelRange)==null?void 0:D.from)??t.calendarFromDate})}):null,d&&((V=e.stateRange.to)==null?void 0:V.toISOString())===u?v.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:v.jsx("span",{className:"text-xs text-foreground",children:((F=e.labelRange)==null?void 0:F.to)??t.calendarToDate})}):null]}),e.RenderOnDay?v.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},RM=()=>Mo(new Date),Ab=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...p})=>{const f=E.useRef($o()),m=Ct(),g=ud(o),h=E.useRef(null),{date:y,range:x}=p,b=y||new Date,S=E.useRef(null),[w,T]=ld({date:b,isAnimating:!1,year:Kr(b),direction:void 0,range:{from:x==null?void 0:x.from,to:x==null?void 0:x.to},months:jM(f.current,b,g),selectMode:l?"from":void 0,week:Oy({start:On(b),end:s_(b)})},M=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(kb(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:Kr(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:Kr(F)}},previousMonth:D=>{D&&(S.current=D.currentTarget);const V=M.state();if(V.isAnimating)return V;const F=Ki(V.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Kr(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:Kr(O),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:F?{from:V.selectMode==="from"?O:V.range.from,to:V.selectMode==="to"?O:V.range.to}:V.range}},onChangeMonth:D=>{const V=D.target.value,H=Array.from(D.target.options).find(B=>B.value===V),O=M.state();if(H){const B=H.dataset.index||"",X=new Date(M.state().date);return X.setMonth(+B),{...O,date:X,year:Kr(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=Le.keyof(hd,V)?hd[V](H,D.shiftKey?"month":"days"):null;if(O!==null)return kb(D.target,h,O),{...F,date:O,year:Kr(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=$M(w.date),k=xb(C,7),_=w.date.toISOString(),A=Cb(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[_,t]);const L=_M(M=>T.date(D=>tM(new Date(D),+M)),1200),N=M=>{const D=M.currentTarget.value;T.onChangeYear(D),s==null||s(new Date(D)),L(D)},$=vb((M,D)=>(M.preventDefault(),D==="right"?T.previousMonth():T.nextMonth()),10),I=()=>{const M=RM();T.date(()=>M),c==null||c(M)};return v.jsx(CE,{transition:VM,children:v.jsxs("div",{ref:h,"data-component":"calendar",onTouchEnd:$.onTouchEnd,onTouchStart:$.onTouchStart,className:ke("relative overflow-hidden",Le.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[v.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:v.jsx(or,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:v.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[v.jsxs("header",{className:"relative flex justify-between",children:[v.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Eb,onClick:T.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(DI,{className:"h-4 w-4"})}),v.jsx(pt.span,{layout:!0,variants:Tb,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:v.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[v.jsx("select",{value:A,onChange:T.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),v.jsx(ob,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),v.jsx(pt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Eb,onClick:T.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:v.jsx(Wu,{className:"h-4 w-4"})}),v.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),v.jsxs(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[v.jsx("thead",{children:v.jsx("tr",{children:w.week.map(M=>v.jsx("th",{role:"columnheader",className:ke("py-2 text-sm font-medium capitalize",Le.function(u==null?void 0:u.weekDay)?u.weekDay(M):u==null?void 0:u.weekDay),children:M.toLocaleDateString(g,{weekday:"short"})},M.toString()))})}),v.jsx(BM,{zip:k,range:x,styles:u,date:y||null,dispatch:T,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:T.onKeyDown})]})]},A)})}),v.jsx("footer",{className:"mt-2 text-center text-primary",children:v.jsx("button",{type:"button",onClick:I,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},md=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>v.jsxs(cn,{...s,as:r,"data-component":"card",className:ke("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8",o),children:[t?v.jsx("header",{"data-component":"card-title",className:ke("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,v.jsx("div",{"data-component":"card-body",className:ke("min-w-full px-4 lg:px-8",a),children:e})]});md.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return v.jsxs(i,{...o,title:Le.string(o.title)?o.title:void 0,className:ke("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[v.jsx(a,{className:"font-semibold",children:o.title}),r?v.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const Pb=e=>{const t=e.Icon??Sy,n=Ct();return v.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[v.jsx(t,{size:64,className:"text-disabled"}),v.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})};function Ib(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _b(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ib(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():Ib(e[o],null)}}}}function en(...e){return P.useCallback(_b(...e),e)}function vs(e){const t=HM(e),n=P.forwardRef((r,o)=>{const{children:i,...a}=r,s=P.Children.toArray(i),l=s.find(qM);if(l){const c=l.props.children,u=s.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return v.jsx(t,{...a,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Ob=vs("Slot");function HM(e){const t=P.forwardRef((n,r)=>{const{children:o,...i}=n;if(P.isValidElement(o)){const a=KM(o),s=UM(i,o.props);return o.type!==P.Fragment&&(s.ref=r?_b(r,a):a),P.cloneElement(o,s)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WM=Symbol("radix.slottable");function qM(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WM}function UM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function KM(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 YM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lt=YM.reduce((e,t)=>{const n=vs(`Primitive.${t}`),r=P.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mb(e,t){e&&_a.flushSync(()=>e.dispatchEvent(t))}var GM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ZM="VisuallyHidden",gd=P.forwardRef((e,t)=>v.jsx(Lt.span,{...e,ref:t,style:{...GM,...e.style}}));gd.displayName=ZM;function ys(e,t=[]){let n=[];function r(i,a){const s=P.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...m}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,h=P.useMemo(()=>m,Object.values(m));return v.jsx(g.Provider,{value:h,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,m=P.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>P.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,XM(o,...t)]}function XM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Db(e){const t=e+"CollectionProvider",[n,r]=ys(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:h,children:y}=g,x=E.useRef(null),b=E.useRef(new Map).current;return v.jsx(o,{scope:h,itemMap:b,collectionRef:x,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=vs(s),c=E.forwardRef((g,h)=>{const{scope:y,children:x}=g,b=i(s,y),S=en(h,b.collectionRef);return v.jsx(l,{ref:S,children:x})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=vs(u),f=E.forwardRef((g,h)=>{const{scope:y,children:x,...b}=g,S=E.useRef(null),w=en(h,S),T=i(u,y);return E.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),v.jsx(p,{[d]:"",ref:w,children:x})});f.displayName=u;function m(g){const h=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((T,C)=>b.indexOf(T.ref.current)-b.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}function It(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var jo=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},QM=P[" useInsertionEffect ".trim().toString()]||jo;function Nb({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=JM({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const u=P.useRef(e!==void 0);P.useEffect(()=>{const d=u.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=P.useCallback(u=>{var d;if(s){const p=eD(u)?u(e):u;p!==e&&((d=a.current)==null||d.call(a,p))}else i(u)},[s,e,i,a]);return[l,c]}function JM({defaultProp:e,onChange:t}){const[n,r]=P.useState(e),o=P.useRef(n),i=P.useRef(t);return QM(()=>{i.current=t},[t]),P.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function eD(e){return typeof e=="function"}function tD(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var Fb=e=>{const{present:t,children:n}=e,r=nD(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),i=en(r.ref,rD(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:i}):null};Fb.displayName="Presence";function nD(e){const[t,n]=P.useState(),r=P.useRef(null),o=P.useRef(e),i=P.useRef("none"),a=e?"mounted":"unmounted",[s,l]=tD(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=bs(r.current);i.current=s==="mounted"?c:"none"},[s]),jo(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=bs(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]),jo(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=bs(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=bs(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:P.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function bs(e){return(e==null?void 0:e.animationName)||"none"}function rD(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 oD=P.createContext(void 0);function iD(e){const t=P.useContext(oD);return e||t||"ltr"}function Yr(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function aD(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e);P.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var sD="DismissableLayer",vd="dismissableLayer.update",lD="dismissableLayer.pointerDownOutside",cD="dismissableLayer.focusOutside",Lb,Vb=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$b=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=P.useContext(Vb),[u,d]=P.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=P.useState({}),m=en(t,C=>d(C)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(h),x=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,w=dD(C=>{const k=C.target,_=[...c.branches].some(A=>A.contains(k));!S||_||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),T=fD(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return aD(C=>{x===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),P.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(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]),P.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),zb())},[u,c]),P.useEffect(()=>{const C=()=>f({});return document.addEventListener(vd,C),()=>document.removeEventListener(vd,C)},[]),v.jsx(Lt.div,{...l,ref:m,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:It(e.onFocusCapture,T.onFocusCapture),onBlurCapture:It(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:It(e.onPointerDownCapture,w.onPointerDownCapture)})});$b.displayName=sD;var uD="DismissableLayerBranch",jb=P.forwardRef((e,t)=>{const n=P.useContext(Vb),r=P.useRef(null),o=en(t,r);return P.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(Lt.div,{...e,ref:o})});jb.displayName=uD;function dD(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Bb(lD,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 fD(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e),r=P.useRef(!1);return P.useEffect(()=>{const o=i=>{i.target&&!r.current&&Bb(cD,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 Bb(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Mb(o,i):o.dispatchEvent(i)}var pD=$b,hD=jb,mD="Portal",Rb=P.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=P.useState(!1);jo(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?wi.createPortal(v.jsx(Lt.div,{...r,ref:t}),a):null});Rb.displayName=mD;function gD(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function vD(e){const[t,n]=P.useState(void 0);return jo(()=>{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 Hb(e,[t,n]){return Math.min(n,Math.max(t,e))}var yd="Progress",bd=100,[yD,JB]=ys(yd),[bD,xD]=yD(yd),Wb=P.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=wD,...a}=e;(o||o===0)&&!Yb(o)&&console.error(SD(`${o}`,"Progress"));const s=Yb(o)?o:bd;r!==null&&!Gb(r,s)&&console.error(TD(`${r}`,"Progress"));const l=Gb(r,s)?r:null,c=xs(l)?i(l,s):void 0;return v.jsx(bD,{scope:n,value:l,max:s,children:v.jsx(Lt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":xs(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":Kb(l,s),"data-value":l??void 0,"data-max":s,...a,ref:t})})});Wb.displayName=yd;var qb="ProgressIndicator",Ub=P.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=xD(qb,n);return v.jsx(Lt.div,{"data-state":Kb(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Ub.displayName=qb;function wD(e,t){return`${Math.round(e/t*100)}%`}function Kb(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function xs(e){return typeof e=="number"}function Yb(e){return xs(e)&&!isNaN(e)&&e>0}function Gb(e,t){return xs(e)&&!isNaN(e)&&e<=t&&e>=0}function SD(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bd}\`.`}function TD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
215
215
  - a positive number
216
216
  - less than the value passed to \`max\` (or ${bd} if no \`max\` prop is set)
217
217
  - \`null\` or \`undefined\` if the progress is indeterminate.
218
218
 
219
- Defaulting to \`null\`.`}var ED=Wb,CD=Ub,Zb=["PageUp","PageDown"],Xb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qb={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},zo="Slider",[xd,kD,AD]=Db(zo),[Jb,JB]=ys(zo,[AD]),[PD,ws]=Jb(zo),ex=P.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=P.useRef(new Set),y=P.useRef(0),b=a==="horizontal"?ID:_D,[S=[],w]=Nb({prop:u,defaultProp:c,onChange:L=>{var $;($=[...h.current][y.current])==null||$.focus(),d(L)}}),T=P.useRef(S);function C(L){const N=FD(S,L);A(L,N)}function k(L){A(L,y.current)}function _(){const L=T.current[y.current];S[y.current]!==L&&p(S)}function A(L,N,{commit:$}={commit:!1}){const I=jD(i),M=zD(Math.round((L-r)/i)*i+r,I),D=Hb(M,[r,o]);w((V=[])=>{const F=DD(V,D,N);if($D(F,l*i)){y.current=F.indexOf(D);const H=String(F)!==String(V);return H&&$&&p(F),H?F:V}else return V})}return v.jsx(PD,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:h.current,values:S,orientation:a,form:m,children:v.jsx(xd.Provider,{scope:e.__scopeSlider,children:v.jsx(xd.Slot,{scope:e.__scopeSlider,children:v.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:It(g.onPointerDown,()=>{s||(T.current=S)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:_,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,S.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:N})=>{if(!s){const M=Zb.includes(L.key)||L.shiftKey&&Xb.includes(L.key)?10:1,D=y.current,V=S[D],F=i*M*N;A(V+F,D,{commit:!0})}}})})})})});ex.displayName=zo;var[tx,nx]=Jb(zo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ID=P.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=P.useState(null),f=en(t,b=>p(b)),m=P.useRef(void 0),g=iD(o),h=g==="ltr",y=h&&!i||!h&&i;function x(b){const S=m.current||d.getBoundingClientRect(),w=[0,S.width],C=Td(w,y?[n,r]:[r,n]);return m.current=S,C(b-S.left)}return v.jsx(tx,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:v.jsx(rx,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const S=x(b.clientX);a==null||a(S)},onSlideMove:b=>{const S=x(b.clientX);s==null||s(S)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=Qb[y?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),_D=P.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=P.useRef(null),d=en(t,u),p=P.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),y=[0,h.height],b=Td(y,f?[r,n]:[n,r]);return p.current=h,b(g-h.top)}return v.jsx(tx,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:v.jsx(rx,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const y=Qb[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:y?-1:1})}})})}),rx=P.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=ws(zo,n);return v.jsx(Lt.span,{...c,ref:t,onKeyDown:It(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Zb.concat(Xb).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:It(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:It(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:It(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),ox="SliderTrack",ix=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ws(ox,n);return v.jsx(Lt.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});ix.displayName=ox;var wd="SliderRange",ax=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ws(wd,n),i=nx(wd,n),a=P.useRef(null),s=en(t,a),l=o.values.length,c=o.values.map(p=>cx(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return v.jsx(Lt.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});ax.displayName=wd;var Sd="SliderThumb",sx=P.forwardRef((e,t)=>{const n=kD(e.__scopeSlider),[r,o]=P.useState(null),i=en(t,s=>o(s)),a=P.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return v.jsx(OD,{...e,ref:i,index:a})}),OD=P.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=ws(Sd,n),s=nx(Sd,n),[l,c]=P.useState(null),u=en(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,p=vD(l),f=a.values[r],m=f===void 0?0:cx(f,a.min,a.max),g=ND(r,a.values.length),h=p==null?void 0:p[s.size],y=h?LD(h,m,s.direction):0;return P.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),v.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${y}px)`},children:[v.jsx(xd.ItemSlot,{scope:e.__scopeSlider,children:v.jsx(Lt.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:It(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&v.jsx(lx,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});sx.displayName=Sd;var MD="RadioBubbleInput",lx=P.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=P.useRef(null),i=en(o,r),a=gD(t);return P.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),v.jsx(Lt.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});lx.displayName=MD;function DD(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function cx(e,t,n){const i=100/(n-t)*(e-t);return Hb(i,[0,100])}function ND(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function FD(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 LD(e,t,n){const r=e/2,i=Td([0,50],[0,r]);return(r-i(t)*n)*n}function VD(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function $D(e,t){if(t>0){const n=VD(e);return Math.min(...n)>=t}return!0}function Td(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function jD(e){return(String(e).split(".")[1]||"").length}function zD(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var BD=ex,RD=ix,HD=ax,WD=sx,Ed="ToastProvider",[Cd,qD,UD]=Db("Toast"),[ux,eR]=ys("Toast",[UD]),[KD,Ss]=ux(Ed),dx=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=P.useState(null),[c,u]=P.useState(0),d=P.useRef(!1),p=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ed}\`. Expected non-empty \`string\`.`),v.jsx(Cd.Provider,{scope:t,children:v.jsx(KD,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:P.useCallback(()=>u(f=>f+1),[]),onToastRemove:P.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};dx.displayName=Ed;var fx="ToastViewport",YD=["F8"],kd="toast.viewportPause",Ad="toast.viewportResume",px=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=YD,label:o="Notifications ({hotkey})",...i}=e,a=Ss(fx,n),s=qD(n),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=en(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;P.useEffect(()=>{const h=y=>{var b;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),P.useEffect(()=>{const h=l.current,y=d.current;if(m&&h&&y){const x=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(kd);y.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(Ad);y.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!h.contains(T.relatedTarget)&&b()},w=()=>{h.contains(document.activeElement)||b()};return h.addEventListener("focusin",x),h.addEventListener("focusout",S),h.addEventListener("pointermove",x),h.addEventListener("pointerleave",w),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{h.removeEventListener("focusin",x),h.removeEventListener("focusout",S),h.removeEventListener("pointermove",x),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[m,a.isClosePausedRef]);const g=P.useCallback(({tabbingDirection:h})=>{const x=s().map(b=>{const S=b.ref.current,w=[S,...lN(S)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?x.reverse():x).flat()},[s]);return P.useEffect(()=>{const h=d.current;if(h){const y=x=>{var w,T,C;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const k=document.activeElement,_=x.shiftKey;if(x.target===h&&_){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:_?"backwards":"forwards"}),$=N.findIndex(I=>I===k);_d(N.slice($+1))?x.preventDefault():_?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[s,g]),v.jsxs(hD,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&v.jsx(Pd,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});_d(h)}}),v.jsx(Cd.Slot,{scope:n,children:v.jsx(Lt.ol,{tabIndex:-1,...i,ref:p})}),m&&v.jsx(Pd,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});_d(h)}})]})});px.displayName=fx;var hx="ToastFocusProxy",Pd=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss(hx,n);return v.jsx(gd,{"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()}})});Pd.displayName=hx;var Qi="Toast",GD="toast.swipeStart",ZD="toast.swipeMove",XD="toast.swipeCancel",QD="toast.swipeEnd",mx=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=Nb({prop:r,defaultProp:o??!0,onChange:i,caller:Qi});return v.jsx(Fb,{present:n||s,children:v.jsx(tN,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Yr(e.onPause),onResume:Yr(e.onResume),onSwipeStart:It(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:It(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:It(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:It(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});mx.displayName=Qi;var[JD,eN]=ux(Qi,{onClose(){}}),tN=P.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=Ss(Qi,n),[h,y]=P.useState(null),x=en(t,I=>y(I)),b=P.useRef(null),S=P.useRef(null),w=o||g.duration,T=P.useRef(0),C=P.useRef(w),k=P.useRef(0),{onToastAdd:_,onToastRemove:A}=g,L=Yr(()=>{var M;(h==null?void 0:h.contains(document.activeElement))&&((M=g.viewport)==null||M.focus()),a()}),N=P.useCallback(I=>{!I||I===1/0||(window.clearTimeout(k.current),T.current=new Date().getTime(),k.current=window.setTimeout(L,I))},[L]);P.useEffect(()=>{const I=g.viewport;if(I){const M=()=>{N(C.current),c==null||c()},D=()=>{const V=new Date().getTime()-T.current;C.current=C.current-V,window.clearTimeout(k.current),l==null||l()};return I.addEventListener(kd,D),I.addEventListener(Ad,M),()=>{I.removeEventListener(kd,D),I.removeEventListener(Ad,M)}}},[g.viewport,w,l,c,N]),P.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),P.useEffect(()=>(_(),()=>A()),[_,A]);const $=P.useMemo(()=>h?wx(h):null,[h]);return g.viewport?v.jsxs(v.Fragment,{children:[$&&v.jsx(nN,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),v.jsx(JD,{scope:n,onClose:L,children:_a.createPortal(v.jsx(Cd.ItemSlot,{scope:n,children:v.jsx(pD,{asChild:!0,onEscapeKeyDown:It(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||L(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(Lt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:It(e.onKeyDown,I=>{I.key==="Escape"&&(s==null||s(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:It(e.onPointerDown,I=>{I.button===0&&(b.current={x:I.clientX,y:I.clientY})}),onPointerMove:It(e.onPointerMove,I=>{if(!b.current)return;const M=I.clientX-b.current.x,D=I.clientY-b.current.y,V=!!S.current,F=["left","right"].includes(g.swipeDirection),H=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,O=F?H(0,M):0,B=F?0:H(0,D),X=I.pointerType==="touch"?10:2,Q={x:O,y:B},J={originalEvent:I,delta:Q};V?(S.current=Q,Ts(ZD,d,J,{discrete:!1})):Sx(Q,g.swipeDirection,X)?(S.current=Q,Ts(GD,u,J,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(M)>X||Math.abs(D)>X)&&(b.current=null)}),onPointerUp:It(e.onPointerUp,I=>{const M=S.current,D=I.target;if(D.hasPointerCapture(I.pointerId)&&D.releasePointerCapture(I.pointerId),S.current=null,b.current=null,M){const V=I.currentTarget,F={originalEvent:I,delta:M};Sx(M,g.swipeDirection,g.swipeThreshold)?Ts(QD,f,F,{discrete:!0}):Ts(XD,p,F,{discrete:!0}),V.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),nN=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Qi,t),[i,a]=P.useState(!1),[s,l]=P.useState(!1);return aN(()=>a(!0)),P.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:v.jsx(Rb,{asChild:!0,children:v.jsx(gd,{...r,children:i&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},rN="ToastTitle",gx=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Lt.div,{...r,ref:t})});gx.displayName=rN;var oN="ToastDescription",vx=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Lt.div,{...r,ref:t})});vx.displayName=oN;var yx="ToastAction",iN=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?v.jsx(xx,{altText:n,asChild:!0,children:v.jsx(Id,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${yx}\`. Expected non-empty \`string\`.`),null)});iN.displayName=yx;var bx="ToastClose",Id=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=eN(bx,n);return v.jsx(xx,{asChild:!0,children:v.jsx(Lt.button,{type:"button",...r,ref:t,onClick:It(e.onClick,o.onClose)})})});Id.displayName=bx;var xx=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return v.jsx(Lt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function wx(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),sN(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(...wx(r))}}),t}function Ts(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Mb(o,i):o.dispatchEvent(i)}var Sx=(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 aN(e=()=>{}){const t=Yr(e);jo(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function sN(e){return e.nodeType===e.ELEMENT_NODE}function lN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _d(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var cN=dx,uN=px,dN=mx,fN=gx,pN=vx,hN=Id;const mN=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},gN=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"}}),Tx=E.createContext(()=>{throw new Error("Not implemented")}),vN=()=>E.useContext(Tx),Ex={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]}},yN=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=gN({theme:t.theme||"default"});return v.jsx(dN,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:v.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"absolute top-0 right-0 w-80 pointer-events-auto text-select",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Ex[t.reversedIndex]||Ex.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:v.jsxs("div",{className:a,children:[v.jsxs("div",{className:"flex flex-col p-4",children:[t.title?v.jsx(fN,{className:"text-lg font-medium leading-relaxed select-text truncate",children:"Title"}):null,v.jsx(pN,{className:"select-text truncate",children:t.text})]}),r?v.jsx(hN,{className:"absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover",children:v.jsx(Wi,{className:"w-5 h-5"})}):null]})})})});function bN({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=mN(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return v.jsxs(cN,{duration:n,swipeThreshold:150,children:[v.jsx(Tx.Provider,{value:l,children:e}),v.jsx(or,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(yN,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),v.jsx(uN,{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 xN=e=>v.jsxs(ED,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:ke("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[v.jsx(CD,{style:{transform:Le.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:ke("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Le.number(e.percent)?v.jsxs("p",{className:ke("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:[e.percent," %"]}):null]}),wN=e=>v.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[v.jsxs("header",{className:"flex items-start gap-4 p-6",children:[v.jsx("div",{className:ke("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:v.jsx("div",{children:v.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx("header",{children:v.jsx("h3",{className:"text-base leading-none",children:e.title})}),v.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?v.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Cx=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},kx={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},Ax=E.createContext(""),SN=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Od=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!SN(a))return a}return n==="backward"?Od(e,e.length-1,"backward"):Od(e,-1,"forward")},Px=(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=Od(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Ix={[kx.ArrowLeft]:(e,t)=>Px(t,"backward"),[kx.ArrowRight]:(e,t)=>Px(t,"forward")},TN=e=>{const[t,n]=Cx(e.active),r=E.useRef(null),o=rr(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(Le.keyof(Ix,c)){const u=Ix[c],d=u(l,r.current);if(d===null)return;n(d)}};return v.jsx(Ax.Provider,{value:t,children:v.jsx(md,{className:e.className,container:ke("pt-0 max-w-full w-full min-w-0",e.container),header:v.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[v.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),v.jsx("nav",{className:"min-w-0",children:v.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return v.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:ke("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:v.jsx(cn,{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})})},EN=()=>E.useContext(Ax),CN=e=>{const t=EN();return v.jsx(E.Fragment,{children:e.id===t?e.children:null})},Es=e=>v.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[v.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),v.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Es.Icon=function(t){return v.jsx("header",{...t,className:ke("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Es.Body=function(t){return v.jsx(cn,{...t,className:ke("min-w-0 flex-1",t.className),children:t.children})},Es.Right=function(t){return v.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:v.jsx(cn,{...t,type:"button"})})};const kN=e=>v.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function Cs(){return typeof window<"u"}function dr(e){return _x(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gn(e){var t;return(t=(_x(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _x(e){return Cs()?e instanceof Node||e instanceof qt(e).Node:!1}function nt(e){return Cs()?e instanceof Element||e instanceof qt(e).Element:!1}function kt(e){return Cs()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Md(e){return!Cs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}function Ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function AN(e){return["table","td","th"].includes(dr(e))}function ks(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Dd(e){const t=Nd(),n=nt(e)?tn(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 PN(e){let t=Zn(e);for(;kt(t)&&!fr(t);){if(Dd(t))return t;if(ks(t))return null;t=Zn(t)}return null}function Nd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fr(e){return["html","body","#document"].includes(dr(e))}function tn(e){return qt(e).getComputedStyle(e)}function As(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zn(e){if(dr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Md(e)&&e.host||Gn(e);return Md(t)?t.host:t}function Ox(e){const t=Zn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&Ji(t)?t:Ox(t)}function pr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ox(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=Fd(a);return t.concat(a,a.visualViewport||[],Ji(o)?o:[],s&&n?pr(s):[])}return t.concat(o,pr(o,[],n))}function Fd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Md(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ld(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Mx(){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 Dx(e){return e.mozInputSource===0&&e.isTrusted?!0:jd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Vd(e){return IN()?!1:!jd()&&e.width===0&&e.height===0||jd()&&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 $d(){return/apple/i.test(navigator.vendor)}function jd(){const e=/android/i;return e.test(Ld())||e.test(Mx())}function Nx(){return Ld().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function IN(){return Mx().includes("jsdom/")}function Bo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function _N(e){return"nativeEvent"in e}function ON(e){return e.matches("html,body")}function Nt(e){return(e==null?void 0:e.ownerDocument)||document}function zd(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 Nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const MN="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bd(e){return kt(e)&&e.matches(MN)}function Vt(e){e.preventDefault(),e.stopPropagation()}function Fx(e){return e?e.getAttribute("role")==="combobox"&&Bd(e):!1}const Fn=Math.min,nn=Math.max,Ps=Math.round,Ro=Math.floor,hr=e=>({x:e,y:e}),DN={left:"right",right:"left",bottom:"top",top:"bottom"},NN={start:"end",end:"start"};function Rd(e,t,n){return nn(e,Fn(t,n))}function Ho(e,t){return typeof e=="function"?e(t):e}function mr(e){return e.split("-")[0]}function Wo(e){return e.split("-")[1]}function Lx(e){return e==="x"?"y":"x"}function Hd(e){return e==="y"?"height":"width"}function Gr(e){return["top","bottom"].includes(mr(e))?"y":"x"}function Wd(e){return Lx(Gr(e))}function FN(e,t,n){n===void 0&&(n=!1);const r=Wo(e),o=Wd(e),i=Hd(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 LN(e){const t=Is(e);return[qd(e),t,qd(t)]}function qd(e){return e.replace(/start|end/g,t=>NN[t])}function VN(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 $N(e,t,n,r){const o=Wo(e);let i=VN(mr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(qd)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>DN[t])}function jN(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vx(e){return typeof e!="number"?jN(e):{top:e,right:e,bottom:e,left:e}}function _s(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
219
+ Defaulting to \`null\`.`}var ED=Wb,CD=Ub,Zb=["PageUp","PageDown"],Xb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qb={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},zo="Slider",[xd,kD,AD]=Db(zo),[Jb,eR]=ys(zo,[AD]),[PD,ws]=Jb(zo),ex=P.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:m,...g}=e,h=P.useRef(new Set),y=P.useRef(0),b=a==="horizontal"?ID:_D,[S=[],w]=Nb({prop:u,defaultProp:c,onChange:L=>{var $;($=[...h.current][y.current])==null||$.focus(),d(L)}}),T=P.useRef(S);function C(L){const N=FD(S,L);A(L,N)}function k(L){A(L,y.current)}function _(){const L=T.current[y.current];S[y.current]!==L&&p(S)}function A(L,N,{commit:$}={commit:!1}){const I=jD(i),M=zD(Math.round((L-r)/i)*i+r,I),D=Hb(M,[r,o]);w((V=[])=>{const F=DD(V,D,N);if($D(F,l*i)){y.current=F.indexOf(D);const H=String(F)!==String(V);return H&&$&&p(F),H?F:V}else return V})}return v.jsx(PD,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:h.current,values:S,orientation:a,form:m,children:v.jsx(xd.Provider,{scope:e.__scopeSlider,children:v.jsx(xd.Slot,{scope:e.__scopeSlider,children:v.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:It(g.onPointerDown,()=>{s||(T.current=S)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:_,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,S.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:N})=>{if(!s){const M=Zb.includes(L.key)||L.shiftKey&&Xb.includes(L.key)?10:1,D=y.current,V=S[D],F=i*M*N;A(V+F,D,{commit:!0})}}})})})})});ex.displayName=zo;var[tx,nx]=Jb(zo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ID=P.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=P.useState(null),f=en(t,b=>p(b)),m=P.useRef(void 0),g=iD(o),h=g==="ltr",y=h&&!i||!h&&i;function x(b){const S=m.current||d.getBoundingClientRect(),w=[0,S.width],C=Td(w,y?[n,r]:[r,n]);return m.current=S,C(b-S.left)}return v.jsx(tx,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:v.jsx(rx,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const S=x(b.clientX);a==null||a(S)},onSlideMove:b=>{const S=x(b.clientX);s==null||s(S)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=Qb[y?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),_D=P.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=P.useRef(null),d=en(t,u),p=P.useRef(void 0),f=!o;function m(g){const h=p.current||u.current.getBoundingClientRect(),y=[0,h.height],b=Td(y,f?[r,n]:[n,r]);return p.current=h,b(g-h.top)}return v.jsx(tx,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:v.jsx(rx,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const h=m(g.clientY);i==null||i(h)},onSlideMove:g=>{const h=m(g.clientY);a==null||a(h)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const y=Qb[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:y?-1:1})}})})}),rx=P.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=ws(zo,n);return v.jsx(Lt.span,{...c,ref:t,onKeyDown:It(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):Zb.concat(Xb).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:It(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:It(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:It(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),ox="SliderTrack",ix=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ws(ox,n);return v.jsx(Lt.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});ix.displayName=ox;var wd="SliderRange",ax=P.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ws(wd,n),i=nx(wd,n),a=P.useRef(null),s=en(t,a),l=o.values.length,c=o.values.map(p=>cx(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return v.jsx(Lt.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});ax.displayName=wd;var Sd="SliderThumb",sx=P.forwardRef((e,t)=>{const n=kD(e.__scopeSlider),[r,o]=P.useState(null),i=en(t,s=>o(s)),a=P.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return v.jsx(OD,{...e,ref:i,index:a})}),OD=P.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=ws(Sd,n),s=nx(Sd,n),[l,c]=P.useState(null),u=en(t,x=>c(x)),d=l?a.form||!!l.closest("form"):!0,p=vD(l),f=a.values[r],m=f===void 0?0:cx(f,a.min,a.max),g=ND(r,a.values.length),h=p==null?void 0:p[s.size],y=h?LD(h,m,s.direction):0;return P.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),v.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${m}% + ${y}px)`},children:[v.jsx(xd.ItemSlot,{scope:e.__scopeSlider,children:v.jsx(Lt.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:It(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&v.jsx(lx,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});sx.displayName=Sd;var MD="RadioBubbleInput",lx=P.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=P.useRef(null),i=en(o,r),a=gD(t);return P.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),v.jsx(Lt.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});lx.displayName=MD;function DD(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function cx(e,t,n){const i=100/(n-t)*(e-t);return Hb(i,[0,100])}function ND(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function FD(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 LD(e,t,n){const r=e/2,i=Td([0,50],[0,r]);return(r-i(t)*n)*n}function VD(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function $D(e,t){if(t>0){const n=VD(e);return Math.min(...n)>=t}return!0}function Td(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function jD(e){return(String(e).split(".")[1]||"").length}function zD(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var BD=ex,RD=ix,HD=ax,WD=sx,Ed="ToastProvider",[Cd,qD,UD]=Db("Toast"),[ux,tR]=ys("Toast",[UD]),[KD,Ss]=ux(Ed),dx=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=P.useState(null),[c,u]=P.useState(0),d=P.useRef(!1),p=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ed}\`. Expected non-empty \`string\`.`),v.jsx(Cd.Provider,{scope:t,children:v.jsx(KD,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:P.useCallback(()=>u(f=>f+1),[]),onToastRemove:P.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};dx.displayName=Ed;var fx="ToastViewport",YD=["F8"],kd="toast.viewportPause",Ad="toast.viewportResume",px=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=YD,label:o="Notifications ({hotkey})",...i}=e,a=Ss(fx,n),s=qD(n),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=en(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=a.toastCount>0;P.useEffect(()=>{const h=y=>{var b;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),P.useEffect(()=>{const h=l.current,y=d.current;if(m&&h&&y){const x=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(kd);y.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(Ad);y.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!h.contains(T.relatedTarget)&&b()},w=()=>{h.contains(document.activeElement)||b()};return h.addEventListener("focusin",x),h.addEventListener("focusout",S),h.addEventListener("pointermove",x),h.addEventListener("pointerleave",w),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{h.removeEventListener("focusin",x),h.removeEventListener("focusout",S),h.removeEventListener("pointermove",x),h.removeEventListener("pointerleave",w),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[m,a.isClosePausedRef]);const g=P.useCallback(({tabbingDirection:h})=>{const x=s().map(b=>{const S=b.ref.current,w=[S,...lN(S)];return h==="forwards"?w:w.reverse()});return(h==="forwards"?x.reverse():x).flat()},[s]);return P.useEffect(()=>{const h=d.current;if(h){const y=x=>{var w,T,C;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const k=document.activeElement,_=x.shiftKey;if(x.target===h&&_){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:_?"backwards":"forwards"}),$=N.findIndex(I=>I===k);_d(N.slice($+1))?x.preventDefault():_?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return h.addEventListener("keydown",y),()=>h.removeEventListener("keydown",y)}},[s,g]),v.jsxs(hD,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&v.jsx(Pd,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});_d(h)}}),v.jsx(Cd.Slot,{scope:n,children:v.jsx(Lt.ol,{tabIndex:-1,...i,ref:p})}),m&&v.jsx(Pd,{ref:u,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});_d(h)}})]})});px.displayName=fx;var hx="ToastFocusProxy",Pd=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ss(hx,n);return v.jsx(gd,{"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()}})});Pd.displayName=hx;var Qi="Toast",GD="toast.swipeStart",ZD="toast.swipeMove",XD="toast.swipeCancel",QD="toast.swipeEnd",mx=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=Nb({prop:r,defaultProp:o??!0,onChange:i,caller:Qi});return v.jsx(Fb,{present:n||s,children:v.jsx(tN,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Yr(e.onPause),onResume:Yr(e.onResume),onSwipeStart:It(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:It(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:It(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:It(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});mx.displayName=Qi;var[JD,eN]=ux(Qi,{onClose(){}}),tN=P.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...m}=e,g=Ss(Qi,n),[h,y]=P.useState(null),x=en(t,I=>y(I)),b=P.useRef(null),S=P.useRef(null),w=o||g.duration,T=P.useRef(0),C=P.useRef(w),k=P.useRef(0),{onToastAdd:_,onToastRemove:A}=g,L=Yr(()=>{var M;(h==null?void 0:h.contains(document.activeElement))&&((M=g.viewport)==null||M.focus()),a()}),N=P.useCallback(I=>{!I||I===1/0||(window.clearTimeout(k.current),T.current=new Date().getTime(),k.current=window.setTimeout(L,I))},[L]);P.useEffect(()=>{const I=g.viewport;if(I){const M=()=>{N(C.current),c==null||c()},D=()=>{const V=new Date().getTime()-T.current;C.current=C.current-V,window.clearTimeout(k.current),l==null||l()};return I.addEventListener(kd,D),I.addEventListener(Ad,M),()=>{I.removeEventListener(kd,D),I.removeEventListener(Ad,M)}}},[g.viewport,w,l,c,N]),P.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),P.useEffect(()=>(_(),()=>A()),[_,A]);const $=P.useMemo(()=>h?wx(h):null,[h]);return g.viewport?v.jsxs(v.Fragment,{children:[$&&v.jsx(nN,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),v.jsx(JD,{scope:n,onClose:L,children:_a.createPortal(v.jsx(Cd.ItemSlot,{scope:n,children:v.jsx(pD,{asChild:!0,onEscapeKeyDown:It(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||L(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(Lt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:It(e.onKeyDown,I=>{I.key==="Escape"&&(s==null||s(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:It(e.onPointerDown,I=>{I.button===0&&(b.current={x:I.clientX,y:I.clientY})}),onPointerMove:It(e.onPointerMove,I=>{if(!b.current)return;const M=I.clientX-b.current.x,D=I.clientY-b.current.y,V=!!S.current,F=["left","right"].includes(g.swipeDirection),H=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,O=F?H(0,M):0,B=F?0:H(0,D),X=I.pointerType==="touch"?10:2,Q={x:O,y:B},J={originalEvent:I,delta:Q};V?(S.current=Q,Ts(ZD,d,J,{discrete:!1})):Sx(Q,g.swipeDirection,X)?(S.current=Q,Ts(GD,u,J,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(M)>X||Math.abs(D)>X)&&(b.current=null)}),onPointerUp:It(e.onPointerUp,I=>{const M=S.current,D=I.target;if(D.hasPointerCapture(I.pointerId)&&D.releasePointerCapture(I.pointerId),S.current=null,b.current=null,M){const V=I.currentTarget,F={originalEvent:I,delta:M};Sx(M,g.swipeDirection,g.swipeThreshold)?Ts(QD,f,F,{discrete:!0}):Ts(XD,p,F,{discrete:!0}),V.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),nN=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ss(Qi,t),[i,a]=P.useState(!1),[s,l]=P.useState(!1);return aN(()=>a(!0)),P.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:v.jsx(Rb,{asChild:!0,children:v.jsx(gd,{...r,children:i&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},rN="ToastTitle",gx=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Lt.div,{...r,ref:t})});gx.displayName=rN;var oN="ToastDescription",vx=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return v.jsx(Lt.div,{...r,ref:t})});vx.displayName=oN;var yx="ToastAction",iN=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?v.jsx(xx,{altText:n,asChild:!0,children:v.jsx(Id,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${yx}\`. Expected non-empty \`string\`.`),null)});iN.displayName=yx;var bx="ToastClose",Id=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=eN(bx,n);return v.jsx(xx,{asChild:!0,children:v.jsx(Lt.button,{type:"button",...r,ref:t,onClick:It(e.onClick,o.onClose)})})});Id.displayName=bx;var xx=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return v.jsx(Lt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function wx(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),sN(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(...wx(r))}}),t}function Ts(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Mb(o,i):o.dispatchEvent(i)}var Sx=(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 aN(e=()=>{}){const t=Yr(e);jo(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function sN(e){return e.nodeType===e.ELEMENT_NODE}function lN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _d(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var cN=dx,uN=px,dN=mx,fN=gx,pN=vx,hN=Id;const mN=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},gN=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"}}),Tx=E.createContext(()=>{throw new Error("Not implemented")}),vN=()=>E.useContext(Tx),Ex={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]}},yN=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=gN({theme:t.theme||"default"});return v.jsx(dN,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:v.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"absolute top-0 right-0 w-80 pointer-events-auto text-select",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Ex[t.reversedIndex]||Ex.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:v.jsxs("div",{className:a,children:[v.jsxs("div",{className:"flex flex-col p-4",children:[t.title?v.jsx(fN,{className:"text-lg font-medium leading-relaxed select-text truncate",children:"Title"}):null,v.jsx(pN,{className:"select-text truncate",children:t.text})]}),r?v.jsx(hN,{className:"absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover",children:v.jsx(Wi,{className:"w-5 h-5"})}):null]})})})});function bN({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=mN(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const m=[...f,{...u,id:d,text:c}];return m.length>t?m.slice(m.length-t,m.length+1):m}),{clear:s,close:()=>a(f=>f.filter(m=>m.id!==d))}},[t]);return v.jsxs(cN,{duration:n,swipeThreshold:150,children:[v.jsx(Tx.Provider,{value:l,children:e}),v.jsx(or,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(m=>m.id!==c.id));return E.createElement(yN,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),v.jsx(uN,{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 xN=e=>v.jsxs(ED,{max:e.max,value:e.percent,style:{transform:"translateZ(0)"},className:ke("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[v.jsx(CD,{style:{transform:Le.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:ke("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Le.number(e.percent)?v.jsxs("p",{className:ke("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:[e.percent," %"]}):null]}),wN=e=>v.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[v.jsxs("header",{className:"flex items-start gap-4 p-6",children:[v.jsx("div",{className:ke("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:v.jsx("div",{children:v.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx("header",{children:v.jsx("h3",{className:"text-base leading-none",children:e.title})}),v.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?v.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Cx=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},kx={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},Ax=E.createContext(""),SN=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Od=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!SN(a))return a}return n==="backward"?Od(e,e.length-1,"backward"):Od(e,-1,"forward")},Px=(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=Od(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Ix={[kx.ArrowLeft]:(e,t)=>Px(t,"backward"),[kx.ArrowRight]:(e,t)=>Px(t,"forward")},TN=e=>{const[t,n]=Cx(e.active),r=E.useRef(null),o=rr(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(Le.keyof(Ix,c)){const u=Ix[c],d=u(l,r.current);if(d===null)return;n(d)}};return v.jsx(Ax.Provider,{value:t,children:v.jsx(md,{className:e.className,container:ke("pt-0 max-w-full w-full min-w-0",e.container),header:v.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[v.jsx("div",{className:"absolute bottom-0 h-px w-full bg-card-border"}),v.jsx("nav",{className:"min-w-0",children:v.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return v.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:ke("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:v.jsx(cn,{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})})},EN=()=>E.useContext(Ax),CN=e=>{const t=EN();return v.jsx(E.Fragment,{children:e.id===t?e.children:null})},Es=e=>v.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[v.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),v.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Es.Icon=function(t){return v.jsx("header",{...t,className:ke("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Es.Body=function(t){return v.jsx(cn,{...t,className:ke("min-w-0 flex-1",t.className),children:t.children})},Es.Right=function(t){return v.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:v.jsx(cn,{...t,type:"button"})})};const kN=e=>v.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function Cs(){return typeof window<"u"}function dr(e){return _x(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gn(e){var t;return(t=(_x(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _x(e){return Cs()?e instanceof Node||e instanceof qt(e).Node:!1}function nt(e){return Cs()?e instanceof Element||e instanceof qt(e).Element:!1}function kt(e){return Cs()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Md(e){return!Cs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}function Ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function AN(e){return["table","td","th"].includes(dr(e))}function ks(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Dd(e){const t=Nd(),n=nt(e)?tn(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 PN(e){let t=Zn(e);for(;kt(t)&&!fr(t);){if(Dd(t))return t;if(ks(t))return null;t=Zn(t)}return null}function Nd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fr(e){return["html","body","#document"].includes(dr(e))}function tn(e){return qt(e).getComputedStyle(e)}function As(e){return nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zn(e){if(dr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Md(e)&&e.host||Gn(e);return Md(t)?t.host:t}function Ox(e){const t=Zn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&Ji(t)?t:Ox(t)}function pr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ox(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=Fd(a);return t.concat(a,a.visualViewport||[],Ji(o)?o:[],s&&n?pr(s):[])}return t.concat(o,pr(o,[],n))}function Fd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Md(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ld(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Mx(){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 Dx(e){return e.mozInputSource===0&&e.isTrusted?!0:jd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Vd(e){return IN()?!1:!jd()&&e.width===0&&e.height===0||jd()&&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 $d(){return/apple/i.test(navigator.vendor)}function jd(){const e=/android/i;return e.test(Ld())||e.test(Mx())}function Nx(){return Ld().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function IN(){return Mx().includes("jsdom/")}function Bo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function _N(e){return"nativeEvent"in e}function ON(e){return e.matches("html,body")}function Nt(e){return(e==null?void 0:e.ownerDocument)||document}function zd(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 Nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const MN="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bd(e){return kt(e)&&e.matches(MN)}function Vt(e){e.preventDefault(),e.stopPropagation()}function Fx(e){return e?e.getAttribute("role")==="combobox"&&Bd(e):!1}const Fn=Math.min,nn=Math.max,Ps=Math.round,Ro=Math.floor,hr=e=>({x:e,y:e}),DN={left:"right",right:"left",bottom:"top",top:"bottom"},NN={start:"end",end:"start"};function Rd(e,t,n){return nn(e,Fn(t,n))}function Ho(e,t){return typeof e=="function"?e(t):e}function mr(e){return e.split("-")[0]}function Wo(e){return e.split("-")[1]}function Lx(e){return e==="x"?"y":"x"}function Hd(e){return e==="y"?"height":"width"}function Gr(e){return["top","bottom"].includes(mr(e))?"y":"x"}function Wd(e){return Lx(Gr(e))}function FN(e,t,n){n===void 0&&(n=!1);const r=Wo(e),o=Wd(e),i=Hd(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 LN(e){const t=Is(e);return[qd(e),t,qd(t)]}function qd(e){return e.replace(/start|end/g,t=>NN[t])}function VN(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 $N(e,t,n,r){const o=Wo(e);let i=VN(mr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(qd)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>DN[t])}function jN(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vx(e){return typeof e!="number"?jN(e):{top:e,right:e,bottom:e,left:e}}function _s(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}}/*!
220
220
  * tabbable 6.2.0
221
221
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
222
- */var zN=["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])"],Os=zN.join(","),$x=typeof Element>"u",qo=$x?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ms=!$x&&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},Ds=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},BN=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},RN=function(t,n,r){if(Ds(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Os));return n&&qo.call(t,Os)&&o.unshift(t),o=o.filter(r),o},HN=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ds(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=qo.call(a,Os);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ds(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},jx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||BN(t))&&!jx(t)?0:t.tabIndex},WN=function(t,n){var r=zx(t);return r<0&&n&&!jx(t)?0:r},qN=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Bx=function(t){return t.tagName==="INPUT"},UN=function(t){return Bx(t)&&t.type==="hidden"},KN=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YN=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},GN=function(t){if(!t.name)return!0;var n=t.form||Ms(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=YN(o,t.form);return!i||i===t},ZN=function(t){return Bx(t)&&t.type==="radio"},XN=function(t){return ZN(t)&&!GN(t)},QN=function(t){var n,r=t&&Ms(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=Ms(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},Rx=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},JN=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(qo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ms(t);if(l&&!l.shadowRoot&&o(l)===!0)return Rx(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(QN(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Rx(t);return!1},e2=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},t2=function(t,n){return!(n.disabled||Ds(n)||UN(n)||JN(n,t)||KN(n)||e2(n))},Ud=function(t,n){return!(XN(n)||zx(n)<0||!t2(t,n))},n2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},r2=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=WN(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(qN).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=HN([t],n.includeContainer,{filter:Ud.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:n2}):r=RN(t,n.includeContainer,Ud.bind(null,n)),r2(r)},o2=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Os)===!1?!1:Ud(n,t)};function Hx(e,t,n){let{reference:r,floating:o}=e;const i=Gr(t),a=Wd(t),s=Hd(a),l=mr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Wo(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const i2=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}=Hx(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:y}=s[g],{x,y:b,data:S,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=b??d,f={...f,[h]:{...f[h],...S}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Hx(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Kd(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Ho(t,e),m=Vx(f),h=s[p?d==="floating"?"reference":"floating":d],y=_s(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=_s(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-w.top+m.top)/S.y,bottom:(w.bottom-y.bottom+m.bottom)/S.y,left:(y.left-w.left+m.left)/S.x,right:(w.right-y.right+m.right)/S.x}}const a2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ho(e,t)||{};if(c==null)return{};const d=Vx(u),p={x:n,y:r},f=Wd(o),m=Hd(f),g=await a.getDimensions(c),h=f==="y",y=h?"top":"left",x=h?"bottom":"right",b=h?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=T?T[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=s.floating[b]||i.floating[m]);const k=S/2-w/2,_=C/2-g[m]/2-1,A=Fn(d[y],_),L=Fn(d[x],_),N=A,$=C-g[m]-L,I=C/2-g[m]/2+k,M=Rd(N,I,$),D=!l.arrow&&Wo(o)!=null&&I!==M&&i.reference[m]/2-(I<N?A:L)-g[m]/2<0,V=D?I<N?I-N:I-$:0;return{[f]:p[f]+V,data:{[f]:M,centerOffset:I-M-V,...D&&{alignmentOffset:V}},reset:D}}}),s2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=Ho(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=mr(o),x=Gr(s),b=mr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[Is(s)]:LN(s)),T=m!=="none";!p&&T&&w.push(...$N(s,g,m,S));const C=[s,...w],k=await Kd(t,h),_=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&_.push(k[y]),d){const I=FN(o,a,S);_.push(k[I[0]],k[I[1]])}if(A=[...A,{placement:o,overflows:_}],!_.every(I=>I<=0)){var L,N;const I=(((L=i.flip)==null?void 0:L.index)||0)+1,M=C[I];if(M)return{data:{index:I,overflows:A},reset:{placement:M}};let D=(N=A.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(f){case"bestFit":{var $;const V=($=A.filter(F=>{if(T){const H=Gr(F.placement);return H===x||H==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(H=>H>0).reduce((H,O)=>H+O,0)]).sort((F,H)=>F[1]-H[1])[0])==null?void 0:$[0];V&&(D=V);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function l2(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=mr(n),s=Wo(n),l=Gr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ho(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const c2=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 l2(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}}}}},u2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...l}=Ho(e,t),c={x:n,y:r},u=await Kd(t,l),d=Gr(mr(o)),p=Lx(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=f+u[h],b=f-u[y];f=Rd(x,f,b)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=m+u[h],b=m-u[y];m=Rd(x,m,b)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},d2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Ho(e,t),l=await Kd(t,s),c=mr(n),u=Wo(n),d=Gr(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,y=p-l.left-l.right,x=Fn(f-l[m],h),b=Fn(p-l[g],y),S=!t.middlewareData.shift;let w=x,T=b;if(d?T=u||S?Fn(b,y):y:w=u||S?Fn(x,h):h,S&&!u){const k=nn(l.left,0),_=nn(l.right,0),A=nn(l.top,0),L=nn(l.bottom,0);d?T=p-2*(k!==0||_!==0?k+_:nn(l.left,l.right)):w=f-2*(A!==0||L!==0?A+L:nn(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 Wx(e){const t=tn(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=Ps(n)!==i||Ps(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Yd(e){return nt(e)?e:e.contextElement}function Uo(e){const t=Yd(e);if(!kt(t))return hr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Wx(t);let a=(i?Ps(n.width):n.width)/r,s=(i?Ps(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const f2=hr(0);function qx(e){const t=qt(e);return!Nd()||!t.visualViewport?f2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function p2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Zr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Yd(e);let a=hr(1);t&&(r?nt(r)&&(a=Uo(r)):a=Uo(e));const s=p2(i,n,r)?qx(i):hr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=qt(i),f=r&&nt(r)?qt(r):r;let m=p,g=Fd(m);for(;g&&r&&f!==m;){const h=Uo(g),y=g.getBoundingClientRect(),x=tn(g),b=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*h.x,S=y.top+(g.clientTop+parseFloat(x.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=b,c+=S,m=qt(g),g=Fd(m)}}return _s({width:u,height:d,x:l,y:c})}function h2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Gn(r),s=t?ks(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=hr(1);const u=hr(0),d=kt(r);if((d||!d&&!i)&&((dr(r)!=="body"||Ji(a))&&(l=As(r)),kt(r))){const p=Zr(r);c=Uo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function m2(e){return Array.from(e.getClientRects())}function Ux(e){return Zr(Gn(e)).left+As(e).scrollLeft}function g2(e){const t=Gn(e),n=As(e),r=e.ownerDocument.body,o=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ux(e);const s=-n.scrollTop;return tn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function v2(e,t){const n=qt(e),r=Gn(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=Nd();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function y2(e,t){const n=Zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?Uo(e):hr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function Kx(e,t,n){let r;if(t==="viewport")r=v2(e,n);else if(t==="document")r=g2(Gn(e));else if(nt(t))r=y2(t,n);else{const o=qx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return _s(r)}function Yx(e,t){const n=Zn(e);return n===t||!nt(n)||fr(n)?!1:tn(n).position==="fixed"||Yx(n,t)}function b2(e,t){const n=t.get(e);if(n)return n;let r=pr(e,[],!1).filter(s=>nt(s)&&dr(s)!=="body"),o=null;const i=tn(e).position==="fixed";let a=i?Zn(e):e;for(;nt(a)&&!fr(a);){const s=tn(a),l=Dd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ji(a)&&!l&&Yx(e,a))?r=r.filter(u=>u!==a):o=s,a=Zn(a)}return t.set(e,r),r}function x2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ks(t)?[]:b2(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Kx(t,u,o);return c.top=nn(d.top,c.top),c.right=Fn(d.right,c.right),c.bottom=Fn(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},Kx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function w2(e){const{width:t,height:n}=Wx(e);return{width:t,height:n}}function S2(e,t,n){const r=kt(t),o=Gn(t),i=n==="fixed",a=Zr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=hr(0);if(r||!r&&!i)if((dr(t)!=="body"||Ji(o))&&(s=As(t)),r){const d=Zr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Ux(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 Gd(e){return tn(e).position==="static"}function Gx(e,t){return!kt(e)||tn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Zx(e,t){const n=qt(e);if(ks(e))return n;if(!kt(e)){let o=Zn(e);for(;o&&!fr(o);){if(nt(o)&&!Gd(o))return o;o=Zn(o)}return n}let r=Gx(e,t);for(;r&&AN(r)&&Gd(r);)r=Gx(r,t);return r&&fr(r)&&Gd(r)&&!Dd(r)?n:r||PN(e)||n}const T2=async function(e){const t=this.getOffsetParent||Zx,n=this.getDimensions,r=await n(e.floating);return{reference:S2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function E2(e){return tn(e).direction==="rtl"}const C2={convertOffsetParentRelativeRectToViewportRelativeRect:h2,getDocumentElement:Gn,getClippingRect:x2,getOffsetParent:Zx,getElementRects:T2,getClientRects:m2,getDimensions:w2,getScale:Uo,isElement:nt,isRTL:E2};function k2(e,t){let n=null,r;const o=Gn(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=Ro(u),m=Ro(o.clientWidth-(c+d)),g=Ro(o.clientHeight-(u+p)),h=Ro(c),x={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:nn(0,Fn(1,l))||1};let b=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!b)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),i}function Ko(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=Yd(e),u=o||i?[...c?pr(c):[],...pr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?k2(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Zr(e):null;l&&h();function h(){const y=Zr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,m=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const A2=c2,P2=u2,I2=s2,_2=d2,Xx=a2,O2=(e,t,n)=>{const r=new Map,o={platform:C2,...n},i={...o.platform,_c:r};return i2(e,t,{...o,platform:i})};var Ns=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Fs(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(!Fs(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)&&!Fs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Qx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jx(e,t){const n=Qx(e);return Math.round(t*n)/n}function Zd(e){const t=P.useRef(e);return Ns(()=>{t.current=e}),t}function M2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=P.useState(r);Fs(p,r)||f(r);const[m,g]=P.useState(null),[h,y]=P.useState(null),x=P.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),b=P.useCallback(F=>{F!==C.current&&(C.current=F,y(F))},[]),S=i||m,w=a||h,T=P.useRef(null),C=P.useRef(null),k=P.useRef(u),_=l!=null,A=Zd(l),L=Zd(o),N=Zd(c),$=P.useCallback(()=>{if(!T.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};L.current&&(F.platform=L.current),O2(T.current,C.current,F).then(H=>{const O={...H,isPositioned:N.current!==!1};I.current&&!Fs(k.current,O)&&(k.current=O,_a.flushSync(()=>{d(O)}))})},[p,t,n,L,N]);Ns(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const I=P.useRef(!1);Ns(()=>(I.current=!0,()=>{I.current=!1}),[]),Ns(()=>{if(S&&(T.current=S),w&&(C.current=w),S&&w){if(A.current)return A.current(S,w,$);$()}},[S,w,$,A,_]);const M=P.useMemo(()=>({reference:T,floating:C,setReference:x,setFloating:b}),[x,b]),D=P.useMemo(()=>({reference:S,floating:w}),[S,w]),V=P.useMemo(()=>{const F={position:n,left:0,top:0};if(!D.floating)return F;const H=Jx(D.floating,u.x),O=Jx(D.floating,u.y);return s?{...F,transform:"translate("+H+"px, "+O+"px)",...Qx(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:O}},[n,s,D.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:M,elements:D,floatingStyles:V}),[u,$,M,D,V])}const D2=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?Xx({element:r.current,padding:o}).fn(n):{}:r?Xx({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...A2(e),options:[e,t]}),Xd=(e,t)=>({...P2(e),options:[e,t]}),Qd=(e,t)=>({...I2(e),options:[e,t]}),e0=(e,t)=>({..._2(e),options:[e,t]}),t0=(e,t)=>({...D2(e),options:[e,t]}),n0={...P},N2=n0.useInsertionEffect||(e=>e());function _t(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return N2(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Jd="ArrowUp",na="ArrowDown",Yo="ArrowLeft",Go="ArrowRight";function Ls(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function ef(e,t){return Bt(e,{disabledIndices:t})}function r0(e,t){return Bt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Bt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&Vs(a,s,o));return s}function F2(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===Jd){if(u&&Vt(n),c===-1)d=l;else if(d=Bt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}ra(e,d)&&(d=c)}if(n.key===na&&(u&&Vt(n),c===-1?d=s:(d=Bt(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Bt(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=c)),r==="both"){const p=Ro(c/i);n.key===Go&&(u&&Vt(n),c%i!==i-1?(d=Bt(e,{startingIndex:c,disabledIndices:a}),o&&Ls(d,i,p)&&(d=Bt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Bt(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ls(d,i,p)&&(d=c)),n.key===Yo&&(u&&Vt(n),c%i!==0?(d=Bt(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ls(d,i,p)&&(d=Bt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Bt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ls(d,i,p)&&(d=c));const f=Ro(l/i)===p;ra(e,d)&&(o&&f?d=n.key===Yo?l:Bt(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function L2(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 V2(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 $2(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Vs(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 o0=0;function gr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(o0);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():o0=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function j2(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 z2(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 i0=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function B2(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Map),a=P.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=P.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return We(()=>{const l=new Map(o);Array.from(l.keys()).sort(j2).forEach((u,d)=>{l.set(u,d)}),z2(o,l)||i(l)},[o]),P.createElement(i0.Provider,{value:P.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function a0(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=P.useContext(i0),[s,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return 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]),P.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Zo(){return Zo=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},Zo.apply(this,arguments)}let s0=!1,R2=0;const l0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+R2++;function H2(){const[e,t]=P.useState(()=>s0?l0():void 0);return We(()=>{e==null&&t(l0())},[]),P.useEffect(()=>{s0=!0},[]),e}const Xo=n0.useId||H2;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function $s(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function W2(){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 c0=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||$s("The `ref` prop is required for `FloatingArrow`."));const h=Xo(),[y,x]=P.useState(!1);if(We(()=>{if(!o)return;tn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const b=c*2,S=b/2,w=a/2*(l/-8+1),T=s/2*l/4,[C,k]=r.split("-"),_=!!p,A=C==="top"||C==="bottom",L=u&&k==="end"?"bottom":"top";let N=u&&k==="end"?"right":"left";u&&y&&(N=k==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",I=(i==null?void 0:i.y)!=null?u||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-T))+(" Q"+a/2+","+s+" "+w+","+(s-T))+" Z",D={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[C];return P.createElement("svg",Zo({},g,{"aria-hidden":!0,ref:n,width:_?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:$,[L]:I,[C]:A||_?"100%":"calc(100% - "+b/2+"px)",transform:""+D+(f??""),...m}}),b>0&&P.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:M}),P.createElement("path",{stroke:b&&!p?g.fill:"none",d:M}),P.createElement("clipPath",{id:h},P.createElement("rect",{x:-S,y:S*(_?-1:1),width:a+b,height:a})))});function u0(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.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 d0=P.createContext(null),f0=P.createContext(null),vr=()=>{var e;return((e=P.useContext(d0))==null?void 0:e.id)||null},yr=()=>P.useContext(f0);function q2(e){const t=Xo(),n=yr(),o=vr();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function U2(e){const{children:t,id:n}=e,r=vr();return P.createElement(d0.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function K2(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(a=>{n.current=[...n.current,a]},[]),o=P.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=P.useState(()=>u0())[0];return P.createElement(f0.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function br(e){return"data-floating-ui-"+e}function $t(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const p0=br("safe-polygon");function tf(e,t,n){return n&&!Bo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function h0(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=yr(),m=vr(),g=$t(c),h=$t(l),y=$t(n),x=P.useRef(),b=P.useRef(-1),S=P.useRef(),w=P.useRef(-1),T=P.useRef(!0),C=P.useRef(!1),k=P.useRef(()=>{}),_=P.useCallback(()=>{var M;const D=(M=o.current.openEvent)==null?void 0:M.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);P.useEffect(()=>{if(!s)return;function M(D){let{open:V}=D;V||(clearTimeout(b.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),P.useEffect(()=>{if(!s||!g.current||!n)return;function M(V){_()&&r(!1,V,"hover")}const D=Nt(a.floating).documentElement;return D.addEventListener("mouseleave",M),()=>{D.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,_]);const A=P.useCallback(function(M,D,V){D===void 0&&(D=!0),V===void 0&&(V="hover");const F=tf(h.current,"close",x.current);F&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,M,V),F)):D&&(clearTimeout(b.current),r(!1,M,V))},[h,r]),L=_t(()=>{k.current(),S.current=void 0}),N=_t(()=>{if(C.current){const M=Nt(a.floating).body;M.style.pointerEvents="",M.removeAttribute(p0),C.current=!1}});P.useEffect(()=>{if(!s)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(O){if(clearTimeout(b.current),T.current=!1,u&&!Bo(x.current)||d>0&&!tf(h.current,"open"))return;const B=tf(h.current,"open",x.current);B?b.current=window.setTimeout(()=>{y.current||r(!0,O,"hover")},B):r(!0,O,"hover")}function V(O){if(M())return;k.current();const B=Nt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),S.current=g.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),L(),A(O,!0,"safe-polygon")}});const Q=S.current;B.addEventListener("mousemove",Q),k.current=()=>{B.removeEventListener("mousemove",Q)};return}(x.current==="touch"?!xt(a.floating,O.relatedTarget):!0)&&A(O)}function F(O){M()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),L(),A(O)}})(O))}if(nt(a.domReference)){var H;const O=a.domReference;return n&&O.addEventListener("mouseleave",F),(H=a.floating)==null||H.addEventListener("mouseleave",F),p&&O.addEventListener("mousemove",D,{once:!0}),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",V),()=>{var B;n&&O.removeEventListener("mouseleave",F),(B=a.floating)==null||B.removeEventListener("mouseleave",F),p&&O.removeEventListener("mousemove",D),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,A,L,N,r,n,y,f,h,g,o]),We(()=>{var M;if(s&&n&&(M=g.current)!=null&&M.__options.blockPointerEvents&&_()){const V=Nt(a.floating).body;V.setAttribute(p0,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(nt(a.domReference)&&F){var D;const H=a.domReference,O=f==null||(D=f.nodesRef.current.find(B=>B.id===m))==null||(D=D.context)==null?void 0:D.elements.floating;return O&&(O.style.pointerEvents=""),H.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{H.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,_]),We(()=>{n||(x.current=void 0,L(),N())},[n,L,N]),P.useEffect(()=>()=>{L(),clearTimeout(b.current),clearTimeout(w.current),N()},[s,a.domReference,L,N]);const $=P.useMemo(()=>{function M(D){x.current=D.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(D){const{nativeEvent:V}=D;function F(){!T.current&&!y.current&&r(!0,V,"hover")}u&&!Bo(x.current)||n||d===0||(clearTimeout(w.current),x.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,y,d]),I=P.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(M){A(M.nativeEvent,!1)}}),[A]);return P.useMemo(()=>s?{reference:$,floating:I}:{},[s,$,I])}function Y2(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 Xr(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 G2(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Xr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Qo=new WeakMap,js=new WeakSet,zs={},nf=0;const Z2=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,m0=e=>e&&(e.host||m0(e.parentNode)),X2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=m0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Q2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=X2(t,e),s=new Set,l=new Set(a),c=[];zs[o]||(zs[o]=new WeakMap);const u=zs[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,m=>{if(dr(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",y=(Qo.get(m)||0)+1,x=(u.get(m)||0)+1;Qo.set(m,y),u.set(m,x),c.push(m),y===1&&h&&js.add(m),x===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return nf++,()=>{c.forEach(f=>{const m=(Qo.get(f)||0)-1,g=(u.get(f)||0)-1;Qo.set(f,m),u.set(f,g),m||(!js.has(f)&&i&&f.removeAttribute(i),js.delete(f)),g||f.removeAttribute(o)}),nf--,nf||(Qo=new WeakMap,Qo=new WeakMap,js=new WeakSet,zs={})}}function g0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Nt(e[0]).body;return Q2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Jo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function v0(e,t){const n=ea(e,Jo());t==="prev"&&n.reverse();const r=n.indexOf(xn(Nt(e)));return n.slice(r+1)[0]}function y0(){return v0(document.body,"next")}function b0(){return v0(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xt(n,r)}function J2(e){ea(e,Jo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function eF(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 tF(e,t,n){const r=e.indexOf(t);function o(a){const s=br("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 rf={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 nF;function x0(e){e.key==="Tab"&&(e.target,clearTimeout(nF))}const Bs=P.forwardRef(function(t,n){const[r,o]=P.useState();We(()=>($d()&&o("button"),document.addEventListener("keydown",x0),()=>{document.removeEventListener("keydown",x0)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[br("focus-guard")]:"",style:rf};return P.createElement("span",Zo({},t,i))}),w0=P.createContext(null),S0=br("portal");function rF(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Xo(),o=T0(),[i,a]=P.useState(null),s=P.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(S0,""),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&&!nt(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(S0,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Qr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=rF({id:n,root:r}),[a,s]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?eF:J2)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),P.createElement(w0.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&P.createElement(Bs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=b0()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&P.createElement("span",{"aria-owns":i.id,style:rf}),i&&_a.createPortal(t,i),p&&i&&P.createElement(Bs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=y0()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const T0=()=>P.useContext(w0),oF=20;let Jr=[];function of(e){Jr=Jr.filter(n=>n.isConnected);let t=e;if(!(!t||dr(t)==="body")){if(!o2(t,Jo())){const n=ea(t,Jo())[0];n&&(t=n)}Jr.push(t),Jr.length>oF&&(Jr=Jr.slice(-20))}}function E0(){return Jr.slice().reverse().find(e=>e.isConnected)}const iF=P.forwardRef(function(t,n){return P.createElement("button",Zo({},t,{type:"button",ref:n,tabIndex:-1,style:rf}))});function ei(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:y,floatingId:x,elements:{domReference:b,floating:S}}=t,w=typeof a=="number"&&a<0,T=Fx(b)&&w,C=Z2()?i:!0,k=$t(o),_=$t(a),A=$t(s),L=yr(),N=T0(),$=P.useRef(null),I=P.useRef(null),M=P.useRef(!1),D=P.useRef(!1),V=P.useRef(-1),F=N!=null,H=S==null?void 0:S.firstElementChild,O=(H==null?void 0:H.id)===x?H:S,B=_t(function(G){return G===void 0&&(G=O),G?ea(G,Jo()):[]}),X=_t(G=>{const Y=B(G);return k.current.map(Z=>b&&Z==="reference"?b:O&&Z==="floating"?O:Y).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function G(Z){if(Z.key==="Tab"){xt(O,xn(Nt(O)))&&B().length===0&&!T&&Vt(Z);const j=X(),z=Nn(Z);k.current[0]==="reference"&&z===b&&(Vt(Z),Z.shiftKey?gr(j[j.length-1]):gr(j[1])),k.current[1]==="floating"&&z===O&&Z.shiftKey&&(Vt(Z),gr(j[0]))}}const Y=Nt(O);return Y.addEventListener("keydown",G),()=>{Y.removeEventListener("keydown",G)}},[r,b,O,c,k,T,B,X]),P.useEffect(()=>{if(r||!S)return;function G(Y){const Z=Nn(Y),z=B().indexOf(Z);z!==-1&&(V.current=z)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,B]),P.useEffect(()=>{if(r||!d)return;function G(){D.current=!0,setTimeout(()=>{D.current=!1})}function Y(Z){const j=Z.relatedTarget;queueMicrotask(()=>{const z=!(xt(b,j)||xt(S,j)||xt(j,S)||xt(N==null?void 0:N.portalNode,j)||j!=null&&j.hasAttribute(br("focus-guard"))||L&&(Xr(L.nodesRef.current,m).find(K=>{var ae,R;return xt((ae=K.context)==null?void 0:ae.elements.floating,j)||xt((R=K.context)==null?void 0:R.elements.domReference,j)})||Y2(L.nodesRef.current,m).find(K=>{var ae,R;return((ae=K.context)==null?void 0:ae.elements.floating)===j||((R=K.context)==null?void 0:R.elements.domReference)===j})));if(l&&z&&xn(Nt(O))===Nt(O).body){kt(O)&&(O==null||O.focus());const K=V.current,ae=B(),R=ae[K]||ae[ae.length-1]||O;kt(R)&&R.focus()}(T||!c)&&j&&z&&!D.current&&j!==E0()&&(M.current=!0,g(!1,Z))})}if(S&&kt(b))return b.addEventListener("focusout",Y),b.addEventListener("pointerdown",G),S.addEventListener("focusout",Y),()=>{b.removeEventListener("focusout",Y),b.removeEventListener("pointerdown",G),S.removeEventListener("focusout",Y)}},[r,b,S,O,c,m,L,N,g,d,l,B,T]),P.useEffect(()=>{var G;if(r)return;const Y=Array.from((N==null||(G=N.portalNode)==null?void 0:G.querySelectorAll("["+br("portal")+"]"))||[]);if(S){const Z=[S,...Y,$.current,I.current,k.current.includes("reference")||T?b:null].filter(z=>z!=null),j=c||T?g0(Z,C,!C):g0(Z);return()=>{j()}}},[r,b,S,c,k,N,T,C]),We(()=>{if(r||!kt(O))return;const G=Nt(O),Y=xn(G);queueMicrotask(()=>{const Z=X(O),j=_.current,z=(typeof j=="number"?Z[j]:j.current)||O,K=xt(O,Y);!w&&!K&&p&&gr(z,{preventScroll:z===O})})},[r,p,O,w,X,_]),We(()=>{if(r||!O)return;let G=!1;const Y=Nt(O),Z=xn(Y);let z=y.current.openEvent;const K=f.domReference.current;of(Z);function ae(R){let{open:be,reason:Ce,event:_e,nested:Be}=R;be&&(z=_e),Ce==="escape-key"&&f.domReference.current&&of(f.domReference.current),Ce==="hover"&&_e.type==="mouseleave"&&(M.current=!0),Ce==="outside-press"&&(Be?(M.current=!1,G=!0):M.current=!(Dx(_e)||Vd(_e)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const R=xn(Y),be=xt(S,R)||L&&Xr(L.nodesRef.current,m).some(le=>{var we;return xt((we=le.context)==null?void 0:we.elements.floating,R)});(be||z&&["click","mousedown"].includes(z.type))&&f.domReference.current&&of(f.domReference.current);const _e=K||Z,Be=ea(Nt(_e).body,Jo());queueMicrotask(()=>{let le=E0();!le&&kt(_e)&&S&&(le=tF(Be,_e,S)),A.current&&!M.current&&kt(le)&&(!(le!==R&&R!==Y.body)||be)&&le.focus({preventScroll:G})})}},[r,S,O,A,y,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=B(),z=xn(Nt(S)),K=j.indexOf(z);K!==-1&&(V.current=K),k.current.includes("floating")||z!==f.domReference.current&&j.length===0?Z!=="0"&&O.setAttribute("tabindex","0"):Z!=="-1"&&O.setAttribute("tabindex","-1")};G();const Y=new MutationObserver(G);return Y.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,O,f,k,B,w]);function Q(G){return r||!u||!c?null:P.createElement(iF,{ref:G==="start"?$:I,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!T:!0)&&(F||c);return P.createElement(P.Fragment,null,J&&P.createElement(Bs,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:G=>{if(c){const Z=X();gr(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=y0()||b;Z==null||Z.focus()}else{var Y;(Y=N.beforeOutsideRef.current)==null||Y.focus()}}}),!T&&Q("start"),n,Q("end"),J&&P.createElement(Bs,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:G=>{if(c)gr(X()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(M.current=!0),ia(G,N.portalNode)){const Z=b0()||b;Z==null||Z.focus()}else{var Y;(Y=N.afterOutsideRef.current)==null||Y.focus()}}}))}const af=new Set,C0=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Xo();return We(()=>{if(!r)return;af.add(i);const a=/iP(hone|ad|od)|iOS/.test(Ld()),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()=>{af.delete(i),af.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),P.createElement("div",Zo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function k0(e){return kt(e.target)&&e.target.tagName==="BUTTON"}function A0(e){return Bd(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=P.useRef(),p=P.useRef(!1),f=P.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(Bo(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}Bo(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||k0(m))&&(m.key===" "&&!A0(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||k0(m)||A0(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function aF(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 P0(e){return e!=null&&e.clientX!=null}function sF(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=P.useRef(!1),p=P.useRef(null),[f,m]=P.useState(),[g,h]=P.useState([]),y=_t((T,C)=>{d.current||r.current.openEvent&&!P0(r.current.openEvent)||a.setPositionReference(aF(i,{x:T,y:C,axis:l,dataRef:r,pointerType:f}))}),x=_t(T=>{c!=null||u!=null||(n?p.current||h([]):y(T.clientX,T.clientY))}),b=Bo(f)?o:n,S=P.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const T=qt(o);function C(k){const _=Nn(k);xt(o,_)?(T.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||P0(r.current.openEvent)){T.addEventListener("mousemove",C);const k=()=>{T.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,y]);P.useEffect(()=>S(),[S,g]),P.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),P.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const w=P.useMemo(()=>{function T(C){let{pointerType:k}=C;m(k)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:x,onMouseEnter:x}},[x]);return P.useMemo(()=>s?{reference:w}:{},[s,w])}const lF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},cF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},I0=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 eo(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=yr(),h=_t(typeof l=="function"?l:()=>!1),y=typeof l=="function"?h:l,x=P.useRef(!1),b=P.useRef(!1),{escapeKey:S,outsidePress:w}=I0(f),{escapeKey:T,outsidePress:C}=I0(m),k=_t(I=>{var M;if(!n||!a||!s||I.key!=="Escape")return;const D=(M=i.current.floatingContext)==null?void 0:M.nodeId,V=g?Xr(g.nodesRef.current,D):[];if(!S&&(I.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(H=>{var O;if((O=H.context)!=null&&O.open&&!H.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,_N(I)?I.nativeEvent:I,"escape-key")}),_=_t(I=>{var M;const D=()=>{var V;k(I),(V=Nn(I))==null||V.removeEventListener("keydown",D)};(M=Nn(I))==null||M.addEventListener("keydown",D)}),A=_t(I=>{var M;const D=x.current;x.current=!1;const V=b.current;if(b.current=!1,c==="click"&&V||D||typeof y=="function"&&!y(I))return;const F=Nn(I),H="["+br("inert")+"]",O=Nt(o.floating).querySelectorAll(H);let B=nt(F)?F:null;for(;B&&!fr(B);){const G=Zn(B);if(fr(G)||!nt(G))break;B=G}if(O.length&&nt(F)&&!ON(F)&&!xt(F,o.floating)&&Array.from(O).every(G=>!xt(B,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&&I.offsetX>F.clientWidth;if(Y&&tn(F).direction==="rtl"&&(Z=I.offsetX<=F.offsetWidth-F.clientWidth),Z||G&&I.offsetY>F.clientHeight)return}const X=(M=i.current.floatingContext)==null?void 0:M.nodeId,Q=g&&Xr(g.nodesRef.current,X).some(G=>{var Y;return zd(I,(Y=G.context)==null?void 0:Y.elements.floating)});if(zd(I,o.floating)||zd(I,o.domReference)||Q)return;const J=g?Xr(g.nodesRef.current,X):[];if(J.length>0){let G=!0;if(J.forEach(Y=>{var Z;if((Z=Y.context)!=null&&Z.open&&!Y.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,I,"outside-press")}),L=_t(I=>{var M;const D=()=>{var V;A(I),(V=Nn(I))==null||V.removeEventListener(c,D)};(M=Nn(I))==null||M.addEventListener(c,D)});P.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function I(V){r(!1,V,"ancestor-scroll")}const M=Nt(o.floating);s&&M.addEventListener("keydown",T?_:k,T),y&&M.addEventListener(c,C?L:A,C);let D=[];return p&&(nt(o.domReference)&&(D=pr(o.domReference)),nt(o.floating)&&(D=D.concat(pr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(pr(o.reference.contextElement)))),D=D.filter(V=>{var F;return V!==((F=M.defaultView)==null?void 0:F.visualViewport)}),D.forEach(V=>{V.addEventListener("scroll",I,{passive:!0})}),()=>{s&&M.removeEventListener("keydown",T?_:k,T),y&&M.removeEventListener(c,C?L:A,C),D.forEach(V=>{V.removeEventListener("scroll",I)})}},[i,o,s,y,c,n,r,p,a,S,w,k,T,_,A,C,L]),P.useEffect(()=>{x.current=!1},[y,c]);const N=P.useMemo(()=>({onKeyDown:k,[lF[d]]:I=>{u&&r(!1,I.nativeEvent,"reference-press")}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[cF[c]]:()=>{x.current=!0}}),[k,c]);return P.useMemo(()=>a?{reference:N,floating:$}:{},[a,N,$])}function uF(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Xo(),i=P.useRef({}),[a]=P.useState(()=>u0()),s=vr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!nt(f)&&W2("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=P.useState(r.reference),u=_t((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=P.useMemo(()=>({setPositionReference:c}),[]),p=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function xr(e){e===void 0&&(e={});const{nodeId:t}=e,n=uF({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=P.useState(null),[s,l]=P.useState(null),u=(o==null?void 0:o.reference)||i,d=P.useRef(null),p=yr();We(()=>{u&&(d.current=u)},[u]);const f=M2({...e,elements:{...o,...s&&{reference:s}}}),m=P.useCallback(b=>{const S=nt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),g=P.useCallback(b=>{(nt(b)||b===null)&&(d.current=b,a(b)),(nt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!nt(b))&&f.refs.setReference(b)},[f.refs]),h=P.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),y=P.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),x=P.useMemo(()=>({...f,...r,refs:h,elements:y,nodeId:t}),[f,h,y,t,r]);return We(()=>{r.dataRef.current.floatingContext=x;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=x)}),P.useMemo(()=>({...f,context:x,refs:h,elements:y}),[f,h,y,x])}function dF(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(),d=P.useRef(!0);P.useEffect(()=>{if(!s)return;const f=qt(a.domReference);function m(){!n&&kt(a.domReference)&&a.domReference===xn(Nt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),P.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),P.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=P.useMemo(()=>({onPointerDown(f){Vd(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Nn(f.nativeEvent);if(l&&nt(m))try{if($d()&&Nx())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Bd(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=nt(m)&&m.hasAttribute(br("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=xn(a.domReference?a.domReference.ownerDocument:document);!m&&x===a.domReference||xt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,x)||xt(a.domReference,x)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return P.useMemo(()=>s?{reference:p}:{},[s,p])}const _0="active",O0="selected";function sf(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[_0]:a,[O0]: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&&[_0,O0].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 wr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=P.useCallback(s=>sf(s,e,"reference"),t),i=P.useCallback(s=>sf(s,e,"floating"),n),a=P.useCallback(s=>sf(s,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let M0=!1;function Rs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function D0(e,t){return Rs(t,e===Jd||e===na,e===Yo||e===Go)}function lf(e,t,n){return Rs(t,e===na,n?e===Yo:e===Go)||e==="Enter"||e===" "||e===""}function fF(e,t,n){return Rs(t,n?e===Yo:e===Go,e===na)}function N0(e,t,n){return Rs(t,n?e===Go:e===Yo,e===Jd)}function Hs(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||$s("`useListNavigation` looping must be enabled to allow escaping."),m||$s("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&$s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=vr(),A=yr(),L=_t(s),N=P.useRef(g),$=P.useRef(c??-1),I=P.useRef(null),M=P.useRef(!0),D=P.useRef(L),V=P.useRef(!!o.floating),F=P.useRef(n),H=P.useRef(!1),O=P.useRef(!1),B=$t(x),X=$t(n),Q=$t(w),J=$t(o.floating),G=$t(c),[Y,Z]=P.useState(),[j,z]=P.useState(),K=_t(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)):gr(de,{preventScroll:!0,sync:Nx()&&$d()?M0||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 te=Q.current;te&&R&&(ce||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof te=="boolean"?{block:"nearest",inline:"nearest"}:te))})});We(()=>{document.createElement("div").focus({get preventScroll(){return M0=!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&&(I.current!=null||N.current===!0&&I.current==null)){let le=0;const we=()=>{i.current[0]==null?(le<2&&(le?requestAnimationFrame:queueMicrotask)(we),le++):($.current=I.current==null||lf(I.current,b,f)||p?ef(i,B.current):r0(i,B.current),I.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,b,f,L,K,B]),We(()=>{var le;if(!l||o.floating||!A||m||!V.current)return;const we=A.nodesRef.current,ce=(le=we.find(de=>de.id===_))==null||(le=le.context)==null?void 0:le.elements.floating,Se=xn(Nt(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,_,m]),We(()=>{if(!l||!A||!m||_)return;function le(we){z(we.id),T&&(T.current=we)}return A.events.on("virtualfocus",le),()=>{A.events.off("virtualfocus",le)}},[l,A,m,_,T]),We(()=>{D.current=L,V.current=!!o.floating}),We(()=>{n||(I.current=null)},[n]),We(()=>{F.current=n},[n]);const ae=a!=null,R=P.useMemo(()=>{function le(ce){if(!n)return;const Se=i.current.indexOf(ce);Se!==-1&&L(Se)}return{onFocus(ce){let{currentTarget:Se}=ce;le(Se)},onClick:ce=>{let{currentTarget:Se}=ce;return Se.focus({preventScroll:!0})},...h&&{onMouseMove(ce){let{currentTarget:Se}=ce;le(Se)},onPointerLeave(ce){let{pointerType:Se}=ce;!M.current||Se==="touch"||($.current=-1,K(i,$),L(null),m||gr(J.current,{preventScroll:!0}))}}}},[n,J,K,h,i,L,m]),be=_t(le=>{if(M.current=!1,H.current=!0,!X.current&&le.currentTarget===J.current)return;if(p&&N0(le.key,b,f)){Vt(le),r(!1,le.nativeEvent,"list-navigation"),kt(o.domReference)&&!m&&o.domReference.focus();return}const we=$.current,ce=ef(i,x),Se=r0(i,x);if(le.key==="Home"&&(Vt(le),$.current=ce,L($.current)),le.key==="End"&&(Vt(le),$.current=Se,L($.current)),S>1){const ie=C||Array.from({length:i.current.length},()=>({width:1,height:1})),de=L2(ie,S,k),te=de.findIndex(ne=>ne!=null&&!Vs(i.current,ne,x)),q=de.reduce((ne,me,De)=>me!=null&&!Vs(i.current,me,x)?De:ne,-1);if($.current=de[F2({current:de.map(ne=>ne!=null?i.current[ne]:null)},{event:le,orientation:b,loop:d,cols:S,disabledIndices:$2([...x||i.current.map((ne,me)=>Vs(i.current,me)?me:void 0),void 0],de),minIndex:te,maxIndex:q,prevIndex:V2($.current>Se?ce:$.current,ie,de,S,le.key===na?"bl":le.key===Go?"tr":"tl"),stopEvent:!0})],L($.current),b==="both")return}if(D0(le.key,b)){if(Vt(le),n&&!m&&xn(le.currentTarget.ownerDocument)===le.currentTarget){$.current=lf(le.key,b,f)?ce:Se,L($.current);return}lf(le.key,b,f)?d?$.current=we>=Se?u&&we!==i.current.length?-1:ce:Bt(i,{startingIndex:we,disabledIndices:x}):$.current=Math.min(Se,Bt(i,{startingIndex:we,disabledIndices:x})):d?$.current=we<=ce?u&&we!==-1?i.current.length:Se:Bt(i,{startingIndex:we,decrement:!0,disabledIndices:x}):$.current=Math.max(ce,Bt(i,{startingIndex:we,decrement:!0,disabledIndices:x})),ra(i,$.current)?L(null):L($.current)}}),Ce=P.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":j||Y},[m,n,ae,j,Y]),_e=P.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!Fx(o.domReference)&&Ce,onKeyDown:be,onPointerMove(){M.current=!0}}),[Ce,be,o.domReference,b]),Be=P.useMemo(()=>{function le(ce){g==="auto"&&Dx(ce.nativeEvent)&&(N.current=!0)}function we(ce){N.current=g,g==="auto"&&Vd(ce.nativeEvent)&&(N.current=!0)}return{...Ce,onKeyDown(ce){M.current=!1;const Se=ce.key.indexOf("Arrow")===0,ie=fF(ce.key,b,f),de=N0(ce.key,b,f),te=D0(ce.key,b),q=(p?ie:te)||ce.key==="Enter"||ce.key.trim()==="";if(m&&n){const Ue=A==null?void 0:A.nodesRef.current.find(jt=>jt.parentId==null),Qe=A&&Ue?G2(A.nodesRef.current,Ue.id):null;if(Se&&Qe&&T){const jt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ie||de){var ne,me;const kn=((ne=Qe.context)==null?void 0:ne.elements.domReference)===ce.currentTarget,Wn=de&&!kn?(me=Qe.context)==null?void 0:me.elements.domReference:ie?i.current.find(Or=>(Or==null?void 0:Or.id)===Y):null;Wn&&(Vt(ce),Wn.dispatchEvent(jt),z(void 0))}if(te&&Qe.context&&Qe.context.open&&Qe.parentId&&ce.currentTarget!==Qe.context.elements.domReference){var De;Vt(ce),(De=Qe.context.elements.domReference)==null||De.dispatchEvent(jt);return}}return be(ce)}if(!(!n&&!y&&Se)){if(q&&(I.current=p&&te?null:ce.key),p){ie&&(Vt(ce),n?($.current=ef(i,B.current),L($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}te&&(c!=null&&($.current=c),Vt(ce),!n&&y?r(!0,ce.nativeEvent,"list-navigation"):be(ce),n&&L($.current))}},onFocus(){n&&!m&&L(null)},onPointerDown:we,onMouseDown:le,onClick:le}},[Y,Ce,be,B,g,i,p,L,r,n,y,b,f,c,A,m,T]);return P.useMemo(()=>l?{reference:Be,floating:_e,item:R}:{},[l,Be,_e,R])}const pF=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function to(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=pF.get(a))!=null?n:a,l=Xo(),u=vr()!=null,d=P.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=P.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=P.useCallback(m=>{let{active:g,selected:h}=m;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&h};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return P.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const F0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function ti(e,t){return typeof e=="function"?e(t):e}function hF(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function mF(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=P.useState("unmounted"),c=hF(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 L0(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=P.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=P.useState(()=>({...ti(i,c),...ti(n,c)})),{isMounted:g,status:h}=mF(e,{duration:a}),y=$t(n),x=$t(r),b=$t(o),S=$t(i);return We(()=>{const w=ti(y.current,c),T=ti(b.current,c),C=ti(S.current,c),k=ti(x.current,c)||Object.keys(w).reduce((_,A)=>(_[A]="",_),{});if(h==="initial"&&m(_=>({transitionProperty:_.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(k).map(F0).join(","),transitionDuration:d+"ms",...C,...k}),h==="close"){const _=T||w;m({transitionProperty:Object.keys(_).map(F0).join(","),transitionDuration:p+"ms",...C,..._})}},[p,b,y,x,S,d,h,c]),{isMounted:g,styles:f}}function gF(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=P.useRef(),g=P.useRef(""),h=P.useRef((n=f??a)!=null?n:-1),y=P.useRef(null),x=_t(s),b=_t(l),S=$t(u),w=$t(p);We(()=>{r&&(clearTimeout(m.current),y.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=_t(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=_t(A=>{function L(D,V,F){const H=S.current?S.current(V,F):V.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return H?D.indexOf(H):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(L(N,N,g.current)===-1?T(!1):A.key===" "&&Vt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Vt(A),T(!0)),N.every(D=>{var V,F;return D?((V=D[0])==null?void 0:V.toLocaleLowerCase())!==((F=D[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",h.current=y.current),g.current+=A.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=y.current,T(!1)},d);const I=h.current,M=L(N,[...N.slice((I||0)+1),...N.slice(0,(I||0)+1)],g.current);M!==-1?(x(M),y.current=M):A.key!==" "&&(g.current="",T(!1))}),k=P.useMemo(()=>({onKeyDown:C}),[C]),_=P.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&T(!1)}}),[C,T]);return P.useMemo(()=>c?{reference:k,floating:_}:{},[c,k,_])}function V0(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 vF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function $0(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,x=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,x}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:y,tree:x}=d;return function(S){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:T,clientY:C}=S,k=[T,C],_=Nn(S),A=S.type==="mouseleave",L=xt(g.floating,_),N=xt(g.domReference,_),$=g.domReference.getBoundingClientRect(),I=g.floating.getBoundingClientRect(),M=m.split("-")[0],D=p>I.right-I.width/2,V=f>I.bottom-I.height/2,F=vF(k,$),H=I.width>$.width,O=I.height>$.height,B=(H?$:I).left,X=(H?$:I).right,Q=(O?$:I).top,J=(O?$:I).bottom;if(L&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&nt(S.relatedTarget)&&xt(g.floating,S.relatedTarget)||x&&Xr(x.nodesRef.current,y).some(Z=>{let{context:j}=Z;return j==null?void 0:j.open}))return;if(M==="top"&&f>=$.bottom-1||M==="bottom"&&f<=$.top+1||M==="left"&&p>=$.right-1||M==="right"&&p<=$.left+1)return w();let G=[];switch(M){case"top":G=[[B,$.top+1],[B,I.bottom-1],[X,I.bottom-1],[X,$.top+1]];break;case"bottom":G=[[B,I.top+1],[B,$.bottom-1],[X,$.bottom-1],[X,I.top+1]];break;case"left":G=[[I.right-1,J],[I.right-1,Q],[$.left+1,Q],[$.left+1,J]];break;case"right":G=[[$.right-1,J],[$.right-1,Q],[I.left+1,Q],[I.left+1,J]];break}function Y(Z){let[j,z]=Z;switch(M){case"top":{const K=[H?j+t/2:D?j+t*4:j-t*4,z+t+1],ae=[H?j-t/2:D?j+t*4:j-t*4,z+t+1],R=[[I.left,D||H?I.bottom-t:I.top],[I.right,D?H?I.bottom-t:I.top:I.bottom-t]];return[K,ae,...R]}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],R=[[I.left,D||H?I.top+t:I.bottom],[I.right,D?H?I.top+t:I.bottom:I.top+t]];return[K,ae,...R]}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?I.right-t:I.left,I.top],[V?O?I.right-t:I.left:I.right-t,I.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],R=[[V||O?I.left+t:I.right,I.top],[V?O?I.left+t:I.right:I.left+t,I.bottom]];return[K,ae,...R]}}}if(!V0([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()}V0([T,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const yF=/Mac|iPod|iPhone|iPad/,Ws=()=>yF.test(navigator.userAgent),bF=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Ws()?"Meta":"Control":n==="Hyper"?Ws()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),j0=e=>e.map(t=>t.trim()).join("+");class xF{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=j0(bF(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=j0(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class wn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof wn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new wn(this);return t?t(n):n}static from(t,n){return new wn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(wn.from(t,n).values())}toArray(){return Array.from(this.values())}}const wF=(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]},z0=(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},B0={basic:/[,[\]]+?/,extend:/[,[\].]+?/},R0=(e,t)=>{const n=z0(t,B0.basic,e);return n!==void 0&&n!==e?n:z0(t,B0.extend,e)},H0=e=>e.replace(/[^0-9]/g,""),qs=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),W0=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?H0(e).includes(H0(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?wF(e,t)!==null:!1,SF=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>W0(e,o,n,r)):W0(e,t,n,r),cf=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Le.array(i.value)?i.value.map(qs):qs(`${i.value}`)}));return e.forEach(i=>{const a=R0(i,t);o.forEach(s=>{const l=R0(i,s.key);if(!l)return;const c=qs(`${s.value}`.toLocaleLowerCase()).trim(),u=qs(`${l}`.toLocaleLowerCase()).trim();if(SF(u,c,s.score,s.match))return void r.set(a,i);Le.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},TF=e=>(e=e.trim(),e==="Alt"?Ws()?v.jsx(BI,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Ws()?v.jsx(FI,{"aria-label":"Command",size:14}):"Ctrl":e),EF=e=>{const t=e.value.trim().split("+");return v.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return v.jsxs(E.Fragment,{children:[v.jsx("kbd",{"aria-label":n,children:TF(n)}),o?null:v.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},uf=v.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),CF=(e,t)=>ur()?t:window.matchMedia(e).matches,kF=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(CF(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},q0=()=>window.matchMedia("@media (pointer: coarse)"),AF=()=>{var r;const e=E.useRef(ur()?null:q0()),[t,n]=E.useState(ur()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?q0():e.current).addEventListener("change",i=>n(i.matches))},[]),t},df=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=AF(),o=E.useRef(ur()?"":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||wb())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(hT(c.style.height)):null,p=Le.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},PF=Ob,Sn="500ms",IF={exit:{x:["0%","-30%"],opacity:0,animationDuration:Sn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Sn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Sn}},_F={initial:{x:["30%","0%"],opacity:.8},enter:{x:"0%",opacity:1,animationDuration:Sn},exit:{x:["0%","30%"],opacity:0,animationDuration:Sn}},ff={drawer:e=>e==="left"?IF:_F,sheet:{initial:{opacity:.5,y:"25%",animationDuration:Sn,transformOrigin:"bottom"},enter:{opacity:1,y:"0%",animationDuration:Sn,transformOrigin:"bottom"},exit:{opacity:.1,y:"50%",animationDuration:Sn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Sn},initial:{opacity:.5,scale:.95,animationDuration:Sn,transition:{duration:.5,ease:"easeInOut"}},enter:{opacity:1,scale:[1.05,1],animationDuration:Sn}}},OF=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"}}),U0={top:0,left:0,right:0,bottom:0},K0=e=>e*.65,MF=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=K0(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return v.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:U0,whileDrag:{cursor:"grabbing"},className:ke("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?v.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Us={drawer:"right",sheet:"none",dialog:"none"},DF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Us.drawer:Us[o]:t?Us[o]:Us.sheet},NF=[],pf=E.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:m=void 0,overlayClassName:g="",type:h="dialog",position:y,overlayClickClose:x=!1,role:b="dialog",interactions:S=NF,...w},T)=>{const C=df(e,"block-only"),k=E.useId(),_=E.useId(),A=kF("(min-width: 64rem)"),L=h!=="dialog",N=DF(A,f,h,y),$=A||f?ff[h]:ff.sheet,I=typeof $=="function"?$(N):$,M=A||f?h:"sheet",D=xr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),V=aa(D.context),F=to(D.context,{role:b}),H=eo(D.context,{escapeKey:!0,referencePress:!0,outsidePress:x}),O=wr([V,F,H].concat(S)),B=o,X=es(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(),R=X.get()||ae.height,be=Math.abs(R-j.delta.y),Ce=K0(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:I},Y=d&&M==="sheet"?{dragElastic:0,onDrag:J,dragConstraints:U0,...G,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:M==="sheet",drag:M==="sheet"?"y":"x"}:G;return v.jsxs(E.Fragment,{children:[o?v.jsx(E.Fragment,{children:r?v.jsx(PF,{ref:D.refs.setReference,...O.getReferenceProps({layoutId:m}),children:B}):v.jsx(pt.button,{ref:D.refs.setReference,...O.getReferenceProps(),layoutId:m,type:"button",children:B})}):null,v.jsx(Qr,{preserveTabOrder:!0,children:v.jsx(or,{mode:"wait",propagate:!0,presenceAffectsLayout:!0,initial:!1,children:e?v.jsx(C0,{lockScroll:!0,className:ke(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${M==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:v.jsx(ei,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:D.context,children:v.jsxs(pt.div,{...w,...Y,...t?{"aria-labelledby":k,"aria-describedby":_}:{"aria-label":s},...O.getFloatingProps({"aria-modal":e,ref:qn(D.refs.setFloating,C),className:ke(OF({position:N,type:M}),l,"overscroll-contain")}),"data-component":"modal",style:M==="drawer"?{width:X}:{height:X},children:[t?v.jsx("header",{className:"relative w-full",children:t?v.jsx("h2",{id:k,className:"px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,v.jsx("section",{"data-component":"modal-body",className:ke("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?v.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?v.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:v.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:v.jsx(Wi,{})})}):null,L&&u?v.jsx(MF,{onChange:a,value:X,sheet:M==="sheet",position:N,parent:D.refs.floating}):null]})})}):null},k)})]})}),FF=e=>v.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Pc(e.item.title)?v.jsx(e.item.title,{text:e.text}):e.item.title}),LF=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?v.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:v.jsx(FF,{text:e.text,item:o})}):o.type!=="shortcut"?v.jsx(E.Fragment,{}):v.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[v.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,v.jsx("span",{children:Pc(o.title)?v.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?v.jsx(EF,{value:o.shortcut}):null]})}),VF=(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:Le.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Le.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=cf(o,"title",n),a=r.filter(s=>Le.function(s.enabled)?s.enabled({text:t}):!1);return wn.unique(i.concat(a),s=>s.title)},$F=[0,0,0,0,0],jF=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=Ct(),[o,i]=E.useState(""),a=rr(o),s=E.useId(),l=E.useRef(null),[c,u]=E.useState(null),d=xr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Ko}),p=Hs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:x=>u(b=>Le.number(x)?x:e.open?b??0:null)}),{getItemProps:f}=wr([p]),m=e.commands.flatMap(x=>x.type==="group"?[x,...x.items]:[x]),g=VF(m,o),h=o===""?m:[{type:"group",title:"Results",items:[]},...g.filter(x=>x.type!=="group")];E.useEffect(()=>{const x=new xF;return x.add(t,()=>{var b;return(b=e.onChangeVisibility)==null?void 0:b.call(e,!0)}),m.forEach(b=>{b.type!=="group"&&b.type==="shortcut"&&b.shortcut!==void 0&&x.add(b.shortcut,S=>b.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),x.register()},[t]);const y=e.Icon??Ty;return v.jsx(E.Fragment,{children:v.jsxs(pf,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[v.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[v.jsx("div",{className:"flex size-10 items-center justify-center",children:v.jsx(y,{Default:Ty,text:o,size:16})}),v.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:x=>i(x.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:x=>{var b;if((x.key==="ArrowDown"||x.key==="ArrowUp")&&c!==null&&((b=n.current[c])==null||b.scrollIntoView({block:"start",inline:"start"})),x.key==="Enter"){if(c!==null&&h[c]){x.preventDefault();const S=h[c],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}if(h.length===1){x.preventDefault();const S=h[0],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[v.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),$F.map((x,b)=>v.jsx("li",{className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:uf},`${s}-${b}-skeleton-index`))]}):v.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[h.map((x,b)=>E.createElement(LF,{...f({onMouseEnter:()=>u(b),ref(S){n.current[b]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),x.type==="shortcut"&&x.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:x,text:o,active:c===b,key:`${s}-${x.type}-${b}`})),h.length===1?v.jsx("div",{className:ke("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Le.number(c)?v.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?v.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},ni=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ta(10),Qd({fallbackAxisSideDirection:"end"}),Xd(),t0({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=xr({open:n,middleware:i,transform:!0,whileElementsMounted:Ko,onOpenChange:(m,g)=>{var y;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(y=e.onChange)==null||y.call(e,m))}}),c=aa(l),u=eo(l),d=to(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=wr([c,u,d]);return v.jsxs(E.Fragment,{children:[v.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&v.jsx(Qr,{preserveTabOrder:!0,id:`${t}-portal`,children:v.jsx(ei,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:v.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[v.jsx(c0,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),v.jsx("header",{className:"mb-2",children:v.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},zF=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}=xr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=aa(s,{enabled:e.disabled??!0}),u=to(s,{role:"tooltip"}),d=eo(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=wr([c,u,d]);return v.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[v.jsx(Na,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:v.jsx(pt.span,{layoutId:o,children:e.trigger})}),v.jsx(or,{children:i?v.jsx(Qr,{root:t,children:v.jsx(ei,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:v.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Y0=200,BF=500,G0=(e="")=>ke("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),hf=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Z0=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=E.useState(r??!1),[p,f]=E.useState(!1),[m,g]=E.useState(null),h=E.useRef([]),y=E.useRef([]),x=E.useContext(hf),b=vr(),S=yr(),w=q2(),T=a0(),C=b!==null,{floatingStyles:k,refs:_,context:A}=xr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Ko,placement:C?"right":"bottom-start",middleware:[ta({mainAxis:C?0:4,alignmentAxis:C?-4:0}),Qd(),Xd()]}),L=to(A,{role:"menu"}),N=eo(A,{bubbles:!0}),$=h0(A,{move:!1,enabled:n,delay:{open:Y0},handleClose:$0({blockPointerEvents:!0})}),I=aa(A,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),M=Hs(A,{loop:!0,activeIndex:m,nested:C,listRef:h,onNavigate:g}),D=gF(A,{activeIndex:m,listRef:y,resetMs:BF,onMatch:u?g:void 0}),{getReferenceProps:V,getFloatingProps:F,getItemProps:H}=wr([$,I,L,N,M,D]);E.useEffect(()=>{if(!S)return;const B=()=>d(!1),X=Q=>{Q.nodeId!==w&&Q.parentId===b&&d(!1)};return S.events.on("click",B),S.events.on("menuopen",X),()=>{S.events.off("click",B),S.events.off("menuopen",X)}},[S,w,b]),E.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:b,nodeId:w})},[S,u,w,b]);const O=o?l.className:ke(G0(l.className));return v.jsxs(U2,{id:w,children:[v.jsx(E.Fragment,{children:l.asChild?v.jsx(Ob,{...V(x.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),x.setHasFocusInside(!0)}})),children:s,className:O,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:qn(_.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0}):v.jsxs("button",{type:"button",className:O,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:qn(_.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0,...V(x.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),x.setHasFocusInside(!0)}})),children:[s,C&&v.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[v.jsx("span",{className:"sr-only",children:"Next menu"}),v.jsx(Wu,{size:14})]})]})}),v.jsx(hf.Provider,{value:{activeIndex:m,setActiveIndex:g,getItemProps:H,setHasFocusInside:f,isOpen:u},children:v.jsx(B2,{elementsRef:h,labelsRef:y,children:u&&v.jsx(Qr,{preserveTabOrder:!0,children:v.jsx(ei,{context:A,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:v.jsx(t,{...F(),ref:_.setFloating,style:{...l.style,...k},className:ke("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),RF=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(hf),s=a0({label:n?null:e}),l=yr(),c=s.index===a.activeIndex;return v.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:qn(s.ref,i),className:G0(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?v.jsx(t,{size:16}):null]})}),HF=E.forwardRef((e,t)=>vr()===null?v.jsx(K2,{children:v.jsx(Z0,{...e,isParent:!0,ref:t})}):v.jsx(Z0,{...e,isParent:!1,ref:t})),WF=e=>v.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),mf=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),y=t||"span",x=I=>{g(I),d==null||d(I)},{refs:b,floatingStyles:S,context:w}=xr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:Ko,onOpenChange:i?void 0:x,middleware:[Xd(),ta(5),Qd({fallbackAxisSideDirection:"start"}),t0({padding:5,element:h})]}),T=h0(w,{move:!0,delay:{open:Y0},enabled:l?s:!1,handleClose:c?$0():null}),C=dF(w,{enabled:l?a:!1}),k=aa(w,{enabled:l?c:!1}),_=eo(w,{enabled:l}),A=to(w,{role:"tooltip",enabled:l}),L=sF(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:$}=wr([A,_,L,a?C:void 0,s?T:void 0,c?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),v.jsxs(E.Fragment,{children:[v.jsx(y,{...N(p),ref:qn(b.setReference,f),children:n}),m&&v.jsx(Qr,{preserveTabOrder:!0,children:v.jsxs(cn,{...$(),ref:b.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[v.jsx(c0,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Ks=0,Sr=1,ri=2,X0=4;function Q0(e){return()=>e}function qF(e){e()}function sa(e,t){return n=>e(t(n))}function J0(e,t){return()=>e(t)}function ew(e,t){return n=>e(t,n)}function gf(e){return e!==void 0}function UF(...e){return()=>{e.map(qF)}}function oi(){}function Ys(e,t){return t(e),e}function KF(e,t){return t(e)}function ct(...e){return e}function tt(e,t){return e(Sr,t)}function Ne(e,t){e(Ks,t)}function vf(e){e(ri)}function Rt(e){return e(X0)}function xe(e,t){return tt(e,ew(t,Ks))}function Ln(e,t){const n=e(Sr,r=>{n(),t(r)});return n}function tw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function nw(e,t){return e===t}function ut(e=nw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ae(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Vn(e){return t=>()=>{t(e)}}function re(e,...t){const n=YF(...t);return(r,o)=>{switch(r){case ri:vf(e);return;case Sr:return tt(e,n(o))}}}function $n(e,t){return n=>r=>{n(t=e(t,r))}}function ii(e){return t=>n=>{e>0?e--:t(n)}}function Tr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ve(...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 YF(...e){return t=>e.reduceRight(KF,t)}function GF(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Sr:return i?n===i?void 0:(r(),n=i,t=tt(e,i),t):(r(),oi);case ri:r(),n=null;return}}}function se(e){let t=e;const n=He();return(r,o)=>{switch(r){case Ks:t=o;break;case Sr:{o(t);break}case X0:return t}return n(r,o)}}function Ht(e,t){return Ys(se(t),n=>xe(e,n))}function He(){const e=[];return(t,n)=>{switch(t){case Ks:e.slice().forEach(r=>{r(n)});return;case ri:e.splice(0,e.length);return;case Sr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function rn(e){return Ys(He(),t=>xe(e,t))}function Ye(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:ZF(),singleton:n}}const ZF=()=>Symbol();function XF(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 Ot(...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 ri:{vf(t);return}case Sr:return r===o&&a(n),tt(t,a)}}}function Ie(e,t=nw){return re(e,ut(t))}function rw(...e){return function(t,n){switch(t){case ri:return;case Sr:return UF(...e.map(r=>tt(r,n)))}}}var on=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(on||{});const QF={0:"debug",3:"error",1:"log",2:"warn"},JF=()=>typeof globalThis>"u"?window:globalThis,Er=Ye(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=JF().VIRTUOSO_LOG_LEVEL)!=null?o:Rt(e);r>=i&&console[QF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function jn(e,t,n){return yf(e,t,n).callbackRef}function yf(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 ow(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=eL(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y}),i==null||i(s?iw("column-gap",getComputedStyle(u).columnGap,o):iw("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return yf(c,n,l)}function eL(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},on.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 iw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,on.WARN),t==="normal"?0:parseInt(t??"0",10)}function bf(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}=yf(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Ut=Ye(()=>{const e=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 aw(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===la}function ca(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function Tn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Tn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Tn(e.l,t,n)}function an(e,t,n){return ot(e)?cw(t,n,1):t===e.k?Mt(e,{k:t,v:n}):t<e.k?uw(Mt(e,{l:an(e.l,t,n)})):uw(Mt(e,{r:an(e.r,t,n)}))}function ai(){return la}function Gs(e,t,n){if(ot(e))return[];const r=Tn(e,t)[0];return tL(wf(e,r,n))}function xf(e,t){if(ot(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=lw(r);return Zs(Mt(e,{k:i,l:sw(r),v:a}))}}else return t<n?Zs(Mt(e,{l:xf(r,t)})):Zs(Mt(e,{r:xf(o,t)}))}function no(e){return ot(e)?[]:[...no(e.l),{k:e.k,v:e.v},...no(e.r)]}function wf(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(wf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(wf(i,t,n))),s}function Zs(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(Sf(t))return dw(Mt(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return Mt(t.r,{l:Mt(t,{r:t.r.l}),lvl:n,r:Mt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Sf(e))return Tf(Mt(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=Sf(o)?r.lvl-1:r.lvl;return Mt(o,{l:Mt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Tf(Mt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Mt(e,t){return cw(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 sw(e){return ot(e.r)?e.l:Zs(Mt(e,{r:sw(e.r)}))}function Sf(e){return ot(e)||e.lvl>e.r.lvl}function lw(e){return ot(e.r)?[e.k,e.v]:lw(e.r)}function cw(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function uw(e){return Tf(dw(e))}function dw(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Mt(t,{r:Mt(e,{l:t.r})}):e}function Tf(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Mt(n,{l:Mt(e,{r:n.l}),lvl:t+1}):e}function tL(e){return aw(e,({k:t,v:n})=>({index:t,value:n}))}function fw(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 Ef=Ye(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function pw(e,t,n){return e[Xs(e,t,n)]}function Xs(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 nL(e,t,n,r){const o=Xs(e,t,r),i=Xs(e,n,r,o);return e.slice(o,i+1)}function En(e,t){return Math.round(e.getBoundingClientRect()[t])}function Qs(e){return!ot(e.groupOffsetTree)}function Cf({index:e},t){return t===e?0:t<e?-1:1}function rL(){return{groupIndices:[],groupOffsetTree:ai(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ai()}}function oL(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=an(e,0,i);continue}const s=Gs(e,a-1,o+1);if(s.some(dL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=xf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=an(e,o+1,p));c&&(e=an(e,a,i))}return[e,n]}function iL(e){return typeof e.groupIndex<"u"}function aL({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}=pw(t,e,Cf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function hw(e,t){if(!Qs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function mw(e,t,n){if(iL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=hw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function sL(e,t,n,r=0){return r>0&&(t=Math.max(t,pw(e,r,Cf).offset)),aw(nL(e,t,n,aL),uL)}function lL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,on.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>an(an(m,g,p),g+1,f),a)}else[a,s]=oL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=kf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>an(p,f,da(f,d,o)),ai()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function cL(e){return no(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 gw(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 kf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Xs(o,t-1,Cf),s=o[l].offset;const c=Tn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Tn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Gs(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function uL(e){return{index:e.index,value:e}}function dL(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 fL={offsetHeight:"height",offsetWidth:"width"},zn=Ye(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),o=Ht(r,0),i=He(),a=He(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,T)=>En(w,fL[T])),p=se(void 0),f=se(0),m=rL(),g=Ht(re(n,Ve(l,e,f),$n(lL,m),ut()),m),h=Ht(re(l,ut(),$n((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);xe(re(l,Ae(w=>w.length>0),Ve(g,f),he(([w,T,C])=>{const k=w.reduce((_,A,L)=>an(_,A,da(A,T.offsetTree,C)||L),ai());return{...T,groupIndices:w,groupOffsetTree:k}})),g),xe(re(r,Ve(g),Ae(([w,{lastIndex:T}])=>w<T),he(([w,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:w}])),n),xe(c,u);const y=Ht(re(c,he(w=>w===void 0)),!0);xe(re(u,Ae(w=>w!==void 0&&ot(Rt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const x=rn(re(n,Ve(g),$n(({sizes:w},[T,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));tt(re(s,$n((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:T}=Rt(g);if(w>0)Ne(t,!0),Ne(i,w+gw(w,T));else if(w<0){const C=Rt(h);C.length>0&&(w-=gw(-w,C)),Ne(a,w)}}),tt(re(s,Ve(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},on.ERROR)});const b=rn(i);xe(re(i,Ve(g),he(([w,T])=>{const C=T.groupIndices.length>0,k=[],_=T.lastSize;if(C){const A=ca(T.sizeTree,0);let L=0,N=0;for(;L<w;){const I=T.groupIndices[N],M=T.groupIndices.length===N+1?1/0:T.groupIndices[N+1]-I-1;k.push({endIndex:I,size:A,startIndex:I}),k.push({endIndex:I+1+M-1,size:_,startIndex:I+1}),N++,L+=M+1}const $=no(T.sizeTree);return L!==w&&$.shift(),$.reduce((I,{k:M,v:D})=>{let V=I.ranges;return I.prevSize!==0&&(V=[...I.ranges,{endIndex:M+w-1,size:I.prevSize,startIndex:I.prevIndex}]),{prevIndex:M+w,prevSize:D,ranges:V}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return no(T.sizeTree).reduce((A,{k:L,v:N})=>({prevIndex:L+w,prevSize:N,ranges:[...A.ranges,{endIndex:L+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:_,ranges:[]}).ranges})),n);const S=rn(re(a,Ve(g,f),he(([w,{offsetTree:T},C])=>{const k=-w;return da(k,T,C)})));return xe(re(a,Ve(g,f),he(([w,T,C])=>{if(T.groupIndices.length>0){if(ot(T.sizeTree))return T;let k=ai();const _=Rt(h);let A=0,L=0,N=0;for(;A<-w;){N=_[L];const $=_[L+1]-N-1;L++,A+=$+1}if(k=no(T.sizeTree).reduce(($,{k:I,v:M})=>an($,Math.max(0,I+w),M),k),A!==-w){const $=ca(T.sizeTree,N);k=an(k,0,$);const I=Tn(T.sizeTree,-w+1)[1];k=an(k,1,I)}return{...T,sizeTree:k,...kf(T.offsetTree,0,k,C)}}else{const k=no(T.sizeTree).reduce((_,{k:A,v:L})=>an(_,Math.max(0,A+w),L),ai());return{...T,sizeTree:k,...kf(T.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:x,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},ct(Er,Ef),{singleton:!0});function pL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const vw=Ye(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=He(),a=He(),s=rn(re(i,he(pL)));return xe(re(s,he(l=>l.totalCount)),n),xe(re(s,he(l=>l.groupIndices)),e),xe(re(Ot(o,t,r),Ae(([l,c])=>Qs(c)),he(([l,c,u])=>Tn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ut(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ct(zn,Ut)),Cr=Ye(([{log:e}])=>{const t=se(!1),n=rn(re(t,Ae(r=>r),ut()));return tt(t,r=>{r&&Rt(e)("props updated",{},on.DEBUG)}),{didMount:n,propsReady:t}},ct(Er),{singleton:!0}),hL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function yw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!hL)&&(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,y=null,x=null;function b(){h&&(h(),h=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),Ne(l,!1)}return xe(re(f,Ve(n,d,r,g,s,a,p),Ve(e,i,o),he(([[S,w,T,C,k,_,A,L],N,$,I])=>{const M=yw(S),{align:D,behavior:V,offset:F}=M,H=C-1,O=mw(M,w,H);let B=da(O,w.offsetTree,N)+_;D==="end"?(B+=$+Tn(w.sizeTree,O)[1]-T+I,O===H&&(B+=A)):D==="center"?B+=($+Tn(w.sizeTree,O)[1]-T+I)/2:B-=k,F&&(B+=F);const X=Q=>{b(),Q?(L("retrying to scroll to",{location:S},on.DEBUG),Ne(f,S)):(Ne(m,!0),L("list did not change, scroll successful",{},on.DEBUG))};if(b(),V==="smooth"){let Q=!1;x=tt(t,J=>{Q=Q||J}),h=Ln(u,()=>{X(Q)})}else h=Ln(re(t,mL(150)),X);return y=setTimeout(()=>{b()},1200),Ne(l,!0),L("scrolling from index to",{behavior:V,index:O,top:B},on.DEBUG),{behavior:V,top:B}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},ct(zn,Ut,Er),{singleton:!0});function mL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Af(e,t){e==0?t():requestAnimationFrame(()=>{Af(e-1,t)})}function Pf(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,Ve(l),Ae(([u,d])=>!!d),Vn(!1)),s),xe(re(a,Ve(l),Ae(([u,d])=>!!d),Vn(!1)),c),tt(re(Ot(t,a),Ve(s,n,e,c),Ae(([[,u],d,{sizeTree:p},f,m])=>u&&(!ot(p)||gf(f))&&!d&&!m),Ve(l)),([,u])=>{Ln(o,()=>{Ne(c,!0)}),Af(4,()=>{Ln(r,()=>{Ne(s,!0)}),Ne(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ct(zn,Ut,fa,Cr),{singleton:!0});function bw(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",gL="none",vL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},yL=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(yL),p=Ht(re(rw(re(Ie(o),ii(1),Vn(!0)),re(Ie(o),ii(1),Vn(!1),tw(100))),ut()),!1),f=Ht(re(rw(re(n,Vn(!0)),re(n,Vn(!1),tw(200))),ut()),!1);xe(re(Ot(Ie(o),Ie(d)),he(([x,b])=>x<=b),ut()),s),xe(re(s,Tr(50)),c);const m=rn(re(Ot(r,Ie(i),Ie(t),Ie(e),Ie(u)),$n((x,[{scrollHeight:b,scrollTop:S},w,T,C,k])=>{const _=S+w-b>-k,A={scrollHeight:b,scrollTop:S,viewportHeight:w};if(_){let N,$;return S>x.state.scrollTop?(N="SCROLLED_DOWN",$=x.state.scrollTop-S):(N="SIZE_DECREASED",$=x.state.scrollTop-S||x.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:$,state:A}}let L;return A.scrollHeight>x.state.scrollHeight?L="SIZE_INCREASED":w<x.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":S<x.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:A}},vL),ut((x,b)=>x&&x.atBottom===b.atBottom))),g=Ht(re(r,$n((x,{scrollHeight:b,scrollTop:S,viewportHeight:w})=>{if(bw(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const T=b-(S+w)<1;return x.scrollTop!==S&&T?{changed:!0,jump:x.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ae(x=>x.changed),he(x=>x.jump)),0);xe(re(m,he(x=>x.atBottom)),a),xe(re(a,Tr(50)),l);const h=se(ma);xe(re(r,he(({scrollTop:x})=>x),ut(),$n((x,b)=>Rt(f)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?ha:ma,prevScrollTop:b},{direction:ma,prevScrollTop:0}),he(x=>x.direction)),h),xe(re(r,Tr(50),Vn(gL)),h);const y=se(0);return xe(re(p,Ae(x=>!x),Vn(0)),y),xe(re(o,Tr(100),Ve(p),Ae(([x,b])=>!!b),$n(([x,b],[S])=>[b,S],[0,0]),he(([x,b])=>b-x)),y),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:y}},ct(Ut)),Js="top",el="bottom",xw="none";function ww(e,t,n){return typeof e=="number"?n===ha&&t===Js||n===ma&&t===el?e:0:n===ha?t===Js?e.main:e.reverse:t===el?e.main:e.reverse}function Sw(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const If=Ye(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=He(),a=se(0),s=se(0),l=se(0),c=Ht(re(Ot(Ie(r),Ie(o),Ie(n),Ie(i,ua),Ie(l),Ie(a),Ie(t),Ie(e),Ie(s)),he(([u,d,p,[f,m],g,h,y,x,b])=>{const S=u-x,w=h+y,T=Math.max(p-S,0);let C=xw;const k=Sw(b,Js),_=Sw(b,el);return f-=x,f+=p+y,m+=p+y,m-=x,f>u+w-k&&(C=ha),m<u-T+d+_&&(C=ma),C!==xw?[Math.max(S-p-ww(g,Js,C)-k,0),S-T-y+d+ww(g,el,C)+_]:null}),Ae(u=>u!=null),ut(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ct(Ut),{singleton:!0});function bL(e,t,n){if(Qs(t)){const r=hw(e,t);return[{index:Tn(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 _f={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function tl(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:Ew(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:Ew(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function Tw(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=Pf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return tl(c,[],s,o,n,r)}function Ew(e,t,n){if(e.length===0)return[];if(!Qs(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Gs(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const ro=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=se([]),h=se(0),y=He();xe(i.topItemsIndexes,g);const x=Ht(re(Ot(f,m,Ie(l,ua),Ie(o),Ie(r),Ie(c),u,Ie(g),Ie(t),Ie(n),e),Ae(([T,C,,k,,,,,,,_])=>{const A=_&&_.length!==k;return T&&!C&&!A}),he(([,,[T,C],k,_,A,L,N,$,I,M])=>{const D=_,{offsetTree:V,sizeTree:F}=D,H=Rt(h);if(k===0)return{..._f,totalCount:k};if(T===0&&C===0)return H===0?{..._f,totalCount:k}:Tw(H,A,_,$,I,M||[]);if(ot(F))return H>0?null:tl(bL(Pf(A,k),D,M),[],k,I,D,$);const O=[];if(N.length>0){const G=N[0],Y=N[N.length-1];let Z=0;for(const j of Gs(F,G,Y)){const z=j.value,K=Math.max(j.start,G),ae=Math.min(j.end,Y);for(let R=K;R<=ae;R++)O.push({data:M==null?void 0:M[R],index:R,offset:Z,size:z}),Z+=z}}if(!L)return tl([],O,k,I,D,$);const B=N.length>0?N[N.length-1]+1:0,X=sL(V,T,C,B);if(X.length===0)return null;const Q=k-1,J=Ys([],G=>{for(const Y of X){const Z=Y.value;let j=Z.offset,z=Y.start;const K=Z.size;if(Z.offset<T){z+=Math.floor((T-Z.offset+I)/(K+I));const R=z-Y.start;j+=R*K+R*I}z<B&&(j+=(B-z)*K,z=B);const ae=Math.min(Y.end,Q);for(let R=z;R<=ae&&!(j>=C);R++)G.push({data:M==null?void 0:M[R],index:R,offset:j,size:K}),j+=K+I}});return tl(J,O,k,I,D,$)}),Ae(T=>T!==null),ut()),_f);xe(re(e,Ae(gf),he(T=>T==null?void 0:T.length)),o),xe(re(x,he(T=>T.topListHeight)),d),xe(d,s),xe(re(x,he(T=>[T.top,T.bottom])),a),xe(re(x,he(T=>T.items)),y);const b=rn(re(x,Ae(({items:T})=>T.length>0),Ve(o,e),Ae(([{items:T},C])=>T[T.length-1].originalIndex===C-1),he(([,T,C])=>[T-1,C]),ut(ua),he(([T])=>T))),S=rn(re(x,Tr(200),Ae(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),he(({items:T})=>T[0].index),ut())),w=rn(re(x,Ae(({items:T})=>T.length>0),he(({items:T})=>{let C=0,k=T.length-1;for(;T[C].type==="group"&&C<k;)C++;for(;T[k].type==="group"&&k>C;)k--;return{endIndex:T[k].index,startIndex:T[C].index}}),ut(fw)));return{endReached:b,initialItemCount:h,itemsRendered:y,listState:x,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},ct(zn,vw,If,pa,fa,ga,Cr,Ef),{singleton:!0}),Cw=Ye(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=He(),a=Ht(re(Ot(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(Ie(a),i),{totalListHeight:a,totalListHeightChanged:i}},ct(Ut,ro),{singleton:!0}),xL=Ye(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Ht(re(Ot(n,e,t),Ae(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),Tr(0),ut()),0);return{alignToBottom:n,paddingTopAddition:r}},ct(Ut,Cw),{singleton:!0});function kw(e){return e?e==="smooth"?"smooth":"auto":!1}const wL=(e,t)=>typeof e=="function"?kw(e(t)):t&&kw(e),SL=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(Ot(re(Ie(t),ii(1)),a),Ve(Ie(u),r,i,c),he(([[g,h],y,x,b,S])=>{let w=h&&b,T="auto";return w&&(T=wL(y,x||S),w=w&&!!T),{followOutputBehavior:T,shouldFollow:w,totalCount:g}}),Ae(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Ln(e,()=>{Rt(l)("following output to ",{totalCount:h},on.DEBUG),f(g),p=null})});function m(g){const h=Ln(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Rt(l)("scrolling to bottom due to increased size",{},on.DEBUG),f("auto"))});setTimeout(h,100)}return tt(re(Ot(Ie(u),t,s),Ae(([g,,h])=>g&&h),$n(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ae(({refreshed:g})=>g),Ve(u,t)),([,g])=>{Rt(i)&&m(g!==!1)}),tt(d,()=>{m(Rt(u)!==!1)}),tt(Ot(Ie(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ct(zn,ga,fa,pa,Cr,Er,Ut)),TL=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(re(s,Ve(i),Ae(([,l])=>l!==0),Ve(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>Tw(l,c,u,d,p,f))),a),{}),ct(zn,pa,ro,Cr),{singleton:!0}),EL=Ye(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return tt(re(e,Ve(r),Ae(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Ln(re(n,ii(1),Ae(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ne(t,o)})})}),{initialScrollTop:r}},ct(Cr,Ut,ro),{singleton:!0}),CL=({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,kL=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,Ve(t,l,n,i,o,r,s),Ve(e),he(([[d,p,f,m,g,h,y,x],b])=>{const{align:S,behavior:w,calculateViewLocation:T=CL,done:C,...k}=d,_=mw(d,p,m-1),A=da(_,p.offsetTree,b)+g+h,L=A+Tn(p.sizeTree,_)[1],N=x+h,$=x+f-y,I=T({itemBottom:L,itemTop:A,locationParams:{align:S,behavior:w,...k},viewportBottom:$,viewportTop:N});return I?C&&Ln(re(a,Ae(M=>!M),ii(Rt(a)?1:2)),C):C&&C(),I}),Ae(d=>d!==null)),c),{scrollIntoView:u}},ct(zn,Ut,fa,ro,Er),{singleton:!0}),Aw=Ye(([{scrollVelocity:e}])=>{const t=se(!1),n=He(),r=se(!1);return xe(re(e,Ve(r,t,n),Ae(([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(Ot(t,e,n),Ve(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}),Of=Ye(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),o=He(),i=se(!1),a=se(void 0);return xe(re(Ot(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,Ve(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ct(Ut)),AL=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,Ve(t,r,a,d,p,n)),([f,m,g,h,y,x,b])=>{const S=cL(m.sizeTree);h&&y!==null&&x!==null&&(g=y.scrollTop-x.offsetTop),g-=b,f({ranges:S,scrollTop:g})}),xe(re(u,Ae(gf),he(PL)),o),xe(re(i,Ve(u),Ae(([,f])=>f!==void 0),ut(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ct(zn,Ut,pa,Cr,Of));function PL(e){return{align:"start",index:0,offset:e.scrollTop}}const IL=Ye(([{topItemsIndexes:e}])=>{const t=se(0);return xe(re(t,Ae(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ct(ro));function Pw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const _L=Pw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),OL=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=rn(re(l,Ve(a),$n(([,y,x,b],[{bottom:S,items:w,offsetBottom:T,totalCount:C},k])=>{const _=S+T;let A=0;return x===C&&y.length>0&&w.length>0&&(w[0].originalIndex===0&&y[0].originalIndex===0||(A=_-b,A!==0&&(A+=k))),[A,w,C,_]},[0,[],0,0]),Ae(([y])=>y!==0),Ve(r,s,n,o,f,m),Ae(([,y,x,b,,,S])=>!S&&!b&&y!==0&&x===ha),he(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},on.DEBUG),y))));function h(y){y>0?(Ne(t,{behavior:"auto",top:-y}),Ne(e,0)):(Ne(e,0),Ne(t,{behavior:"auto",top:-y}))}return tt(re(g,Ve(e,i)),([y,x,b])=>{b&&_L()?Ne(e,x-y):h(-y)}),tt(re(Ot(Ht(i,!1),e,m),Ae(([y,x,b])=>!y&&!b&&x!==0),he(([y,x])=>x),Tr(1)),h),xe(re(d,he(y=>({top:-y}))),t),tt(re(c,Ve(p,u),he(([y,{groupIndices:x,lastSize:b,sizeTree:S},w])=>{function T(C){return C*(b+w)}if(x.length===0)return T(y);{let C=0;const k=ca(S,0);let _=0,A=0;for(;_<y;){_++,C+=k;let L=x.length===A+1?1/0:x[A+1]-x[A]-1;_+L>y&&(C-=k,L=y-_+1),_+=L,C+=T(L),A++}return C}})),y=>{Ne(e,y),requestAnimationFrame(()=>{Ne(t,{top:y}),requestAnimationFrame(()=>{Ne(e,0),Ne(m,!1)})})}),{deviation:e}},ct(Ut,ga,ro,zn,Er,Ef)),ML=Ye(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ct(If,TL,Cr,Aw,Cw,EL,xL,Of,kL,Er)),Iw=Ye(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,y,{listState:x,topItemsIndexes:b,...S},{scrollToIndex:w},T,{topItemCount:C},{groupCounts:k},_])=>(xe(S.rangeChanged,_.scrollSeekRangeChanged),xe(re(_.windowViewportRect,he(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...y,groupIndices:i,itemSize:a,listState:x,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,..._,...g,sizes:l,...h}),ct(zn,pa,Ut,AL,SL,ro,fa,OL,IL,vw,ML));function DL(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 nl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Mf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(h,y){h.propsReady&&Ne(h.propsReady,!1);for(const x of r){const b=h[t.required[x]];Ne(b,y[x])}for(const x of o)if(x in y){const b=h[t.optional[x]];Ne(b,y[x])}h.propsReady&&Ne(h.propsReady,!0)}function c(h){return i.reduce((y,x)=>(y[x]=b=>{const S=h[t.methods[x]];Ne(S,b)},y),{})}function u(h){return a.reduce((y,x)=>(y[x]=GF(h[t.events[x]]),y),{})}const d=E.forwardRef((h,y)=>{const{children:x,...b}=h,[S]=E.useState(()=>Ys(XF(e),C=>{l(C,b)})),[w]=E.useState(J0(u,S));nl(()=>{for(const C of a)C in b&&tt(w[C],b[C]);return()=>{Object.values(w).map(vf)}},[b,w,S]),nl(()=>{l(S,b)}),E.useImperativeHandle(y,Q0(c(S)));const T=n;return v.jsx(s.Provider,{value:S,children:n?v.jsx(T,{...DL([...r,...o,...a],b),children:x}):x})}),p=h=>E.useCallback(ew(Ne,E.useContext(s)[h]),[h]),f=h=>{const y=E.useContext(s)[h],x=E.useCallback(b=>tt(y,b),[y]);return E.useSyncExternalStore(x,()=>Rt(y),()=>Rt(y))},m=h=>{const y=E.useContext(s)[h],[x,b]=E.useState(J0(Rt,y));return nl(()=>tt(y,S=>{S!==x&&b(Q0(S))}),[y,x]),x},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,y)=>{const x=E.useContext(s)[h];nl(()=>tt(x,y),[y,x])},useEmitterValue:g,usePublisher:p}}const rl=E.createContext(void 0),_w=E.createContext(void 0),Ow=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Df(e){return"self"in e}function NL(e){return"body"in e}function Mw(e,t,n,r=oi,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(NL(h)||Df(h)){const x=Df(h)?h:h.defaultView;g=i?x.scrollX:x.scrollY,f=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,m=i?x.innerWidth:x.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?y():wi.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,y;Df(f)?(h=Math.max(En(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,y=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=En(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const x=h-g;if(p.top=Math.ceil(Math.max(Math.min(x,p.top),0)),bw(g,h)||p.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const Nf="-webkit-sticky",Dw="sticky",Nw=Pw(()=>{if(typeof document>"u")return Dw;const e=document.createElement("div");return e.style.position=Nf,e.style.position===Nf?Nf:Dw});function Ff(e){return e}const FL=Ye(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(Ff),i=se("div"),a=se(oi),s=(l,c=null)=>Ht(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")}}),LL=Ye(([e,t])=>({...e,...t}),ct(Iw,FL)),VL=({height:e})=>v.jsx("div",{style:{height:e}}),$L={overflowAnchor:"none",position:Nw(),zIndex:1},Fw={overflowAnchor:"none"},jL={...Fw,display:"inline-block",height:"100%"},Lw=E.memo(function({showTopList:e=!1}){const t=Oe("listState"),n=mn("sizeRanges"),r=Oe("useWindowScroll"),o=Oe("customScrollParent"),i=mn("windowScrollContainerState"),a=mn("scrollContainerState"),s=o||r?i:a,l=Oe("itemContent"),c=Oe("context"),u=Oe("groupContent"),d=Oe("trackItemSizes"),p=Oe("itemSize"),f=Oe("log"),m=mn("gap"),g=Oe("horizontalDirection"),{callbackRef:h}=ow(n,p,d,e?oi:s,f,m,o,g,Oe("skipAnimationFrameInResizeObserver")),[y,x]=E.useState(0);$f("deviation",I=>{y!==I&&x(I)});const b=Oe("EmptyPlaceholder"),S=Oe("ScrollSeekPlaceholder")||VL,w=Oe("ListComponent"),T=Oe("ItemComponent"),C=Oe("GroupComponent"),k=Oe("computeItemKey"),_=Oe("isSeeking"),A=Oe("groupIndices").length>0,L=Oe("alignToBottom"),N=Oe("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:L?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:L?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?v.jsx(b,{...dt(b,c)}):v.jsx(w,{...dt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(I=>{const M=I.originalIndex,D=k(M+t.firstItemIndex,I.data,c);return _?E.createElement(S,{...dt(S,c),height:I.size,index:I.index,key:D,type:I.type||"item",...I.type==="group"?{}:{groupIndex:I.groupIndex}}):I.type==="group"?E.createElement(C,{...dt(C,c),"data-index":M,"data-item-index":I.index,"data-known-size":I.size,key:D,style:$L},u(I.index,c)):E.createElement(T,{...dt(T,c),...Vw(T,I.data),"data-index":M,"data-item-group-index":I.groupIndex,"data-item-index":I.index,"data-known-size":I.size,key:D,style:g?jL:Fw},A?l(I.index,I.groupIndex,I.data,c):l(I.index,I.data,c))})})}),zL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},BL={outline:"none",overflowX:"auto",position:"relative"},si=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),RL={position:Nw(),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 HL=E.memo(function(){const e=Oe("HeaderComponent"),t=mn("headerHeight"),n=Oe("HeaderFooterTag"),r=jn(E.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Oe("skipAnimationFrameInResizeObserver")),o=Oe("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),WL=E.memo(function(){const e=Oe("FooterComponent"),t=mn("footerHeight"),n=Oe("HeaderFooterTag"),r=jn(E.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Oe("skipAnimationFrameInResizeObserver")),o=Oe("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null});function Lf({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}=Mw(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),v.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?BL:zL,...o},tabIndex:0,...i,...dt(s,u),children:r})})}function Vf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:y}=Mw(a,l,s,m,d);return Ow(()=>{var x;return h.current=d||((x=f.current)==null?void 0:x.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",y),e("scrollBy",g),v.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...dt(s,p),children:r})})}const qL=({children:e})=>{const t=E.useContext(rl),n=mn("viewportHeight"),r=mn("fixedItemHeight"),o=Oe("alignToBottom"),i=Oe("horizontalDirection"),a=E.useMemo(()=>sa(n,l=>En(l,i?"width":"height")),[n,i]),s=jn(a,!0,Oe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:s,style:si(o),children:e})},UL=({children:e})=>{const t=E.useContext(rl),n=mn("windowViewportRect"),r=mn("fixedItemHeight"),o=Oe("customScrollParent"),i=bf(n,o,Oe("skipAnimationFrameInResizeObserver")),a=Oe("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:si(a),children:e})},KL=({children:e})=>{const t=Oe("TopItemListComponent")||"div",n=Oe("headerHeight"),r={...RL,marginTop:`${n}px`},o=Oe("context");return v.jsx(t,{style:r,...dt(t,o),children:e})},YL=E.memo(function(e){const t=Oe("useWindowScroll"),n=Oe("topItemsIndexes").length>0,r=Oe("customScrollParent"),o=Oe("context"),i=r||t?XL:ZL,a=r||t?UL:qL;return v.jsxs(i,{...e,...dt(i,o),children:[n&&v.jsx(KL,{children:v.jsx(Lw,{showTopList:!0})}),v.jsxs(a,{children:[v.jsx(HL,{}),v.jsx(Lw,{}),v.jsx(WL,{})]})]})}),{Component:GL,useEmitter:$f,useEmitterValue:Oe,usePublisher:mn}=Mf(LL,{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:{}},YL),ZL=Lf({useEmitter:$f,useEmitterValue:Oe,usePublisher:mn}),XL=Vf({useEmitter:$f,useEmitterValue:Oe,usePublisher:mn}),jf=GL,QL=Ye(()=>{const e=se(l=>v.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(Ff),a=se(oi),s=(l,c=null)=>Ht(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")}}),JL=Ye(([e,t])=>({...e,...t}),ct(Iw,QL)),eV=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{height:e}})}),tV=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{border:0,height:e,padding:0}})}),nV={overflowAnchor:"none"},$w=E.memo(function({showTopList:e=!1}){const t=$e("listState"),n=$e("computeItemKey"),r=$e("firstItemIndex"),o=$e("isSeeking"),i=$e("ScrollSeekPlaceholder")||eV,a=$e("context"),s=$e("TableRowComponent"),l=$e("fixedHeaderHeight"),c=$e("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}:nV},c(p.index,p.data,a))});return v.jsx(v.Fragment,{children:d})}),rV=E.memo(function(){const e=$e("listState"),t=$e("topItemsIndexes").length>0,n=Cn("sizeRanges"),r=$e("useWindowScroll"),o=$e("customScrollParent"),i=Cn("windowScrollContainerState"),a=Cn("scrollContainerState"),s=o||r?i:a,l=$e("trackItemSizes"),c=$e("itemSize"),u=$e("log"),{callbackRef:d,ref:p}=ow(n,c,l,s,u,void 0,o,!1,$e("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);zf("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=$e("EmptyPlaceholder"),h=$e("FillerRow")||tV,y=$e("TableBodyComponent"),x=$e("paddingTopAddition"),b=$e("statefulTotalCount"),S=$e("context");if(b===0&&g)return v.jsx(g,{...dt(g,S)});const w=(t?e.topItems:[]).reduce((A,L)=>A+L.size,0),T=e.offsetTop+x+f-w,C=e.offsetBottom,k=T>0?v.jsx(h,{context:S,height:T},"padding-top"):null,_=C>0?v.jsx(h,{context:S,height:C},"padding-bottom"):null;return v.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...dt(y,S),children:[k,t&&v.jsx($w,{showTopList:!0}),v.jsx($w,{}),_]})}),oV=({children:e})=>{const t=E.useContext(rl),n=Cn("viewportHeight"),r=Cn("fixedItemHeight"),o=jn(E.useMemo(()=>sa(n,i=>En(i,"height")),[n]),!0,$e("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:o,style:si(!1),children:e})},iV=({children:e})=>{const t=E.useContext(rl),n=Cn("windowViewportRect"),r=Cn("fixedItemHeight"),o=$e("customScrollParent"),i=bf(n,o,$e("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:si(!1),children:e})},aV=E.memo(function(e){const t=$e("useWindowScroll"),n=$e("customScrollParent"),r=Cn("fixedHeaderHeight"),o=Cn("fixedFooterHeight"),i=$e("fixedHeaderContent"),a=$e("fixedFooterContent"),s=$e("context"),l=jn(E.useMemo(()=>sa(r,y=>En(y,"height")),[r]),!0,$e("skipAnimationFrameInResizeObserver")),c=jn(E.useMemo(()=>sa(o,y=>En(y,"height")),[o]),!0,$e("skipAnimationFrameInResizeObserver")),u=n||t?cV:lV,d=n||t?iV:oV,p=$e("TableComponent"),f=$e("TableHeadComponent"),m=$e("TableFooterComponent"),g=i?v.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...dt(f,s),children:i()},"TableHead"):null,h=a?v.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...dt(m,s),children:a()},"TableFoot"):null;return v.jsx(u,{...e,...dt(u,s),children:v.jsx(d,{children:v.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...dt(p,s),children:[g,v.jsx(rV,{},"TableBody"),h]})})})}),{Component:sV,useEmitter:zf,useEmitterValue:$e,usePublisher:Cn}=Mf(JL,{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:{}},aV),lV=Lf({useEmitter:zf,useEmitterValue:$e,usePublisher:Cn}),cV=Vf({useEmitter:zf,useEmitterValue:$e,usePublisher:Cn}),uV=sV,jw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},dV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:zw,floor:ol,max:va,min:Bf,round:Bw}=Math;function Rw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function fV(e){return{...dV,items:e}}function il(e,t){return e&&e.width===t.width&&e.height===t.height}function pV(e,t){return e&&e.column===t.column&&e.row===t.row}const hV=Ye(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S},w])=>{const T=se(0),C=se(0),k=se(jw),_=se({height:0,width:0}),A=se({height:0,width:0}),L=He(),N=He(),$=se(0),I=se(null),M=se({column:0,row:0}),D=He(),V=He(),F=se(!1),H=se(0),O=se(!0),B=se(!1),X=se(!1);tt(re(m,Ve(H),Ae(([j,z])=>!!z)),()=>{Ne(O,!1)}),tt(re(Ot(m,O,A,_,H,B),Ae(([j,z,K,ae,,R])=>j&&!z&&K.height!==0&&ae.height!==0&&!R)),([,,,,j])=>{Ne(B,!0),Af(1,()=>{Ne(L,j)}),Ln(re(c),()=>{Ne(t,[0,0]),Ne(O,!0)})}),xe(re(V,Ae(j=>j!=null&&j.scrollTop>0),Vn(0)),C),tt(re(m,Ve(V),Ae(([,j])=>j!=null)),([,j])=>{j&&(Ne(_,j.viewport),Ne(A,j.item),Ne(M,j.gap),j.scrollTop>0&&(Ne(F,!0),Ln(re(c,ii(1)),z=>{Ne(F,!1)}),Ne(l,{top:j.scrollTop})))}),xe(re(_,he(({height:j})=>j)),d),xe(re(Ot(Ie(_,il),Ie(A,il),Ie(M,(j,z)=>j&&j.column===z.column&&j.row===z.row),Ie(c)),he(([j,z,K,ae])=>({gap:K,item:z,scrollTop:ae,viewport:j}))),D),xe(re(Ot(Ie(T),r,Ie(M,pV),Ie(A,il),Ie(_,il),Ie(I),Ie(C),Ie(F),Ie(O),Ie(H)),Ae(([,,,,,,,j])=>!j),he(([j,[z,K],ae,R,be,Ce,_e,,Be,le])=>{const{column:we,row:ce}=ae,{height:Se,width:ie}=R,{width:de}=be;if(_e===0&&(j===0||de===0))return jw;if(ie===0){const kn=Pf(le,j),Wn=kn+Math.max(_e-1,0);return fV(Rw(kn,Wn,Ce))}const te=Hw(de,ie,we);let q,ne;Be?z===0&&K===0&&_e>0?(q=0,ne=_e-1):(q=te*ol((z+ce)/(Se+ce)),ne=te*zw((K+ce)/(Se+ce))-1,ne=Bf(j-1,va(ne,te-1)),q=Bf(ne,va(0,q))):(q=0,ne=-1);const me=Rw(q,ne,Ce),{bottom:De,top:Ue}=Ww(be,ae,R,me),Qe=zw(j/te),jt=Qe*Se+(Qe-1)*ce-De;return{bottom:De,itemHeight:Se,items:me,itemWidth:ie,offsetBottom:jt,offsetTop:Ue,top:Ue}})),k),xe(re(I,Ae(j=>j!==null),he(j=>j.length)),T),xe(re(Ot(_,A,k,M),Ae(([j,z,{items:K}])=>K.length>0&&z.height!==0&&j.height!==0),he(([j,z,{items:K},ae])=>{const{bottom:R,top:be}=Ww(j,ae,z,K);return[be,R]}),ut(ua)),t);const Q=se(!1);xe(re(c,Ve(Q),he(([j,z])=>z||j!==0)),Q);const J=rn(re(Ot(k,T),Ae(([{items:j}])=>j.length>0),Ve(Q),Ae(([[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=rn(re(Ie(k),Ae(({items:j})=>j.length>0&&j[0].index===0),Vn(0),ut())),Y=rn(re(Ie(k),Ve(F),Ae(([{items:j},z])=>j.length>0&&!z),he(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),ut(fw),Tr(0)));xe(Y,f.scrollSeekRangeChanged),xe(re(L,Ve(_,A,T,M),he(([j,z,K,ae,R])=>{const be=yw(j),{align:Ce,behavior:_e,offset:Be}=be;let le=be.index;le==="LAST"&&(le=ae-1),le=va(0,le,Bf(ae-1,le));let we=Rf(z,R,K,le);return Ce==="end"?we=Bw(we-z.height+K.height):Ce==="center"&&(we=Bw(we-z.height/2+K.height/2)),Be&&(we+=Be),{behavior:_e,top:we}})),l);const Z=Ht(re(k,he(j=>j.offsetBottom+j.bottom)),0);return xe(re(S,he(j=>({height:j.visibleHeight,width:j.visibleWidth}))),_),{customScrollParent:h,data:I,deviation:$,footerHeight:o,gap:M,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:L,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:y,viewportDimensions:_,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S,...f,gridState:k,horizontalDirection:X,initialTopMostItemIndex:H,totalListHeight:Z,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:G,stateChanged:D,stateRestoreInProgress:F,...w}},ct(If,Ut,ga,Aw,Cr,Of,Er));function Hw(e,t,n){return va(1,ol((e+n)/(ol(t)+n)))}function Ww(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Rf(e,t,n,r[0].index);return{bottom:Rf(e,t,n,r[r.length-1].index)+o,top:i}}function Rf(e,t,n,r){const o=Hw(e.width,n.width,t.column),i=ol(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const mV=Ye(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(Ff),a=se("div"),s=se(oi),l=(d,p=null)=>Ht(re(t,he(f=>f[d]),ut()),p),c=se(!1),u=se(!1);return xe(Ie(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")}}),gV=Ye(([e,t])=>({...e,...t}),ct(hV,mV)),vV=E.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),o=ht("computeItemKey"),i=ht("isSeeking"),a=gn("scrollHeight"),s=ht("ItemComponent"),l=ht("ListComponent"),c=ht("ScrollSeekPlaceholder"),u=ht("context"),d=gn("itemDimensions"),p=gn("gap"),f=ht("log"),m=ht("stateRestoreInProgress"),g=gn("reportReadyState"),h=jn(E.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const b=y.firstChild;if(b){const{height:S,width:w}=b.getBoundingClientRect();d({height:S,width:w})}p({column:Uw("column-gap",getComputedStyle(y).columnGap,f),row:Uw("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return Ow(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:v.jsx(l,{className:t,ref:h,...dt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const x=o(y.index,y.data,u);return i?v.jsx(c,{...dt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},x):E.createElement(s,{...dt(s,u),className:n,"data-index":y.index,key:x},r(y.index,y.data,u))})})}),yV=E.memo(function(){const e=ht("HeaderComponent"),t=gn("headerHeight"),n=ht("headerFooterTag"),r=jn(E.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=ht("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),bV=E.memo(function(){const e=ht("FooterComponent"),t=gn("footerHeight"),n=ht("headerFooterTag"),r=jn(E.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=ht("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),xV=({children:e})=>{const t=E.useContext(_w),n=gn("itemDimensions"),r=gn("viewportDimensions"),o=jn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),v.jsx("div",{ref:o,style:si(!1),children:e})},wV=({children:e})=>{const t=E.useContext(_w),n=gn("windowViewportRect"),r=gn("itemDimensions"),o=ht("customScrollParent"),i=bf(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),v.jsx("div",{ref:i,style:si(!1),children:e})},SV=E.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?EV:TV,o=n||t?wV:xV,i=ht("context");return v.jsx(r,{...e,...dt(r,i),children:v.jsxs(o,{children:[v.jsx(yV,{}),v.jsx(vV,{}),v.jsx(bV,{})]})})}),{useEmitter:qw,useEmitterValue:ht,usePublisher:gn}=Mf(gV,{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"}},SV),TV=Lf({useEmitter:qw,useEmitterValue:ht,usePublisher:gn}),EV=Vf({useEmitter:qw,useEmitterValue:ht,usePublisher:gn});function Uw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,on.WARN),t==="normal"?0:parseInt(t??"0",10)}const Hf=()=>{const e=E.useContext(Vo);return e?e.tweaks:gs},Kw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>v.jsxs("span",{className:ke("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:v.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?v.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?v.jsx(mf,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:v.jsx("span",{className:"cursor-help",children:v.jsx(Ey,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:v.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?v.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[v.jsx(by,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),v.jsx(NI,{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:y=!1,required:x,disabled:b,reportStatus:S},w)=>{const T=Hf(),C=S!==void 0?S:T.input.iconFeedback,k=d??f,_=Ct(),A=e??_.inputOptionalLabel;return v.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:ke("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[v.jsxs("label",{form:u,htmlFor:k,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[v.jsx(Kw,{info:s,hideLeft:y,reportStatus:C,title:m,placeholder:h,children:A||n?v.jsxs(E.Fragment,{children:[x?null:v.jsx("span",{"aria-disabled":b,className:"transition-colors text-opacity-70 aria-disabled:text-disabled group-focus-within:text-primary group-hover:text-primary",children:A}),n?v.jsx(E.Fragment,{children:n}):null]}):null}),v.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?v.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?v.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),v.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),v.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),CV=e=>v.jsx(E.Fragment,{children:e.children}),kV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},AV=[],PV=E.forwardRef(function(t,n){return v.jsx(pt.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:v.jsx(or,{children:t.children})})}),IV=E.forwardRef(function({item:t,context:n,...r},o){return v.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),_V={List:PV,Item:IV},li=40,OV=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const y=E.useRef(null),x=E.useRef(null),b=E.useRef(null),S=g.value??g.defaultValue??"",w=Ct(),[T,C]=E.useState(()=>Math.min(320,li*o.length)),[k,_]=E.useState(!1),[A,L]=E.useState(""),[N,$]=E.useState(S),[I,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(AV),H=df(k,"block-only"),O=m&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,B=A?cf(O,"value",[{key:"value",value:A},{key:"label",value:A}]):O,X=()=>{_(!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:j,context:z}=xr({open:k,transform:!0,onOpenChange:_,placement:"bottom-start",whileElementsMounted:Ko,middleware:[ta(4),e0({padding:10,elementContext:"reference",apply(ie){const de=ie.elements.floating.querySelector("ul"),te=(de==null?void 0:de.getBoundingClientRect().height)||0,q=Ti(j.reference.current,window.innerHeight),ne=Math.min(te<li?q:te,q,ie.availableHeight),me=Q.length===0?li:Math.min(ne,q,te),De=`${x.current.getBoundingClientRect().width}px`;Object.assign(ie.elements.floating.style,{width:De,maxWidth:De,height:me})}})]}),K=L0(z,kV),{getReferenceProps:ae,getFloatingProps:R,getItemProps:be}=wr([to(z,{role:"listbox"}),eo(z),Hs(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,o.length]),E.useEffect(()=>{if(!k)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*li)),100)},[A,k,j.reference,Q.length]),E.useEffect(()=>{const ie=j.reference.current;if(ie)return Si(ie)},[]);const Ce=(ie,de)=>{$(ie.value);const te=j.reference.current;if(!te)return;te==null||te.setAttribute("data-value",ie.value),te.value=ie.value;const q=new Event("change",{bubbles:!1,cancelable:!0});te.dispatchEvent(q),g.onChange&&g.onChange(q),M(ie.label??""),X(),L(""),V(de)},_e=ie=>{var te;const de=ie.target.value;return L(de),!k&&de===""?_(!0):(ie.target.name=g.name||"",de?_(!0):(te=g.onChange)==null?void 0:te.call(g,ie))},Be=()=>{var ie;_(!0),L(""),(ie=j.reference.current)==null||ie.focus()},le=()=>{V(ie=>ie===null?0:ie),_(!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 v.jsxs(ya,{...g,left:e,error:t,ref:x,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Be,children:[v.jsx(Hu,{size:20}),v.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),N?v.jsx("button",{type:"button",onClick:we,className:"p-2 transition-colors link:text-danger md:p-1",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[v.jsx("input",{"data-shadow":"true",...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,te;if(ie.key==="Escape")return ie.currentTarget.blur(),X();if(k){if(ie.key==="ArrowDown"){let q=Le.number(D)?D+1:0;return q>Q.length-1&&(q=0),(de=b.current)==null||de.scrollIntoView({index:q}),V(q)}if(ie.key==="ArrowUp"){let q=Le.number(D)?D-1:Q.length-1;return q<0&&(q=Q.length-1),(te=b.current)==null||te.scrollIntoView({index:q}),V(q)}if(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:k?A:I||N,"aria-autocomplete":"list",autoComplete:"off",className:ke("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),v.jsx("input",{id:ce,name:ce,type:"hidden","data-origin":ce,ref:h,required:f,defaultValue:g.value||N||void 0}),v.jsx(Qr,{preserveTabOrder:!0,children:k?v.jsx(ei,{modal:!0,guards:!0,returnFocus:!1,context:z,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.jsxs(pt.div,{...R({ref:qn(H,j.setFloating),style:{...K.styles,left:G,top:Y??0,position:Z}}),initial:!1,"data-floating":"true",animate:{height:Se?"auto":T},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!k)return C(0);const de=j.floating.current.querySelectorAll("li").item(0),te=(de?de.getBoundingClientRect().height:li)*Q.length;return wi.flushSync(()=>C(te+2))},children:[Se?v.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,v.jsx(jf,{overscan:40,ref:b,hidden:Se,data:Q,style:{height:T},defaultItemHeight:li,components:_V,scrollerRef:ie=>void(y.current=ie),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ie,de)=>{const te=de.Render??CV,q=N===de.value||N===de.label,ne=D===ie,me=de.label??de.value;return v.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:v.jsx(te,{...g,label:de.label,value:de.value,children:me})})}})]})}):null})]})}),Wf=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return v.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:ke("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[v.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:ke("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,v.jsx("span",{"data-name":"checkbox-label",className:ke("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Yw=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:y=!1,loading:x,...b},S)=>{const w=e,T=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,_=Si(C.current),A=r==null?void 0:r(k),L=N=>{const $=N;if($.key==="Enter"&&k.enterKeyHint==="next"){const I=k.getAttribute("data-next");if(I){const M=document.getElementById(I);if(M)return M.focus(),void $.preventDefault()}}};return k.addEventListener("keydown",L),()=>{A==null||A(),_(),k.removeEventListener("keydown",L)}},[]),v.jsx(ya,{...n,info:i,left:a,error:l,right:c,loading:x,form:b.form,name:b.name,feedback:h,hideLeft:y,title:b.title,container:ke(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:v.jsx(w,{...n,...b,id:T,name:T,type:m,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:qn(S,C),className:ke("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),ba=Yw(ob,"input",{type:"text"}),Gw=new Date(1970,11,31),qf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Zw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},MV={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")},Uf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},DV=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=Uf(u,Gw).flatMap(C=>Le.keyof(qf,C.type)?qf[C.type](C.value):[]),h=Uf(u,Gw).reduce((C,k)=>C+(Le.keyof(Zw,k.type)?Zw[k.type](k.value):""),""),[y,x]=E.useState(d?Uf(u,d).reduce((C,k)=>C+(Le.keyof(qf,k.type)?MV[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(x(k),g.length===k.length&&g.every((A,L)=>{const N=k.charAt(L);return typeof A=="string"?N===A:A.test(N)})){const A=Mo(ZO(k,h,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),x(C?Z_(C,h):"")),w=Ku(d),T=w?d.toISOString():void 0;return v.jsx(ba,{...i,mask:g,value:y,id:void 0,name:void 0,"data-value":T,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:v.jsxs(E.Fragment,{children:[v.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),v.jsx(ni,{open:f,onChange:m,trigger:v.jsxs("span",{"aria-labelledby":l,children:[v.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),v.jsx(MI,{})]}),buttonProps:{"aria-describedby":l},children:v.jsx(Ab,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),NV=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],FV=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],LV=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],VV=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Xw=(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 $V(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?VV:LV:t.binary?FV:NV,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=Xw(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=Xw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var al={exports:{}},sl={exports:{}},Ze={};/** @license React v16.13.1
222
+ */var zN=["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])"],Os=zN.join(","),$x=typeof Element>"u",qo=$x?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ms=!$x&&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},Ds=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},BN=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},RN=function(t,n,r){if(Ds(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Os));return n&&qo.call(t,Os)&&o.unshift(t),o=o.filter(r),o},HN=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ds(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=qo.call(a,Os);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Ds(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},jx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||BN(t))&&!jx(t)?0:t.tabIndex},WN=function(t,n){var r=zx(t);return r<0&&n&&!jx(t)?0:r},qN=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Bx=function(t){return t.tagName==="INPUT"},UN=function(t){return Bx(t)&&t.type==="hidden"},KN=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YN=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},GN=function(t){if(!t.name)return!0;var n=t.form||Ms(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=YN(o,t.form);return!i||i===t},ZN=function(t){return Bx(t)&&t.type==="radio"},XN=function(t){return ZN(t)&&!GN(t)},QN=function(t){var n,r=t&&Ms(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=Ms(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},Rx=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},JN=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=qo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(qo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ms(t);if(l&&!l.shadowRoot&&o(l)===!0)return Rx(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(QN(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Rx(t);return!1},e2=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return qo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},t2=function(t,n){return!(n.disabled||Ds(n)||UN(n)||JN(n,t)||KN(n)||e2(n))},Ud=function(t,n){return!(XN(n)||zx(n)<0||!t2(t,n))},n2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},r2=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=WN(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(qN).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=HN([t],n.includeContainer,{filter:Ud.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:n2}):r=RN(t,n.includeContainer,Ud.bind(null,n)),r2(r)},o2=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return qo.call(t,Os)===!1?!1:Ud(n,t)};function Hx(e,t,n){let{reference:r,floating:o}=e;const i=Gr(t),a=Wd(t),s=Hd(a),l=mr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Wo(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const i2=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}=Hx(c,r,l),p=r,f={},m=0;for(let g=0;g<s.length;g++){const{name:h,fn:y}=s[g],{x,y:b,data:S,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=b??d,f={...f,[h]:{...f[h],...S}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Hx(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Kd(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Ho(t,e),m=Vx(f),h=s[p?d==="floating"?"reference":"floating":d],y=_s(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=_s(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-w.top+m.top)/S.y,bottom:(w.bottom-y.bottom+m.bottom)/S.y,left:(y.left-w.left+m.left)/S.x,right:(w.right-y.right+m.right)/S.x}}const a2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ho(e,t)||{};if(c==null)return{};const d=Vx(u),p={x:n,y:r},f=Wd(o),m=Hd(f),g=await a.getDimensions(c),h=f==="y",y=h?"top":"left",x=h?"bottom":"right",b=h?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[f]-p[f]-i.floating[m],w=p[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=T?T[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=s.floating[b]||i.floating[m]);const k=S/2-w/2,_=C/2-g[m]/2-1,A=Fn(d[y],_),L=Fn(d[x],_),N=A,$=C-g[m]-L,I=C/2-g[m]/2+k,M=Rd(N,I,$),D=!l.arrow&&Wo(o)!=null&&I!==M&&i.reference[m]/2-(I<N?A:L)-g[m]/2<0,V=D?I<N?I-N:I-$:0;return{[f]:p[f]+V,data:{[f]:M,centerOffset:I-M-V,...D&&{alignmentOffset:V}},reset:D}}}),s2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=Ho(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=mr(o),x=Gr(s),b=mr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[Is(s)]:LN(s)),T=m!=="none";!p&&T&&w.push(...$N(s,g,m,S));const C=[s,...w],k=await Kd(t,h),_=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&_.push(k[y]),d){const I=FN(o,a,S);_.push(k[I[0]],k[I[1]])}if(A=[...A,{placement:o,overflows:_}],!_.every(I=>I<=0)){var L,N;const I=(((L=i.flip)==null?void 0:L.index)||0)+1,M=C[I];if(M)return{data:{index:I,overflows:A},reset:{placement:M}};let D=(N=A.filter(V=>V.overflows[0]<=0).sort((V,F)=>V.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(f){case"bestFit":{var $;const V=($=A.filter(F=>{if(T){const H=Gr(F.placement);return H===x||H==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(H=>H>0).reduce((H,O)=>H+O,0)]).sort((F,H)=>F[1]-H[1])[0])==null?void 0:$[0];V&&(D=V);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function l2(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=mr(n),s=Wo(n),l=Gr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ho(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const c2=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 l2(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}}}}},u2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...l}=Ho(e,t),c={x:n,y:r},u=await Kd(t,l),d=Gr(mr(o)),p=Lx(d);let f=c[p],m=c[d];if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=f+u[h],b=f-u[y];f=Rd(x,f,b)}if(a){const h=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=m+u[h],b=m-u[y];m=Rd(x,m,b)}const g=s.fn({...t,[p]:f,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},d2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Ho(e,t),l=await Kd(t,s),c=mr(n),u=Wo(n),d=Gr(n)==="y",{width:p,height:f}=r.floating;let m,g;c==="top"||c==="bottom"?(m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,m=u==="end"?"top":"bottom");const h=f-l.top-l.bottom,y=p-l.left-l.right,x=Fn(f-l[m],h),b=Fn(p-l[g],y),S=!t.middlewareData.shift;let w=x,T=b;if(d?T=u||S?Fn(b,y):y:w=u||S?Fn(x,h):h,S&&!u){const k=nn(l.left,0),_=nn(l.right,0),A=nn(l.top,0),L=nn(l.bottom,0);d?T=p-2*(k!==0||_!==0?k+_:nn(l.left,l.right)):w=f-2*(A!==0||L!==0?A+L:nn(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 Wx(e){const t=tn(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=Ps(n)!==i||Ps(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Yd(e){return nt(e)?e:e.contextElement}function Uo(e){const t=Yd(e);if(!kt(t))return hr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Wx(t);let a=(i?Ps(n.width):n.width)/r,s=(i?Ps(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const f2=hr(0);function qx(e){const t=qt(e);return!Nd()||!t.visualViewport?f2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function p2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Zr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Yd(e);let a=hr(1);t&&(r?nt(r)&&(a=Uo(r)):a=Uo(e));const s=p2(i,n,r)?qx(i):hr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=qt(i),f=r&&nt(r)?qt(r):r;let m=p,g=Fd(m);for(;g&&r&&f!==m;){const h=Uo(g),y=g.getBoundingClientRect(),x=tn(g),b=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*h.x,S=y.top+(g.clientTop+parseFloat(x.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=b,c+=S,m=qt(g),g=Fd(m)}}return _s({width:u,height:d,x:l,y:c})}function h2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Gn(r),s=t?ks(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=hr(1);const u=hr(0),d=kt(r);if((d||!d&&!i)&&((dr(r)!=="body"||Ji(a))&&(l=As(r)),kt(r))){const p=Zr(r);c=Uo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function m2(e){return Array.from(e.getClientRects())}function Ux(e){return Zr(Gn(e)).left+As(e).scrollLeft}function g2(e){const t=Gn(e),n=As(e),r=e.ownerDocument.body,o=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ux(e);const s=-n.scrollTop;return tn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function v2(e,t){const n=qt(e),r=Gn(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=Nd();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function y2(e,t){const n=Zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?Uo(e):hr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function Kx(e,t,n){let r;if(t==="viewport")r=v2(e,n);else if(t==="document")r=g2(Gn(e));else if(nt(t))r=y2(t,n);else{const o=qx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return _s(r)}function Yx(e,t){const n=Zn(e);return n===t||!nt(n)||fr(n)?!1:tn(n).position==="fixed"||Yx(n,t)}function b2(e,t){const n=t.get(e);if(n)return n;let r=pr(e,[],!1).filter(s=>nt(s)&&dr(s)!=="body"),o=null;const i=tn(e).position==="fixed";let a=i?Zn(e):e;for(;nt(a)&&!fr(a);){const s=tn(a),l=Dd(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ji(a)&&!l&&Yx(e,a))?r=r.filter(u=>u!==a):o=s,a=Zn(a)}return t.set(e,r),r}function x2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ks(t)?[]:b2(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Kx(t,u,o);return c.top=nn(d.top,c.top),c.right=Fn(d.right,c.right),c.bottom=Fn(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},Kx(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function w2(e){const{width:t,height:n}=Wx(e);return{width:t,height:n}}function S2(e,t,n){const r=kt(t),o=Gn(t),i=n==="fixed",a=Zr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=hr(0);if(r||!r&&!i)if((dr(t)!=="body"||Ji(o))&&(s=As(t)),r){const d=Zr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Ux(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 Gd(e){return tn(e).position==="static"}function Gx(e,t){return!kt(e)||tn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Zx(e,t){const n=qt(e);if(ks(e))return n;if(!kt(e)){let o=Zn(e);for(;o&&!fr(o);){if(nt(o)&&!Gd(o))return o;o=Zn(o)}return n}let r=Gx(e,t);for(;r&&AN(r)&&Gd(r);)r=Gx(r,t);return r&&fr(r)&&Gd(r)&&!Dd(r)?n:r||PN(e)||n}const T2=async function(e){const t=this.getOffsetParent||Zx,n=this.getDimensions,r=await n(e.floating);return{reference:S2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function E2(e){return tn(e).direction==="rtl"}const C2={convertOffsetParentRelativeRectToViewportRelativeRect:h2,getDocumentElement:Gn,getClippingRect:x2,getOffsetParent:Zx,getElementRects:T2,getClientRects:m2,getDimensions:w2,getScale:Uo,isElement:nt,isRTL:E2};function k2(e,t){let n=null,r;const o=Gn(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=Ro(u),m=Ro(o.clientWidth-(c+d)),g=Ro(o.clientHeight-(u+p)),h=Ro(c),x={rootMargin:-f+"px "+-m+"px "+-g+"px "+-h+"px",threshold:nn(0,Fn(1,l))||1};let b=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!b)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),i}function Ko(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=Yd(e),u=o||i?[...c?pr(c):[],...pr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?k2(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,g=l?Zr(e):null;l&&h();function h(){const y=Zr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,m=requestAnimationFrame(h)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const A2=c2,P2=u2,I2=s2,_2=d2,Xx=a2,O2=(e,t,n)=>{const r=new Map,o={platform:C2,...n},i={...o.platform,_c:r};return i2(e,t,{...o,platform:i})};var Ns=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Fs(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(!Fs(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)&&!Fs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Qx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jx(e,t){const n=Qx(e);return Math.round(t*n)/n}function Zd(e){const t=P.useRef(e);return Ns(()=>{t.current=e}),t}function M2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=P.useState(r);Fs(p,r)||f(r);const[m,g]=P.useState(null),[h,y]=P.useState(null),x=P.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),b=P.useCallback(F=>{F!==C.current&&(C.current=F,y(F))},[]),S=i||m,w=a||h,T=P.useRef(null),C=P.useRef(null),k=P.useRef(u),_=l!=null,A=Zd(l),L=Zd(o),N=Zd(c),$=P.useCallback(()=>{if(!T.current||!C.current)return;const F={placement:t,strategy:n,middleware:p};L.current&&(F.platform=L.current),O2(T.current,C.current,F).then(H=>{const O={...H,isPositioned:N.current!==!1};I.current&&!Fs(k.current,O)&&(k.current=O,_a.flushSync(()=>{d(O)}))})},[p,t,n,L,N]);Ns(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const I=P.useRef(!1);Ns(()=>(I.current=!0,()=>{I.current=!1}),[]),Ns(()=>{if(S&&(T.current=S),w&&(C.current=w),S&&w){if(A.current)return A.current(S,w,$);$()}},[S,w,$,A,_]);const M=P.useMemo(()=>({reference:T,floating:C,setReference:x,setFloating:b}),[x,b]),D=P.useMemo(()=>({reference:S,floating:w}),[S,w]),V=P.useMemo(()=>{const F={position:n,left:0,top:0};if(!D.floating)return F;const H=Jx(D.floating,u.x),O=Jx(D.floating,u.y);return s?{...F,transform:"translate("+H+"px, "+O+"px)",...Qx(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:O}},[n,s,D.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:M,elements:D,floatingStyles:V}),[u,$,M,D,V])}const D2=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?Xx({element:r.current,padding:o}).fn(n):{}:r?Xx({element:r,padding:o}).fn(n):{}}}},ta=(e,t)=>({...A2(e),options:[e,t]}),Xd=(e,t)=>({...P2(e),options:[e,t]}),Qd=(e,t)=>({...I2(e),options:[e,t]}),e0=(e,t)=>({..._2(e),options:[e,t]}),t0=(e,t)=>({...D2(e),options:[e,t]}),n0={...P},N2=n0.useInsertionEffect||(e=>e());function _t(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return N2(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Jd="ArrowUp",na="ArrowDown",Yo="ArrowLeft",Go="ArrowRight";function Ls(e,t,n){return Math.floor(e/t)!==n}function ra(e,t){return t<0||t>=e.current.length}function ef(e,t){return Bt(e,{disabledIndices:t})}function r0(e,t){return Bt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Bt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&Vs(a,s,o));return s}function F2(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===Jd){if(u&&Vt(n),c===-1)d=l;else if(d=Bt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,m=l-(f-p);f===p?d=l:d=f>p?m:m-i}ra(e,d)&&(d=c)}if(n.key===na&&(u&&Vt(n),c===-1?d=s:(d=Bt(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Bt(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),ra(e,d)&&(d=c)),r==="both"){const p=Ro(c/i);n.key===Go&&(u&&Vt(n),c%i!==i-1?(d=Bt(e,{startingIndex:c,disabledIndices:a}),o&&Ls(d,i,p)&&(d=Bt(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Bt(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ls(d,i,p)&&(d=c)),n.key===Yo&&(u&&Vt(n),c%i!==0?(d=Bt(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ls(d,i,p)&&(d=Bt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Bt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ls(d,i,p)&&(d=c));const f=Ro(l/i)===p;ra(e,d)&&(o&&f?d=n.key===Yo?l:Bt(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function L2(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 V2(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 $2(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Vs(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 o0=0;function gr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(o0);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():o0=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function j2(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 z2(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 i0=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function B2(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Map),a=P.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=P.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return We(()=>{const l=new Map(o);Array.from(l.keys()).sort(j2).forEach((u,d)=>{l.set(u,d)}),z2(o,l)||i(l)},[o]),P.createElement(i0.Provider,{value:P.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function a0(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=P.useContext(i0),[s,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return 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]),P.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Zo(){return Zo=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},Zo.apply(this,arguments)}let s0=!1,R2=0;const l0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+R2++;function H2(){const[e,t]=P.useState(()=>s0?l0():void 0);return We(()=>{e==null&&t(l0())},[]),P.useEffect(()=>{s0=!0},[]),e}const Xo=n0.useId||H2;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function $s(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function W2(){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 c0=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...m}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||$s("The `ref` prop is required for `FloatingArrow`."));const h=Xo(),[y,x]=P.useState(!1);if(We(()=>{if(!o)return;tn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const b=c*2,S=b/2,w=a/2*(l/-8+1),T=s/2*l/4,[C,k]=r.split("-"),_=!!p,A=C==="top"||C==="bottom",L=u&&k==="end"?"bottom":"top";let N=u&&k==="end"?"right":"left";u&&y&&(N=k==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",I=(i==null?void 0:i.y)!=null?u||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-T))+(" Q"+a/2+","+s+" "+w+","+(s-T))+" Z",D={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[C];return P.createElement("svg",Zo({},g,{"aria-hidden":!0,ref:n,width:_?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:$,[L]:I,[C]:A||_?"100%":"calc(100% - "+b/2+"px)",transform:""+D+(f??""),...m}}),b>0&&P.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:M}),P.createElement("path",{stroke:b&&!p?g.fill:"none",d:M}),P.createElement("clipPath",{id:h},P.createElement("rect",{x:-S,y:S*(_?-1:1),width:a+b,height:a})))});function u0(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.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 d0=P.createContext(null),f0=P.createContext(null),vr=()=>{var e;return((e=P.useContext(d0))==null?void 0:e.id)||null},yr=()=>P.useContext(f0);function q2(e){const t=Xo(),n=yr(),o=vr();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function U2(e){const{children:t,id:n}=e,r=vr();return P.createElement(d0.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function K2(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(a=>{n.current=[...n.current,a]},[]),o=P.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=P.useState(()=>u0())[0];return P.createElement(f0.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function br(e){return"data-floating-ui-"+e}function $t(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const p0=br("safe-polygon");function tf(e,t,n){return n&&!Bo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function h0(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=yr(),m=vr(),g=$t(c),h=$t(l),y=$t(n),x=P.useRef(),b=P.useRef(-1),S=P.useRef(),w=P.useRef(-1),T=P.useRef(!0),C=P.useRef(!1),k=P.useRef(()=>{}),_=P.useCallback(()=>{var M;const D=(M=o.current.openEvent)==null?void 0:M.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);P.useEffect(()=>{if(!s)return;function M(D){let{open:V}=D;V||(clearTimeout(b.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),P.useEffect(()=>{if(!s||!g.current||!n)return;function M(V){_()&&r(!1,V,"hover")}const D=Nt(a.floating).documentElement;return D.addEventListener("mouseleave",M),()=>{D.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,g,_]);const A=P.useCallback(function(M,D,V){D===void 0&&(D=!0),V===void 0&&(V="hover");const F=tf(h.current,"close",x.current);F&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,M,V),F)):D&&(clearTimeout(b.current),r(!1,M,V))},[h,r]),L=_t(()=>{k.current(),S.current=void 0}),N=_t(()=>{if(C.current){const M=Nt(a.floating).body;M.style.pointerEvents="",M.removeAttribute(p0),C.current=!1}});P.useEffect(()=>{if(!s)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(O){if(clearTimeout(b.current),T.current=!1,u&&!Bo(x.current)||d>0&&!tf(h.current,"open"))return;const B=tf(h.current,"open",x.current);B?b.current=window.setTimeout(()=>{y.current||r(!0,O,"hover")},B):r(!0,O,"hover")}function V(O){if(M())return;k.current();const B=Nt(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),S.current=g.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),L(),A(O,!0,"safe-polygon")}});const Q=S.current;B.addEventListener("mousemove",Q),k.current=()=>{B.removeEventListener("mousemove",Q)};return}(x.current==="touch"?!xt(a.floating,O.relatedTarget):!0)&&A(O)}function F(O){M()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){N(),L(),A(O)}})(O))}if(nt(a.domReference)){var H;const O=a.domReference;return n&&O.addEventListener("mouseleave",F),(H=a.floating)==null||H.addEventListener("mouseleave",F),p&&O.addEventListener("mousemove",D,{once:!0}),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",V),()=>{var B;n&&O.removeEventListener("mouseleave",F),(B=a.floating)==null||B.removeEventListener("mouseleave",F),p&&O.removeEventListener("mousemove",D),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",V)}}},[a,s,e,u,d,p,A,L,N,r,n,y,f,h,g,o]),We(()=>{var M;if(s&&n&&(M=g.current)!=null&&M.__options.blockPointerEvents&&_()){const V=Nt(a.floating).body;V.setAttribute(p0,""),V.style.pointerEvents="none",C.current=!0;const F=a.floating;if(nt(a.domReference)&&F){var D;const H=a.domReference,O=f==null||(D=f.nodesRef.current.find(B=>B.id===m))==null||(D=D.context)==null?void 0:D.elements.floating;return O&&(O.style.pointerEvents=""),H.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{H.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,m,a,f,g,_]),We(()=>{n||(x.current=void 0,L(),N())},[n,L,N]),P.useEffect(()=>()=>{L(),clearTimeout(b.current),clearTimeout(w.current),N()},[s,a.domReference,L,N]);const $=P.useMemo(()=>{function M(D){x.current=D.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(D){const{nativeEvent:V}=D;function F(){!T.current&&!y.current&&r(!0,V,"hover")}u&&!Bo(x.current)||n||d===0||(clearTimeout(w.current),x.current==="touch"?F():w.current=window.setTimeout(F,d))}}},[u,r,n,y,d]),I=P.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(M){A(M.nativeEvent,!1)}}),[A]);return P.useMemo(()=>s?{reference:$,floating:I}:{},[s,$,I])}function Y2(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 Xr(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 G2(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Xr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Qo=new WeakMap,js=new WeakSet,zs={},nf=0;const Z2=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,m0=e=>e&&(e.host||m0(e.parentNode)),X2=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=m0(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Q2(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=X2(t,e),s=new Set,l=new Set(a),c=[];zs[o]||(zs[o]=new WeakMap);const u=zs[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,m=>{if(dr(m)!=="script")if(s.has(m))p(m);else{const g=i?m.getAttribute(i):null,h=g!==null&&g!=="false",y=(Qo.get(m)||0)+1,x=(u.get(m)||0)+1;Qo.set(m,y),u.set(m,x),c.push(m),y===1&&h&&js.add(m),x===1&&m.setAttribute(o,""),!h&&i&&m.setAttribute(i,"true")}})}return nf++,()=>{c.forEach(f=>{const m=(Qo.get(f)||0)-1,g=(u.get(f)||0)-1;Qo.set(f,m),u.set(f,g),m||(!js.has(f)&&i&&f.removeAttribute(i),js.delete(f)),g||f.removeAttribute(o)}),nf--,nf||(Qo=new WeakMap,Qo=new WeakMap,js=new WeakSet,zs={})}}function g0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Nt(e[0]).body;return Q2(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Jo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function v0(e,t){const n=ea(e,Jo());t==="prev"&&n.reverse();const r=n.indexOf(xn(Nt(e)));return n.slice(r+1)[0]}function y0(){return v0(document.body,"next")}function b0(){return v0(document.body,"prev")}function ia(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xt(n,r)}function J2(e){ea(e,Jo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function eF(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 tF(e,t,n){const r=e.indexOf(t);function o(a){const s=br("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 rf={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 nF;function x0(e){e.key==="Tab"&&(e.target,clearTimeout(nF))}const Bs=P.forwardRef(function(t,n){const[r,o]=P.useState();We(()=>($d()&&o("button"),document.addEventListener("keydown",x0),()=>{document.removeEventListener("keydown",x0)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[br("focus-guard")]:"",style:rf};return P.createElement("span",Zo({},t,i))}),w0=P.createContext(null),S0=br("portal");function rF(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Xo(),o=T0(),[i,a]=P.useState(null),s=P.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(S0,""),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&&!nt(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(S0,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function Qr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=rF({id:n,root:r}),[a,s]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(m){i&&ia(m)&&(m.type==="focusin"?eF:J2)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),P.createElement(w0.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&P.createElement(Bs,{"data-type":"outside",ref:l,onFocus:f=>{if(ia(f,i)){var m;(m=u.current)==null||m.focus()}else{const g=b0()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&P.createElement("span",{"aria-owns":i.id,style:rf}),i&&_a.createPortal(t,i),p&&i&&P.createElement(Bs,{"data-type":"outside",ref:c,onFocus:f=>{if(ia(f,i)){var m;(m=d.current)==null||m.focus()}else{const g=y0()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const T0=()=>P.useContext(w0),oF=20;let Jr=[];function of(e){Jr=Jr.filter(n=>n.isConnected);let t=e;if(!(!t||dr(t)==="body")){if(!o2(t,Jo())){const n=ea(t,Jo())[0];n&&(t=n)}Jr.push(t),Jr.length>oF&&(Jr=Jr.slice(-20))}}function E0(){return Jr.slice().reverse().find(e=>e.isConnected)}const iF=P.forwardRef(function(t,n){return P.createElement("button",Zo({},t,{type:"button",ref:n,tabIndex:-1,style:rf}))});function ei(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:m,onOpenChange:g,events:h,dataRef:y,floatingId:x,elements:{domReference:b,floating:S}}=t,w=typeof a=="number"&&a<0,T=Fx(b)&&w,C=Z2()?i:!0,k=$t(o),_=$t(a),A=$t(s),L=yr(),N=T0(),$=P.useRef(null),I=P.useRef(null),M=P.useRef(!1),D=P.useRef(!1),V=P.useRef(-1),F=N!=null,H=S==null?void 0:S.firstElementChild,O=(H==null?void 0:H.id)===x?H:S,B=_t(function(G){return G===void 0&&(G=O),G?ea(G,Jo()):[]}),X=_t(G=>{const Y=B(G);return k.current.map(Z=>b&&Z==="reference"?b:O&&Z==="floating"?O:Y).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function G(Z){if(Z.key==="Tab"){xt(O,xn(Nt(O)))&&B().length===0&&!T&&Vt(Z);const j=X(),z=Nn(Z);k.current[0]==="reference"&&z===b&&(Vt(Z),Z.shiftKey?gr(j[j.length-1]):gr(j[1])),k.current[1]==="floating"&&z===O&&Z.shiftKey&&(Vt(Z),gr(j[0]))}}const Y=Nt(O);return Y.addEventListener("keydown",G),()=>{Y.removeEventListener("keydown",G)}},[r,b,O,c,k,T,B,X]),P.useEffect(()=>{if(r||!S)return;function G(Y){const Z=Nn(Y),z=B().indexOf(Z);z!==-1&&(V.current=z)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,B]),P.useEffect(()=>{if(r||!d)return;function G(){D.current=!0,setTimeout(()=>{D.current=!1})}function Y(Z){const j=Z.relatedTarget;queueMicrotask(()=>{const z=!(xt(b,j)||xt(S,j)||xt(j,S)||xt(N==null?void 0:N.portalNode,j)||j!=null&&j.hasAttribute(br("focus-guard"))||L&&(Xr(L.nodesRef.current,m).find(K=>{var ae,R;return xt((ae=K.context)==null?void 0:ae.elements.floating,j)||xt((R=K.context)==null?void 0:R.elements.domReference,j)})||Y2(L.nodesRef.current,m).find(K=>{var ae,R;return((ae=K.context)==null?void 0:ae.elements.floating)===j||((R=K.context)==null?void 0:R.elements.domReference)===j})));if(l&&z&&xn(Nt(O))===Nt(O).body){kt(O)&&(O==null||O.focus());const K=V.current,ae=B(),R=ae[K]||ae[ae.length-1]||O;kt(R)&&R.focus()}(T||!c)&&j&&z&&!D.current&&j!==E0()&&(M.current=!0,g(!1,Z))})}if(S&&kt(b))return b.addEventListener("focusout",Y),b.addEventListener("pointerdown",G),S.addEventListener("focusout",Y),()=>{b.removeEventListener("focusout",Y),b.removeEventListener("pointerdown",G),S.removeEventListener("focusout",Y)}},[r,b,S,O,c,m,L,N,g,d,l,B,T]),P.useEffect(()=>{var G;if(r)return;const Y=Array.from((N==null||(G=N.portalNode)==null?void 0:G.querySelectorAll("["+br("portal")+"]"))||[]);if(S){const Z=[S,...Y,$.current,I.current,k.current.includes("reference")||T?b:null].filter(z=>z!=null),j=c||T?g0(Z,C,!C):g0(Z);return()=>{j()}}},[r,b,S,c,k,N,T,C]),We(()=>{if(r||!kt(O))return;const G=Nt(O),Y=xn(G);queueMicrotask(()=>{const Z=X(O),j=_.current,z=(typeof j=="number"?Z[j]:j.current)||O,K=xt(O,Y);!w&&!K&&p&&gr(z,{preventScroll:z===O})})},[r,p,O,w,X,_]),We(()=>{if(r||!O)return;let G=!1;const Y=Nt(O),Z=xn(Y);let z=y.current.openEvent;const K=f.domReference.current;of(Z);function ae(R){let{open:be,reason:Ce,event:_e,nested:Be}=R;be&&(z=_e),Ce==="escape-key"&&f.domReference.current&&of(f.domReference.current),Ce==="hover"&&_e.type==="mouseleave"&&(M.current=!0),Ce==="outside-press"&&(Be?(M.current=!1,G=!0):M.current=!(Dx(_e)||Vd(_e)))}return h.on("openchange",ae),()=>{h.off("openchange",ae);const R=xn(Y),be=xt(S,R)||L&&Xr(L.nodesRef.current,m).some(le=>{var we;return xt((we=le.context)==null?void 0:we.elements.floating,R)});(be||z&&["click","mousedown"].includes(z.type))&&f.domReference.current&&of(f.domReference.current);const _e=K||Z,Be=ea(Nt(_e).body,Jo());queueMicrotask(()=>{let le=E0();!le&&kt(_e)&&S&&(le=tF(Be,_e,S)),A.current&&!M.current&&kt(le)&&(!(le!==R&&R!==Y.body)||be)&&le.focus({preventScroll:G})})}},[r,S,O,A,y,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=B(),z=xn(Nt(S)),K=j.indexOf(z);K!==-1&&(V.current=K),k.current.includes("floating")||z!==f.domReference.current&&j.length===0?Z!=="0"&&O.setAttribute("tabindex","0"):Z!=="-1"&&O.setAttribute("tabindex","-1")};G();const Y=new MutationObserver(G);return Y.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,O,f,k,B,w]);function Q(G){return r||!u||!c?null:P.createElement(iF,{ref:G==="start"?$:I,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!T:!0)&&(F||c);return P.createElement(P.Fragment,null,J&&P.createElement(Bs,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:G=>{if(c){const Z=X();gr(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=y0()||b;Z==null||Z.focus()}else{var Y;(Y=N.beforeOutsideRef.current)==null||Y.focus()}}}),!T&&Q("start"),n,Q("end"),J&&P.createElement(Bs,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:G=>{if(c)gr(X()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(M.current=!0),ia(G,N.portalNode)){const Z=b0()||b;Z==null||Z.focus()}else{var Y;(Y=N.afterOutsideRef.current)==null||Y.focus()}}}))}const af=new Set,C0=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Xo();return We(()=>{if(!r)return;af.add(i);const a=/iP(hone|ad|od)|iOS/.test(Ld()),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()=>{af.delete(i),af.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),P.createElement("div",Zo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function k0(e){return kt(e.target)&&e.target.tagName==="BUTTON"}function A0(e){return Bd(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=P.useRef(),p=P.useRef(!1),f=P.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current;m.button===0&&s!=="click"&&(Bo(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}Bo(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||k0(m))&&(m.key===" "&&!A0(i)&&(m.preventDefault(),p.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||k0(m)||A0(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function aF(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 P0(e){return e!=null&&e.clientX!=null}function sF(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=P.useRef(!1),p=P.useRef(null),[f,m]=P.useState(),[g,h]=P.useState([]),y=_t((T,C)=>{d.current||r.current.openEvent&&!P0(r.current.openEvent)||a.setPositionReference(aF(i,{x:T,y:C,axis:l,dataRef:r,pointerType:f}))}),x=_t(T=>{c!=null||u!=null||(n?p.current||h([]):y(T.clientX,T.clientY))}),b=Bo(f)?o:n,S=P.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const T=qt(o);function C(k){const _=Nn(k);xt(o,_)?(T.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||P0(r.current.openEvent)){T.addEventListener("mousemove",C);const k=()=>{T.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,y]);P.useEffect(()=>S(),[S,g]),P.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),P.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const w=P.useMemo(()=>{function T(C){let{pointerType:k}=C;m(k)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:x,onMouseEnter:x}},[x]);return P.useMemo(()=>s?{reference:w}:{},[s,w])}const lF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},cF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},I0=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 eo(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=yr(),h=_t(typeof l=="function"?l:()=>!1),y=typeof l=="function"?h:l,x=P.useRef(!1),b=P.useRef(!1),{escapeKey:S,outsidePress:w}=I0(f),{escapeKey:T,outsidePress:C}=I0(m),k=_t(I=>{var M;if(!n||!a||!s||I.key!=="Escape")return;const D=(M=i.current.floatingContext)==null?void 0:M.nodeId,V=g?Xr(g.nodesRef.current,D):[];if(!S&&(I.stopPropagation(),V.length>0)){let F=!0;if(V.forEach(H=>{var O;if((O=H.context)!=null&&O.open&&!H.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,_N(I)?I.nativeEvent:I,"escape-key")}),_=_t(I=>{var M;const D=()=>{var V;k(I),(V=Nn(I))==null||V.removeEventListener("keydown",D)};(M=Nn(I))==null||M.addEventListener("keydown",D)}),A=_t(I=>{var M;const D=x.current;x.current=!1;const V=b.current;if(b.current=!1,c==="click"&&V||D||typeof y=="function"&&!y(I))return;const F=Nn(I),H="["+br("inert")+"]",O=Nt(o.floating).querySelectorAll(H);let B=nt(F)?F:null;for(;B&&!fr(B);){const G=Zn(B);if(fr(G)||!nt(G))break;B=G}if(O.length&&nt(F)&&!ON(F)&&!xt(F,o.floating)&&Array.from(O).every(G=>!xt(B,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&&I.offsetX>F.clientWidth;if(Y&&tn(F).direction==="rtl"&&(Z=I.offsetX<=F.offsetWidth-F.clientWidth),Z||G&&I.offsetY>F.clientHeight)return}const X=(M=i.current.floatingContext)==null?void 0:M.nodeId,Q=g&&Xr(g.nodesRef.current,X).some(G=>{var Y;return zd(I,(Y=G.context)==null?void 0:Y.elements.floating)});if(zd(I,o.floating)||zd(I,o.domReference)||Q)return;const J=g?Xr(g.nodesRef.current,X):[];if(J.length>0){let G=!0;if(J.forEach(Y=>{var Z;if((Z=Y.context)!=null&&Z.open&&!Y.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,I,"outside-press")}),L=_t(I=>{var M;const D=()=>{var V;A(I),(V=Nn(I))==null||V.removeEventListener(c,D)};(M=Nn(I))==null||M.addEventListener(c,D)});P.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function I(V){r(!1,V,"ancestor-scroll")}const M=Nt(o.floating);s&&M.addEventListener("keydown",T?_:k,T),y&&M.addEventListener(c,C?L:A,C);let D=[];return p&&(nt(o.domReference)&&(D=pr(o.domReference)),nt(o.floating)&&(D=D.concat(pr(o.floating))),!nt(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(pr(o.reference.contextElement)))),D=D.filter(V=>{var F;return V!==((F=M.defaultView)==null?void 0:F.visualViewport)}),D.forEach(V=>{V.addEventListener("scroll",I,{passive:!0})}),()=>{s&&M.removeEventListener("keydown",T?_:k,T),y&&M.removeEventListener(c,C?L:A,C),D.forEach(V=>{V.removeEventListener("scroll",I)})}},[i,o,s,y,c,n,r,p,a,S,w,k,T,_,A,C,L]),P.useEffect(()=>{x.current=!1},[y,c]);const N=P.useMemo(()=>({onKeyDown:k,[lF[d]]:I=>{u&&r(!1,I.nativeEvent,"reference-press")}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[cF[c]]:()=>{x.current=!0}}),[k,c]);return P.useMemo(()=>a?{reference:N,floating:$}:{},[a,N,$])}function uF(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Xo(),i=P.useRef({}),[a]=P.useState(()=>u0()),s=vr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!nt(f)&&W2("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=P.useState(r.reference),u=_t((f,m,g)=>{i.current.openEvent=f?m:void 0,a.emit("openchange",{open:f,event:m,reason:g,nested:s}),n==null||n(f,m,g)}),d=P.useMemo(()=>({setPositionReference:c}),[]),p=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function xr(e){e===void 0&&(e={});const{nodeId:t}=e,n=uF({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=P.useState(null),[s,l]=P.useState(null),u=(o==null?void 0:o.reference)||i,d=P.useRef(null),p=yr();We(()=>{u&&(d.current=u)},[u]);const f=M2({...e,elements:{...o,...s&&{reference:s}}}),m=P.useCallback(b=>{const S=nt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),g=P.useCallback(b=>{(nt(b)||b===null)&&(d.current=b,a(b)),(nt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!nt(b))&&f.refs.setReference(b)},[f.refs]),h=P.useMemo(()=>({...f.refs,setReference:g,setPositionReference:m,domReference:d}),[f.refs,g,m]),y=P.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),x=P.useMemo(()=>({...f,...r,refs:h,elements:y,nodeId:t}),[f,h,y,t,r]);return We(()=>{r.dataRef.current.floatingContext=x;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=x)}),P.useMemo(()=>({...f,context:x,refs:h,elements:y}),[f,h,y,x])}function dF(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(),d=P.useRef(!0);P.useEffect(()=>{if(!s)return;const f=qt(a.domReference);function m(){!n&&kt(a.domReference)&&a.domReference===xn(Nt(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",m),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",m),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),P.useEffect(()=>{if(!s)return;function f(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),P.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=P.useMemo(()=>({onPointerDown(f){Vd(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const m=Nn(f.nativeEvent);if(l&&nt(m))try{if($d()&&Nx())throw Error();if(!m.matches(":focus-visible"))return}catch{if(!d.current&&!Bd(m))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const m=f.relatedTarget,g=f.nativeEvent,h=nt(m)&&m.hasAttribute(br("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=xn(a.domReference?a.domReference.ownerDocument:document);!m&&x===a.domReference||xt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,x)||xt(a.domReference,x)||h||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return P.useMemo(()=>s?{reference:p}:{},[s,p])}const _0="active",O0="selected";function sf(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[_0]:a,[O0]: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&&[_0,O0].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 wr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=P.useCallback(s=>sf(s,e,"reference"),t),i=P.useCallback(s=>sf(s,e,"floating"),n),a=P.useCallback(s=>sf(s,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let M0=!1;function Rs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function D0(e,t){return Rs(t,e===Jd||e===na,e===Yo||e===Go)}function lf(e,t,n){return Rs(t,e===na,n?e===Yo:e===Go)||e==="Enter"||e===" "||e===""}function fF(e,t,n){return Rs(t,n?e===Yo:e===Go,e===na)}function N0(e,t,n){return Rs(t,n?e===Go:e===Yo,e===Jd)}function Hs(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||$s("`useListNavigation` looping must be enabled to allow escaping."),m||$s("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&$s("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=vr(),A=yr(),L=_t(s),N=P.useRef(g),$=P.useRef(c??-1),I=P.useRef(null),M=P.useRef(!0),D=P.useRef(L),V=P.useRef(!!o.floating),F=P.useRef(n),H=P.useRef(!1),O=P.useRef(!1),B=$t(x),X=$t(n),Q=$t(w),J=$t(o.floating),G=$t(c),[Y,Z]=P.useState(),[j,z]=P.useState(),K=_t(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)):gr(de,{preventScroll:!0,sync:Nx()&&$d()?M0||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 te=Q.current;te&&R&&(ce||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof te=="boolean"?{block:"nearest",inline:"nearest"}:te))})});We(()=>{document.createElement("div").focus({get preventScroll(){return M0=!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&&(I.current!=null||N.current===!0&&I.current==null)){let le=0;const we=()=>{i.current[0]==null?(le<2&&(le?requestAnimationFrame:queueMicrotask)(we),le++):($.current=I.current==null||lf(I.current,b,f)||p?ef(i,B.current):r0(i,B.current),I.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,b,f,L,K,B]),We(()=>{var le;if(!l||o.floating||!A||m||!V.current)return;const we=A.nodesRef.current,ce=(le=we.find(de=>de.id===_))==null||(le=le.context)==null?void 0:le.elements.floating,Se=xn(Nt(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,_,m]),We(()=>{if(!l||!A||!m||_)return;function le(we){z(we.id),T&&(T.current=we)}return A.events.on("virtualfocus",le),()=>{A.events.off("virtualfocus",le)}},[l,A,m,_,T]),We(()=>{D.current=L,V.current=!!o.floating}),We(()=>{n||(I.current=null)},[n]),We(()=>{F.current=n},[n]);const ae=a!=null,R=P.useMemo(()=>{function le(ce){if(!n)return;const Se=i.current.indexOf(ce);Se!==-1&&L(Se)}return{onFocus(ce){let{currentTarget:Se}=ce;le(Se)},onClick:ce=>{let{currentTarget:Se}=ce;return Se.focus({preventScroll:!0})},...h&&{onMouseMove(ce){let{currentTarget:Se}=ce;le(Se)},onPointerLeave(ce){let{pointerType:Se}=ce;!M.current||Se==="touch"||($.current=-1,K(i,$),L(null),m||gr(J.current,{preventScroll:!0}))}}}},[n,J,K,h,i,L,m]),be=_t(le=>{if(M.current=!1,H.current=!0,!X.current&&le.currentTarget===J.current)return;if(p&&N0(le.key,b,f)){Vt(le),r(!1,le.nativeEvent,"list-navigation"),kt(o.domReference)&&!m&&o.domReference.focus();return}const we=$.current,ce=ef(i,x),Se=r0(i,x);if(le.key==="Home"&&(Vt(le),$.current=ce,L($.current)),le.key==="End"&&(Vt(le),$.current=Se,L($.current)),S>1){const ie=C||Array.from({length:i.current.length},()=>({width:1,height:1})),de=L2(ie,S,k),te=de.findIndex(ne=>ne!=null&&!Vs(i.current,ne,x)),q=de.reduce((ne,me,De)=>me!=null&&!Vs(i.current,me,x)?De:ne,-1);if($.current=de[F2({current:de.map(ne=>ne!=null?i.current[ne]:null)},{event:le,orientation:b,loop:d,cols:S,disabledIndices:$2([...x||i.current.map((ne,me)=>Vs(i.current,me)?me:void 0),void 0],de),minIndex:te,maxIndex:q,prevIndex:V2($.current>Se?ce:$.current,ie,de,S,le.key===na?"bl":le.key===Go?"tr":"tl"),stopEvent:!0})],L($.current),b==="both")return}if(D0(le.key,b)){if(Vt(le),n&&!m&&xn(le.currentTarget.ownerDocument)===le.currentTarget){$.current=lf(le.key,b,f)?ce:Se,L($.current);return}lf(le.key,b,f)?d?$.current=we>=Se?u&&we!==i.current.length?-1:ce:Bt(i,{startingIndex:we,disabledIndices:x}):$.current=Math.min(Se,Bt(i,{startingIndex:we,disabledIndices:x})):d?$.current=we<=ce?u&&we!==-1?i.current.length:Se:Bt(i,{startingIndex:we,decrement:!0,disabledIndices:x}):$.current=Math.max(ce,Bt(i,{startingIndex:we,decrement:!0,disabledIndices:x})),ra(i,$.current)?L(null):L($.current)}}),Ce=P.useMemo(()=>m&&n&&ae&&{"aria-activedescendant":j||Y},[m,n,ae,j,Y]),_e=P.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!Fx(o.domReference)&&Ce,onKeyDown:be,onPointerMove(){M.current=!0}}),[Ce,be,o.domReference,b]),Be=P.useMemo(()=>{function le(ce){g==="auto"&&Dx(ce.nativeEvent)&&(N.current=!0)}function we(ce){N.current=g,g==="auto"&&Vd(ce.nativeEvent)&&(N.current=!0)}return{...Ce,onKeyDown(ce){M.current=!1;const Se=ce.key.indexOf("Arrow")===0,ie=fF(ce.key,b,f),de=N0(ce.key,b,f),te=D0(ce.key,b),q=(p?ie:te)||ce.key==="Enter"||ce.key.trim()==="";if(m&&n){const Ue=A==null?void 0:A.nodesRef.current.find(jt=>jt.parentId==null),Qe=A&&Ue?G2(A.nodesRef.current,Ue.id):null;if(Se&&Qe&&T){const jt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ie||de){var ne,me;const kn=((ne=Qe.context)==null?void 0:ne.elements.domReference)===ce.currentTarget,Wn=de&&!kn?(me=Qe.context)==null?void 0:me.elements.domReference:ie?i.current.find(Or=>(Or==null?void 0:Or.id)===Y):null;Wn&&(Vt(ce),Wn.dispatchEvent(jt),z(void 0))}if(te&&Qe.context&&Qe.context.open&&Qe.parentId&&ce.currentTarget!==Qe.context.elements.domReference){var De;Vt(ce),(De=Qe.context.elements.domReference)==null||De.dispatchEvent(jt);return}}return be(ce)}if(!(!n&&!y&&Se)){if(q&&(I.current=p&&te?null:ce.key),p){ie&&(Vt(ce),n?($.current=ef(i,B.current),L($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}te&&(c!=null&&($.current=c),Vt(ce),!n&&y?r(!0,ce.nativeEvent,"list-navigation"):be(ce),n&&L($.current))}},onFocus(){n&&!m&&L(null)},onPointerDown:we,onMouseDown:le,onClick:le}},[Y,Ce,be,B,g,i,p,L,r,n,y,b,f,c,A,m,T]);return P.useMemo(()=>l?{reference:Be,floating:_e,item:R}:{},[l,Be,_e,R])}const pF=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function to(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=pF.get(a))!=null?n:a,l=Xo(),u=vr()!=null,d=P.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=P.useMemo(()=>{const m={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?m:{...m,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=P.useCallback(m=>{let{active:g,selected:h}=m;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&h};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return P.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const F0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function ti(e,t){return typeof e=="function"?e(t):e}function hF(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function mF(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=P.useState("unmounted"),c=hF(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 L0(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=P.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,m]=P.useState(()=>({...ti(i,c),...ti(n,c)})),{isMounted:g,status:h}=mF(e,{duration:a}),y=$t(n),x=$t(r),b=$t(o),S=$t(i);return We(()=>{const w=ti(y.current,c),T=ti(b.current,c),C=ti(S.current,c),k=ti(x.current,c)||Object.keys(w).reduce((_,A)=>(_[A]="",_),{});if(h==="initial"&&m(_=>({transitionProperty:_.transitionProperty,...C,...w})),h==="open"&&m({transitionProperty:Object.keys(k).map(F0).join(","),transitionDuration:d+"ms",...C,...k}),h==="close"){const _=T||w;m({transitionProperty:Object.keys(_).map(F0).join(","),transitionDuration:p+"ms",...C,..._})}},[p,b,y,x,S,d,h,c]),{isMounted:g,styles:f}}function gF(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,m=P.useRef(),g=P.useRef(""),h=P.useRef((n=f??a)!=null?n:-1),y=P.useRef(null),x=_t(s),b=_t(l),S=$t(u),w=$t(p);We(()=>{r&&(clearTimeout(m.current),y.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=_t(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=_t(A=>{function L(D,V,F){const H=S.current?S.current(V,F):V.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(F.toLocaleLowerCase()))===0);return H?D.indexOf(H):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(L(N,N,g.current)===-1?T(!1):A.key===" "&&Vt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Vt(A),T(!0)),N.every(D=>{var V,F;return D?((V=D[0])==null?void 0:V.toLocaleLowerCase())!==((F=D[1])==null?void 0:F.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",h.current=y.current),g.current+=A.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",h.current=y.current,T(!1)},d);const I=h.current,M=L(N,[...N.slice((I||0)+1),...N.slice(0,(I||0)+1)],g.current);M!==-1?(x(M),y.current=M):A.key!==" "&&(g.current="",T(!1))}),k=P.useMemo(()=>({onKeyDown:C}),[C]),_=P.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&T(!1)}}),[C,T]);return P.useMemo(()=>c?{reference:k,floating:_}:{},[c,k,_])}function V0(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 vF(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function $0(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),m=f-l;if(a===null||s===null||m===0)return a=d,s=p,l=f,null;const g=d-a,h=p-s,x=Math.sqrt(g*g+h*h)/m;return a=d,s=p,l=f,x}const u=d=>{let{x:p,y:f,placement:m,elements:g,onClose:h,nodeId:y,tree:x}=d;return function(S){function w(){clearTimeout(o),h()}if(clearTimeout(o),!g.domReference||!g.floating||m==null||p==null||f==null)return;const{clientX:T,clientY:C}=S,k=[T,C],_=Nn(S),A=S.type==="mouseleave",L=xt(g.floating,_),N=xt(g.domReference,_),$=g.domReference.getBoundingClientRect(),I=g.floating.getBoundingClientRect(),M=m.split("-")[0],D=p>I.right-I.width/2,V=f>I.bottom-I.height/2,F=vF(k,$),H=I.width>$.width,O=I.height>$.height,B=(H?$:I).left,X=(H?$:I).right,Q=(O?$:I).top,J=(O?$:I).bottom;if(L&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&nt(S.relatedTarget)&&xt(g.floating,S.relatedTarget)||x&&Xr(x.nodesRef.current,y).some(Z=>{let{context:j}=Z;return j==null?void 0:j.open}))return;if(M==="top"&&f>=$.bottom-1||M==="bottom"&&f<=$.top+1||M==="left"&&p>=$.right-1||M==="right"&&p<=$.left+1)return w();let G=[];switch(M){case"top":G=[[B,$.top+1],[B,I.bottom-1],[X,I.bottom-1],[X,$.top+1]];break;case"bottom":G=[[B,I.top+1],[B,$.bottom-1],[X,$.bottom-1],[X,I.top+1]];break;case"left":G=[[I.right-1,J],[I.right-1,Q],[$.left+1,Q],[$.left+1,J]];break;case"right":G=[[$.right-1,J],[$.right-1,Q],[I.left+1,Q],[I.left+1,J]];break}function Y(Z){let[j,z]=Z;switch(M){case"top":{const K=[H?j+t/2:D?j+t*4:j-t*4,z+t+1],ae=[H?j-t/2:D?j+t*4:j-t*4,z+t+1],R=[[I.left,D||H?I.bottom-t:I.top],[I.right,D?H?I.bottom-t:I.top:I.bottom-t]];return[K,ae,...R]}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],R=[[I.left,D||H?I.top+t:I.bottom],[I.right,D?H?I.top+t:I.bottom:I.top+t]];return[K,ae,...R]}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?I.right-t:I.left,I.top],[V?O?I.right-t:I.left:I.right-t,I.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],R=[[V||O?I.left+t:I.right,I.top],[V?O?I.left+t:I.right:I.left+t,I.bottom]];return[K,ae,...R]}}}if(!V0([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()}V0([T,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const yF=/Mac|iPod|iPhone|iPad/,Ws=()=>yF.test(navigator.userAgent),bF=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Ws()?"Meta":"Control":n==="Hyper"?Ws()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),j0=e=>e.map(t=>t.trim()).join("+");class xF{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=j0(bF(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=j0(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class wn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof wn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new wn(this);return t?t(n):n}static from(t,n){return new wn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(wn.from(t,n).values())}toArray(){return Array.from(this.values())}}const wF=(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]},z0=(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},B0={basic:/[,[\]]+?/,extend:/[,[\].]+?/},R0=(e,t)=>{const n=z0(t,B0.basic,e);return n!==void 0&&n!==e?n:z0(t,B0.extend,e)},H0=e=>e.replace(/[^0-9]/g,""),qs=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),W0=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?H0(e).includes(H0(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?wF(e,t)!==null:!1,SF=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>W0(e,o,n,r)):W0(e,t,n,r),cf=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Le.array(i.value)?i.value.map(qs):qs(`${i.value}`)}));return e.forEach(i=>{const a=R0(i,t);o.forEach(s=>{const l=R0(i,s.key);if(!l)return;const c=qs(`${s.value}`.toLocaleLowerCase()).trim(),u=qs(`${l}`.toLocaleLowerCase()).trim();if(SF(u,c,s.score,s.match))return void r.set(a,i);Le.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},TF=e=>(e=e.trim(),e==="Alt"?Ws()?v.jsx(BI,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Ws()?v.jsx(FI,{"aria-label":"Command",size:14}):"Ctrl":e),EF=e=>{const t=e.value.trim().split("+");return v.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return v.jsxs(E.Fragment,{children:[v.jsx("kbd",{"aria-label":n,children:TF(n)}),o?null:v.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},uf=v.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded-sm bg-table-border"}),CF=(e,t)=>ur()?t:window.matchMedia(e).matches,kF=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(CF(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},q0=()=>window.matchMedia("@media (pointer: coarse)"),AF=()=>{var r;const e=E.useRef(ur()?null:q0()),[t,n]=E.useState(ur()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?q0():e.current).addEventListener("change",i=>n(i.matches))},[]),t},df=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=AF(),o=E.useRef(ur()?"":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||wb())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(hT(c.style.height)):null,p=Le.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},PF=Ob,Sn="500ms",IF={exit:{x:["0%","-30%"],opacity:0,animationDuration:Sn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Sn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Sn}},_F={initial:{x:["30%","0%"],opacity:.8},enter:{x:"0%",opacity:1,animationDuration:Sn},exit:{x:["0%","30%"],opacity:0,animationDuration:Sn}},ff={drawer:e=>e==="left"?IF:_F,sheet:{initial:{opacity:.5,y:"25%",animationDuration:Sn,transformOrigin:"bottom"},enter:{opacity:1,y:"0%",animationDuration:Sn,transformOrigin:"bottom"},exit:{opacity:.1,y:"50%",animationDuration:Sn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Sn},initial:{opacity:.5,scale:.95,animationDuration:Sn,transition:{duration:.5,ease:"easeInOut"}},enter:{opacity:1,scale:[1.05,1],animationDuration:Sn}}},OF=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"}}),U0={top:0,left:0,right:0,bottom:0},K0=e=>e*.65,MF=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=K0(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return v.jsx(pt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:U0,whileDrag:{cursor:"grabbing"},className:ke("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?v.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Us={drawer:"right",sheet:"none",dialog:"none"},DF=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Us.drawer:Us[o]:t?Us[o]:Us.sheet},NF=[],pf=E.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:m=void 0,overlayClassName:g="",type:h="dialog",position:y,overlayClickClose:x=!1,role:b="dialog",interactions:S=NF,...w},T)=>{const C=df(e,"block-only"),k=E.useId(),_=E.useId(),A=kF("(min-width: 64rem)"),L=h!=="dialog",N=DF(A,f,h,y),$=A||f?ff[h]:ff.sheet,I=typeof $=="function"?$(N):$,M=A||f?h:"sheet",D=xr({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),V=aa(D.context),F=to(D.context,{role:b}),H=eo(D.context,{escapeKey:!0,referencePress:!0,outsidePress:x}),O=wr([V,F,H].concat(S)),B=o,X=es(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(),R=X.get()||ae.height,be=Math.abs(R-j.delta.y),Ce=K0(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:I},Y=d&&M==="sheet"?{dragElastic:0,onDrag:J,dragConstraints:U0,...G,dragListener:!0,dragMomentum:!0,dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,draggable:M==="sheet",drag:M==="sheet"?"y":"x"}:G;return v.jsxs(E.Fragment,{children:[o?v.jsx(E.Fragment,{children:r?v.jsx(PF,{ref:D.refs.setReference,...O.getReferenceProps({layoutId:m}),children:B}):v.jsx(pt.button,{ref:D.refs.setReference,...O.getReferenceProps(),layoutId:m,type:"button",children:B})}):null,v.jsx(Qr,{preserveTabOrder:!0,children:v.jsx(or,{mode:"wait",propagate:!0,presenceAffectsLayout:!0,initial:!1,children:e?v.jsx(C0,{lockScroll:!0,className:ke(`inset-0 isolate z-overlay h-dvh overflow-clip! bg-floating-overlay/70 ${M==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:v.jsx(ei,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:D.context,children:v.jsxs(pt.div,{...w,...Y,...t?{"aria-labelledby":k,"aria-describedby":_}:{"aria-label":s},...O.getFloatingProps({"aria-modal":e,ref:qn(D.refs.setFloating,C),className:ke(OF({position:N,type:M}),l,"overscroll-contain")}),"data-component":"modal",style:M==="drawer"?{width:X}:{height:X},children:[t?v.jsx("header",{className:"relative w-full",children:t?v.jsx("h2",{id:k,className:"px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,v.jsx("section",{"data-component":"modal-body",className:ke("flex-1 select-text overflow-y-auto px-8 py-1",c),children:i}),n?v.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?v.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:v.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:v.jsx(Wi,{})})}):null,L&&u?v.jsx(MF,{onChange:a,value:X,sheet:M==="sheet",position:N,parent:D.refs.floating}):null]})})}):null},k)})]})}),FF=e=>v.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Pc(e.item.title)?v.jsx(e.item.title,{text:e.text}):e.item.title}),LF=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?v.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:v.jsx(FF,{text:e.text,item:o})}):o.type!=="shortcut"?v.jsx(E.Fragment,{}):v.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[v.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,v.jsx("span",{children:Pc(o.title)?v.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?v.jsx(EF,{value:o.shortcut}):null]})}),VF=(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:Le.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Le.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=cf(o,"title",n),a=r.filter(s=>Le.function(s.enabled)?s.enabled({text:t}):!1);return wn.unique(i.concat(a),s=>s.title)},$F=[0,0,0,0,0],jF=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=Ct(),[o,i]=E.useState(""),a=rr(o),s=E.useId(),l=E.useRef(null),[c,u]=E.useState(null),d=xr({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:Ko}),p=Hs(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:x=>u(b=>Le.number(x)?x:e.open?b??0:null)}),{getItemProps:f}=wr([p]),m=e.commands.flatMap(x=>x.type==="group"?[x,...x.items]:[x]),g=VF(m,o),h=o===""?m:[{type:"group",title:"Results",items:[]},...g.filter(x=>x.type!=="group")];E.useEffect(()=>{const x=new xF;return x.add(t,()=>{var b;return(b=e.onChangeVisibility)==null?void 0:b.call(e,!0)}),m.forEach(b=>{b.type!=="group"&&b.type==="shortcut"&&b.shortcut!==void 0&&x.add(b.shortcut,S=>b.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),x.register()},[t]);const y=e.Icon??Ty;return v.jsx(E.Fragment,{children:v.jsxs(pf,{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-(--breakpoint-sm) lg:max-w-(--breakpoint-md)",children:[v.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[v.jsx("div",{className:"flex size-10 items-center justify-center",children:v.jsx(y,{Default:Ty,text:o,size:16})}),v.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:x=>i(x.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-hidden",onKeyDown:x=>{var b;if((x.key==="ArrowDown"||x.key==="ArrowUp")&&c!==null&&((b=n.current[c])==null||b.scrollIntoView({block:"start",inline:"start"})),x.key==="Enter"){if(c!==null&&h[c]){x.preventDefault();const S=h[c],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}if(h.length===1){x.preventDefault();const S=h[0],w=x.currentTarget.value;if(S.type==="shortcut")return S.action({event:x,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[v.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),$F.map((x,b)=>v.jsx("li",{className:ke("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:uf},`${s}-${b}-skeleton-index`))]}):v.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[v.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[h.map((x,b)=>E.createElement(LF,{...f({onMouseEnter:()=>u(b),ref(S){n.current[b]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),x.type==="shortcut"&&x.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:x,text:o,active:c===b,key:`${s}-${x.type}-${b}`})),h.length===1?v.jsx("div",{className:ke("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Le.number(c)?v.jsx(e.Preview,{command:h[c],text:o}):null]}),e.footer?v.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},ni=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[ta(10),Qd({fallbackAxisSideDirection:"end"}),Xd(),t0({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=xr({open:n,middleware:i,transform:!0,whileElementsMounted:Ko,onOpenChange:(m,g)=>{var y;const h=g==null?void 0:g.relatedTarget;h&&h.dataset.floating==="true"&&!m||(r(m),(y=e.onChange)==null||y.call(e,m))}}),c=aa(l),u=eo(l),d=to(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=wr([c,u,d]);return v.jsxs(E.Fragment,{children:[v.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&v.jsx(Qr,{preserveTabOrder:!0,id:`${t}-portal`,children:v.jsx(ei,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:v.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[v.jsx(c0,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),v.jsx("header",{className:"mb-2",children:v.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},zF=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}=xr({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=aa(s,{enabled:e.disabled??!0}),u=to(s,{role:"tooltip"}),d=eo(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=wr([c,u,d]);return v.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[v.jsx(Na,{...f(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:v.jsx(pt.span,{layoutId:o,children:e.trigger})}),v.jsx(or,{children:i?v.jsx(Qr,{root:t,children:v.jsx(ei,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:v.jsx(pt.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Y0=200,BF=500,G0=(e="")=>ke("w-full min-w-36 outline-hidden 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),hf=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Z0=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=E.useState(r??!1),[p,f]=E.useState(!1),[m,g]=E.useState(null),h=E.useRef([]),y=E.useRef([]),x=E.useContext(hf),b=vr(),S=yr(),w=q2(),T=a0(),C=b!==null,{floatingStyles:k,refs:_,context:A}=xr({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Ko,placement:C?"right":"bottom-start",middleware:[ta({mainAxis:C?0:4,alignmentAxis:C?-4:0}),Qd(),Xd()]}),L=to(A,{role:"menu"}),N=eo(A,{bubbles:!0}),$=h0(A,{move:!1,enabled:n,delay:{open:Y0},handleClose:$0({blockPointerEvents:!0})}),I=aa(A,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),M=Hs(A,{loop:!0,activeIndex:m,nested:C,listRef:h,onNavigate:g}),D=gF(A,{activeIndex:m,listRef:y,resetMs:BF,onMatch:u?g:void 0}),{getReferenceProps:V,getFloatingProps:F,getItemProps:H}=wr([$,I,L,N,M,D]);E.useEffect(()=>{if(!S)return;const B=()=>d(!1),X=Q=>{Q.nodeId!==w&&Q.parentId===b&&d(!1)};return S.events.on("click",B),S.events.on("menuopen",X),()=>{S.events.off("click",B),S.events.off("menuopen",X)}},[S,w,b]),E.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:b,nodeId:w})},[S,u,w,b]);const O=o?l.className:ke(G0(l.className));return v.jsxs(U2,{id:w,children:[v.jsx(E.Fragment,{children:l.asChild?v.jsx(Ob,{...V(x.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),x.setHasFocusInside(!0)}})),children:s,className:O,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:qn(_.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0}):v.jsxs("button",{type:"button",className:O,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:qn(_.setReference,T.ref,c),tabIndex:C?x.activeIndex===T.index?0:-1:void 0,...V(x.getItemProps({...l,onFocus(B){var X;(X=l.onFocus)==null||X.call(l,B),f(!1),x.setHasFocusInside(!0)}})),children:[s,C&&v.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[v.jsx("span",{className:"sr-only",children:"Next menu"}),v.jsx(Wu,{size:14})]})]})}),v.jsx(hf.Provider,{value:{activeIndex:m,setActiveIndex:g,getItemProps:H,setHasFocusInside:f,isOpen:u},children:v.jsx(B2,{elementsRef:h,labelsRef:y,children:u&&v.jsx(Qr,{preserveTabOrder:!0,children:v.jsx(ei,{context:A,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:v.jsx(t,{...F(),ref:_.setFloating,style:{...l.style,...k},className:ke("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-hidden",a),children:e})})})})})]})}),RF=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(hf),s=a0({label:n?null:e}),l=yr(),c=s.index===a.activeIndex;return v.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:qn(s.ref,i),className:G0(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?v.jsx(t,{size:16}):null]})}),HF=E.forwardRef((e,t)=>vr()===null?v.jsx(K2,{children:v.jsx(Z0,{...e,isParent:!0,ref:t})}):v.jsx(Z0,{...e,isParent:!1,ref:t})),WF=e=>v.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),mf=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),y=t||"span",x=I=>{g(I),d==null||d(I)},{refs:b,floatingStyles:S,context:w}=xr({open:m,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:Ko,onOpenChange:i?void 0:x,middleware:[Xd(),ta(5),Qd({fallbackAxisSideDirection:"start"}),t0({padding:5,element:h})]}),T=h0(w,{move:!0,delay:{open:Y0},enabled:l?s:!1,handleClose:c?$0():null}),C=dF(w,{enabled:l?a:!1}),k=aa(w,{enabled:l?c:!1}),_=eo(w,{enabled:l}),A=to(w,{role:"tooltip",enabled:l}),L=sF(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:$}=wr([A,_,L,a?C:void 0,s?T:void 0,c?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),v.jsxs(E.Fragment,{children:[v.jsx(y,{...N(p),ref:qn(b.setReference,f),children:n}),m&&v.jsx(Qr,{preserveTabOrder:!0,children:v.jsxs(cn,{...$(),ref:b.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[v.jsx(c0,{ref:h,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Ks=0,Sr=1,ri=2,X0=4;function Q0(e){return()=>e}function qF(e){e()}function sa(e,t){return n=>e(t(n))}function J0(e,t){return()=>e(t)}function ew(e,t){return n=>e(t,n)}function gf(e){return e!==void 0}function UF(...e){return()=>{e.map(qF)}}function oi(){}function Ys(e,t){return t(e),e}function KF(e,t){return t(e)}function ct(...e){return e}function tt(e,t){return e(Sr,t)}function Ne(e,t){e(Ks,t)}function vf(e){e(ri)}function Rt(e){return e(X0)}function xe(e,t){return tt(e,ew(t,Ks))}function Ln(e,t){const n=e(Sr,r=>{n(),t(r)});return n}function tw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function nw(e,t){return e===t}function ut(e=nw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ae(e){return t=>n=>{e(n)&&t(n)}}function he(e){return t=>sa(t,e)}function Vn(e){return t=>()=>{t(e)}}function re(e,...t){const n=YF(...t);return(r,o)=>{switch(r){case ri:vf(e);return;case Sr:return tt(e,n(o))}}}function $n(e,t){return n=>r=>{n(t=e(t,r))}}function ii(e){return t=>n=>{e>0?e--:t(n)}}function Tr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ve(...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 YF(...e){return t=>e.reduceRight(KF,t)}function GF(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case Sr:return i?n===i?void 0:(r(),n=i,t=tt(e,i),t):(r(),oi);case ri:r(),n=null;return}}}function se(e){let t=e;const n=He();return(r,o)=>{switch(r){case Ks:t=o;break;case Sr:{o(t);break}case X0:return t}return n(r,o)}}function Ht(e,t){return Ys(se(t),n=>xe(e,n))}function He(){const e=[];return(t,n)=>{switch(t){case Ks:e.slice().forEach(r=>{r(n)});return;case ri:e.splice(0,e.length);return;case Sr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function rn(e){return Ys(He(),t=>xe(e,t))}function Ye(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:ZF(),singleton:n}}const ZF=()=>Symbol();function XF(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 Ot(...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 ri:{vf(t);return}case Sr:return r===o&&a(n),tt(t,a)}}}function Ie(e,t=nw){return re(e,ut(t))}function rw(...e){return function(t,n){switch(t){case ri:return;case Sr:return UF(...e.map(r=>tt(r,n)))}}}var on=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(on||{});const QF={0:"debug",3:"error",1:"log",2:"warn"},JF=()=>typeof globalThis>"u"?window:globalThis,Er=Ye(()=>{const e=se(3);return{log:se((t,n,r=1)=>{var o;const i=(o=JF().VIRTUOSO_LOG_LEVEL)!=null?o:Rt(e);r>=i&&console[QF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function jn(e,t,n){return yf(e,t,n).callbackRef}function yf(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 ow(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=eL(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let m;f&&(m=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:f?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:f?s?m.innerWidth:m.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y}),i==null||i(s?iw("column-gap",getComputedStyle(u).columnGap,o):iw("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return yf(c,n,l)}function eL(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},on.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 iw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,on.WARN),t==="normal"?0:parseInt(t??"0",10)}function bf(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}=yf(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Ut=Ye(()=>{const e=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 aw(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===la}function ca(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?ca(e.l,t):ca(e.r,t)}function Tn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Tn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Tn(e.l,t,n)}function an(e,t,n){return ot(e)?cw(t,n,1):t===e.k?Mt(e,{k:t,v:n}):t<e.k?uw(Mt(e,{l:an(e.l,t,n)})):uw(Mt(e,{r:an(e.r,t,n)}))}function ai(){return la}function Gs(e,t,n){if(ot(e))return[];const r=Tn(e,t)[0];return tL(wf(e,r,n))}function xf(e,t){if(ot(e))return la;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=lw(r);return Zs(Mt(e,{k:i,l:sw(r),v:a}))}}else return t<n?Zs(Mt(e,{l:xf(r,t)})):Zs(Mt(e,{r:xf(o,t)}))}function no(e){return ot(e)?[]:[...no(e.l),{k:e.k,v:e.v},...no(e.r)]}function wf(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(wf(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(wf(i,t,n))),s}function Zs(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(Sf(t))return dw(Mt(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return Mt(t.r,{l:Mt(t,{r:t.r.l}),lvl:n,r:Mt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Sf(e))return Tf(Mt(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=Sf(o)?r.lvl-1:r.lvl;return Mt(o,{l:Mt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Tf(Mt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Mt(e,t){return cw(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 sw(e){return ot(e.r)?e.l:Zs(Mt(e,{r:sw(e.r)}))}function Sf(e){return ot(e)||e.lvl>e.r.lvl}function lw(e){return ot(e.r)?[e.k,e.v]:lw(e.r)}function cw(e,t,n,r=la,o=la){return{k:e,l:r,lvl:n,r:o,v:t}}function uw(e){return Tf(dw(e))}function dw(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Mt(t,{r:Mt(e,{l:t.r})}):e}function Tf(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Mt(n,{l:Mt(e,{r:n.l}),lvl:t+1}):e}function tL(e){return aw(e,({k:t,v:n})=>({index:t,value:n}))}function fw(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 Ef=Ye(()=>({recalcInProgress:se(!1)}),[],{singleton:!0});function pw(e,t,n){return e[Xs(e,t,n)]}function Xs(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 nL(e,t,n,r){const o=Xs(e,t,r),i=Xs(e,n,r,o);return e.slice(o,i+1)}function En(e,t){return Math.round(e.getBoundingClientRect()[t])}function Qs(e){return!ot(e.groupOffsetTree)}function Cf({index:e},t){return t===e?0:t<e?-1:1}function rL(){return{groupIndices:[],groupOffsetTree:ai(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ai()}}function oL(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=an(e,0,i);continue}const s=Gs(e,a-1,o+1);if(s.some(dL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=xf(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=an(e,o+1,p));c&&(e=an(e,a,i))}return[e,n]}function iL(e){return typeof e.groupIndex<"u"}function aL({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}=pw(t,e,Cf),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function hw(e,t){if(!Qs(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function mw(e,t,n){if(iL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=hw(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function sL(e,t,n,r=0){return r>0&&(t=Math.max(t,pw(e,r,Cf).offset)),aw(nL(e,t,n,aL),uL)}function lL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,on.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((m,g)=>an(an(m,g,p),g+1,f),a)}else[a,s]=oL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=kf(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>an(p,f,da(f,d,o)),ai()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function cL(e){return no(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 gw(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 kf(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Xs(o,t-1,Cf),s=o[l].offset;const c=Tn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Tn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Gs(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function uL(e){return{index:e.index,value:e}}function dL(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 fL={offsetHeight:"height",offsetWidth:"width"},zn=Ye(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),o=Ht(r,0),i=He(),a=He(),s=se(0),l=se([]),c=se(void 0),u=se(void 0),d=se((w,T)=>En(w,fL[T])),p=se(void 0),f=se(0),m=rL(),g=Ht(re(n,Ve(l,e,f),$n(lL,m),ut()),m),h=Ht(re(l,ut(),$n((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),he(({prev:w})=>w)),[]);xe(re(l,Ae(w=>w.length>0),Ve(g,f),he(([w,T,C])=>{const k=w.reduce((_,A,L)=>an(_,A,da(A,T.offsetTree,C)||L),ai());return{...T,groupIndices:w,groupOffsetTree:k}})),g),xe(re(r,Ve(g),Ae(([w,{lastIndex:T}])=>w<T),he(([w,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:w}])),n),xe(c,u);const y=Ht(re(c,he(w=>w===void 0)),!0);xe(re(u,Ae(w=>w!==void 0&&ot(Rt(g).sizeTree)),he(w=>[{endIndex:0,size:w,startIndex:0}])),n);const x=rn(re(n,Ve(g),$n(({sizes:w},[T,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:m}),he(w=>w.changed)));tt(re(s,$n((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),he(w=>w.diff)),w=>{const{groupIndices:T}=Rt(g);if(w>0)Ne(t,!0),Ne(i,w+gw(w,T));else if(w<0){const C=Rt(h);C.length>0&&(w-=gw(-w,C)),Ne(a,w)}}),tt(re(s,Ve(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},on.ERROR)});const b=rn(i);xe(re(i,Ve(g),he(([w,T])=>{const C=T.groupIndices.length>0,k=[],_=T.lastSize;if(C){const A=ca(T.sizeTree,0);let L=0,N=0;for(;L<w;){const I=T.groupIndices[N],M=T.groupIndices.length===N+1?1/0:T.groupIndices[N+1]-I-1;k.push({endIndex:I,size:A,startIndex:I}),k.push({endIndex:I+1+M-1,size:_,startIndex:I+1}),N++,L+=M+1}const $=no(T.sizeTree);return L!==w&&$.shift(),$.reduce((I,{k:M,v:D})=>{let V=I.ranges;return I.prevSize!==0&&(V=[...I.ranges,{endIndex:M+w-1,size:I.prevSize,startIndex:I.prevIndex}]),{prevIndex:M+w,prevSize:D,ranges:V}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return no(T.sizeTree).reduce((A,{k:L,v:N})=>({prevIndex:L+w,prevSize:N,ranges:[...A.ranges,{endIndex:L+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:_,ranges:[]}).ranges})),n);const S=rn(re(a,Ve(g,f),he(([w,{offsetTree:T},C])=>{const k=-w;return da(k,T,C)})));return xe(re(a,Ve(g,f),he(([w,T,C])=>{if(T.groupIndices.length>0){if(ot(T.sizeTree))return T;let k=ai();const _=Rt(h);let A=0,L=0,N=0;for(;A<-w;){N=_[L];const $=_[L+1]-N-1;L++,A+=$+1}if(k=no(T.sizeTree).reduce(($,{k:I,v:M})=>an($,Math.max(0,I+w),M),k),A!==-w){const $=ca(T.sizeTree,N);k=an(k,0,$);const I=Tn(T.sizeTree,-w+1)[1];k=an(k,1,I)}return{...T,sizeTree:k,...kf(T.offsetTree,0,k,C)}}else{const k=no(T.sizeTree).reduce((_,{k:A,v:L})=>an(_,Math.max(0,A+w),L),ai());return{...T,sizeTree:k,...kf(T.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:x,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},ct(Er,Ef),{singleton:!0});function pL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const vw=Ye(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=He(),a=He(),s=rn(re(i,he(pL)));return xe(re(s,he(l=>l.totalCount)),n),xe(re(s,he(l=>l.groupIndices)),e),xe(re(Ot(o,t,r),Ae(([l,c])=>Qs(c)),he(([l,c,u])=>Tn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),ut(),he(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ct(zn,Ut)),Cr=Ye(([{log:e}])=>{const t=se(!1),n=rn(re(t,Ae(r=>r),ut()));return tt(t,r=>{r&&Rt(e)("props updated",{},on.DEBUG)}),{didMount:n,propsReady:t}},ct(Er),{singleton:!0}),hL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function yw(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!hL)&&(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,y=null,x=null;function b(){h&&(h(),h=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),Ne(l,!1)}return xe(re(f,Ve(n,d,r,g,s,a,p),Ve(e,i,o),he(([[S,w,T,C,k,_,A,L],N,$,I])=>{const M=yw(S),{align:D,behavior:V,offset:F}=M,H=C-1,O=mw(M,w,H);let B=da(O,w.offsetTree,N)+_;D==="end"?(B+=$+Tn(w.sizeTree,O)[1]-T+I,O===H&&(B+=A)):D==="center"?B+=($+Tn(w.sizeTree,O)[1]-T+I)/2:B-=k,F&&(B+=F);const X=Q=>{b(),Q?(L("retrying to scroll to",{location:S},on.DEBUG),Ne(f,S)):(Ne(m,!0),L("list did not change, scroll successful",{},on.DEBUG))};if(b(),V==="smooth"){let Q=!1;x=tt(t,J=>{Q=Q||J}),h=Ln(u,()=>{X(Q)})}else h=Ln(re(t,mL(150)),X);return y=setTimeout(()=>{b()},1200),Ne(l,!0),L("scrolling from index to",{behavior:V,index:O,top:B},on.DEBUG),{behavior:V,top:B}})),c),{scrollTargetReached:m,scrollToIndex:f,topListHeight:g}},ct(zn,Ut,Er),{singleton:!0});function mL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Af(e,t){e==0?t():requestAnimationFrame(()=>{Af(e-1,t)})}function Pf(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,Ve(l),Ae(([u,d])=>!!d),Vn(!1)),s),xe(re(a,Ve(l),Ae(([u,d])=>!!d),Vn(!1)),c),tt(re(Ot(t,a),Ve(s,n,e,c),Ae(([[,u],d,{sizeTree:p},f,m])=>u&&(!ot(p)||gf(f))&&!d&&!m),Ve(l)),([,u])=>{Ln(o,()=>{Ne(c,!0)}),Af(4,()=>{Ln(r,()=>{Ne(s,!0)}),Ne(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ct(zn,Ut,fa,Cr),{singleton:!0});function bw(e,t){return Math.abs(e-t)<1.01}const ha="up",ma="down",gL="none",vL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},yL=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(yL),p=Ht(re(rw(re(Ie(o),ii(1),Vn(!0)),re(Ie(o),ii(1),Vn(!1),tw(100))),ut()),!1),f=Ht(re(rw(re(n,Vn(!0)),re(n,Vn(!1),tw(200))),ut()),!1);xe(re(Ot(Ie(o),Ie(d)),he(([x,b])=>x<=b),ut()),s),xe(re(s,Tr(50)),c);const m=rn(re(Ot(r,Ie(i),Ie(t),Ie(e),Ie(u)),$n((x,[{scrollHeight:b,scrollTop:S},w,T,C,k])=>{const _=S+w-b>-k,A={scrollHeight:b,scrollTop:S,viewportHeight:w};if(_){let N,$;return S>x.state.scrollTop?(N="SCROLLED_DOWN",$=x.state.scrollTop-S):(N="SIZE_DECREASED",$=x.state.scrollTop-S||x.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:$,state:A}}let L;return A.scrollHeight>x.state.scrollHeight?L="SIZE_INCREASED":w<x.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":S<x.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:A}},vL),ut((x,b)=>x&&x.atBottom===b.atBottom))),g=Ht(re(r,$n((x,{scrollHeight:b,scrollTop:S,viewportHeight:w})=>{if(bw(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const T=b-(S+w)<1;return x.scrollTop!==S&&T?{changed:!0,jump:x.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ae(x=>x.changed),he(x=>x.jump)),0);xe(re(m,he(x=>x.atBottom)),a),xe(re(a,Tr(50)),l);const h=se(ma);xe(re(r,he(({scrollTop:x})=>x),ut(),$n((x,b)=>Rt(f)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?ha:ma,prevScrollTop:b},{direction:ma,prevScrollTop:0}),he(x=>x.direction)),h),xe(re(r,Tr(50),Vn(gL)),h);const y=se(0);return xe(re(p,Ae(x=>!x),Vn(0)),y),xe(re(o,Tr(100),Ve(p),Ae(([x,b])=>!!b),$n(([x,b],[S])=>[b,S],[0,0]),he(([x,b])=>b-x)),y),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:h,scrollVelocity:y}},ct(Ut)),Js="top",el="bottom",xw="none";function ww(e,t,n){return typeof e=="number"?n===ha&&t===Js||n===ma&&t===el?e:0:n===ha?t===Js?e.main:e.reverse:t===el?e.main:e.reverse}function Sw(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const If=Ye(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=He(),a=se(0),s=se(0),l=se(0),c=Ht(re(Ot(Ie(r),Ie(o),Ie(n),Ie(i,ua),Ie(l),Ie(a),Ie(t),Ie(e),Ie(s)),he(([u,d,p,[f,m],g,h,y,x,b])=>{const S=u-x,w=h+y,T=Math.max(p-S,0);let C=xw;const k=Sw(b,Js),_=Sw(b,el);return f-=x,f+=p+y,m+=p+y,m-=x,f>u+w-k&&(C=ha),m<u-T+d+_&&(C=ma),C!==xw?[Math.max(S-p-ww(g,Js,C)-k,0),S-T-y+d+ww(g,el,C)+_]:null}),Ae(u=>u!=null),ut(ua)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ct(Ut),{singleton:!0});function bL(e,t,n){if(Qs(t)){const r=hw(e,t);return[{index:Tn(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 _f={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function tl(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:Ew(e,o,i),offsetBottom:m,offsetTop:c,top:f,topItems:Ew(t,o,i),topListHeight:t.reduce((g,h)=>h.size+g,0),totalCount:n}}function Tw(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=Pf(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return tl(c,[],s,o,n,r)}function Ew(e,t,n){if(e.length===0)return[];if(!Qs(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Gs(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const ro=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:m}])=>{const g=se([]),h=se(0),y=He();xe(i.topItemsIndexes,g);const x=Ht(re(Ot(f,m,Ie(l,ua),Ie(o),Ie(r),Ie(c),u,Ie(g),Ie(t),Ie(n),e),Ae(([T,C,,k,,,,,,,_])=>{const A=_&&_.length!==k;return T&&!C&&!A}),he(([,,[T,C],k,_,A,L,N,$,I,M])=>{const D=_,{offsetTree:V,sizeTree:F}=D,H=Rt(h);if(k===0)return{..._f,totalCount:k};if(T===0&&C===0)return H===0?{..._f,totalCount:k}:Tw(H,A,_,$,I,M||[]);if(ot(F))return H>0?null:tl(bL(Pf(A,k),D,M),[],k,I,D,$);const O=[];if(N.length>0){const G=N[0],Y=N[N.length-1];let Z=0;for(const j of Gs(F,G,Y)){const z=j.value,K=Math.max(j.start,G),ae=Math.min(j.end,Y);for(let R=K;R<=ae;R++)O.push({data:M==null?void 0:M[R],index:R,offset:Z,size:z}),Z+=z}}if(!L)return tl([],O,k,I,D,$);const B=N.length>0?N[N.length-1]+1:0,X=sL(V,T,C,B);if(X.length===0)return null;const Q=k-1,J=Ys([],G=>{for(const Y of X){const Z=Y.value;let j=Z.offset,z=Y.start;const K=Z.size;if(Z.offset<T){z+=Math.floor((T-Z.offset+I)/(K+I));const R=z-Y.start;j+=R*K+R*I}z<B&&(j+=(B-z)*K,z=B);const ae=Math.min(Y.end,Q);for(let R=z;R<=ae&&!(j>=C);R++)G.push({data:M==null?void 0:M[R],index:R,offset:j,size:K}),j+=K+I}});return tl(J,O,k,I,D,$)}),Ae(T=>T!==null),ut()),_f);xe(re(e,Ae(gf),he(T=>T==null?void 0:T.length)),o),xe(re(x,he(T=>T.topListHeight)),d),xe(d,s),xe(re(x,he(T=>[T.top,T.bottom])),a),xe(re(x,he(T=>T.items)),y);const b=rn(re(x,Ae(({items:T})=>T.length>0),Ve(o,e),Ae(([{items:T},C])=>T[T.length-1].originalIndex===C-1),he(([,T,C])=>[T-1,C]),ut(ua),he(([T])=>T))),S=rn(re(x,Tr(200),Ae(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),he(({items:T})=>T[0].index),ut())),w=rn(re(x,Ae(({items:T})=>T.length>0),he(({items:T})=>{let C=0,k=T.length-1;for(;T[C].type==="group"&&C<k;)C++;for(;T[k].type==="group"&&k>C;)k--;return{endIndex:T[k].index,startIndex:T[C].index}}),ut(fw)));return{endReached:b,initialItemCount:h,itemsRendered:y,listState:x,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},ct(zn,vw,If,pa,fa,ga,Cr,Ef),{singleton:!0}),Cw=Ye(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=He(),a=Ht(re(Ot(n,e,r,t,o),he(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return xe(Ie(a),i),{totalListHeight:a,totalListHeightChanged:i}},ct(Ut,ro),{singleton:!0}),xL=Ye(([{viewportHeight:e},{totalListHeight:t}])=>{const n=se(!1),r=Ht(re(Ot(n,e,t),Ae(([o])=>o),he(([,o,i])=>Math.max(0,o-i)),Tr(0),ut()),0);return{alignToBottom:n,paddingTopAddition:r}},ct(Ut,Cw),{singleton:!0});function kw(e){return e?e==="smooth"?"smooth":"auto":!1}const wL=(e,t)=>typeof e=="function"?kw(e(t)):t&&kw(e),SL=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(Ot(re(Ie(t),ii(1)),a),Ve(Ie(u),r,i,c),he(([[g,h],y,x,b,S])=>{let w=h&&b,T="auto";return w&&(T=wL(y,x||S),w=w&&!!T),{followOutputBehavior:T,shouldFollow:w,totalCount:g}}),Ae(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:h})=>{p&&(p(),p=null),p=Ln(e,()=>{Rt(l)("following output to ",{totalCount:h},on.DEBUG),f(g),p=null})});function m(g){const h=Ln(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Rt(l)("scrolling to bottom due to increased size",{},on.DEBUG),f("auto"))});setTimeout(h,100)}return tt(re(Ot(Ie(u),t,s),Ae(([g,,h])=>g&&h),$n(({value:g},[,h])=>({refreshed:g===h,value:h}),{refreshed:!1,value:0}),Ae(({refreshed:g})=>g),Ve(u,t)),([,g])=>{Rt(i)&&m(g!==!1)}),tt(d,()=>{m(Rt(u)!==!1)}),tt(Ot(Ie(u),n),([g,h])=>{g&&!h.atBottom&&h.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ct(zn,ga,fa,pa,Cr,Er,Ut)),TL=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(xe(re(s,Ve(i),Ae(([,l])=>l!==0),Ve(o,r,t,n,e),he(([[,l],c,u,d,p,f=[]])=>Tw(l,c,u,d,p,f))),a),{}),ct(zn,pa,ro,Cr),{singleton:!0}),EL=Ye(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=se(0);return tt(re(e,Ve(r),Ae(([,o])=>o!==0),he(([,o])=>({top:o}))),o=>{Ln(re(n,ii(1),Ae(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ne(t,o)})})}),{initialScrollTop:r}},ct(Cr,Ut,ro),{singleton:!0}),CL=({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,kL=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,Ve(t,l,n,i,o,r,s),Ve(e),he(([[d,p,f,m,g,h,y,x],b])=>{const{align:S,behavior:w,calculateViewLocation:T=CL,done:C,...k}=d,_=mw(d,p,m-1),A=da(_,p.offsetTree,b)+g+h,L=A+Tn(p.sizeTree,_)[1],N=x+h,$=x+f-y,I=T({itemBottom:L,itemTop:A,locationParams:{align:S,behavior:w,...k},viewportBottom:$,viewportTop:N});return I?C&&Ln(re(a,Ae(M=>!M),ii(Rt(a)?1:2)),C):C&&C(),I}),Ae(d=>d!==null)),c),{scrollIntoView:u}},ct(zn,Ut,fa,ro,Er),{singleton:!0}),Aw=Ye(([{scrollVelocity:e}])=>{const t=se(!1),n=He(),r=se(!1);return xe(re(e,Ve(r,t,n),Ae(([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(Ot(t,e,n),Ve(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}),Of=Ye(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),o=He(),i=se(!1),a=se(void 0);return xe(re(Ot(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,Ve(r),he(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ct(Ut)),AL=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,Ve(t,r,a,d,p,n)),([f,m,g,h,y,x,b])=>{const S=cL(m.sizeTree);h&&y!==null&&x!==null&&(g=y.scrollTop-x.offsetTop),g-=b,f({ranges:S,scrollTop:g})}),xe(re(u,Ae(gf),he(PL)),o),xe(re(i,Ve(u),Ae(([,f])=>f!==void 0),ut(),he(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ct(zn,Ut,pa,Cr,Of));function PL(e){return{align:"start",index:0,offset:e.scrollTop}}const IL=Ye(([{topItemsIndexes:e}])=>{const t=se(0);return xe(re(t,Ae(n=>n>=0),he(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ct(ro));function Pw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const _L=Pw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),OL=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=rn(re(l,Ve(a),$n(([,y,x,b],[{bottom:S,items:w,offsetBottom:T,totalCount:C},k])=>{const _=S+T;let A=0;return x===C&&y.length>0&&w.length>0&&(w[0].originalIndex===0&&y[0].originalIndex===0||(A=_-b,A!==0&&(A+=k))),[A,w,C,_]},[0,[],0,0]),Ae(([y])=>y!==0),Ve(r,s,n,o,f,m),Ae(([,y,x,b,,,S])=>!S&&!b&&y!==0&&x===ha),he(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},on.DEBUG),y))));function h(y){y>0?(Ne(t,{behavior:"auto",top:-y}),Ne(e,0)):(Ne(e,0),Ne(t,{behavior:"auto",top:-y}))}return tt(re(g,Ve(e,i)),([y,x,b])=>{b&&_L()?Ne(e,x-y):h(-y)}),tt(re(Ot(Ht(i,!1),e,m),Ae(([y,x,b])=>!y&&!b&&x!==0),he(([y,x])=>x),Tr(1)),h),xe(re(d,he(y=>({top:-y}))),t),tt(re(c,Ve(p,u),he(([y,{groupIndices:x,lastSize:b,sizeTree:S},w])=>{function T(C){return C*(b+w)}if(x.length===0)return T(y);{let C=0;const k=ca(S,0);let _=0,A=0;for(;_<y;){_++,C+=k;let L=x.length===A+1?1/0:x[A+1]-x[A]-1;_+L>y&&(C-=k,L=y-_+1),_+=L,C+=T(L),A++}return C}})),y=>{Ne(e,y),requestAnimationFrame(()=>{Ne(t,{top:y}),requestAnimationFrame(()=>{Ne(e,0),Ne(m,!1)})})}),{deviation:e}},ct(Ut,ga,ro,zn,Er,Ef)),ML=Ye(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ct(If,TL,Cr,Aw,Cw,EL,xL,Of,kL,Er)),Iw=Ye(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m},g,h,y,{listState:x,topItemsIndexes:b,...S},{scrollToIndex:w},T,{topItemCount:C},{groupCounts:k},_])=>(xe(S.rangeChanged,_.scrollSeekRangeChanged),xe(re(_.windowViewportRect,he(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:m,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...y,groupIndices:i,itemSize:a,listState:x,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,..._,...g,sizes:l,...h}),ct(zn,pa,Ut,AL,SL,ro,fa,OL,IL,vw,ML));function DL(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 nl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Mf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(h,y){h.propsReady&&Ne(h.propsReady,!1);for(const x of r){const b=h[t.required[x]];Ne(b,y[x])}for(const x of o)if(x in y){const b=h[t.optional[x]];Ne(b,y[x])}h.propsReady&&Ne(h.propsReady,!0)}function c(h){return i.reduce((y,x)=>(y[x]=b=>{const S=h[t.methods[x]];Ne(S,b)},y),{})}function u(h){return a.reduce((y,x)=>(y[x]=GF(h[t.events[x]]),y),{})}const d=E.forwardRef((h,y)=>{const{children:x,...b}=h,[S]=E.useState(()=>Ys(XF(e),C=>{l(C,b)})),[w]=E.useState(J0(u,S));nl(()=>{for(const C of a)C in b&&tt(w[C],b[C]);return()=>{Object.values(w).map(vf)}},[b,w,S]),nl(()=>{l(S,b)}),E.useImperativeHandle(y,Q0(c(S)));const T=n;return v.jsx(s.Provider,{value:S,children:n?v.jsx(T,{...DL([...r,...o,...a],b),children:x}):x})}),p=h=>E.useCallback(ew(Ne,E.useContext(s)[h]),[h]),f=h=>{const y=E.useContext(s)[h],x=E.useCallback(b=>tt(y,b),[y]);return E.useSyncExternalStore(x,()=>Rt(y),()=>Rt(y))},m=h=>{const y=E.useContext(s)[h],[x,b]=E.useState(J0(Rt,y));return nl(()=>tt(y,S=>{S!==x&&b(Q0(S))}),[y,x]),x},g=E.version.startsWith("18")?f:m;return{Component:d,useEmitter:(h,y)=>{const x=E.useContext(s)[h];nl(()=>tt(x,y),[y,x])},useEmitterValue:g,usePublisher:p}}const rl=E.createContext(void 0),_w=E.createContext(void 0),Ow=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Df(e){return"self"in e}function NL(e){return"body"in e}function Mw(e,t,n,r=oi,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(NL(h)||Df(h)){const x=Df(h)?h:h.defaultView;g=i?x.scrollX:x.scrollY,f=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,m=i?x.innerWidth:x.innerHeight}else g=i?h.scrollLeft:h.scrollTop,f=i?h.scrollWidth:h.scrollHeight,m=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:m})};p.suppressFlushSync?y():wi.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===f-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const m=p.behavior==="smooth";let g,h,y;Df(f)?(h=Math.max(En(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,y=i?window.scrollX:window.scrollY):(h=f[i?"scrollWidth":"scrollHeight"],g=En(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const x=h-g;if(p.top=Math.ceil(Math.max(Math.min(x,p.top),0)),bw(g,h)||p.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:g}),m&&t(!0);return}m?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const Nf="-webkit-sticky",Dw="sticky",Nw=Pw(()=>{if(typeof document>"u")return Dw;const e=document.createElement("div");return e.style.position=Nf,e.style.position===Nf?Nf:Dw});function Ff(e){return e}const FL=Ye(()=>{const e=se(l=>`Item ${l}`),t=se(null),n=se(l=>`Group ${l}`),r=se({}),o=se(Ff),i=se("div"),a=se(oi),s=(l,c=null)=>Ht(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")}}),LL=Ye(([e,t])=>({...e,...t}),ct(Iw,FL)),VL=({height:e})=>v.jsx("div",{style:{height:e}}),$L={overflowAnchor:"none",position:Nw(),zIndex:1},Fw={overflowAnchor:"none"},jL={...Fw,display:"inline-block",height:"100%"},Lw=E.memo(function({showTopList:e=!1}){const t=Oe("listState"),n=mn("sizeRanges"),r=Oe("useWindowScroll"),o=Oe("customScrollParent"),i=mn("windowScrollContainerState"),a=mn("scrollContainerState"),s=o||r?i:a,l=Oe("itemContent"),c=Oe("context"),u=Oe("groupContent"),d=Oe("trackItemSizes"),p=Oe("itemSize"),f=Oe("log"),m=mn("gap"),g=Oe("horizontalDirection"),{callbackRef:h}=ow(n,p,d,e?oi:s,f,m,o,g,Oe("skipAnimationFrameInResizeObserver")),[y,x]=E.useState(0);$f("deviation",I=>{y!==I&&x(I)});const b=Oe("EmptyPlaceholder"),S=Oe("ScrollSeekPlaceholder")||VL,w=Oe("ListComponent"),T=Oe("ItemComponent"),C=Oe("GroupComponent"),k=Oe("computeItemKey"),_=Oe("isSeeking"),A=Oe("groupIndices").length>0,L=Oe("alignToBottom"),N=Oe("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:L?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:L?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?v.jsx(b,{...dt(b,c)}):v.jsx(w,{...dt(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:$,children:(e?t.topItems:t.items).map(I=>{const M=I.originalIndex,D=k(M+t.firstItemIndex,I.data,c);return _?E.createElement(S,{...dt(S,c),height:I.size,index:I.index,key:D,type:I.type||"item",...I.type==="group"?{}:{groupIndex:I.groupIndex}}):I.type==="group"?E.createElement(C,{...dt(C,c),"data-index":M,"data-item-index":I.index,"data-known-size":I.size,key:D,style:$L},u(I.index,c)):E.createElement(T,{...dt(T,c),...Vw(T,I.data),"data-index":M,"data-item-group-index":I.groupIndex,"data-item-index":I.index,"data-known-size":I.size,key:D,style:g?jL:Fw},A?l(I.index,I.groupIndex,I.data,c):l(I.index,I.data,c))})})}),zL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},BL={outline:"none",overflowX:"auto",position:"relative"},si=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),RL={position:Nw(),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 HL=E.memo(function(){const e=Oe("HeaderComponent"),t=mn("headerHeight"),n=Oe("HeaderFooterTag"),r=jn(E.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Oe("skipAnimationFrameInResizeObserver")),o=Oe("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),WL=E.memo(function(){const e=Oe("FooterComponent"),t=mn("footerHeight"),n=Oe("HeaderFooterTag"),r=jn(E.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,Oe("skipAnimationFrameInResizeObserver")),o=Oe("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null});function Lf({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}=Mw(a,l,s,c,void 0,d);return e("scrollTo",m),e("scrollBy",p),v.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?BL:zL,...o},tabIndex:0,...i,...dt(s,u),children:r})})}function Vf({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),m=t("scrollerRef"),{scrollByCallback:g,scrollerRef:h,scrollToCallback:y}=Mw(a,l,s,m,d);return Ow(()=>{var x;return h.current=d||((x=f.current)==null?void 0:x.ownerDocument.defaultView),()=>{h.current=null}},[h,d]),e("windowScrollTo",y),e("scrollBy",g),v.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...dt(s,p),children:r})})}const qL=({children:e})=>{const t=E.useContext(rl),n=mn("viewportHeight"),r=mn("fixedItemHeight"),o=Oe("alignToBottom"),i=Oe("horizontalDirection"),a=E.useMemo(()=>sa(n,l=>En(l,i?"width":"height")),[n,i]),s=jn(a,!0,Oe("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:s,style:si(o),children:e})},UL=({children:e})=>{const t=E.useContext(rl),n=mn("windowViewportRect"),r=mn("fixedItemHeight"),o=Oe("customScrollParent"),i=bf(n,o,Oe("skipAnimationFrameInResizeObserver")),a=Oe("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:si(a),children:e})},KL=({children:e})=>{const t=Oe("TopItemListComponent")||"div",n=Oe("headerHeight"),r={...RL,marginTop:`${n}px`},o=Oe("context");return v.jsx(t,{style:r,...dt(t,o),children:e})},YL=E.memo(function(e){const t=Oe("useWindowScroll"),n=Oe("topItemsIndexes").length>0,r=Oe("customScrollParent"),o=Oe("context"),i=r||t?XL:ZL,a=r||t?UL:qL;return v.jsxs(i,{...e,...dt(i,o),children:[n&&v.jsx(KL,{children:v.jsx(Lw,{showTopList:!0})}),v.jsxs(a,{children:[v.jsx(HL,{}),v.jsx(Lw,{}),v.jsx(WL,{})]})]})}),{Component:GL,useEmitter:$f,useEmitterValue:Oe,usePublisher:mn}=Mf(LL,{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:{}},YL),ZL=Lf({useEmitter:$f,useEmitterValue:Oe,usePublisher:mn}),XL=Vf({useEmitter:$f,useEmitterValue:Oe,usePublisher:mn}),jf=GL,QL=Ye(()=>{const e=se(l=>v.jsxs("td",{children:["Item $",l]})),t=se(null),n=se(null),r=se(null),o=se({}),i=se(Ff),a=se(oi),s=(l,c=null)=>Ht(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")}}),JL=Ye(([e,t])=>({...e,...t}),ct(Iw,QL)),eV=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{height:e}})}),tV=({height:e})=>v.jsx("tr",{children:v.jsx("td",{style:{border:0,height:e,padding:0}})}),nV={overflowAnchor:"none"},$w=E.memo(function({showTopList:e=!1}){const t=$e("listState"),n=$e("computeItemKey"),r=$e("firstItemIndex"),o=$e("isSeeking"),i=$e("ScrollSeekPlaceholder")||eV,a=$e("context"),s=$e("TableRowComponent"),l=$e("fixedHeaderHeight"),c=$e("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}:nV},c(p.index,p.data,a))});return v.jsx(v.Fragment,{children:d})}),rV=E.memo(function(){const e=$e("listState"),t=$e("topItemsIndexes").length>0,n=Cn("sizeRanges"),r=$e("useWindowScroll"),o=$e("customScrollParent"),i=Cn("windowScrollContainerState"),a=Cn("scrollContainerState"),s=o||r?i:a,l=$e("trackItemSizes"),c=$e("itemSize"),u=$e("log"),{callbackRef:d,ref:p}=ow(n,c,l,s,u,void 0,o,!1,$e("skipAnimationFrameInResizeObserver")),[f,m]=E.useState(0);zf("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,m(A))});const g=$e("EmptyPlaceholder"),h=$e("FillerRow")||tV,y=$e("TableBodyComponent"),x=$e("paddingTopAddition"),b=$e("statefulTotalCount"),S=$e("context");if(b===0&&g)return v.jsx(g,{...dt(g,S)});const w=(t?e.topItems:[]).reduce((A,L)=>A+L.size,0),T=e.offsetTop+x+f-w,C=e.offsetBottom,k=T>0?v.jsx(h,{context:S,height:T},"padding-top"):null,_=C>0?v.jsx(h,{context:S,height:C},"padding-bottom"):null;return v.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...dt(y,S),children:[k,t&&v.jsx($w,{showTopList:!0}),v.jsx($w,{}),_]})}),oV=({children:e})=>{const t=E.useContext(rl),n=Cn("viewportHeight"),r=Cn("fixedItemHeight"),o=jn(E.useMemo(()=>sa(n,i=>En(i,"height")),[n]),!0,$e("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),v.jsx("div",{"data-viewport-type":"element",ref:o,style:si(!1),children:e})},iV=({children:e})=>{const t=E.useContext(rl),n=Cn("windowViewportRect"),r=Cn("fixedItemHeight"),o=$e("customScrollParent"),i=bf(n,o,$e("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),v.jsx("div",{"data-viewport-type":"window",ref:i,style:si(!1),children:e})},aV=E.memo(function(e){const t=$e("useWindowScroll"),n=$e("customScrollParent"),r=Cn("fixedHeaderHeight"),o=Cn("fixedFooterHeight"),i=$e("fixedHeaderContent"),a=$e("fixedFooterContent"),s=$e("context"),l=jn(E.useMemo(()=>sa(r,y=>En(y,"height")),[r]),!0,$e("skipAnimationFrameInResizeObserver")),c=jn(E.useMemo(()=>sa(o,y=>En(y,"height")),[o]),!0,$e("skipAnimationFrameInResizeObserver")),u=n||t?cV:lV,d=n||t?iV:oV,p=$e("TableComponent"),f=$e("TableHeadComponent"),m=$e("TableFooterComponent"),g=i?v.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...dt(f,s),children:i()},"TableHead"):null,h=a?v.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...dt(m,s),children:a()},"TableFoot"):null;return v.jsx(u,{...e,...dt(u,s),children:v.jsx(d,{children:v.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...dt(p,s),children:[g,v.jsx(rV,{},"TableBody"),h]})})})}),{Component:sV,useEmitter:zf,useEmitterValue:$e,usePublisher:Cn}=Mf(JL,{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:{}},aV),lV=Lf({useEmitter:zf,useEmitterValue:$e,usePublisher:Cn}),cV=Vf({useEmitter:zf,useEmitterValue:$e,usePublisher:Cn}),uV=sV,jw={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},dV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:zw,floor:ol,max:va,min:Bf,round:Bw}=Math;function Rw(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function fV(e){return{...dV,items:e}}function il(e,t){return e&&e.width===t.width&&e.height===t.height}function pV(e,t){return e&&e.column===t.column&&e.row===t.row}const hV=Ye(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:m,propsReady:g},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S},w])=>{const T=se(0),C=se(0),k=se(jw),_=se({height:0,width:0}),A=se({height:0,width:0}),L=He(),N=He(),$=se(0),I=se(null),M=se({column:0,row:0}),D=He(),V=He(),F=se(!1),H=se(0),O=se(!0),B=se(!1),X=se(!1);tt(re(m,Ve(H),Ae(([j,z])=>!!z)),()=>{Ne(O,!1)}),tt(re(Ot(m,O,A,_,H,B),Ae(([j,z,K,ae,,R])=>j&&!z&&K.height!==0&&ae.height!==0&&!R)),([,,,,j])=>{Ne(B,!0),Af(1,()=>{Ne(L,j)}),Ln(re(c),()=>{Ne(t,[0,0]),Ne(O,!0)})}),xe(re(V,Ae(j=>j!=null&&j.scrollTop>0),Vn(0)),C),tt(re(m,Ve(V),Ae(([,j])=>j!=null)),([,j])=>{j&&(Ne(_,j.viewport),Ne(A,j.item),Ne(M,j.gap),j.scrollTop>0&&(Ne(F,!0),Ln(re(c,ii(1)),z=>{Ne(F,!1)}),Ne(l,{top:j.scrollTop})))}),xe(re(_,he(({height:j})=>j)),d),xe(re(Ot(Ie(_,il),Ie(A,il),Ie(M,(j,z)=>j&&j.column===z.column&&j.row===z.row),Ie(c)),he(([j,z,K,ae])=>({gap:K,item:z,scrollTop:ae,viewport:j}))),D),xe(re(Ot(Ie(T),r,Ie(M,pV),Ie(A,il),Ie(_,il),Ie(I),Ie(C),Ie(F),Ie(O),Ie(H)),Ae(([,,,,,,,j])=>!j),he(([j,[z,K],ae,R,be,Ce,_e,,Be,le])=>{const{column:we,row:ce}=ae,{height:Se,width:ie}=R,{width:de}=be;if(_e===0&&(j===0||de===0))return jw;if(ie===0){const kn=Pf(le,j),Wn=kn+Math.max(_e-1,0);return fV(Rw(kn,Wn,Ce))}const te=Hw(de,ie,we);let q,ne;Be?z===0&&K===0&&_e>0?(q=0,ne=_e-1):(q=te*ol((z+ce)/(Se+ce)),ne=te*zw((K+ce)/(Se+ce))-1,ne=Bf(j-1,va(ne,te-1)),q=Bf(ne,va(0,q))):(q=0,ne=-1);const me=Rw(q,ne,Ce),{bottom:De,top:Ue}=Ww(be,ae,R,me),Qe=zw(j/te),jt=Qe*Se+(Qe-1)*ce-De;return{bottom:De,itemHeight:Se,items:me,itemWidth:ie,offsetBottom:jt,offsetTop:Ue,top:Ue}})),k),xe(re(I,Ae(j=>j!==null),he(j=>j.length)),T),xe(re(Ot(_,A,k,M),Ae(([j,z,{items:K}])=>K.length>0&&z.height!==0&&j.height!==0),he(([j,z,{items:K},ae])=>{const{bottom:R,top:be}=Ww(j,ae,z,K);return[be,R]}),ut(ua)),t);const Q=se(!1);xe(re(c,Ve(Q),he(([j,z])=>z||j!==0)),Q);const J=rn(re(Ot(k,T),Ae(([{items:j}])=>j.length>0),Ve(Q),Ae(([[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=rn(re(Ie(k),Ae(({items:j})=>j.length>0&&j[0].index===0),Vn(0),ut())),Y=rn(re(Ie(k),Ve(F),Ae(([{items:j},z])=>j.length>0&&!z),he(([{items:j}])=>({endIndex:j[j.length-1].index,startIndex:j[0].index})),ut(fw),Tr(0)));xe(Y,f.scrollSeekRangeChanged),xe(re(L,Ve(_,A,T,M),he(([j,z,K,ae,R])=>{const be=yw(j),{align:Ce,behavior:_e,offset:Be}=be;let le=be.index;le==="LAST"&&(le=ae-1),le=va(0,le,Bf(ae-1,le));let we=Rf(z,R,K,le);return Ce==="end"?we=Bw(we-z.height+K.height):Ce==="center"&&(we=Bw(we-z.height/2+K.height/2)),Be&&(we+=Be),{behavior:_e,top:we}})),l);const Z=Ht(re(k,he(j=>j.offsetBottom+j.bottom)),0);return xe(re(S,he(j=>({height:j.visibleHeight,width:j.visibleWidth}))),_),{customScrollParent:h,data:I,deviation:$,footerHeight:o,gap:M,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:V,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:L,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:y,viewportDimensions:_,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:S,...f,gridState:k,horizontalDirection:X,initialTopMostItemIndex:H,totalListHeight:Z,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:G,stateChanged:D,stateRestoreInProgress:F,...w}},ct(If,Ut,ga,Aw,Cr,Of,Er));function Hw(e,t,n){return va(1,ol((e+n)/(ol(t)+n)))}function Ww(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Rf(e,t,n,r[0].index);return{bottom:Rf(e,t,n,r[r.length-1].index)+o,top:i}}function Rf(e,t,n,r){const o=Hw(e.width,n.width,t.column),i=ol(r/o),a=i*n.height+va(0,i-1)*t.row;return a>0?a+t.row:a}const mV=Ye(()=>{const e=se(d=>`Item ${d}`),t=se({}),n=se(null),r=se("virtuoso-grid-item"),o=se("virtuoso-grid-list"),i=se(Ff),a=se("div"),s=se(oi),l=(d,p=null)=>Ht(re(t,he(f=>f[d]),ut()),p),c=se(!1),u=se(!1);return xe(Ie(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")}}),gV=Ye(([e,t])=>({...e,...t}),ct(hV,mV)),vV=E.memo(function(){const e=ht("gridState"),t=ht("listClassName"),n=ht("itemClassName"),r=ht("itemContent"),o=ht("computeItemKey"),i=ht("isSeeking"),a=gn("scrollHeight"),s=ht("ItemComponent"),l=ht("ListComponent"),c=ht("ScrollSeekPlaceholder"),u=ht("context"),d=gn("itemDimensions"),p=gn("gap"),f=ht("log"),m=ht("stateRestoreInProgress"),g=gn("reportReadyState"),h=jn(E.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const b=y.firstChild;if(b){const{height:S,width:w}=b.getBoundingClientRect();d({height:S,width:w})}p({column:Uw("column-gap",getComputedStyle(y).columnGap,f),row:Uw("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return Ow(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),m?null:v.jsx(l,{className:t,ref:h,...dt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const x=o(y.index,y.data,u);return i?v.jsx(c,{...dt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},x):E.createElement(s,{...dt(s,u),className:n,"data-index":y.index,key:x},r(y.index,y.data,u))})})}),yV=E.memo(function(){const e=ht("HeaderComponent"),t=gn("headerHeight"),n=ht("headerFooterTag"),r=jn(E.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=ht("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),bV=E.memo(function(){const e=ht("FooterComponent"),t=gn("footerHeight"),n=ht("headerFooterTag"),r=jn(E.useMemo(()=>i=>{t(En(i,"height"))},[t]),!0,!1),o=ht("context");return e?v.jsx(n,{ref:r,children:v.jsx(e,{...dt(e,o)})}):null}),xV=({children:e})=>{const t=E.useContext(_w),n=gn("itemDimensions"),r=gn("viewportDimensions"),o=jn(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),v.jsx("div",{ref:o,style:si(!1),children:e})},wV=({children:e})=>{const t=E.useContext(_w),n=gn("windowViewportRect"),r=gn("itemDimensions"),o=ht("customScrollParent"),i=bf(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),v.jsx("div",{ref:i,style:si(!1),children:e})},SV=E.memo(function({...e}){const t=ht("useWindowScroll"),n=ht("customScrollParent"),r=n||t?EV:TV,o=n||t?wV:xV,i=ht("context");return v.jsx(r,{...e,...dt(r,i),children:v.jsxs(o,{children:[v.jsx(yV,{}),v.jsx(vV,{}),v.jsx(bV,{})]})})}),{useEmitter:qw,useEmitterValue:ht,usePublisher:gn}=Mf(gV,{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"}},SV),TV=Lf({useEmitter:qw,useEmitterValue:ht,usePublisher:gn}),EV=Vf({useEmitter:qw,useEmitterValue:ht,usePublisher:gn});function Uw(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,on.WARN),t==="normal"?0:parseInt(t??"0",10)}const Hf=()=>{const e=E.useContext(Vo);return e?e.tweaks:gs},Kw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>v.jsxs("span",{className:ke("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:v.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled input-field-label group-hover:text-primary group-focus-within:text-primary",children:[a,e||o?v.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?v.jsx(mf,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:v.jsx("span",{className:"cursor-help",children:v.jsx(Ey,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:v.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?v.jsxs("span",{className:"flex items-center gap-1 h-3 min-w-6",children:[v.jsx(by,{size:16,strokeWidth:1,"aria-hidden":"true",absoluteStrokeWidth:!0,className:"input-field-icon input-field-success-icon"}),v.jsx(NI,{size:16,strokeWidth:1,"aria-hidden":"true",absoluteStrokeWidth:!0,className:"input-field-icon input-field-error-icon"})]}):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:y=!1,required:x,disabled:b,reportStatus:S},w)=>{const T=Hf(),C=S!==void 0?S:T.input.iconFeedback,k=d??f,_=Ct(),A=e??_.inputOptionalLabel;return v.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:ke("group flex min-h-0 max-w-full min-w-0 flex-col items-start input-field-group",r),children:[v.jsxs("label",{form:u,htmlFor:k,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed input-field-label",children:[v.jsx(Kw,{info:s,hideLeft:y,reportStatus:C,title:m,placeholder:h,children:A||n?v.jsxs(E.Fragment,{children:[x?null:v.jsx("span",{"aria-disabled":b,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:A}),n?v.jsx(E.Fragment,{children:n}):null]}):null}),v.jsxs("div",{className:`group input-field-border relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled ${p}`,children:[t?v.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,a?v.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",children:a}):null]})]}),v.jsx("p",{className:"mt-input-gap input-field-error-feedback whitespace-pre-wrap text-wrap text-xs",children:c}),v.jsx("p",{className:"mt-input-gap text-secondary text-xs empty:mt-0 empty:hidden input-field-success-feedback",children:o})]})}),CV=e=>v.jsx(E.Fragment,{children:e.children}),kV={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},AV=[],PV=E.forwardRef(function(t,n){return v.jsx(pt.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:v.jsx(or,{children:t.children})})}),IV=E.forwardRef(function({item:t,context:n,...r},o){return v.jsx(pt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),_V={List:PV,Item:IV},li=40,OV=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,...g},h)=>{const y=E.useRef(null),x=E.useRef(null),b=E.useRef(null),S=g.value??g.defaultValue??"",w=Ct(),[T,C]=E.useState(()=>Math.min(320,li*o.length)),[k,_]=E.useState(!1),[A,L]=E.useState(""),[N,$]=E.useState(S),[I,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(AV),H=df(k,"block-only"),O=m&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,B=A?cf(O,"value",[{key:"value",value:A},{key:"label",value:A}]):O,X=()=>{_(!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:j,context:z}=xr({open:k,transform:!0,onOpenChange:_,placement:"bottom-start",whileElementsMounted:Ko,middleware:[ta(4),e0({padding:10,elementContext:"reference",apply(ie){const de=ie.elements.floating.querySelector("ul"),te=(de==null?void 0:de.getBoundingClientRect().height)||0,q=Ti(j.reference.current,window.innerHeight),ne=Math.min(te<li?q:te,q,ie.availableHeight),me=Q.length===0?li:Math.min(ne,q,te),De=`${x.current.getBoundingClientRect().width}px`;Object.assign(ie.elements.floating.style,{width:De,maxWidth:De,height:me})}})]}),K=L0(z,kV),{getReferenceProps:ae,getFloatingProps:R,getItemProps:be}=wr([to(z,{role:"listbox"}),eo(z),Hs(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,o.length]),E.useEffect(()=>{if(!k)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*li)),100)},[A,k,j.reference,Q.length]),E.useEffect(()=>{const ie=j.reference.current;if(ie)return Si(ie)},[]);const Ce=(ie,de)=>{$(ie.value);const te=j.reference.current;if(!te)return;te==null||te.setAttribute("data-value",ie.value),te.value=ie.value;const q=new Event("change",{bubbles:!1,cancelable:!0});te.dispatchEvent(q),g.onChange&&g.onChange(q),M(ie.label??""),X(),L(""),V(de)},_e=ie=>{var te;const de=ie.target.value;return L(de),!k&&de===""?_(!0):(ie.target.name=g.name||"",de?_(!0):(te=g.onChange)==null?void 0:te.call(g,ie))},Be=()=>{var ie;_(!0),L(""),(ie=j.reference.current)==null||ie.focus()},le=()=>{V(ie=>ie===null?0:ie),_(!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 v.jsxs(ya,{...g,left:e,error:t,ref:x,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:Be,children:[v.jsx(Hu,{size:20}),v.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),N?v.jsx("button",{type:"button",onClick:we,className:"p-2 transition-colors link:text-danger md:p-1",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[v.jsx("input",{"data-shadow":"true",...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,te;if(ie.key==="Escape")return ie.currentTarget.blur(),X();if(k){if(ie.key==="ArrowDown"){let q=Le.number(D)?D+1:0;return q>Q.length-1&&(q=0),(de=b.current)==null||de.scrollIntoView({index:q}),V(q)}if(ie.key==="ArrowUp"){let q=Le.number(D)?D-1:Q.length-1;return q<0&&(q=Q.length-1),(te=b.current)==null||te.scrollIntoView({index:q}),V(q)}if(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:k?A:I||N,"aria-autocomplete":"list",autoComplete:"off",className:ke("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-hidden transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","text-base group-focus-within:border-primary group-hover:border-primary",g.className)}),v.jsx("input",{id:ce,name:ce,type:"hidden","data-origin":ce,ref:h,required:f,defaultValue:g.value||N||void 0}),v.jsx(Qr,{preserveTabOrder:!0,children:k?v.jsx(ei,{modal:!0,guards:!0,returnFocus:!1,context:z,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.jsxs(pt.div,{...R({ref:qn(H,j.setFloating),style:{...K.styles,left:G,top:Y??0,position:Z}}),initial:!1,"data-floating":"true",animate:{height:Se?"auto":T},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!k)return C(0);const de=j.floating.current.querySelectorAll("li").item(0),te=(de?de.getBoundingClientRect().height:li)*Q.length;return wi.flushSync(()=>C(te+2))},children:[Se?v.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,v.jsx(jf,{overscan:40,ref:b,hidden:Se,data:Q,style:{height:T},defaultItemHeight:li,components:_V,scrollerRef:ie=>void(y.current=ie),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ie,de)=>{const te=de.Render??CV,q=N===de.value||N===de.label,ne=D===ie,me=de.label??de.value;return v.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:v.jsx(te,{...g,label:de.label,value:de.value,children:me})})}})]})}):null})]})}),Wf=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return v.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:ke("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"checkbox-task-item":"",s),children:[v.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:ke("form-checkbox mr-2 inline-block size-4 appearance-none rounded-sm border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,v.jsx("span",{"data-name":"checkbox-label",className:ke("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),MV=(e,t)=>{const n=E.useId();return e||t||n},Yw=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:m="text",labelClassName:g,feedback:h=null,hideLeft:y=!1,loading:x,...b},S)=>{const w=e,T=MV(b.id,b.name),C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,_=Si(C.current),A=r==null?void 0:r(k),L=N=>{const $=N;if($.key==="Enter"&&k.enterKeyHint==="next"){const I=k.getAttribute("data-next");if(I){const M=document.getElementById(I);if(M)return M.focus(),void $.preventDefault()}}};return k.addEventListener("keydown",L),()=>{A==null||A(),_(),k.removeEventListener("keydown",L)}},[]),v.jsx(ya,{...n,info:i,left:a,error:l,right:c,loading:x,form:b.form,name:b.name,feedback:h,hideLeft:y,title:b.title,container:ke(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:v.jsx(w,{...n,...b,id:T,name:T,type:m,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:qn(S,C),className:ke("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base","outline-hidden transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),ba=Yw(ob,"input",{type:"text"}),Gw=new Date(1970,11,31),qf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Zw={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},DV={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")},Uf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},NV=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=Uf(u,Gw).flatMap(C=>Le.keyof(qf,C.type)?qf[C.type](C.value):[]),h=Uf(u,Gw).reduce((C,k)=>C+(Le.keyof(Zw,k.type)?Zw[k.type](k.value):""),""),[y,x]=E.useState(d?Uf(u,d).reduce((C,k)=>C+(Le.keyof(qf,k.type)?DV[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(x(k),g.length===k.length&&g.every((A,L)=>{const N=k.charAt(L);return typeof A=="string"?N===A:A.test(N)})){const A=Mo(ZO(k,h,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),x(C?Z_(C,h):"")),w=Ku(d),T=w?d.toISOString():void 0;return v.jsx(ba,{...i,mask:g,value:y,id:void 0,name:void 0,"data-value":T,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??h,right:v.jsxs(E.Fragment,{children:[v.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),v.jsx(ni,{open:f,onChange:m,trigger:v.jsxs("span",{"aria-labelledby":l,children:[v.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),v.jsx(MI,{})]}),buttonProps:{"aria-describedby":l},children:v.jsx(Ab,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),FV=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],LV=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],VV=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],$V=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Xw=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function jV(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?$V:VV:t.binary?LV:FV,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=Xw(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=Xw(Number(e),t.locale,a),c=n[s];return i+l+r+c}var al={exports:{}},sl={exports:{}},Ze={};/** @license React v16.13.1
223
223
  * react-is.production.min.js
224
224
  *
225
225
  * Copyright (c) Facebook, Inc. and its affiliates.
226
226
  *
227
227
  * This source code is licensed under the MIT license found in the
228
228
  * LICENSE file in the root directory of this source tree.
229
- */var Qw;function jV(){if(Qw)return Ze;Qw=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case m:case f:case a:return w;default:return T}}case n:return T}}}function S(w){return b(w)===c}return Ze.AsyncMode=l,Ze.ConcurrentMode=c,Ze.ContextConsumer=s,Ze.ContextProvider=a,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=r,Ze.Lazy=m,Ze.Memo=f,Ze.Portal=n,Ze.Profiler=i,Ze.StrictMode=o,Ze.Suspense=d,Ze.isAsyncMode=function(w){return S(w)||b(w)===l},Ze.isConcurrentMode=S,Ze.isContextConsumer=function(w){return b(w)===s},Ze.isContextProvider=function(w){return b(w)===a},Ze.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ze.isForwardRef=function(w){return b(w)===u},Ze.isFragment=function(w){return b(w)===r},Ze.isLazy=function(w){return b(w)===m},Ze.isMemo=function(w){return b(w)===f},Ze.isPortal=function(w){return b(w)===n},Ze.isProfiler=function(w){return b(w)===i},Ze.isStrictMode=function(w){return b(w)===o},Ze.isSuspense=function(w){return b(w)===d},Ze.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===y||w.$$typeof===x||w.$$typeof===g)},Ze.typeOf=b,Ze}var Xe={};/** @license React v16.13.1
229
+ */var Qw;function zV(){if(Qw)return Ze;Qw=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case m:case f:case a:return w;default:return T}}case n:return T}}}function S(w){return b(w)===c}return Ze.AsyncMode=l,Ze.ConcurrentMode=c,Ze.ContextConsumer=s,Ze.ContextProvider=a,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=r,Ze.Lazy=m,Ze.Memo=f,Ze.Portal=n,Ze.Profiler=i,Ze.StrictMode=o,Ze.Suspense=d,Ze.isAsyncMode=function(w){return S(w)||b(w)===l},Ze.isConcurrentMode=S,Ze.isContextConsumer=function(w){return b(w)===s},Ze.isContextProvider=function(w){return b(w)===a},Ze.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ze.isForwardRef=function(w){return b(w)===u},Ze.isFragment=function(w){return b(w)===r},Ze.isLazy=function(w){return b(w)===m},Ze.isMemo=function(w){return b(w)===f},Ze.isPortal=function(w){return b(w)===n},Ze.isProfiler=function(w){return b(w)===i},Ze.isStrictMode=function(w){return b(w)===o},Ze.isSuspense=function(w){return b(w)===d},Ze.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===y||w.$$typeof===x||w.$$typeof===g)},Ze.typeOf=b,Ze}var Xe={};/** @license React v16.13.1
230
230
  * react-is.development.js
231
231
  *
232
232
  * Copyright (c) Facebook, Inc. and its affiliates.
233
233
  *
234
234
  * This source code is licensed under the MIT license found in the
235
235
  * LICENSE file in the root directory of this source tree.
236
- */var Jw;function zV(){return Jw||(Jw=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===i||R===o||R===d||R===p||typeof R=="object"&&R!==null&&(R.$$typeof===m||R.$$typeof===f||R.$$typeof===a||R.$$typeof===s||R.$$typeof===u||R.$$typeof===h||R.$$typeof===y||R.$$typeof===x||R.$$typeof===g)}function S(R){if(typeof R=="object"&&R!==null){var be=R.$$typeof;switch(be){case t:var Ce=R.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,k=a,_=t,A=u,L=r,N=m,$=f,I=n,M=i,D=o,V=d,F=!1;function H(R){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(R)||S(R)===l}function O(R){return S(R)===c}function B(R){return S(R)===s}function X(R){return S(R)===a}function Q(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function J(R){return S(R)===u}function G(R){return S(R)===r}function Y(R){return S(R)===m}function Z(R){return S(R)===f}function j(R){return S(R)===n}function z(R){return S(R)===i}function K(R){return S(R)===o}function ae(R){return S(R)===d}Xe.AsyncMode=w,Xe.ConcurrentMode=T,Xe.ContextConsumer=C,Xe.ContextProvider=k,Xe.Element=_,Xe.ForwardRef=A,Xe.Fragment=L,Xe.Lazy=N,Xe.Memo=$,Xe.Portal=I,Xe.Profiler=M,Xe.StrictMode=D,Xe.Suspense=V,Xe.isAsyncMode=H,Xe.isConcurrentMode=O,Xe.isContextConsumer=B,Xe.isContextProvider=X,Xe.isElement=Q,Xe.isForwardRef=J,Xe.isFragment=G,Xe.isLazy=Y,Xe.isMemo=Z,Xe.isPortal=j,Xe.isProfiler=z,Xe.isStrictMode=K,Xe.isSuspense=ae,Xe.isValidElementType=b,Xe.typeOf=S}()),Xe}var e1;function t1(){return e1||(e1=1,process.env.NODE_ENV==="production"?sl.exports=jV():sl.exports=zV()),sl.exports}/*
236
+ */var Jw;function BV(){return Jw||(Jw=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===i||R===o||R===d||R===p||typeof R=="object"&&R!==null&&(R.$$typeof===m||R.$$typeof===f||R.$$typeof===a||R.$$typeof===s||R.$$typeof===u||R.$$typeof===h||R.$$typeof===y||R.$$typeof===x||R.$$typeof===g)}function S(R){if(typeof R=="object"&&R!==null){var be=R.$$typeof;switch(be){case t:var Ce=R.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,k=a,_=t,A=u,L=r,N=m,$=f,I=n,M=i,D=o,V=d,F=!1;function H(R){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(R)||S(R)===l}function O(R){return S(R)===c}function B(R){return S(R)===s}function X(R){return S(R)===a}function Q(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function J(R){return S(R)===u}function G(R){return S(R)===r}function Y(R){return S(R)===m}function Z(R){return S(R)===f}function j(R){return S(R)===n}function z(R){return S(R)===i}function K(R){return S(R)===o}function ae(R){return S(R)===d}Xe.AsyncMode=w,Xe.ConcurrentMode=T,Xe.ContextConsumer=C,Xe.ContextProvider=k,Xe.Element=_,Xe.ForwardRef=A,Xe.Fragment=L,Xe.Lazy=N,Xe.Memo=$,Xe.Portal=I,Xe.Profiler=M,Xe.StrictMode=D,Xe.Suspense=V,Xe.isAsyncMode=H,Xe.isConcurrentMode=O,Xe.isContextConsumer=B,Xe.isContextProvider=X,Xe.isElement=Q,Xe.isForwardRef=J,Xe.isFragment=G,Xe.isLazy=Y,Xe.isMemo=Z,Xe.isPortal=j,Xe.isProfiler=z,Xe.isStrictMode=K,Xe.isSuspense=ae,Xe.isValidElementType=b,Xe.typeOf=S}()),Xe}var e1;function t1(){return e1||(e1=1,process.env.NODE_ENV==="production"?sl.exports=zV():sl.exports=BV()),sl.exports}/*
237
237
  object-assign
238
238
  (c) Sindre Sorhus
239
239
  @license MIT
240
- */var Kf,n1;function BV(){if(n1)return Kf;n1=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 Kf=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},Kf}var Yf,r1;function Gf(){if(r1)return Yf;r1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Yf=e,Yf}var Zf,o1;function i1(){return o1||(o1=1,Zf=Function.call.bind(Object.prototype.hasOwnProperty)),Zf}var Xf,a1;function RV(){if(a1)return Xf;a1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Gf(),n={},r=i1();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={})},Xf=o,Xf}var Qf,s1;function HV(){if(s1)return Qf;s1=1;var e=t1(),t=BV(),n=Gf(),r=i1(),o=RV(),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 Qf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(O){var B=O&&(c&&O[c]||O[u]);if(typeof B=="function")return B}var p="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:b,element:S(),elementType:w(),instanceOf:T,node:A(),objectOf:k,oneOf:C,oneOfType:_,shape:N,exact:$};function m(O,B){return O===B?O!==0||1/O===1/B:O!==O&&B!==B}function g(O,B){this.message=O,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function h(O){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q(G,Y,Z,j,z,K,ae){if(j=j||p,K=K||Z,ae!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var be=j+":"+Z;!B[be]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+j+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[be]=!0,X++)}}return Y[Z]==null?G?Y[Z]===null?new g("The "+z+" `"+K+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new g("The "+z+" `"+K+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:O(Y,Z,j,z,K)}var J=Q.bind(null,!1);return J.isRequired=Q.bind(null,!0),J}function y(O){function B(X,Q,J,G,Y,Z){var j=X[Q],z=D(j);if(z!==O){var K=V(j);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return h(B)}function x(){return h(a)}function b(O){function B(X,Q,J,G,Y){if(typeof O!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=X[Q];if(!Array.isArray(Z)){var j=D(Z);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an array."))}for(var z=0;z<Z.length;z++){var K=O(Z,z,J,G,Y+"["+z+"]",n);if(K instanceof Error)return K}return null}return h(B)}function S(){function O(B,X,Q,J,G){var Y=B[X];if(!s(Y)){var Z=D(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return h(O)}function w(){function O(B,X,Q,J,G){var Y=B[X];if(!e.isValidElementType(Y)){var Z=D(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return h(O)}function T(O){function B(X,Q,J,G,Y){if(!(X[Q]instanceof O)){var Z=O.name||p,j=H(X[Q]);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return h(B)}function C(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(X,Q,J,G,Y){for(var Z=X[Q],j=0;j<O.length;j++)if(m(Z,O[j]))return null;var z=JSON.stringify(O,function(ae,R){var be=V(R);return be==="symbol"?String(R):R});return new g("Invalid "+G+" `"+Y+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+z+"."))}return h(B)}function k(O){function B(X,Q,J,G,Y){if(typeof O!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an object."));for(var z in Z)if(r(Z,z)){var K=O(Z,z,J,G,Y+"."+z,n);if(K instanceof Error)return K}return null}return h(B)}function _(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<O.length;B++){var X=O[B];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(X)+" at index "+B+"."),a}function Q(J,G,Y,Z,j){for(var z=[],K=0;K<O.length;K++){var ae=O[K],R=ae(J,G,Y,Z,j,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&z.push(R.data.expectedType)}var be=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new g("Invalid "+Z+" `"+j+"` supplied to "+("`"+Y+"`"+be+"."))}return h(Q)}function A(){function O(B,X,Q,J,G){return I(B[X])?null:new g("Invalid "+J+" `"+G+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return h(O)}function L(O,B,X,Q,J){return new g((O||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function N(O){function B(X,Q,J,G,Y){var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));for(var z in O){var K=O[z];if(typeof K!="function")return L(J,G,Y,z,V(K));var ae=K(Z,z,J,G,Y+"."+z,n);if(ae)return ae}return null}return h(B)}function $(O){function B(X,Q,J,G,Y){var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));var z=t({},X[Q],O);for(var K in z){var 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," ")+`
241
- Valid keys: `+JSON.stringify(Object.keys(O),null," "));var R=ae(Z,K,J,G,Y+"."+K,n);if(R)return R}return null}return h(B)}function I(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(I);if(O===null||s(O))return!0;var B=d(O);if(B){var X=B.call(O),Q;if(B!==O.entries){for(;!(Q=X.next()).done;)if(!I(Q.value))return!1}else for(;!(Q=X.next()).done;){var J=Q.value;if(J&&!I(J[1]))return!1}}else return!1;return!0;default:return!1}}function M(O,B){return O==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function D(O){var B=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":M(B,O)?"symbol":B}function V(O){if(typeof O>"u"||O===null)return""+O;var B=D(O);if(B==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return B}function F(O){var B=V(O);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function H(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Qf}var Jf,l1;function WV(){if(l1)return Jf;l1=1;var e=Gf();function t(){}function n(){}return n.resetWarningCache=t,Jf=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},Jf}var c1;function qV(){if(c1)return al.exports;if(c1=1,process.env.NODE_ENV!=="production"){var e=t1(),t=!0;al.exports=HV()(e.isElement,t)}else al.exports=WV()();return al.exports}var UV=qV();const it=Gp(UV);function oo(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 KV=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 ci(e,t,n){const r=YV(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&u1(r,"path",i),u1(r,"relativePath",i),r}function YV(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=KV.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function u1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const GV=[".DS_Store","Thumbs.db"];function ZV(e){return oo(this,void 0,void 0,function*(){return ll(e)&&XV(e.dataTransfer)?t$(e.dataTransfer,e.type):QV(e)?JV(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?e$(e):[]})}function XV(e){return ll(e)}function QV(e){return ll(e)&&ll(e.target)}function ll(e){return typeof e=="object"&&e!==null}function JV(e){return ep(e.target.files).map(t=>ci(t))}function e$(e){return oo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ci(n))})}function t$(e,t){return oo(this,void 0,void 0,function*(){if(e.items){const n=ep(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(n$));return d1(f1(r))}return d1(ep(e.files).map(n=>ci(n)))})}function d1(e){return e.filter(t=>GV.indexOf(t.name)===-1)}function ep(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 n$(e){if(typeof e.webkitGetAsEntry!="function")return p1(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?h1(t):p1(e,t)}function f1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?f1(n):[n]],[])}function p1(e,t){return oo(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,ci(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ci(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function r$(e){return oo(this,void 0,void 0,function*(){return e.isDirectory?h1(e):o$(e)})}function h1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>oo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(r$));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function o$(e){return oo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ci(r,e.fullPath);t(o)},r=>{n(r)})})})}var cl={},m1;function i$(){return m1||(m1=1,cl.__esModule=!0,cl.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}),cl}var a$=i$();const tp=Gp(a$);function g1(e){return c$(e)||l$(e)||x1(e)||s$()}function s$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
242
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c$(e){if(Array.isArray(e))return np(e)}function v1(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 y1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(n),!0).forEach(function(r){b1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b1(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 f$(e)||d$(e,t)||x1(e,t)||u$()}function u$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
243
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x1(e,t){if(e){if(typeof e=="string")return np(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 np(e,t)}}function np(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 d$(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 f$(e){if(Array.isArray(e))return e}var p$=typeof tp=="function"?tp:tp.default,h$="file-invalid-type",m$="file-too-large",g$="file-too-small",v$="too-many-files",y$=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:h$,message:"File type must be ".concat(r)}},w1=function(t){return{code:m$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},S1=function(t){return{code:g$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},b$={code:v$,message:"Too many files"};function T1(e,t){var n=e.type==="application/x-moz-file"||p$(e,t);return[n,n?null:y$(t)]}function E1(e,t,n){if(io(e.size))if(io(t)&&io(n)){if(e.size>n)return[!1,w1(n)];if(e.size<t)return[!1,S1(t)]}else{if(io(t)&&e.size<t)return[!1,S1(t)];if(io(n)&&e.size>n)return[!1,w1(n)]}return[!0,null]}function io(e){return e!=null}function x$(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=T1(l,n),u=xa(c,1),d=u[0],p=E1(l,r,o),f=xa(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function ul(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function dl(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 C1(e){e.preventDefault()}function w$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function S$(e){return e.indexOf("Edge/")!==-1}function T$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return w$(e)||S$(e)}function Bn(){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!ul(r)&&s&&s.apply(void 0,[r].concat(i)),ul(r)})}}function E$(){return"showOpenFilePicker"in window}function C$(e){if(io(e)){var t=Object.entries(e).filter(function(n){var r=xa(n,2),o=r[0],i=r[1],a=!0;return k1(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(A1))&&(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 y1(y1({},n),{},b1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function k$(e){if(io(e))return Object.entries(e).reduce(function(t,n){var r=xa(n,2),o=r[0],i=r[1];return[].concat(g1(t),[o],g1(i))},[]).filter(function(t){return k1(t)||A1(t)}).join(",")}function A$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function P$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function k1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function A1(e){return/^.*\.[\w]+$/.test(e)}var I$=["children"],_$=["open"],O$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],M$=["refKey","onChange","onClick"];function D$(e){return L$(e)||F$(e)||P1(e)||N$()}function N$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
244
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L$(e){if(Array.isArray(e))return op(e)}function rp(e,t){return j$(e)||$$(e,t)||P1(e,t)||V$()}function V$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
245
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P1(e,t){if(e){if(typeof e=="string")return op(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 op(e,t)}}function op(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function j$(e){if(Array.isArray(e))return e}function I1(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?I1(Object(n),!0).forEach(function(r){ip(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ip(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fl(e,t){if(e==null)return{};var n=z$(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 z$(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 ap=E.forwardRef(function(e,t){var n=e.children,r=fl(e,I$),o=O1(r),i=o.open,a=fl(o,_$);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(vt(vt({},a),{},{open:i})))});ap.displayName="Dropzone";var _1={disabled:!1,getFilesFromEvent:ZV,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};ap.defaultProps=_1,ap.propTypes={children:it.func,accept:it.objectOf(it.arrayOf(it.string)),multiple:it.bool,preventDropOnDocument:it.bool,noClick:it.bool,noKeyboard:it.bool,noDrag:it.bool,noDragEventsBubbling:it.bool,minSize:it.number,maxSize:it.number,maxFiles:it.number,disabled:it.bool,getFilesFromEvent:it.func,onFileDialogCancel:it.func,onFileDialogOpen:it.func,useFsAccessApi:it.bool,autoFocus:it.bool,onDragEnter:it.func,onDragLeave:it.func,onDragOver:it.func,onDrop:it.func,onDropAccepted:it.func,onDropRejected:it.func,onError:it.func,validator:it.func};var sp={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function O1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},_1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,_=t.validator,A=E.useMemo(function(){return k$(n)},[n]),L=E.useMemo(function(){return C$(n)},[n]),N=E.useMemo(function(){return typeof h=="function"?h:M1},[h]),$=E.useMemo(function(){return typeof g=="function"?g:M1},[g]),I=E.useRef(null),M=E.useRef(null),D=E.useReducer(B$,sp),V=rp(D,2),F=V[0],H=V[1],O=F.isFocused,B=F.isFileDialogActive,X=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&E$()),Q=function(){!X.current&&B&&setTimeout(function(){if(M.current){var ne=M.current.files;ne.length||(H({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[M,B,$,X]);var J=E.useRef([]),G=function(ne){I.current&&I.current.contains(ne.target)||(ne.preventDefault(),J.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",C1,!1),document.addEventListener("drop",G,!1)),function(){b&&(document.removeEventListener("dragover",C1),document.removeEventListener("drop",G))}},[I,b]),E.useEffect(function(){return!r&&x&&I.current&&I.current.focus(),function(){}},[I,x,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),Z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[].concat(D$(J.current),[q.target]),dl(q)&&Promise.resolve(o(q)).then(function(ne){if(!(ul(q)&&!C)){var me=ne.length,De=me>0&&x$({files:ne,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:_}),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,_]),j=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=dl(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 I.current&&I.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}),dl(q)&&u&&u(q))},[I,u,C]),K=E.useCallback(function(q,ne){var me=[],De=[];q.forEach(function(Ue){var Qe=T1(Ue,A),jt=rp(Qe,2),kn=jt[0],Wn=jt[1],Or=E1(Ue,a,i),Mr=rp(Or,2),Dr=Mr[0],W=Mr[1],U=_?_(Ue):null;if(kn&&Dr&&!U)me.push(Ue);else{var Re=[Wn,W];U&&(Re=Re.concat(U)),De.push({file:Ue,errors:Re.filter(function(rt){return rt})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(Ue){De.push({file:Ue,errors:[b$]})}),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,_]),ae=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[],dl(q)&&Promise.resolve(o(q)).then(function(ne){ul(q)&&!C||K(ne,q)}).catch(function(ne){return Y(ne)}),H({type:"reset"})},[o,K,Y,C]),R=E.useCallback(function(){if(X.current){H({type:"openDialog"}),N();var q={multiple:s,types:L};window.showOpenFilePicker(q).then(function(ne){return o(ne)}).then(function(ne){K(ne,null),H({type:"closeDialog"})}).catch(function(ne){A$(ne)?($(ne),H({type:"closeDialog"})):P$(ne)?(X.current=!1,M.current?(M.current.value=null,M.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(ne)});return}M.current&&(H({type:"openDialog"}),N(),M.current.value=null,M.current.click())},[H,N,$,y,K,Y,L,s]),be=E.useCallback(function(q){!I.current||!I.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),R())},[I,R]),Ce=E.useCallback(function(){H({type:"focus"})},[]),_e=E.useCallback(function(){H({type:"blur"})},[]),Be=E.useCallback(function(){S||(T$()?setTimeout(R,0):R())},[S,R]),le=function(ne){return r?null:ne},we=function(ne){return w?null:le(ne)},ce=function(ne){return T?null:le(ne)},Se=function(ne){C&&ne.stopPropagation()},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,jt=q.onBlur,kn=q.onClick,Wn=q.onDragEnter,Or=q.onDragOver,Mr=q.onDragLeave,Dr=q.onDrop,W=fl(q,O$);return vt(vt(ip({onKeyDown:we(Bn(Ue,be)),onFocus:we(Bn(Qe,Ce)),onBlur:we(Bn(jt,_e)),onClick:le(Bn(kn,Be)),onDragEnter:ce(Bn(Wn,Z)),onDragOver:ce(Bn(Or,j)),onDragLeave:ce(Bn(Mr,z)),onDrop:ce(Bn(Dr,ae)),role:typeof De=="string"&&De!==""?De:"presentation"},me,I),!r&&!w?{tabIndex:0}:{}),W)}},[I,be,Ce,_e,Be,Z,j,z,ae,w,T,r]),de=E.useCallback(function(q){q.stopPropagation()},[]),te=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.onChange,Ue=q.onClick,Qe=fl(q,M$),jt=ip({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(Bn(De,ae)),onClick:le(Bn(Ue,de)),tabIndex:-1},me,M);return vt(vt({},jt),Qe)}},[M,n,s,ae,r]);return vt(vt({},F),{},{isFocused:O&&!r,getRootProps:ie,getInputProps:te,rootRef:I,inputRef:M,open:le(R)})}function B$(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({},sp),{},{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({},sp);default:return e}}function M1(){}const D1=E.createContext([null,()=>{}]),R$=()=>E.useContext(D1),H$=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,W$={csv:Uu,xls:Uu,mov:wy,mp4:wy,xlsx:Uu,pdf:xy,txt:xy,json:LI,mp3:OI},q$=e=>{const[,t]=R$(),[n,r]=E.useState({url:"",type:"",size:""});E.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:H$(l),size:$V(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=W$[e.file.name.split(".").at(-1)]??Sy,s=n.type==="img"?v.jsx("img",{src:n.url,className:"block w-full",alt:e.file.name}):v.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return v.jsxs("li",{className:"flex w-full flex-row justify-between gap-4 border-b border-card-border last:border-b-transparent",children:[v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-row items-center gap-4",children:[v.jsx("button",{type:"button",onClick:o,className:"flex size-20 items-center justify-center",children:s}),v.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[v.jsx("span",{children:e.file.name}),v.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?v.jsx("div",{className:"min-w-full flex-1",children:v.jsx(e.File,{file:e.file})}):null]}),v.jsx("div",{className:"align-start justify-start flex py-4 transition-colors duration-300 ease-linear hover:text-danger-hover",children:v.jsx("button",{onClick:i,type:"button",className:"size-6 flex items-center justify-center",children:v.jsx(Wi,{size:16})})})]})},U$=e=>v.jsx("ul",{className:"w-full space-y-8",children:e.files.map(t=>v.jsx(q$,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),N1=e=>{const t=Ct(),n=e.dragging?VI:$I;return v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsx("div",{className:"flex flex-col items-center justify-center gap-2",children:v.jsx(n,{className:"text-primary",size:80})}),v.jsxs("div",{className:"my-4 flex flex-col items-center gap-1",children:[v.jsx("p",{children:t.uploadIdle}),v.jsx("button",{className:"text-primary underline",type:"button",children:t.uploadIdleButton})]})]})},K$=e=>e.isDragActive?v.jsx(N1,{files:e.files,dragging:!0}):e.files.length>0?v.jsx(U$,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):v.jsx(E.Fragment,{children:e.idle}),Y$=v.jsx(N1,{dragging:!1}),G$=e=>{const t=e.item.file,n=e.item.type;return v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),v.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?v.jsx("img",{className:"container block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?v.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?v.jsx("figure",{children:v.jsx("audio",{controls:!0,src:e.item.url})}):null]})},Z$=({idle:e=Y$,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Ct(),a=E.useState(null),[s,l]=E.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r==null||r(g),l(h=>h.concat(g))},{getRootProps:p,getInputProps:f,isDragActive:m}=O1({onDrop:d});return v.jsxs(D1.Provider,{value:a,children:[v.jsx(pf,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?v.jsx(G$,{item:a[0]}):null}),v.jsxs("div",{...p(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[v.jsx("input",{...f(o),name:o.name,id:o.name}),v.jsx(K$,{File:n,onDeleteFile:t,isDragActive:m,idle:e,files:c})]})]})},X$=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return v.jsx("form",{...e,onSubmit:t})},F1=40,Q$=e=>v.jsx(E.Fragment,{children:e.children}),J$={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},L1=[],ej=E.forwardRef(function(t,n){return v.jsx(pt.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:v.jsx(or,{children:t.children})})}),tj=E.forwardRef(function({item:t,context:n,...r},o){return v.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),nj={List:ej,Item:tj},rj=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]),v.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?v.jsxs(Fa,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},oj=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},y)=>{const x=E.useMemo(()=>new wn(r.map(te=>[te.value,te])),[r]),b=E.useRef(null),S=E.useRef(null),w=h.value??h.defaultValue??L1,T=Ct(),[C,k]=E.useState(0),[_,A]=E.useState(!1),[L,N]=E.useState(""),[$,I]=E.useState(()=>{const te=new wn;return w.forEach(q=>{const ne=x.get(q);return ne?te.set(q,ne):void 0}),te}),M=E.useMemo(()=>Array.from($.keys()),[$]),[D,V]=E.useState(()=>{const te=new Set(w);return r.reduce((q,ne)=>te.has(ne.value)?[...q,ne.label??ne.value]:q,[])??w}),[F,H]=E.useState(null),O=E.useRef(L1),B=m&&L!==""?[{value:L,label:L,"data-dynamic":"true"},...r]:r,X=L.length===0?B:cf(B,"value",[{key:"value",value:L},{key:"label",value:L}]),Q=df(_,"block-only"),J=X.filter(te=>te.hidden!==!0),G=J.length===0,{x:Y,y:Z,strategy:j,refs:z,context:K}=xr({open:_,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:Ko,middleware:[ta(4),e0({padding:10,elementContext:"reference",apply(te){const q=te.elements.floating.querySelector("ul"),ne=(q==null?void 0:q.getBoundingClientRect().height)||0,me=Ti(z.reference.current,window.innerHeight),De=Math.min(ne<F1?me:ne,me,te.availableHeight),Ue=J.length===0?F1:Math.min(De,me,ne),Qe=`${b.current.getBoundingClientRect().width}px`;Object.assign(te.elements.floating.style,{width:Qe,maxWidth:Qe,height:Ue})}})]}),ae=L0(K,J$),{getReferenceProps:R,getFloatingProps:be,getItemProps:Ce}=wr([to(K,{role:"listbox"}),eo(K),Hs(K,{cols:0,listRef:O,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:te=>H(q=>te??q)})]);E.useEffect(()=>{if(!_)return k(0);const te=z.reference;if(te.current===null)return;const q=Ti(te.current,window.innerHeight);setTimeout(()=>k(Math.min(q,J.length*40)),100)},[L,_,z.reference]),E.useEffect(()=>{h.value&&I(new wn(h.value.map(te=>[te,x.get(te)])))},[h.value,x]),E.useEffect(()=>{const te=z.reference.current;if(te)return Si(te)},[]);const _e=(te,q)=>{const ne=$.clone(Ue=>Ue.has(te.value)?Ue.remove(te.value):Ue.set(te.value,te));I(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(te.label??"")),N(""),H(q)},Be=te=>{const q=te.target.value;return N(q),!_&&q===""?A(!0):(te.target.name=h.name||"",q?A(!0):void 0)},le=()=>{var te;A(!0),N(""),(te=z.reference.current)==null||te.focus()},we=()=>{A(!0),N("")},ce=()=>{var te;(te=z.reference.current)==null||te.setAttribute("data-value","[]"),N(""),A(!1),I(new wn),g==null||g([])},Se=h.id||h.name,ie=$.map((te,q)=>v.jsx(Fa,{size:"small",icon:v.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),_e(te,q)},children:v.jsx(Wi,{size:14})}),children:te.label??te.value},`MultiSelect-${te.value}-x`)),de={height:G?"0":$.size===0?C-49:C-86};return v.jsxs(ya,{...h,left:e,error:t,ref:b,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:le,children:[v.jsx(Hu,{size:20}),v.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),$?v.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[v.jsxs("ul",{...R({...h,onFocus:we,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:z.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":M.join(","),className:ke("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[M.length>0?null:v.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),v.jsx(rj,{label:c,children:ie})]}),v.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:y,required:f,defaultValue:h.value||M||void 0}),v.jsx(Qr,{preserveTabOrder:!0,children:_?v.jsx(C0,{lockScroll:!0,children:v.jsx(ei,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.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:[v.jsx("input",{autoFocus:!0,value:L,onChange:Be,title:h.title,placeholder:T.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:te=>{var q,ne;if(te.key==="ArrowDown"){let me=F+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),H(me)}if(te.key==="ArrowUp"){let me=F-1;return me<0&&(me=J.length-1),(ne=S.current)==null||ne.scrollIntoView({index:me}),H(me)}if(te.key==="Escape")return te.currentTarget.blur(),A(!1);if(te.key==="Enter"){if(F!==null&&J[F])return te.preventDefault(),_e(J[F],F);if(J.length===1)return te.preventDefault(),_e(J[0],0)}}}),G?v.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,G?null:v.jsx(pt.div,{initial:!1,"data-floating":"true",ref:Q,animate:{height:G?"auto":C},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!_)return k(0);const q=z.floating.current.querySelectorAll("li").item(0),ne=(q?q.getBoundingClientRect().height:40)*J.length;return wi.flushSync(()=>k(ne+2))},children:v.jsx(jf,{ref:S,hidden:G,data:J,components:nj,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(te,q)=>{const ne=q.Render??Q$,me=$.has(q.value)||$.has(q.label??""),De=F===te,Ue=q.label??q.value;return v.jsxs("button",{"data-value":q.value,...Ce({ref:Qe=>void(O.current[te]=Qe),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>_e(q,te)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${me||De?"bg-floating-hover text-floating-foreground":""}`,children:[v.jsx(Wf,{onChange:pd,checked:me,"aria-checked":me,onClick:Qe=>{Qe.stopPropagation(),_e(q,te)}}),v.jsx(ne,{...h,label:q.label,value:q.value,children:Ue})]})}})}),v.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:$.size===0?v.jsx(Fa,{theme:"muted",size:"small",children:T.autocompleteEmpty}):ie})]})})}):null})]})}),ij=({children:e,className:t="",size:n,...r})=>v.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[v.jsx("input",{...r,type:"radio",className:ke("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),ao=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const y=Ct(),x=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(h,()=>x.current),E.useEffect(()=>{if(x.current===null)return;const w=new AbortController,T=x.current,C=Si(x.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=x.current)==null?void 0:w.focus()};return v.jsx(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:v.jsxs("label",{htmlFor:b,children:[p,v.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[v.jsx(Hu,{size:20}),v.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:v.jsxs("select",{...g,id:b,name:b,required:e,ref:qn(h,x),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:ke("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[v.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})}),aj=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"));Le.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Le.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),v.jsx(mf,{title:"",ref:r,as:WD,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border-1 border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},sj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef($o()),s=r||o||[];return v.jsxs(BD,{...i,defaultValue:r,value:o,className:ke("relative flex h-5 w-full touch-none select-none items-center",n),children:[v.jsx(RD,{className:"relative h-2 rounded-full grow bg-background",children:v.jsx(HD,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>v.jsx(aj,{tooltip:t??!1},`${a.current}-${c}`))]})},lj=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=rr(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return v.jsxs("fieldset",{className:ke("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[v.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[v.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),v.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:v.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),v.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:v.jsx("span",{className:"font-medium text-foreground",children:e})})]}),v.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),cj=e=>{const[t,n]=pI();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:yI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),v.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},uj=Yw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
246
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),dj=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},fj={Item:E.forwardRef(function(t,n){return v.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return v.jsx("ul",{...t,ref:n,className:"space-y-3"})})},pj=e=>{const t=E.useRef(null),n=dj(t);return v.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[v.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[v.jsx("header",{className:"border-b border-card-border pb-2"}),v.jsxs("div",{className:"px-8 space-y-2",children:[v.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),v.jsx(jf,{height:n,useWindowScroll:!0,data:e.source,components:fj,itemContent:(r,o)=>v.jsx(E.Fragment,{children:v.jsx(Wf,{children:v.jsx(e.Item,{data:o})})})})]})]}),v.jsx("div",{children:v.jsx(Na,{children:v.jsx(Wu,{})})}),v.jsx("div",{})]})};var hj=Object.defineProperty,V1=Object.getOwnPropertySymbols,mj=Object.prototype.hasOwnProperty,gj=Object.prototype.propertyIsEnumerable,$1=(e,t,n)=>t in e?hj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vj=(e,t)=>{for(var n in t||(t={}))mj.call(t,n)&&$1(e,n,t[n]);if(V1)for(var n of V1(t))gj.call(t,n)&&$1(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},yj=(e,t,n,r)=>hl(lp,e,t,n,r),ui=e=>typeof e=="object",kr=(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=>kr(e[r],t[r]))},bj=(e,t)=>(ui(e)||Array.isArray(e))&&t?e[t]:e,xj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,pl=e=>/[0-9.]+/.test(e),j1=e=>["string","number"].includes(typeof e),z1=e=>e==null||(e==null?void 0:e.length)===0||e==="",B1={eq:kr,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:z1,notEmpty:e=>!z1(e),in:(e,t)=>lp(t,n=>kr(e,n)),notIn:(e,t)=>R1(t,n=>!kr(e,n))},wj=e=>{if(e in B1)return B1[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},hl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=wj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},Sj=(e,t,n,r)=>hl(di,e,t,n,r),R1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Tj=(e,t,n,r)=>hl(R1,e,t,n,r),H1=e=>{if(e===null)return null;const t=vj({},e);return Object.keys(t).forEach(n=>t[n]=ui(e[n])?H1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},W1=(e,t)=>{if(ui(t)){for(let n=0;n<e.length;n++){const r=e[n];if(kr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(kr(t,r))return!0}return!1},Ej=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},Cj=e=>di(e,(t,n,r)=>ui(t)?n===r.findIndex(o=>kr(o,t)):n===r.indexOf(t)),kj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},q1=(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())},Aj=(e,t)=>q1(e,n=>n[t]),U1=(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},Pj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Ij=(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 pl(e)&&pl(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)&&pl(e)&&pl(t)){const o=[],[i,a]=Pj(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return Ij(e,t,r)},_j=(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 j1(e)&&j1(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},K1=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},Oj=(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)},Mj=(e,t,n,r)=>hl(Oj,e,t,n,r),Y1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(xj(t))},G1=(e=>(e.Asc="asc",e.Desc="desc",e))(G1||{}),Dj=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),Nj=(e,t)=>e.sort(Dj(t)),Fj=(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})},Lj=class Rp{constructor(t=[]){this.array=t}static Range(...t){return _j(...t)}static New(t){return new Rp(t)}Where(t,n,r){return this.array=Sj(this.array,t,n,r),this}Some(t,n,r){return yj(this.array,t,n,r)}All(t,n,r){return Tj(this.array,t,n,r)}Reverse(){return this.array=K1(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=Mj(this.array,t,n,r),this}Distinct(){return this.array=Cj(this.array),this}First(t){return t===void 0?this.array[0]:kj(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+bj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Aj(this.array,t)}GroupWith(t){return q1(this.array,t)}Except(t){return di(this.array,n=>!W1(t,n))}Intersect(t){return di(this.array,n=>W1(t,n))}OrderBy(t,n){let r;return r=t?Y1(this.array,t):this.array.toSorted(),this.array=n==="desc"?K1(r):r,this}Includes(t){return lp(this.array,n=>kr(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(U1(this.array,n=>[t,n]))}Zip(t,n){return U1(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 Rp(H1(this.array))}ToObject(t){return Ej(this.array,t)}Sort(t){return Array.isArray(t)?Nj(this.array,t):Y1(this.array,t)}Unique(t){return Fj(this.array,t)}},Z1=Lj,dp={},X1;function Vj(){return X1||(X1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(x){window.console.log(x)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const x=y.getItem(h);try{return JSON.parse(x)}catch{return x??null}},i=h=>Object.keys(h).reduce((y,x)=>({...y,[x]:o(x,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=p.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,x={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((w,T)=>{const C=T.parse(x);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${b}`]).join(";");document.cookie=S,u()}},f=h=>{const y=new Set,x=b=>{h().removeItem(b);const S=i(h());y.forEach(w=>w(S))};return{delete:x,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(h()):h(),has:b=>{const S=h().getItem(b);return!n(S)},deleteAll:()=>{t(h(),x),y.forEach(b=>b(h()))},get:b=>o(b,h()),set:(b,S)=>{h().setItem(b,JSON.stringify(S)),y.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(dp)),dp}var wa=Vj();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},jj={},zj=(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})},Bj=(e,t,n=jj)=>{const r=ur()?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:zj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return ur()||wa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Rj=e=>{const t=rr(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]},Hj=()=>ur()?void 0:document.querySelector('[data-component="modal-body"]'),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:$o(),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]}),[t]),operations:t}},Wj=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 v.jsx(E.Fragment,{children:v.jsx(ni,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:v.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[v.jsx(zI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(ao,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),v.jsx(ao,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),v.jsx(ba,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),v.jsx("div",{className:"flex justify-center items-center mt-5",children:v.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:v.jsx(ts,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[v.jsx(qu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},qj=({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 v.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[v.jsx(ao,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),v.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),v.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:v.jsx(ts,{className:"text-danger",size:14})})]})},Uj=({item:e,onPointerDown:t})=>{const n=es(0);return v.jsxs(my,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[v.jsx("button",{type:"button",className:"cursor-grab",children:v.jsx(jI,{size:14})}),v.jsx("span",{children:e.groupName})]},e.groupId)},Kj=e=>{var l;const t=Ct(),n=pp(e.cols),r=gI(),[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 Z1(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(pT(m).map((y,x)=>{const b=m[y];return{...g,groupId:$o(),groupKey:d,index:x,rows:b,groupName:y}}))},s=()=>e.setGroups([]);return v.jsx(E.Fragment,{children:v.jsxs(ni,{arrow:!1,title:t.tableGroupLabel,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(qI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[v.jsxs("div",{className:"flex flex-nowrap items-center",children:[v.jsx(ao,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),v.jsx(Na,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:v.jsx(ts,{size:16,className:"text-danger"})})]}),e.groups.length>0?v.jsxs("section",{className:"my-4",children:[v.jsx("header",{children:v.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),v.jsx(wE,{children:v.jsx(py,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>v.jsx(Uj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Yj=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),Gj=(e,t)=>e.toSorted(Yj(t)),Q1=(e,t,n)=>({label:t,id:$o(),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,Q1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return v.jsx(E.Fragment,{children:v.jsx(ni,{title:t.tableSortDropdownTitle,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(yy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(ao,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),v.jsx(ao,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),v.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:v.jsx(ts,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[v.jsx(qu,{size:14})," ",t.tableSortAddButton]})})]})})})},Xj=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=Q1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=fp(e.col);return v.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[v.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?v.jsx(_I,{size:14}):null,n==="desc"?v.jsx(II,{size:14}):null,n==="undefined"?v.jsx(yy,{size:14}):null]})},Qj=e=>v.jsx("header",{className:"min-w-full mb-1",children:v.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[v.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[v.jsx("span",{children:v.jsx(Wj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),v.jsx("span",{children:v.jsx(Zj,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),v.jsx("span",{children:v.jsx(Kj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),v.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>v.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[v.jsxs("span",{children:[v.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),v.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[v.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),v.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=hp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function Jj(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 ez=e=>{const t=E.useId(),n=Ct(),r=E.useMemo(()=>Jj(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return v.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[v.jsx("p",{children:v.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?v.jsxs(E.Fragment,{children:[v.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),v.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>v.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),v.jsx("nav",{children:v.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?v.jsx("li",{children:v.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:v.jsx(E.Fragment,{children:typeof i=="string"?v.jsx("li",{children:"..."}):v.jsx("li",{children:v.jsx(cn,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?v.jsx("li",{children:v.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},tz=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),v.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:v.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},nz=(e,t,n)=>{const r=n.cols,o=n.loading;return v.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=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?v.jsx(tz,{children:v.jsx(p,{col:i,row:t,rowIndex:e})}):null,v.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),v.jsx("span",{className:"relative",children:o?uf:c?v.jsx(E.Fragment,{children:v.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):v.jsx(E.Fragment,{children:Le.nil(l)?"":l})}))})})},rz={top:0,left:0,right:0,bottom:-1},oz=e=>{var g;const t=Hf(),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?RI:HI,c=E.useRef(null),u=h=>{const y=h.currentTarget.dataset.id||"";return e.setFilters(x=>x.filter(b=>b.id!==y))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const y=new AbortController;return h.addEventListener("pointerdown",x=>{if(x.target.dataset.type==="resizer")return x.stopPropagation(),x.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===G1.Asc?"ascending":"descending":"none",m=fp(e.header);return v.jsxs(my,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[v.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:v.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?v.jsx(ni,{arrow:!0,trigger:v.jsxs("span",{children:[v.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),v.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:v.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",v.jsx("span",{className:"font-medium",children:m})]}),children:v.jsxs("ul",{className:"font-medium",children:[r.length===0?null:v.jsx(E.Fragment,{children:r.map(h=>v.jsx("li",{className:"my-1",children:v.jsx(qj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),v.jsx("li",{children:v.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(mp(e.header,s.options,s.operations))),children:[v.jsx(qu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,v.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?v.jsx(Xj,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:v.jsx(pt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:rz,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(y+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,y)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const x=c.current.getBoundingClientRect().width,b=y.delta.x;c.current.style.width=`${Math.abs(x+b)}px`}})]})},iz=e=>{const[t,n]=Rj(e.setCols);return v.jsx(py,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:v.jsx(or,{children:e.headers.map((r,o)=>v.jsx(oz,{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}`))})})},J1=E.createContext({}),az=()=>E.useContext(J1),sz=E.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:v.jsx(or,{children:n.children})})),lz=E.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-separate text-left ${t??""}`})),cz=E.forwardRef(({context:e,...t},n)=>{const r=az(),o={...t==null?void 0:t.style,top:Le.number(r.sticky)?`${r.sticky}px`:void 0};return v.jsx("thead",{...t,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group shadow-shadow-card group:sticky",ref:n})}),uz=E.forwardRef(({context:e,item:t,...n},r)=>v.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${(n==null?void 0:n.className)??""}`})),dz=E.forwardRef((e,t)=>e.context.loadingMore?v.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:v.jsx("tr",{role:"row",className:"bg-card-background",children:v.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:v.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),fz={TableHead:cz,Table:lz,TableBody:sz,TableRow:uz,TableFoot:dz},pz=[0,0,0,0,0,0,0,0,0,0],hz=e=>v.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?uf:v.jsx(Pb,{})}),mz=()=>v.jsx(E.Fragment,{}),gz=()=>v.jsx(E.Fragment,{}),vz=[],eS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!1,pagination:c=null,useControl:u=!1,...d})=>{const p=E.useRef(null),[f,m]=E.useState(!1),g=rr(a),h=rr(d.loadingMore),y=E.useMemo(()=>{if(d.loading)return pz;if(u)return d.rows;const S=new Z1(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:S.Where(w.name,w.operation.symbol,w.value)),r.length===0?S.Select():Gj(S.Select(),r)},[d.loading,d.rows,u,t,r]);E.useEffect(()=>{if(p.current===null)return()=>{};const S=p.current,w=new IntersectionObserver(T=>{var _;return T[T.length-1].isIntersecting&&h.current?((_=g.current)==null||_.call(g),void m(!0)):m(!1)});return w.observe(S),()=>w.disconnect()},[h,g]);const x=y.length===0,b={loading:d.loading,loadingMore:d.loadingMore,cols:e,Aside:d.Aside};return v.jsxs("div",{className:"min-w-full",children:[v.jsxs("div",{className:`group w-full relative rounded-lg ${l?"border border-table-border":""}`,children:[v.jsx(uV,{context:b,components:fz,totalCount:y.length,style:{height:"100%"},itemContent:x?mz:nz,data:x?vz:y,useWindowScroll:!s,fixedFooterContent:f?gz:null,customScrollParent:s?s():void 0,fixedHeaderContent:()=>v.jsx(iz,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),x?v.jsx(hz,{loading:d.loading}):null,v.jsx("div",{"aria-hidden":"true",ref:p,className:"w-full h-0.5"})]}),c!==null?v.jsx(ez,{...c}):null]})},yz=(e,t)=>typeof t=="function"?t(e):t,ml=(e,t,n)=>e===t||n==null?void 0:n(t),bz=e=>{const t=Hf(),n=E.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=E.useMemo(()=>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]:yz(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),ml((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),ml((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),ml((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),ml((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return v.jsxs(J1.Provider,{value:n,children:[r?v.jsx(Qj,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?v.jsx(eS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):v.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>v.jsx("div",{className:"min-w-full",children:v.jsx(eS,{...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}`))})]})},xz=["INPUT","SELECT"],tS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{xz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var vp,nS;function yp(){if(nS)return vp;nS=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,rS;function oS(){if(rS)return bp;rS=1;var e=yp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],y=0;y<256;++y)h.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return h}(),o=function(y){for(;y.length>1;){var x=y.pop(),b=x.obj[x.prop];if(n(b)){for(var S=[],w=0;w<b.length;++w)typeof b[w]<"u"&&S.push(b[w]);x.obj[x.prop]=S}}},i=function(y,x){for(var b=x&&x.plainObjects?{__proto__:null}:{},S=0;S<y.length;++S)typeof y[S]<"u"&&(b[S]=y[S]);return b},a=function h(y,x,b){if(!x)return y;if(typeof x!="object"&&typeof x!="function"){if(n(y))y.push(x);else if(y&&typeof y=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,x))&&(y[x]=!0);else return[y,x];return y}if(!y||typeof y!="object")return[y].concat(x);var S=y;return n(y)&&!n(x)&&(S=i(y,b)),n(y)&&n(x)?(x.forEach(function(w,T){if(t.call(y,T)){var C=y[T];C&&typeof C=="object"&&w&&typeof w=="object"?y[T]=h(C,w,b):y.push(w)}else y[T]=w}),y):Object.keys(x).reduce(function(w,T){var C=x[T];return t.call(w,T)?w[T]=h(w[T],C,b):w[T]=C,w},S)},s=function(y,x){return Object.keys(x).reduce(function(b,S){return b[S]=x[S],b},y)},l=function(h,y,x){var b=h.replace(/\+/g," ");if(x==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(y,x,b,S,w){if(y.length===0)return y;var T=y;if(typeof y=="symbol"?T=Symbol.prototype.toString.call(y):typeof y!="string"&&(T=String(y)),b==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",k=0;k<T.length;k+=c){for(var _=T.length>=c?T.slice(k,k+c):T,A=[],L=0;L<_.length;++L){var N=_.charCodeAt(L);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){A[A.length]=_.charAt(L);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}L+=1,N=65536+((N&1023)<<10|_.charCodeAt(L)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(y){for(var x=[{obj:{o:y},prop:"o"}],b=[],S=0;S<x.length;++S)for(var w=x[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var _=C[k],A=T[_];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(x.push({obj:T,prop:_}),b.push(A))}return o(x),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},m=function(y,x){return[].concat(y,x)},g=function(y,x){if(n(y)){for(var b=[],S=0;S<y.length;S+=1)b.push(x(y[S]));return b}return x(y)};return bp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},bp}var xp,iS;function wz(){if(iS)return xp;iS=1;var e=lT(),t=oS(),n=yp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,y,x,b,S,w,T,C,k,_,A,L,N,$,I,M,D,V){for(var F=h,H=V,O=0,B=!1;(H=H.get(p))!==void 0&&!B;){var X=H.get(h);if(O+=1,typeof X<"u"){if(X===O)throw new RangeError("Cyclic object value");B=!0}typeof H.get(p)>"u"&&(O=0)}if(typeof _=="function"?F=_(y,F):F instanceof Date?F=N(F):x==="comma"&&i(F)&&(F=t.maybeMap(F,function(_e){return _e instanceof Date?N(_e):_e})),F===null){if(w)return k&&!M?k(y,u.encoder,D,"key",$):y;F=""}if(d(F)||t.isBuffer(F)){if(k){var Q=M?y:k(y,u.encoder,D,"key",$);return[I(Q)+"="+I(k(F,u.encoder,D,"value",$))]}return[I(y)+"="+I(String(F))]}var J=[];if(typeof F>"u")return J;var G;if(x==="comma"&&i(F))M&&k&&(F=t.maybeMap(F,k)),G=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(_))G=_;else{var Y=Object.keys(F);G=A?Y.sort(A):Y}var Z=C?String(y).replace(/\./g,"%2E"):String(y),j=b&&i(F)&&F.length===1?Z+"[]":Z;if(S&&i(F)&&F.length===0)return j+"[]";for(var z=0;z<G.length;++z){var K=G[z],ae=typeof K=="object"&&K&&typeof K.value<"u"?K.value:F[K];if(!(T&&ae===null)){var R=L&&C?String(K).replace(/\./g,"%2E"):String(K),be=i(F)?typeof x=="function"?x(j,R):j:j+(L?"."+R:"["+R+"]");V.set(h,O);var Ce=e();Ce.set(p,V),s(J,g(ae,be,x,b,S,w,T,C,x==="comma"&&M&&i(F)?null:k,_,A,L,N,$,I,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 y=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");x=h.format}var b=n.formatters[x],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:x,formatter:b,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return xp=function(g,h){var y=g,x=m(h),b,S;typeof x.filter=="function"?(S=x.filter,y=S("",y)):i(x.filter)&&(S=x.filter,b=S);var w=[];if(typeof y!="object"||y===null)return"";var T=o[x.arrayFormat],C=T==="comma"&&x.commaRoundTrip;b||(b=Object.keys(y)),x.sort&&b.sort(x.sort);for(var k=e(),_=0;_<b.length;++_){var A=b[_],L=y[A];x.skipNulls&&L===null||s(w,f(L,A,T,C,x.allowEmptyArrays,x.strictNullHandling,x.skipNulls,x.encodeDotInKeys,x.encode?x.encoder:null,x.filter,x.sort,x.allowDots,x.serializeDate,x.format,x.formatter,x.encodeValuesOnly,x.charset,k))}var N=w.join(x.delimiter),$=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},xp}var wp,aS;function Sz(){if(aS)return wp;aS=1;var e=oS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=m.parameterLimit===1/0?void 0:m.parameterLimit,x=h.split(m.delimiter,m.throwOnLimitExceeded?y+1:y);if(m.throwOnLimitExceeded&&x.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var b=-1,S,w=m.charset;if(m.charsetSentinel)for(S=0;S<x.length;++S)x[S].indexOf("utf8=")===0&&(x[S]===s?w="utf-8":x[S]===a&&(w="iso-8859-1"),b=S,S=x.length);for(S=0;S<x.length;++S)if(S!==b){var T=x[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,_,A;k===-1?(_=m.decoder(T,r.decoder,w,"key"),A=m.strictNullHandling?null:""):(_=m.decoder(T.slice(0,k),r.decoder,w,"key"),A=e.maybeMap(i(T.slice(k+1),m,n(g[_])?g[_].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),A&&m.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),T.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var L=t.call(g,_);L&&m.duplicates==="combine"?g[_]=e.combine(g[_],A):(!L||m.duplicates==="last")&&(g[_]=A)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");h=Array.isArray(f)&&f[y]?f[y].length:0}for(var x=g?f:i(f,m,h),b=p.length-1;b>=0;--b){var S,w=p[b];if(w==="[]"&&m.parseArrays)S=m.allowEmptyArrays&&(x===""||m.strictNullHandling&&x===null)?[]:e.combine([],x);else{S=m.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!m.parseArrays&&C===""?S={0:x}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&m.parseArrays&&k<=m.arrayLimit?(S=[],S[k]=x):C!=="__proto__"&&(S[C]=x)}x=S}return x},u=function(f,m,g,h){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,x=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=g.depth>0&&x.exec(y),w=S?y.slice(0,S.index):y,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=b.exec(y))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+y.slice(S.index)+"]")}return c(T,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return 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}:{},y=Object.keys(g),x=0;x<y.length;++x){var b=y[x],S=u(b,g[b],m,typeof p=="string");h=e.merge(h,S,m)}return m.allowSparse===!0?h:e.compact(h)},wp}var Sp,sS;function Tz(){if(sS)return Sp;sS=1;var e=wz(),t=Sz(),n=yp();return Sp={formats:n,parse:t,stringify:e},Sp}var Ez=Tz(),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 lS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(lS||(lS={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ar=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},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 vn 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 vn))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()}}vn.create=e=>new vn(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 Cz=Sa;function Tp(){return Cz}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 Kt{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 Kt.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}),Qt=e=>({status:"valid",value:e}),cS=e=>e.status==="aborted",uS=e=>e.status==="dirty",pi=e=>e.status==="valid",gl=e=>typeof Promise<"u"&&e instanceof Promise;function vl(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 dS(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 fS=(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 vn(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 je{get description(){return this._def.description}_getType(t){return Ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Kt,ctx:{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(gl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},i=this._parseSync({data:t,path:o.path,parent:o});return fS(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return 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:Ar(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(gl(o)?o:Promise.resolve(o));return fS(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 er({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 tr.create(this,this._def)}nullable(){return co.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Hn.create(this)}promise(){return Pa.create(this,this._def)}or(t){return xl.create([this,t],this._def)}and(t){return wl.create(this,t,this._def)}transform(t){return new er({...Me(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new kl({...Me(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new gS({typeName:Ee.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Al({...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 Pl.create(this,t)}readonly(){return Il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const kz=/^c[^\s-]{8,}$/i,Az=/^[0-9a-z]+$/,Pz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Iz=/^[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,_z=/^[a-z0-9_-]{21}$/i,Oz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Mz=/^[-+]?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)?)??$/,Dz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Nz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cp;const Fz=/^(?:(?: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])$/,Lz=/^(?:(?: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])$/,Vz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,$z=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,zz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,pS="((\\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])))",Bz=new RegExp(`^${pS}$`);function hS(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 Rz(e){return new RegExp(`^${hS(e)}$`)}function Hz(e){let t=`${pS}T${hS(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 Wz(e,t){return!!((t==="v4"||!t)&&Fz.test(e)||(t==="v6"||!t)&&Vz.test(e))}function qz(e,t){if(!Oz.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 Uz(e,t){return!!((t==="v4"||!t)&&Lz.test(e)||(t==="v6"||!t)&&$z.test(e))}class Xn extends je{_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 Kt;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")Dz.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(Nz,"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")Iz.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")_z.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")kz.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")Az.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")Pz.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"?Hz(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"?Bz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Rz(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"?Mz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Wz(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"?qz(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"?Uz(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"?jz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?zz.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 Xn({...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 Xn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Xn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Xn({...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}}Xn.create=e=>{var t;return new Xn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function Kz(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 je{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 Kt;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"?Kz(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 je{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 Kt;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 je{_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 Qt(t.data)}}kp.create=e=>new kp({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class ka extends je{_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 Kt;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 Ap extends je{_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 Qt(t.data)}}Ap.create=e=>new Ap({typeName:Ee.ZodSymbol,...Me(e)});class yl extends je{_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 Qt(t.data)}}yl.create=e=>new yl({typeName:Ee.ZodUndefined,...Me(e)});class bl extends je{_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 Qt(t.data)}}bl.create=e=>new bl({typeName:Ee.ZodNull,...Me(e)});class Pp extends je{constructor(){super(...arguments),this._any=!0}_parse(t){return Qt(t.data)}}Pp.create=e=>new Pp({typeName:Ee.ZodAny,...Me(e)});class mi extends je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Qt(t.data)}}mi.create=e=>new mi({typeName:Ee.ZodUnknown,...Me(e)});class Pr extends je{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),Pe}}Pr.create=e=>new Pr({typeName:Ee.ZodNever,...Me(e)});class Ip extends je{_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 Qt(t.data)}}Ip.create=e=>new Ip({typeName:Ee.ZodVoid,...Me(e)});class Hn extends je{_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=>Kt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rn(n,a,n.path,s)));return Kt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Hn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Hn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Hn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Hn.create=(e,t)=>new Hn({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]=tr.create(gi(r))}return new wt({...e._def,shape:()=>t})}else return e instanceof Hn?new Hn({...e._def,type:gi(e.element)}):e instanceof tr?tr.create(gi(e.unwrap())):e instanceof co?co.create(gi(e.unwrap())):e instanceof Jn?Jn.create(e.items.map(t=>gi(t))):e}class wt extends je{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 Pr&&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 Pr){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=>Kt.mergeObjectSync(r,c)):Kt.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 tr;)i=i._def.innerType;n[r]=i}}),new wt({...this._def,shape:()=>n})}keyof(){return mS(qe.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)});class xl extends je{_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 vn(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 vn(l));return ue(n,{code:oe.invalid_union,unionErrors:s}),Pe}}get options(){return this._def.options}}xl.create=(e,t)=>new xl({options:e,typeName:Ee.ZodUnion,...Me(t)});const Qn=e=>e instanceof Tl?Qn(e.schema):e instanceof er?Qn(e.innerType()):e instanceof El?[e.value]:e instanceof lo?e.options:e instanceof Cl?qe.objectValues(e.enum):e instanceof kl?Qn(e._def.innerType):e instanceof yl?[void 0]:e instanceof bl?[null]:e instanceof tr?[void 0,...Qn(e.unwrap())]:e instanceof co?[null,...Qn(e.unwrap())]:e instanceof gS||e instanceof Il?Qn(e.unwrap()):e instanceof Al?Qn(e._def.innerType):[];class _p extends je{_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=Qn(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 _p({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Op(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=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 wl extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(cS(i)||cS(a))return Pe;const s=Op(i.value,a.value);return s.valid?((uS(i)||uS(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}))}}wl.create=(e,t,n)=>new wl({left:e,right:t,typeName:Ee.ZodIntersection,...Me(n)});class Jn extends je{_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=>Kt.mergeArray(n,a)):Kt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Jn({...this._def,rest:t})}}Jn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jn({items:e,typeName:Ee.ZodTuple,rest:null,...Me(t)})};class Sl extends je{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?Kt.mergeObjectAsync(n,o):Kt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof je?new Sl({keyType:t,valueType:n,typeName:Ee.ZodRecord,...Me(r)}):new Sl({keyType:Xn.create(),valueType:t,typeName:Ee.ZodRecord,...Me(n)})}}class Mp extends je{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 je{_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 Aa extends je{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 Pa){const s=this;return Qt(async function(...l){const c=new vn([]),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 Qt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new vn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new vn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Aa({...this._def,args:Jn.create(t).rest(mi.create())})}returns(t){return new Aa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Aa({args:t||Jn.create([]).rest(mi.create()),returns:n||mi.create(),typeName:Ee.ZodFunction,...Me(r)})}}class Tl extends je{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})}}Tl.create=(e,t)=>new Tl({getter:e,typeName:Ee.ZodLazy,...Me(t)});class El extends je{_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}}El.create=(e,t)=>new El({value:e,typeName:Ee.ZodLiteral,...Me(t)});function mS(e,t){return new lo({values:e,typeName:Ee.ZodEnum,...Me(t)})}class lo extends je{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(vl(this,Ea)||dS(this,Ea,new Set(this._def.values)),!vl(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 Qt(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=mS;class Cl extends je{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(vl(this,Ca)||dS(this,Ca,new Set(qe.getValidEnumValues(this._def.values))),!vl(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 Qt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,Cl.create=(e,t)=>new Cl({values:e,typeName:Ee.ZodNativeEnum,...Me(t)});class Pa extends je{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 Qt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Pa.create=(e,t)=>new Pa({type:e,typeName:Ee.ZodPromise,...Me(t)});class er extends je{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)}}er.create=(e,t,n)=>new er({schema:e,typeName:Ee.ZodEffects,effect:t,...Me(n)}),er.createWithPreprocess=(e,t,n)=>new er({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Me(n)});class tr extends je{_parse(t){return this._getType(t)===fe.undefined?Qt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}tr.create=(e,t)=>new tr({innerType:e,typeName:Ee.ZodOptional,...Me(t)});class co extends je{_parse(t){return this._getType(t)===fe.null?Qt(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 kl extends je{_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}}kl.create=(e,t)=>new kl({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Al extends je{_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 gl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new vn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new vn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Al.create=(e,t)=>new Al({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Dp extends je{_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 gS extends je{_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 Pl extends je{_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 Pl({in:t,out:n,typeName:Ee.ZodPipeline})}}class Il extends je{_parse(t){const n=this._def.innerType._parse(t),r=o=>(pi(o)&&(o.value=Object.freeze(o.value)),o);return gl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Il.create=(e,t)=>new Il({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={})),Xn.create,so.create,Dp.create,hi.create,kp.create,ka.create,Ap.create,yl.create,bl.create,Pp.create,mi.create,Pr.create,Ip.create,Hn.create,wt.create,wt.strictCreate,xl.create,_p.create,wl.create,Jn.create,Sl.create,Mp.create,vi.create,Aa.create,Tl.create,El.create,lo.create,Cl.create,Pa.create,er.create,tr.create,co.create,er.createWithPreprocess,Pl.create;const Yz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Gz=(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]}}},vS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),sn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):vS(t),o=structuredClone(e);return Gz(o,r,n),o},Zz=(e,t)=>e.localeCompare(t),yi={},yS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return bS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=yS(e._def.innerType);return t==="ZodArray"?n??[]:n}},bS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,yS(n)])),xS=(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]=xS(i,o):n[r]=o||i)}return n},Xz={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},wS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return Ez.parse(n.toString(),Xz)},Ir=(e,t)=>vS(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),_r=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 _r(e);const n=document.querySelector(`[data-origin="${t}"]`);return _r(n||e)},Qz={state:{},loading:!1,useOnChange:!1},SS=e=>e.dataset.target||e.name,Jz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return Yz(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},eB=(e,t,n=Qz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Le.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??bS(e)??{}),l=E.useCallback(b=>{var A;const S=b.target,w=b.currentTarget;if(S.dataset.optional==="true")return;const C=SS(S),k=Np(S)||(w?_r(w):""),_=Ir(C,e);if(S.setAttribute("data-initialized","true"),_){const L=_.safeParse(k),N=L.success?void 0:((A=L.error.issues[0])==null?void 0:A.message)??"";o($=>sn($??{},C,N))}},[e]),c=E.useCallback(b=>S=>{const w=S.currentTarget,T=Object.values(i.current).reduce((k,_)=>{var I;const A=_.element,L=_.schema.safeParse(_r(A));if(A.dataset.ignore==="ignore"||L.success)return k;const N=(I=L.error.issues[0])==null?void 0:I.message;A.setAttribute("data-initialized","true");const $=A.dataset.name||A.name||"";return sn(k,$,N)},{}),C=Le.empty(T)?null:T;o(C),console.error(C),b==null||b({form:w,errors:C||{}})},[]),u=(b,S=yi)=>{const w=Ir(b,e),T=C=>{var _;if(!Ku(C))return;s(A=>sn(A,b,C.toISOString())),o(A=>sn(A,b,void 0));const k=i.current[b].element;if(k){const A=k.getAttribute("data-origin"),L=document.querySelector(`input[data-target="${A}"]`);L&&L.setCustomValidity("")}(_=S==null?void 0:S.onChange)==null||_.call(S,C)};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,date:Le.string(a[b])?new Date(a[b]):a[b],required:S.required??!w.isOptional(),error:Pn(r,b),ref:C=>{C!==null&&(i.current[b]={element:C,schema:w})}}},d=(b,S=yi)=>{const w=Ir(b,e);return{...S,name:b,id:b,onChange:C=>{var _;const k=C.target.value;s(A=>sn(A,b,k)),(_=S==null?void 0:S.onChange)==null||_.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Pn(r,b,void 0),value:Pn(a,b,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[b]={element:C,schema:w}:void 0}},p=(b,S=yi)=>{const w=Ir(b,e);return{...S,name:b,id:b,onChange:C=>{var _;const k=C.target.checked;s(A=>sn(A??{},b,k)),(_=S==null?void 0:S.onChange)==null||_.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Pn(r,b,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[b]={element:C,schema:w}):void 0}},f=(b,S=yi)=>{const w=Ir(b,e),T=C=>{var _,A;(_=C.persist)==null||_.call(C);const k=C.target.value;(A=S==null?void 0:S.onChange)==null||A.call(S,C),s(L=>sn(L,b,k))};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,onInvalid:l,error:Pn(r,b,void 0),required:S.required??!w.isOptional(),value:Pn(a,b,void 0)||(S==null?void 0:S.value)||"",type:Le.instance(w,so)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[b]={element:C,schema:w}}},m=(b,S=yi)=>{const w=Ir(b,e);return{...S,name:b,id:b,onChangeOptions:C=>{s(k=>sn(k,b,C))},form:t,loading:n.loading,onInvalid:l,error:Pn(r,b,void 0),required:S.required??!w.isOptional(),value:Pn(a,b,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[b]={element:C,schema:w})}},g=(b,S=yi)=>{const w=Ir(b,e),T=w._def.typeName==="ZodNumber";return{...S,name:b,id:b,onChange:k=>{var A,L;(A=k.persist)==null||A.call(k);const _=T?k.target.valueAsNumber:k.target.value;(L=S==null?void 0:S.onChange)==null||L.call(S,k),s(N=>sn(N,b,_))},form:t,loading:n.loading,onInvalid:l,error:Pn(r,b,void 0),required:S.required??!w.isOptional(),type:T?"number":(S==null?void 0:S.type)??"text",value:Pn(a,b,void 0)||(S==null?void 0:S.value)||"",ref:k=>k===null?void 0:void(i.current[b]={element:k,schema:w})}};E.useEffect(()=>{const b=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(_r(T)),k=N=>{var V;const $=SS(N.target);if(!$)return!1;const I=N.target,M=Np(N.target)||(N.relatedTarget?_r(N.relatedTarget):""),D=w.schema.safeParse(M);if(I.setAttribute("value",M),D.success)return T.setCustomValidity&&T.setCustomValidity(""),o(F=>{if(Le.null(F))return null;const H=sn(F,$,void 0);return Le.empty(F)||Le.nil(F)||Le.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(Le.null(H))return null;const O=sn(H,$,F||void 0);return Le.empty(O)?null:O})}return!1},_=new AbortController,A=T.getAttribute("data-trigger")||"blur";T.addEventListener(A,k,{signal:_.signal});const L=T.dataset.shadow?!1:T.required?!C.success:!1;return{input:w,hasInitialError:L,unsubscribe:()=>_.abort()}});return b.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>b.forEach(w=>w.unsubscribe())});const h=b=>S=>{var L;S.preventDefault();const w=S.currentTarget;let T=wS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(N=>{if(N.tagName==="SELECT"){const $=N;T=sn(T,$.name,$.value)}if(N.tagName==="INPUT"){const $=N,I=Np($)||($?_r($):"");T=sn(T,$.dataset.target||$.name,I)}});const k=xS(T,a),_=e.safeParse(k),A=()=>{var N;tS(w),(N=n.interceptor)==null||N.clear()};if(_.success){const N=JSON.stringify(_.data);return w.setAttribute("data-json",N),(L=n.interceptor)==null||L.clear(),b==null?void 0:b(S,{form:w,event:S,reset:A,setErrors:o,errors:[],success:!0,data:_.data,json:_.data})}return console.group("useForm error"),console.info(_),console.info(_.error.issues),console.error(_.error),console.groupEnd(),w.reportValidity(),b==null?void 0:b(S,{form:w,json:T,event:S,reset:A,setErrors:o,data:T,success:!1,errors:_.error.issues.map(N=>({message:N.message,path:N.path.map($=>String($))}))})},y=b=>dd(a,b)||"",x=b=>({...b,id:t,name:t});return E.useEffect(()=>{var b;n.interceptor&&((b=n.interceptor)==null||b.set(a))},[a]),{get:y,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:m,disabled:r!==null}},tB=e=>e?JSON.parse(e.getAttribute("data-json")):{},nB=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},TS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},ES={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"},CS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},rB={name:"dark",zIndex:CS,rounded:TS,spacing:ES,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%)"}}}},oB={rounded:TS,spacing:ES,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:CS,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%)"}}}},iB=rB,aB=oB,sB=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...gs,...e.tweaks},parser:e.parser||ps.hsla,map:{...ms,...e.map}}),[e]);return v.jsx(Vo.Provider,{value:t,children:e.children})},lB=()=>{const e=E.useContext(Vo);return e?e.parser:ps.hsla};ee.Alert=YI,ee.Autocomplete=OV,ee.Button=Na,ee.Calendar=Ab,ee.Card=md,ee.Checkbox=Wf,ee.ColType=fi,ee.Collapse=ky,ee.CommandPalette=jF,ee.ComponentsProvider=sB,ee.Context=Vo,ee.DatePicker=DV,ee.Dict=wn,ee.Dropdown=ni,ee.Empty=Pb,ee.Expand=zF,ee.FileUpload=Z$,ee.Form=X$,ee.Input=ba,ee.InputFeedback=Kw,ee.InputField=ya,ee.Menu=HF,ee.MenuItem=RF,ee.Modal=pf,ee.MultiSelect=oj,ee.Notifications=bN,ee.Polymorph=cn,ee.Progress=xN,ee.Radiobox=ij,ee.RenderOnView=aE,ee.Select=ao,ee.Slider=sj,ee.Stats=wN,ee.Switch=lj,ee.Tab=CN,ee.Table=bz,ee.Tabs=TN,ee.Tag=Fa,ee.TaskList=cj,ee.Textarea=uj,ee.Timeline=kN,ee.TimelineItem=Es,ee.Toolbar=WF,ee.Tooltip=mf,ee.TransferList=pj,ee.createColumns=$j,ee.createCssProperties=NM,ee.createDesignTokens=mb,ee.createFormStorage=Jz,ee.createOptionCols=pp,ee.createStyles=OM,ee.createTheme=DM,ee.createTokenStyles=FM,ee.css=ke,ee.defaultDarkTheme=iB,ee.defaultLightTheme=aB,ee.defaultTranslations=ms,ee.defaultTweaks=gs,ee.dispatchInput=rm,ee.formReset=tS,ee.formToJson=wS,ee.getCoords=nE,ee.getJsonForm=tB,ee.getModalScrollerRef=Hj,ee.getRemainingSize=Ti,ee.getSchemaShape=Ir,ee.hasVerticalScroll=om,ee.initializeInputDataset=Si,ee.isMobile=wb,ee.isReactComponent=tE,ee.isReactFC=Pc,ee.isSsr=ur,ee.mergeRefs=qn,ee.negate=LM,ee.noop=pd,ee.parsers=ps,ee.path=dd,ee.reduceTokens=cr,ee.safeRegex=fd,ee.splitInto=xb,ee.useColorParser=lB,ee.useForm=eB,ee.useLocale=ud,ee.useNotification=vN,ee.usePrevious=nB,ee.useReactive=Cx,ee.useStableRef=rr,ee.useSwipe=vb,ee.useTablePreferences=Bj,ee.useTranslations=Ct,ee.uuid=$o,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
240
+ */var Kf,n1;function RV(){if(n1)return Kf;n1=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 Kf=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},Kf}var Yf,r1;function Gf(){if(r1)return Yf;r1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Yf=e,Yf}var Zf,o1;function i1(){return o1||(o1=1,Zf=Function.call.bind(Object.prototype.hasOwnProperty)),Zf}var Xf,a1;function HV(){if(a1)return Xf;a1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Gf(),n={},r=i1();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={})},Xf=o,Xf}var Qf,s1;function WV(){if(s1)return Qf;s1=1;var e=t1(),t=RV(),n=Gf(),r=i1(),o=HV(),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 Qf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(O){var B=O&&(c&&O[c]||O[u]);if(typeof B=="function")return B}var p="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:b,element:S(),elementType:w(),instanceOf:T,node:A(),objectOf:k,oneOf:C,oneOfType:_,shape:N,exact:$};function m(O,B){return O===B?O!==0||1/O===1/B:O!==O&&B!==B}function g(O,B){this.message=O,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function h(O){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q(G,Y,Z,j,z,K,ae){if(j=j||p,K=K||Z,ae!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var be=j+":"+Z;!B[be]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+j+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[be]=!0,X++)}}return Y[Z]==null?G?Y[Z]===null?new g("The "+z+" `"+K+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new g("The "+z+" `"+K+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:O(Y,Z,j,z,K)}var J=Q.bind(null,!1);return J.isRequired=Q.bind(null,!0),J}function y(O){function B(X,Q,J,G,Y,Z){var j=X[Q],z=D(j);if(z!==O){var K=V(j);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return h(B)}function x(){return h(a)}function b(O){function B(X,Q,J,G,Y){if(typeof O!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Z=X[Q];if(!Array.isArray(Z)){var j=D(Z);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an array."))}for(var z=0;z<Z.length;z++){var K=O(Z,z,J,G,Y+"["+z+"]",n);if(K instanceof Error)return K}return null}return h(B)}function S(){function O(B,X,Q,J,G){var Y=B[X];if(!s(Y)){var Z=D(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return h(O)}function w(){function O(B,X,Q,J,G){var Y=B[X];if(!e.isValidElementType(Y)){var Z=D(Y);return new g("Invalid "+J+" `"+G+"` of type "+("`"+Z+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return h(O)}function T(O){function B(X,Q,J,G,Y){if(!(X[Q]instanceof O)){var Z=O.name||p,j=H(X[Q]);return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected ")+("instance of `"+Z+"`."))}return null}return h(B)}function C(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(X,Q,J,G,Y){for(var Z=X[Q],j=0;j<O.length;j++)if(m(Z,O[j]))return null;var z=JSON.stringify(O,function(ae,R){var be=V(R);return be==="symbol"?String(R):R});return new g("Invalid "+G+" `"+Y+"` of value `"+String(Z)+"` "+("supplied to `"+J+"`, expected one of "+z+"."))}return h(B)}function k(O){function B(X,Q,J,G,Y){if(typeof O!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type "+("`"+j+"` supplied to `"+J+"`, expected an object."));for(var z in Z)if(r(Z,z)){var K=O(Z,z,J,G,Y+"."+z,n);if(K instanceof Error)return K}return null}return h(B)}function _(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<O.length;B++){var X=O[B];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(X)+" at index "+B+"."),a}function Q(J,G,Y,Z,j){for(var z=[],K=0;K<O.length;K++){var ae=O[K],R=ae(J,G,Y,Z,j,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&z.push(R.data.expectedType)}var be=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new g("Invalid "+Z+" `"+j+"` supplied to "+("`"+Y+"`"+be+"."))}return h(Q)}function A(){function O(B,X,Q,J,G){return I(B[X])?null:new g("Invalid "+J+" `"+G+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return h(O)}function L(O,B,X,Q,J){return new g((O||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function N(O){function B(X,Q,J,G,Y){var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));for(var z in O){var K=O[z];if(typeof K!="function")return L(J,G,Y,z,V(K));var ae=K(Z,z,J,G,Y+"."+z,n);if(ae)return ae}return null}return h(B)}function $(O){function B(X,Q,J,G,Y){var Z=X[Q],j=D(Z);if(j!=="object")return new g("Invalid "+G+" `"+Y+"` of type `"+j+"` "+("supplied to `"+J+"`, expected `object`."));var z=t({},X[Q],O);for(var K in z){var 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," ")+`
241
+ Valid keys: `+JSON.stringify(Object.keys(O),null," "));var R=ae(Z,K,J,G,Y+"."+K,n);if(R)return R}return null}return h(B)}function I(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(I);if(O===null||s(O))return!0;var B=d(O);if(B){var X=B.call(O),Q;if(B!==O.entries){for(;!(Q=X.next()).done;)if(!I(Q.value))return!1}else for(;!(Q=X.next()).done;){var J=Q.value;if(J&&!I(J[1]))return!1}}else return!1;return!0;default:return!1}}function M(O,B){return O==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function D(O){var B=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":M(B,O)?"symbol":B}function V(O){if(typeof O>"u"||O===null)return""+O;var B=D(O);if(B==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return B}function F(O){var B=V(O);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function H(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Qf}var Jf,l1;function qV(){if(l1)return Jf;l1=1;var e=Gf();function t(){}function n(){}return n.resetWarningCache=t,Jf=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},Jf}var c1;function UV(){if(c1)return al.exports;if(c1=1,process.env.NODE_ENV!=="production"){var e=t1(),t=!0;al.exports=WV()(e.isElement,t)}else al.exports=qV()();return al.exports}var KV=UV();const it=Gp(KV);function oo(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 YV=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 ci(e,t,n){const r=GV(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&u1(r,"path",i),u1(r,"relativePath",i),r}function GV(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=YV.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function u1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const ZV=[".DS_Store","Thumbs.db"];function XV(e){return oo(this,void 0,void 0,function*(){return ll(e)&&QV(e.dataTransfer)?n$(e.dataTransfer,e.type):JV(e)?e$(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?t$(e):[]})}function QV(e){return ll(e)}function JV(e){return ll(e)&&ll(e.target)}function ll(e){return typeof e=="object"&&e!==null}function e$(e){return ep(e.target.files).map(t=>ci(t))}function t$(e){return oo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>ci(n))})}function n$(e,t){return oo(this,void 0,void 0,function*(){if(e.items){const n=ep(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(r$));return d1(f1(r))}return d1(ep(e.files).map(n=>ci(n)))})}function d1(e){return e.filter(t=>ZV.indexOf(t.name)===-1)}function ep(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 r$(e){if(typeof e.webkitGetAsEntry!="function")return p1(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?h1(t):p1(e,t)}function f1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?f1(n):[n]],[])}function p1(e,t){return oo(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,ci(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return ci(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function o$(e){return oo(this,void 0,void 0,function*(){return e.isDirectory?h1(e):i$(e)})}function h1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>oo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(o$));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function i$(e){return oo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=ci(r,e.fullPath);t(o)},r=>{n(r)})})})}var cl={},m1;function a$(){return m1||(m1=1,cl.__esModule=!0,cl.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}),cl}var s$=a$();const tp=Gp(s$);function g1(e){return u$(e)||c$(e)||x1(e)||l$()}function l$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
242
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function u$(e){if(Array.isArray(e))return np(e)}function v1(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 y1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(n),!0).forEach(function(r){b1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b1(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 p$(e)||f$(e,t)||x1(e,t)||d$()}function d$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
243
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x1(e,t){if(e){if(typeof e=="string")return np(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 np(e,t)}}function np(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 f$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function p$(e){if(Array.isArray(e))return e}var h$=typeof tp=="function"?tp:tp.default,m$="file-invalid-type",g$="file-too-large",v$="file-too-small",y$="too-many-files",b$=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:m$,message:"File type must be ".concat(r)}},w1=function(t){return{code:g$,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},S1=function(t){return{code:v$,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},x$={code:y$,message:"Too many files"};function T1(e,t){var n=e.type==="application/x-moz-file"||h$(e,t);return[n,n?null:b$(t)]}function E1(e,t,n){if(io(e.size))if(io(t)&&io(n)){if(e.size>n)return[!1,w1(n)];if(e.size<t)return[!1,S1(t)]}else{if(io(t)&&e.size<t)return[!1,S1(t)];if(io(n)&&e.size>n)return[!1,w1(n)]}return[!0,null]}function io(e){return e!=null}function w$(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=T1(l,n),u=xa(c,1),d=u[0],p=E1(l,r,o),f=xa(p,1),m=f[0],g=s?s(l):null;return d&&m&&!g})}function ul(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function dl(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 C1(e){e.preventDefault()}function S$(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function T$(e){return e.indexOf("Edge/")!==-1}function E$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return S$(e)||T$(e)}function Bn(){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!ul(r)&&s&&s.apply(void 0,[r].concat(i)),ul(r)})}}function C$(){return"showOpenFilePicker"in window}function k$(e){if(io(e)){var t=Object.entries(e).filter(function(n){var r=xa(n,2),o=r[0],i=r[1],a=!0;return k1(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(A1))&&(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 y1(y1({},n),{},b1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function A$(e){if(io(e))return Object.entries(e).reduce(function(t,n){var r=xa(n,2),o=r[0],i=r[1];return[].concat(g1(t),[o],g1(i))},[]).filter(function(t){return k1(t)||A1(t)}).join(",")}function P$(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function I$(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function k1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function A1(e){return/^.*\.[\w]+$/.test(e)}var _$=["children"],O$=["open"],M$=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],D$=["refKey","onChange","onClick"];function N$(e){return V$(e)||L$(e)||P1(e)||F$()}function F$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
244
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function V$(e){if(Array.isArray(e))return op(e)}function rp(e,t){return z$(e)||j$(e,t)||P1(e,t)||$$()}function $$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
245
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P1(e,t){if(e){if(typeof e=="string")return op(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 op(e,t)}}function op(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 j$(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 z$(e){if(Array.isArray(e))return e}function I1(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?I1(Object(n),!0).forEach(function(r){ip(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ip(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fl(e,t){if(e==null)return{};var n=B$(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 B$(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 ap=E.forwardRef(function(e,t){var n=e.children,r=fl(e,_$),o=O1(r),i=o.open,a=fl(o,O$);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(vt(vt({},a),{},{open:i})))});ap.displayName="Dropzone";var _1={disabled:!1,getFilesFromEvent:XV,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};ap.defaultProps=_1,ap.propTypes={children:it.func,accept:it.objectOf(it.arrayOf(it.string)),multiple:it.bool,preventDropOnDocument:it.bool,noClick:it.bool,noKeyboard:it.bool,noDrag:it.bool,noDragEventsBubbling:it.bool,minSize:it.number,maxSize:it.number,maxFiles:it.number,disabled:it.bool,getFilesFromEvent:it.func,onFileDialogCancel:it.func,onFileDialogOpen:it.func,useFsAccessApi:it.bool,autoFocus:it.bool,onDragEnter:it.func,onDragLeave:it.func,onDragOver:it.func,onDrop:it.func,onDropAccepted:it.func,onDropRejected:it.func,onError:it.func,validator:it.func};var sp={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function O1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},_1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,h=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,_=t.validator,A=E.useMemo(function(){return A$(n)},[n]),L=E.useMemo(function(){return k$(n)},[n]),N=E.useMemo(function(){return typeof h=="function"?h:M1},[h]),$=E.useMemo(function(){return typeof g=="function"?g:M1},[g]),I=E.useRef(null),M=E.useRef(null),D=E.useReducer(R$,sp),V=rp(D,2),F=V[0],H=V[1],O=F.isFocused,B=F.isFileDialogActive,X=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&C$()),Q=function(){!X.current&&B&&setTimeout(function(){if(M.current){var ne=M.current.files;ne.length||(H({type:"closeDialog"}),$())}},300)};E.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[M,B,$,X]);var J=E.useRef([]),G=function(ne){I.current&&I.current.contains(ne.target)||(ne.preventDefault(),J.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",C1,!1),document.addEventListener("drop",G,!1)),function(){b&&(document.removeEventListener("dragover",C1),document.removeEventListener("drop",G))}},[I,b]),E.useEffect(function(){return!r&&x&&I.current&&I.current.focus(),function(){}},[I,x,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),Z=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[].concat(N$(J.current),[q.target]),dl(q)&&Promise.resolve(o(q)).then(function(ne){if(!(ul(q)&&!C)){var me=ne.length,De=me>0&&w$({files:ne,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:_}),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,_]),j=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q);var ne=dl(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 I.current&&I.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}),dl(q)&&u&&u(q))},[I,u,C]),K=E.useCallback(function(q,ne){var me=[],De=[];q.forEach(function(Ue){var Qe=T1(Ue,A),jt=rp(Qe,2),kn=jt[0],Wn=jt[1],Or=E1(Ue,a,i),Mr=rp(Or,2),Dr=Mr[0],W=Mr[1],U=_?_(Ue):null;if(kn&&Dr&&!U)me.push(Ue);else{var Re=[Wn,W];U&&(Re=Re.concat(U)),De.push({file:Ue,errors:Re.filter(function(rt){return rt})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(Ue){De.push({file:Ue,errors:[x$]})}),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,_]),ae=E.useCallback(function(q){q.preventDefault(),q.persist(),Se(q),J.current=[],dl(q)&&Promise.resolve(o(q)).then(function(ne){ul(q)&&!C||K(ne,q)}).catch(function(ne){return Y(ne)}),H({type:"reset"})},[o,K,Y,C]),R=E.useCallback(function(){if(X.current){H({type:"openDialog"}),N();var q={multiple:s,types:L};window.showOpenFilePicker(q).then(function(ne){return o(ne)}).then(function(ne){K(ne,null),H({type:"closeDialog"})}).catch(function(ne){P$(ne)?($(ne),H({type:"closeDialog"})):I$(ne)?(X.current=!1,M.current?(M.current.value=null,M.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(ne)});return}M.current&&(H({type:"openDialog"}),N(),M.current.value=null,M.current.click())},[H,N,$,y,K,Y,L,s]),be=E.useCallback(function(q){!I.current||!I.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),R())},[I,R]),Ce=E.useCallback(function(){H({type:"focus"})},[]),_e=E.useCallback(function(){H({type:"blur"})},[]),Be=E.useCallback(function(){S||(E$()?setTimeout(R,0):R())},[S,R]),le=function(ne){return r?null:ne},we=function(ne){return w?null:le(ne)},ce=function(ne){return T?null:le(ne)},Se=function(ne){C&&ne.stopPropagation()},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,jt=q.onBlur,kn=q.onClick,Wn=q.onDragEnter,Or=q.onDragOver,Mr=q.onDragLeave,Dr=q.onDrop,W=fl(q,M$);return vt(vt(ip({onKeyDown:we(Bn(Ue,be)),onFocus:we(Bn(Qe,Ce)),onBlur:we(Bn(jt,_e)),onClick:le(Bn(kn,Be)),onDragEnter:ce(Bn(Wn,Z)),onDragOver:ce(Bn(Or,j)),onDragLeave:ce(Bn(Mr,z)),onDrop:ce(Bn(Dr,ae)),role:typeof De=="string"&&De!==""?De:"presentation"},me,I),!r&&!w?{tabIndex:0}:{}),W)}},[I,be,Ce,_e,Be,Z,j,z,ae,w,T,r]),de=E.useCallback(function(q){q.stopPropagation()},[]),te=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=q.refKey,me=ne===void 0?"ref":ne,De=q.onChange,Ue=q.onClick,Qe=fl(q,D$),jt=ip({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(Bn(De,ae)),onClick:le(Bn(Ue,de)),tabIndex:-1},me,M);return vt(vt({},jt),Qe)}},[M,n,s,ae,r]);return vt(vt({},F),{},{isFocused:O&&!r,getRootProps:ie,getInputProps:te,rootRef:I,inputRef:M,open:le(R)})}function R$(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({},sp),{},{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({},sp);default:return e}}function M1(){}const D1=E.createContext([null,()=>{}]),H$=()=>E.useContext(D1),W$=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,q$={csv:Uu,xls:Uu,mov:wy,mp4:wy,xlsx:Uu,pdf:xy,txt:xy,json:LI,mp3:OI},U$=e=>{const[,t]=H$(),[n,r]=E.useState({url:"",type:"",size:""});E.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:W$(l),size:jV(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=q$[e.file.name.split(".").at(-1)]??Sy,s=n.type==="img"?v.jsx("img",{src:n.url,className:"block w-full",alt:e.file.name}):v.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return v.jsxs("li",{className:"flex w-full flex-row justify-between gap-4 border-b border-card-border last:border-b-transparent",children:[v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-row items-center gap-4",children:[v.jsx("button",{type:"button",onClick:o,className:"flex size-20 items-center justify-center",children:s}),v.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[v.jsx("span",{children:e.file.name}),v.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?v.jsx("div",{className:"min-w-full flex-1",children:v.jsx(e.File,{file:e.file})}):null]}),v.jsx("div",{className:"align-start justify-start flex py-4 transition-colors duration-300 ease-linear hover:text-danger-hover",children:v.jsx("button",{onClick:i,type:"button",className:"size-6 flex items-center justify-center",children:v.jsx(Wi,{size:16})})})]})},K$=e=>v.jsx("ul",{className:"w-full space-y-8",children:e.files.map(t=>v.jsx(U$,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),N1=e=>{const t=Ct(),n=e.dragging?VI:$I;return v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsx("div",{className:"flex flex-col items-center justify-center gap-2",children:v.jsx(n,{className:"text-primary",size:80})}),v.jsxs("div",{className:"my-4 flex flex-col items-center gap-1",children:[v.jsx("p",{children:t.uploadIdle}),v.jsx("button",{className:"text-primary underline",type:"button",children:t.uploadIdleButton})]})]})},Y$=e=>e.isDragActive?v.jsx(N1,{files:e.files,dragging:!0}):e.files.length>0?v.jsx(K$,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):v.jsx(E.Fragment,{children:e.idle}),G$=v.jsx(N1,{dragging:!1}),Z$=e=>{const t=e.item.file,n=e.item.type;return v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),v.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?v.jsx("img",{className:"container block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?v.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?v.jsx("figure",{children:v.jsx("audio",{controls:!0,src:e.item.url})}):null]})},X$=({idle:e=G$,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Ct(),a=E.useState(null),[s,l]=E.useState([]),c=o.files??s,u=()=>a[1](null),d=g=>{r==null||r(g),l(h=>h.concat(g))},{getRootProps:p,getInputProps:f,isDragActive:m}=O1({onDrop:d});return v.jsxs(D1.Provider,{value:a,children:[v.jsx(pf,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?v.jsx(Z$,{item:a[0]}):null}),v.jsxs("div",{...p(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[v.jsx("input",{...f(o),name:o.name,id:o.name}),v.jsx(Y$,{File:n,onDeleteFile:t,isDragActive:m,idle:e,files:c})]})]})},Q$=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return v.jsx("form",{...e,onSubmit:t})},F1=40,J$=e=>v.jsx(E.Fragment,{children:e.children}),ej={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},L1=[],tj=E.forwardRef(function(t,n){return v.jsx(pt.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:v.jsx(or,{children:t.children})})}),nj=E.forwardRef(function({item:t,context:n,...r},o){return v.jsx(pt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),rj={List:tj,Item:nj},oj=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]),v.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?v.jsxs(Fa,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},ij=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:m=!1,onChangeOptions:g,...h},y)=>{const x=E.useMemo(()=>new wn(r.map(te=>[te.value,te])),[r]),b=E.useRef(null),S=E.useRef(null),w=h.value??h.defaultValue??L1,T=Ct(),[C,k]=E.useState(0),[_,A]=E.useState(!1),[L,N]=E.useState(""),[$,I]=E.useState(()=>{const te=new wn;return w.forEach(q=>{const ne=x.get(q);return ne?te.set(q,ne):void 0}),te}),M=E.useMemo(()=>Array.from($.keys()),[$]),[D,V]=E.useState(()=>{const te=new Set(w);return r.reduce((q,ne)=>te.has(ne.value)?[...q,ne.label??ne.value]:q,[])??w}),[F,H]=E.useState(null),O=E.useRef(L1),B=m&&L!==""?[{value:L,label:L,"data-dynamic":"true"},...r]:r,X=L.length===0?B:cf(B,"value",[{key:"value",value:L},{key:"label",value:L}]),Q=df(_,"block-only"),J=X.filter(te=>te.hidden!==!0),G=J.length===0,{x:Y,y:Z,strategy:j,refs:z,context:K}=xr({open:_,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:Ko,middleware:[ta(4),e0({padding:10,elementContext:"reference",apply(te){const q=te.elements.floating.querySelector("ul"),ne=(q==null?void 0:q.getBoundingClientRect().height)||0,me=Ti(z.reference.current,window.innerHeight),De=Math.min(ne<F1?me:ne,me,te.availableHeight),Ue=J.length===0?F1:Math.min(De,me,ne),Qe=`${b.current.getBoundingClientRect().width}px`;Object.assign(te.elements.floating.style,{width:Qe,maxWidth:Qe,height:Ue})}})]}),ae=L0(K,ej),{getReferenceProps:R,getFloatingProps:be,getItemProps:Ce}=wr([to(K,{role:"listbox"}),eo(K),Hs(K,{cols:0,listRef:O,loop:!0,virtual:!0,allowEscape:!0,activeIndex:F,selectedIndex:F,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:te=>H(q=>te??q)})]);E.useEffect(()=>{if(!_)return k(0);const te=z.reference;if(te.current===null)return;const q=Ti(te.current,window.innerHeight);setTimeout(()=>k(Math.min(q,J.length*40)),100)},[L,_,z.reference]),E.useEffect(()=>{h.value&&I(new wn(h.value.map(te=>[te,x.get(te)])))},[h.value,x]),E.useEffect(()=>{const te=z.reference.current;if(te)return Si(te)},[]);const _e=(te,q)=>{const ne=$.clone(Ue=>Ue.has(te.value)?Ue.remove(te.value):Ue.set(te.value,te));I(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(te.label??"")),N(""),H(q)},Be=te=>{const q=te.target.value;return N(q),!_&&q===""?A(!0):(te.target.name=h.name||"",q?A(!0):void 0)},le=()=>{var te;A(!0),N(""),(te=z.reference.current)==null||te.focus()},we=()=>{A(!0),N("")},ce=()=>{var te;(te=z.reference.current)==null||te.setAttribute("data-value","[]"),N(""),A(!1),I(new wn),g==null||g([])},Se=h.id||h.name,ie=$.map((te,q)=>v.jsx(Fa,{size:"small",icon:v.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),_e(te,q)},children:v.jsx(Wi,{size:14})}),children:te.label??te.value},`MultiSelect-${te.value}-x`)),de={height:G?"0":$.size===0?C-49:C-86};return v.jsxs(ya,{...h,left:e,error:t,ref:b,form:h.form,name:h.name,feedback:d,hideLeft:p,required:f,title:h.title,container:o,rightLabel:i,interactive:a,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:v.jsxs("span",{className:"flex items-center gap-0.5",children:[n,v.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:le,children:[v.jsx(Hu,{size:20}),v.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),$?v.jsx("button",{type:"button",onClick:ce,className:"transition-colors link:text-danger",children:v.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[v.jsxs("ul",{...R({...h,onFocus:we,id:`${Se}-shadow`,name:`${Se}-shadow`,ref:z.setReference}),tabIndex:0,role:"button","data-name":Se,"data-target":Se,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":M.join(","),className:ke("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-hidden transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","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 text-ellipsis",h.className),children:[M.length>0?null:v.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),v.jsx(oj,{label:c,children:ie})]}),v.jsx("input",{id:Se,name:Se,type:"hidden","data-origin":Se,ref:y,required:f,defaultValue:h.value||M||void 0}),v.jsx(Qr,{preserveTabOrder:!0,children:_?v.jsx(C0,{lockScroll:!0,children:v.jsx(ei,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:v.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:[v.jsx("input",{autoFocus:!0,value:L,onChange:Be,title:h.title,placeholder:T.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded-sm border-b border-input-border bg-transparent px-input-x py-input-y outline-hidden transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:te=>{var q,ne;if(te.key==="ArrowDown"){let me=F+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),H(me)}if(te.key==="ArrowUp"){let me=F-1;return me<0&&(me=J.length-1),(ne=S.current)==null||ne.scrollIntoView({index:me}),H(me)}if(te.key==="Escape")return te.currentTarget.blur(),A(!1);if(te.key==="Enter"){if(F!==null&&J[F])return te.preventDefault(),_e(J[F],F);if(J.length===1)return te.preventDefault(),_e(J[0],0)}}}),G?v.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:v.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,G?null:v.jsx(pt.div,{initial:!1,"data-floating":"true",ref:Q,animate:{height:G?"auto":C},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!_)return k(0);const q=z.floating.current.querySelectorAll("li").item(0),ne=(q?q.getBoundingClientRect().height:40)*J.length;return wi.flushSync(()=>k(ne+2))},children:v.jsx(jf,{ref:S,hidden:G,data:J,components:rj,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(te,q)=>{const ne=q.Render??J$,me=$.has(q.value)||$.has(q.label??""),De=F===te,Ue=q.label??q.value;return v.jsxs("button",{"data-value":q.value,...Ce({ref:Qe=>void(O.current[te]=Qe),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>_e(q,te)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${me||De?"bg-floating-hover text-floating-foreground":""}`,children:[v.jsx(Wf,{onChange:pd,checked:me,"aria-checked":me,onClick:Qe=>{Qe.stopPropagation(),_e(q,te)}}),v.jsx(ne,{...h,label:q.label,value:q.value,children:Ue})]})}})}),v.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:$.size===0?v.jsx(Fa,{theme:"muted",size:"small",children:T.autocompleteEmpty}):ie})]})})}):null})]})}),aj=({children:e,className:t="",size:n,...r})=>v.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[v.jsx("input",{...r,type:"radio",className:ke("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),ao=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:m,...g},h)=>{const y=Ct(),x=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(h,()=>x.current),E.useEffect(()=>{if(x.current===null)return;const w=new AbortController,T=x.current,C=Si(x.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=x.current)==null?void 0:w.focus()};return v.jsx(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:v.jsxs("label",{htmlFor:b,children:[p,v.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[v.jsx(Hu,{size:20}),v.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:v.jsxs("select",{...g,id:b,name:b,required:e,ref:qn(h,x),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:ke("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-hidden transition-colors","data-[selected=false]:text-input-placeholder",g.className),children:[v.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})}),sj=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"));Le.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Le.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),v.jsx(mf,{title:"",ref:r,as:WD,enabled:e.tooltip,className:"block rounded-full bg-input-switch size-5 cursor-grab border border-input-border shadow-shadow-floating active:cursor-grabbing",children:t})},lj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef($o()),s=r||o||[];return v.jsxs(BD,{...i,defaultValue:r,value:o,className:ke("relative flex h-5 w-full touch-none select-none items-center",n),children:[v.jsx(RD,{className:"relative h-2 rounded-full grow bg-background",children:v.jsx(HD,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>v.jsx(sj,{tooltip:t??!1},`${a.current}-${c}`))]})},cj=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=rr(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},m=u.current;return m.addEventListener("change",f),()=>m==null?void 0:m.removeEventListener("change",f)}},[]);const p=()=>{var m,g;const f=!((m=u.current)!=null&&m.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return v.jsxs("fieldset",{className:ke("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[v.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[v.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),v.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-hidden focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:v.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow-sm ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),v.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:v.jsx("span",{className:"font-medium text-foreground",children:e})})]}),v.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),uj=e=>{const[t,n]=pI();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:yI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),v.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},dj=Yw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
246
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),fj=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},pj={Item:E.forwardRef(function(t,n){return v.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return v.jsx("ul",{...t,ref:n,className:"space-y-3"})})},hj=e=>{const t=E.useRef(null),n=fj(t);return v.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[v.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[v.jsx("header",{className:"border-b border-card-border pb-2"}),v.jsxs("div",{className:"px-8 space-y-2",children:[v.jsx(ba,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),v.jsx(jf,{height:n,useWindowScroll:!0,data:e.source,components:pj,itemContent:(r,o)=>v.jsx(E.Fragment,{children:v.jsx(Wf,{children:v.jsx(e.Item,{data:o})})})})]})]}),v.jsx("div",{children:v.jsx(Na,{children:v.jsx(Wu,{})})}),v.jsx("div",{})]})};var mj=Object.defineProperty,V1=Object.getOwnPropertySymbols,gj=Object.prototype.hasOwnProperty,vj=Object.prototype.propertyIsEnumerable,$1=(e,t,n)=>t in e?mj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yj=(e,t)=>{for(var n in t||(t={}))gj.call(t,n)&&$1(e,n,t[n]);if(V1)for(var n of V1(t))vj.call(t,n)&&$1(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},bj=(e,t,n,r)=>hl(lp,e,t,n,r),ui=e=>typeof e=="object",kr=(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=>kr(e[r],t[r]))},xj=(e,t)=>(ui(e)||Array.isArray(e))&&t?e[t]:e,wj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,pl=e=>/[0-9.]+/.test(e),j1=e=>["string","number"].includes(typeof e),z1=e=>e==null||(e==null?void 0:e.length)===0||e==="",B1={eq:kr,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:z1,notEmpty:e=>!z1(e),in:(e,t)=>lp(t,n=>kr(e,n)),notIn:(e,t)=>R1(t,n=>!kr(e,n))},Sj=e=>{if(e in B1)return B1[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},hl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=Sj(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},Tj=(e,t,n,r)=>hl(di,e,t,n,r),R1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},Ej=(e,t,n,r)=>hl(R1,e,t,n,r),H1=e=>{if(e===null)return null;const t=yj({},e);return Object.keys(t).forEach(n=>t[n]=ui(e[n])?H1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},W1=(e,t)=>{if(ui(t)){for(let n=0;n<e.length;n++){const r=e[n];if(kr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(kr(t,r))return!0}return!1},Cj=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},kj=e=>di(e,(t,n,r)=>ui(t)?n===r.findIndex(o=>kr(o,t)):n===r.indexOf(t)),Aj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},q1=(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())},Pj=(e,t)=>q1(e,n=>n[t]),U1=(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},Ij=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},_j=(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 pl(e)&&pl(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)&&pl(e)&&pl(t)){const o=[],[i,a]=Ij(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return _j(e,t,r)},Oj=(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 j1(e)&&j1(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},K1=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},Mj=(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)},Dj=(e,t,n,r)=>hl(Mj,e,t,n,r),Y1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(wj(t))},G1=(e=>(e.Asc="asc",e.Desc="desc",e))(G1||{}),Nj=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),Fj=(e,t)=>e.sort(Nj(t)),Lj=(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})},Vj=class Rp{constructor(t=[]){this.array=t}static Range(...t){return Oj(...t)}static New(t){return new Rp(t)}Where(t,n,r){return this.array=Tj(this.array,t,n,r),this}Some(t,n,r){return bj(this.array,t,n,r)}All(t,n,r){return Ej(this.array,t,n,r)}Reverse(){return this.array=K1(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=Dj(this.array,t,n,r),this}Distinct(){return this.array=kj(this.array),this}First(t){return t===void 0?this.array[0]:Aj(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+xj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Pj(this.array,t)}GroupWith(t){return q1(this.array,t)}Except(t){return di(this.array,n=>!W1(t,n))}Intersect(t){return di(this.array,n=>W1(t,n))}OrderBy(t,n){let r;return r=t?Y1(this.array,t):this.array.toSorted(),this.array=n==="desc"?K1(r):r,this}Includes(t){return lp(this.array,n=>kr(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(U1(this.array,n=>[t,n]))}Zip(t,n){return U1(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 Rp(H1(this.array))}ToObject(t){return Cj(this.array,t)}Sort(t){return Array.isArray(t)?Fj(this.array,t):Y1(this.array,t)}Unique(t){return Lj(this.array,t)}},Z1=Vj,dp={},X1;function $j(){return X1||(X1=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(x){window.console.log(x)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const x=y.getItem(h);try{return JSON.parse(x)}catch{return x??null}},i=h=>Object.keys(h).reduce((y,x)=>({...y,[x]:o(x,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],p={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=p.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,x={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((w,T)=>{const C=T.parse(x);return C===""?w:w.concat(C)},[`${encodeURIComponent(h)}=${b}`]).join(";");document.cookie=S,u()}},f=h=>{const y=new Set,x=b=>{h().removeItem(b);const S=i(h());y.forEach(w=>w(S))};return{delete:x,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(h()):h(),has:b=>{const S=h().getItem(b);return!n(S)},deleteAll:()=>{t(h(),x),y.forEach(b=>b(h()))},get:b=>o(b,h()),set:(b,S)=>{h().setItem(b,JSON.stringify(S)),y.forEach(w=>w(h()))}}},m=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=m,e.createStorage=f}(dp)),dp}var wa=$j();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,jj=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},zj={},Bj=(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})},Rj=(e,t,n=zj)=>{const r=ur()?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:Bj(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return ur()||wa.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},Hj=e=>{const t=rr(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]},Wj=()=>ur()?void 0:document.querySelector('[data-component="modal-body"]'),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:$o(),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]}),[t]),operations:t}},qj=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 v.jsx(E.Fragment,{children:v.jsx(ni,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:v.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[v.jsx(zI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(ao,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),v.jsx(ao,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),v.jsx(ba,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),v.jsx("div",{className:"flex justify-center items-center mt-5",children:v.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:v.jsx(ts,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[v.jsx(qu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Uj=({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 v.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[v.jsx(ao,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),v.jsx(ba,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),v.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:v.jsx(ts,{className:"text-danger",size:14})})]})},Kj=({item:e,onPointerDown:t})=>{const n=es(0);return v.jsxs(my,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[v.jsx("button",{type:"button",className:"cursor-grab",children:v.jsx(jI,{size:14})}),v.jsx("span",{children:e.groupName})]},e.groupId)},Yj=e=>{var l;const t=Ct(),n=pp(e.cols),r=gI(),[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 Z1(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(pT(m).map((y,x)=>{const b=m[y];return{...g,groupId:$o(),groupKey:d,index:x,rows:b,groupName:y}}))},s=()=>e.setGroups([]);return v.jsx(E.Fragment,{children:v.jsxs(ni,{arrow:!1,title:t.tableGroupLabel,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(qI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[v.jsxs("div",{className:"flex flex-nowrap items-center",children:[v.jsx(ao,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),v.jsx(Na,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:v.jsx(ts,{size:16,className:"text-danger"})})]}),e.groups.length>0?v.jsxs("section",{className:"my-4",children:[v.jsx("header",{children:v.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),v.jsx(wE,{children:v.jsx(py,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>v.jsx(Kj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Gj=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),Zj=(e,t)=>e.toSorted(Gj(t)),Q1=(e,t,n)=>({label:t,id:$o(),type:n,value:e.id}),Xj=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,Q1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return v.jsx(E.Fragment,{children:v.jsx(ni,{title:t.tableSortDropdownTitle,trigger:v.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[v.jsx(yy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:v.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>v.jsxs("li",{className:"flex flex-nowrap gap-3",children:[v.jsx(ao,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),v.jsx(ao,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),v.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:v.jsx(ts,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),v.jsx("li",{children:v.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[v.jsx(qu,{size:14})," ",t.tableSortAddButton]})})]})})})},Qj=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=Q1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=fp(e.col);return v.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[v.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?v.jsx(_I,{size:14}):null,n==="desc"?v.jsx(II,{size:14}):null,n==="undefined"?v.jsx(yy,{size:14}):null]})},Jj=e=>v.jsx("header",{className:"min-w-full mb-1",children:v.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[v.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[v.jsx("span",{children:v.jsx(qj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),v.jsx("span",{children:v.jsx(Xj,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),v.jsx("span",{children:v.jsx(Yj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),v.jsx("ul",{className:"flex flex-wrap w-full flex-1 grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>v.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[v.jsxs("span",{children:[v.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),v.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[v.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),v.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-hidden [appearance:textfield] empty:after: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 ez(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 tz=e=>{const t=E.useId(),n=Ct(),r=E.useMemo(()=>ez(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return v.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[v.jsx("p",{children:v.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?v.jsxs(E.Fragment,{children:[v.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),v.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>v.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),v.jsx("nav",{children:v.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?v.jsx("li",{children:v.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:v.jsx(E.Fragment,{children:typeof i=="string"?v.jsx("li",{children:"..."}):v.jsx("li",{children:v.jsx(cn,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?v.jsx("li",{children:v.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},nz=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),v.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:v.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},rz=(e,t,n)=>{const r=n.cols,o=n.loading;return v.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=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?v.jsx(nz,{children:v.jsx(p,{col:i,row:t,rowIndex:e})}):null,v.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),v.jsx("span",{className:"relative",children:o?uf:c?v.jsx(E.Fragment,{children:v.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):v.jsx(E.Fragment,{children:Le.nil(l)?"":l})}))})})},oz={top:0,left:0,right:0,bottom:-1},iz=e=>{var g;const t=Hf(),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?RI:HI,c=E.useRef(null),u=h=>{const y=h.currentTarget.dataset.id||"";return e.setFilters(x=>x.filter(b=>b.id!==y))},d=E.useCallback(h=>{if(h===null)return;c.current=h;const y=new AbortController;return h.addEventListener("pointerdown",x=>{if(x.target.dataset.type==="resizer")return x.stopPropagation(),x.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(h=>e.header.id===h.value),f=p!=null&&p.type?p.type===G1.Asc?"ascending":"descending":"none",m=fp(e.header);return v.jsxs(my,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[v.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:v.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?v.jsx(ni,{arrow:!0,trigger:v.jsxs("span",{children:[v.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),v.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:v.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",v.jsx("span",{className:"font-medium",children:m})]}),children:v.jsxs("ul",{className:"font-medium",children:[r.length===0?null:v.jsx(E.Fragment,{children:r.map(h=>v.jsx("li",{className:"my-1",children:v.jsx(Uj,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),v.jsx("li",{children:v.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(h=>h.concat(mp(e.header,s.options,s.operations))),children:[v.jsx(qu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,v.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?v.jsx(Qj,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:v.jsx(pt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:oz,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-px cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:h=>void h.currentTarget.focus(),onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(y+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,y)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const x=c.current.getBoundingClientRect().width,b=y.delta.x;c.current.style.width=`${Math.abs(x+b)}px`}})]})},az=e=>{const[t,n]=Hj(e.setCols);return v.jsx(py,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:v.jsx(or,{children:e.headers.map((r,o)=>v.jsx(iz,{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}`))})})},J1=E.createContext({}),sz=()=>E.useContext(J1),lz=E.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:v.jsx(or,{children:n.children})})),cz=E.forwardRef(({context:e,className:t="",...n},r)=>v.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-separate text-left ${t??""}`})),uz=E.forwardRef(({context:e,...t},n)=>{const r=sz(),o={...t==null?void 0:t.style,top:Le.number(r.sticky)?`${r.sticky}px`:void 0};return v.jsx("thead",{...t,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group shadow-shadow-card group:sticky",ref:n})}),dz=E.forwardRef(({context:e,item:t,...n},r)=>v.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${(n==null?void 0:n.className)??""}`})),fz=E.forwardRef((e,t)=>e.context.loadingMore?v.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:v.jsx("tr",{role:"row",className:"bg-card-background",children:v.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:v.jsx("span",{className:"block w-full h-2 rounded-sm opacity-60 animate-pulse bg-foreground"})})})}):null),pz={TableHead:uz,Table:cz,TableBody:lz,TableRow:dz,TableFoot:fz},hz=[0,0,0,0,0,0,0,0,0,0],mz=e=>v.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?uf:v.jsx(Pb,{})}),gz=()=>v.jsx(E.Fragment,{}),vz=()=>v.jsx(E.Fragment,{}),yz=[],eS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,border:l=!1,pagination:c=null,useControl:u=!1,...d})=>{const p=E.useRef(null),[f,m]=E.useState(!1),g=rr(a),h=rr(d.loadingMore),y=E.useMemo(()=>{if(d.loading)return hz;if(u)return d.rows;const S=new Z1(d.rows);return t.length>0&&t.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:S.Where(w.name,w.operation.symbol,w.value)),r.length===0?S.Select():Zj(S.Select(),r)},[d.loading,d.rows,u,t,r]);E.useEffect(()=>{if(p.current===null)return()=>{};const S=p.current,w=new IntersectionObserver(T=>{var _;return T[T.length-1].isIntersecting&&h.current?((_=g.current)==null||_.call(g),void m(!0)):m(!1)});return w.observe(S),()=>w.disconnect()},[h,g]);const x=y.length===0,b={loading:d.loading,loadingMore:d.loadingMore,cols:e,Aside:d.Aside};return v.jsxs("div",{className:"min-w-full",children:[v.jsxs("div",{className:`group w-full relative rounded-lg ${l?"border border-table-border":""}`,children:[v.jsx(uV,{context:b,components:pz,totalCount:y.length,style:{height:"100%"},itemContent:x?gz:rz,data:x?yz:y,useWindowScroll:!s,fixedFooterContent:f?vz:null,customScrollParent:s?s():void 0,fixedHeaderContent:()=>v.jsx(az,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!d.loading,inlineFilter:d.inlineFilter,inlineSorter:d.inlineSorter})}),x?v.jsx(mz,{loading:d.loading}):null,v.jsx("div",{"aria-hidden":"true",ref:p,className:"w-full h-0.5"})]}),c!==null?v.jsx(tz,{...c}):null]})},bz=(e,t)=>typeof t=="function"?t(e):t,ml=(e,t,n)=>e===t||n==null?void 0:n(t),xz=e=>{const t=Hf(),n=E.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=E.useMemo(()=>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]:bz(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),ml((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),ml((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),ml((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),ml((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return v.jsxs(J1.Provider,{value:n,children:[r?v.jsx(Jj,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?v.jsx(eS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):v.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>v.jsx("div",{className:"min-w-full",children:v.jsx(eS,{...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}`))})]})},wz=["INPUT","SELECT"],tS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{wz.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var vp,nS;function yp(){if(nS)return vp;nS=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,rS;function oS(){if(rS)return bp;rS=1;var e=yp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var h=[],y=0;y<256;++y)h.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return h}(),o=function(y){for(;y.length>1;){var x=y.pop(),b=x.obj[x.prop];if(n(b)){for(var S=[],w=0;w<b.length;++w)typeof b[w]<"u"&&S.push(b[w]);x.obj[x.prop]=S}}},i=function(y,x){for(var b=x&&x.plainObjects?{__proto__:null}:{},S=0;S<y.length;++S)typeof y[S]<"u"&&(b[S]=y[S]);return b},a=function h(y,x,b){if(!x)return y;if(typeof x!="object"&&typeof x!="function"){if(n(y))y.push(x);else if(y&&typeof y=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,x))&&(y[x]=!0);else return[y,x];return y}if(!y||typeof y!="object")return[y].concat(x);var S=y;return n(y)&&!n(x)&&(S=i(y,b)),n(y)&&n(x)?(x.forEach(function(w,T){if(t.call(y,T)){var C=y[T];C&&typeof C=="object"&&w&&typeof w=="object"?y[T]=h(C,w,b):y.push(w)}else y[T]=w}),y):Object.keys(x).reduce(function(w,T){var C=x[T];return t.call(w,T)?w[T]=h(w[T],C,b):w[T]=C,w},S)},s=function(y,x){return Object.keys(x).reduce(function(b,S){return b[S]=x[S],b},y)},l=function(h,y,x){var b=h.replace(/\+/g," ");if(x==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(y,x,b,S,w){if(y.length===0)return y;var T=y;if(typeof y=="symbol"?T=Symbol.prototype.toString.call(y):typeof y!="string"&&(T=String(y)),b==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var C="",k=0;k<T.length;k+=c){for(var _=T.length>=c?T.slice(k,k+c):T,A=[],L=0;L<_.length;++L){var N=_.charCodeAt(L);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){A[A.length]=_.charAt(L);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}L+=1,N=65536+((N&1023)<<10|_.charCodeAt(L)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(y){for(var x=[{obj:{o:y},prop:"o"}],b=[],S=0;S<x.length;++S)for(var w=x[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var _=C[k],A=T[_];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(x.push({obj:T,prop:_}),b.push(A))}return o(x),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},m=function(y,x){return[].concat(y,x)},g=function(y,x){if(n(y)){for(var b=[],S=0;S<y.length;S+=1)b.push(x(y[S]));return b}return x(y)};return bp={arrayToObject:i,assign:s,combine:m,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},bp}var xp,iS;function Sz(){if(iS)return xp;iS=1;var e=lT(),t=oS(),n=yp(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,y){return h+"["+y+"]"},repeat:function(h){return h}},i=Array.isArray,a=Array.prototype.push,s=function(g,h){a.apply(g,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},p={},f=function g(h,y,x,b,S,w,T,C,k,_,A,L,N,$,I,M,D,V){for(var F=h,H=V,O=0,B=!1;(H=H.get(p))!==void 0&&!B;){var X=H.get(h);if(O+=1,typeof X<"u"){if(X===O)throw new RangeError("Cyclic object value");B=!0}typeof H.get(p)>"u"&&(O=0)}if(typeof _=="function"?F=_(y,F):F instanceof Date?F=N(F):x==="comma"&&i(F)&&(F=t.maybeMap(F,function(_e){return _e instanceof Date?N(_e):_e})),F===null){if(w)return k&&!M?k(y,u.encoder,D,"key",$):y;F=""}if(d(F)||t.isBuffer(F)){if(k){var Q=M?y:k(y,u.encoder,D,"key",$);return[I(Q)+"="+I(k(F,u.encoder,D,"value",$))]}return[I(y)+"="+I(String(F))]}var J=[];if(typeof F>"u")return J;var G;if(x==="comma"&&i(F))M&&k&&(F=t.maybeMap(F,k)),G=[{value:F.length>0?F.join(",")||null:void 0}];else if(i(_))G=_;else{var Y=Object.keys(F);G=A?Y.sort(A):Y}var Z=C?String(y).replace(/\./g,"%2E"):String(y),j=b&&i(F)&&F.length===1?Z+"[]":Z;if(S&&i(F)&&F.length===0)return j+"[]";for(var z=0;z<G.length;++z){var K=G[z],ae=typeof K=="object"&&K&&typeof K.value<"u"?K.value:F[K];if(!(T&&ae===null)){var R=L&&C?String(K).replace(/\./g,"%2E"):String(K),be=i(F)?typeof x=="function"?x(j,R):j:j+(L?"."+R:"["+R+"]");V.set(h,O);var Ce=e();Ce.set(p,V),s(J,g(ae,be,x,b,S,w,T,C,x==="comma"&&M&&i(F)?null:k,_,A,L,N,$,I,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 y=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");x=h.format}var b=n.formatters[x],S=u.filter;(typeof h.filter=="function"||i(h.filter))&&(S=h.filter);var w;if(h.arrayFormat in o?w=h.arrayFormat:"indices"in h?w=h.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:x,formatter:b,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return xp=function(g,h){var y=g,x=m(h),b,S;typeof x.filter=="function"?(S=x.filter,y=S("",y)):i(x.filter)&&(S=x.filter,b=S);var w=[];if(typeof y!="object"||y===null)return"";var T=o[x.arrayFormat],C=T==="comma"&&x.commaRoundTrip;b||(b=Object.keys(y)),x.sort&&b.sort(x.sort);for(var k=e(),_=0;_<b.length;++_){var A=b[_],L=y[A];x.skipNulls&&L===null||s(w,f(L,A,T,C,x.allowEmptyArrays,x.strictNullHandling,x.skipNulls,x.encodeDotInKeys,x.encode?x.encoder:null,x.filter,x.sort,x.allowDots,x.serializeDate,x.format,x.formatter,x.encodeValuesOnly,x.charset,k))}var N=w.join(x.delimiter),$=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},xp}var wp,aS;function Tz(){if(aS)return wp;aS=1;var e=oS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,m){return String.fromCharCode(parseInt(m,10))})},i=function(p,f,m){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&m>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,m){var g={__proto__:null},h=m.ignoreQueryPrefix?f.replace(/^\?/,""):f;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=m.parameterLimit===1/0?void 0:m.parameterLimit,x=h.split(m.delimiter,m.throwOnLimitExceeded?y+1:y);if(m.throwOnLimitExceeded&&x.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var b=-1,S,w=m.charset;if(m.charsetSentinel)for(S=0;S<x.length;++S)x[S].indexOf("utf8=")===0&&(x[S]===s?w="utf-8":x[S]===a&&(w="iso-8859-1"),b=S,S=x.length);for(S=0;S<x.length;++S)if(S!==b){var T=x[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,_,A;k===-1?(_=m.decoder(T,r.decoder,w,"key"),A=m.strictNullHandling?null:""):(_=m.decoder(T.slice(0,k),r.decoder,w,"key"),A=e.maybeMap(i(T.slice(k+1),m,n(g[_])?g[_].length:0),function(N){return m.decoder(N,r.decoder,w,"value")})),A&&m.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),T.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var L=t.call(g,_);L&&m.duplicates==="combine"?g[_]=e.combine(g[_],A):(!L||m.duplicates==="last")&&(g[_]=A)}return g},c=function(p,f,m,g){var h=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");h=Array.isArray(f)&&f[y]?f[y].length:0}for(var x=g?f:i(f,m,h),b=p.length-1;b>=0;--b){var S,w=p[b];if(w==="[]"&&m.parseArrays)S=m.allowEmptyArrays&&(x===""||m.strictNullHandling&&x===null)?[]:e.combine([],x);else{S=m.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=m.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!m.parseArrays&&C===""?S={0:x}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&m.parseArrays&&k<=m.arrayLimit?(S=[],S[k]=x):C!=="__proto__"&&(S[C]=x)}x=S}return x},u=function(f,m,g,h){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,x=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=g.depth>0&&x.exec(y),w=S?y.slice(0,S.index):y,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=b.exec(y))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+y.slice(S.index)+"]")}return c(T,m,g,h)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:h,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return 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}:{},y=Object.keys(g),x=0;x<y.length;++x){var b=y[x],S=u(b,g[b],m,typeof p=="string");h=e.merge(h,S,m)}return m.allowSparse===!0?h:e.compact(h)},wp}var Sp,sS;function Ez(){if(sS)return Sp;sS=1;var e=Sz(),t=Tz(),n=yp();return Sp={formats:n,parse:t,stringify:e},Sp}var Cz=Ez(),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 lS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(lS||(lS={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ar=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},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 vn 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 vn))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()}}vn.create=e=>new vn(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 kz=Sa;function Tp(){return kz}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 Kt{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 Kt.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}),Qt=e=>({status:"valid",value:e}),cS=e=>e.status==="aborted",uS=e=>e.status==="dirty",pi=e=>e.status==="valid",gl=e=>typeof Promise<"u"&&e instanceof Promise;function vl(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 dS(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 fS=(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 vn(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 je{get description(){return this._def.description}_getType(t){return Ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Kt,ctx:{common:t.parent.common,data:t.data,parsedType:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(gl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},i=this._parseSync({data:t,path:o.path,parent:o});return fS(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return 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:Ar(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(gl(o)?o:Promise.resolve(o));return fS(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 er({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 tr.create(this,this._def)}nullable(){return co.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Hn.create(this)}promise(){return Pa.create(this,this._def)}or(t){return xl.create([this,t],this._def)}and(t){return wl.create(this,t,this._def)}transform(t){return new er({...Me(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new kl({...Me(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new gS({typeName:Ee.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Al({...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 Pl.create(this,t)}readonly(){return Il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Az=/^c[^\s-]{8,}$/i,Pz=/^[0-9a-z]+$/,Iz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_z=/^[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,Oz=/^[a-z0-9_-]{21}$/i,Mz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Dz=/^[-+]?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)?)??$/,Nz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Fz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cp;const Lz=/^(?:(?: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])$/,Vz=/^(?:(?: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])$/,$z=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,jz=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Bz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,pS="((\\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])))",Rz=new RegExp(`^${pS}$`);function hS(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 Hz(e){return new RegExp(`^${hS(e)}$`)}function Wz(e){let t=`${pS}T${hS(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 qz(e,t){return!!((t==="v4"||!t)&&Lz.test(e)||(t==="v6"||!t)&&$z.test(e))}function Uz(e,t){if(!Mz.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 Kz(e,t){return!!((t==="v4"||!t)&&Vz.test(e)||(t==="v6"||!t)&&jz.test(e))}class Xn extends je{_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 Kt;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")Nz.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(Fz,"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")_z.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")Oz.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")Az.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")Pz.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")Iz.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"?Wz(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"?Rz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{code:oe.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Hz(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"?Dz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"duration",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?qz(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"?Uz(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"?Kz(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"?zz.test(t.data)||(o=this._getOrReturnCtx(t,o),ue(o,{validation:"base64",code:oe.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Bz.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 Xn({...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 Xn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Xn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Xn({...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}}Xn.create=e=>{var t;return new Xn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function Yz(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 je{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 Kt;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"?Yz(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 je{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 Kt;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 je{_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 Qt(t.data)}}kp.create=e=>new kp({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class ka extends je{_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 Kt;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 Ap extends je{_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 Qt(t.data)}}Ap.create=e=>new Ap({typeName:Ee.ZodSymbol,...Me(e)});class yl extends je{_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 Qt(t.data)}}yl.create=e=>new yl({typeName:Ee.ZodUndefined,...Me(e)});class bl extends je{_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 Qt(t.data)}}bl.create=e=>new bl({typeName:Ee.ZodNull,...Me(e)});class Pp extends je{constructor(){super(...arguments),this._any=!0}_parse(t){return Qt(t.data)}}Pp.create=e=>new Pp({typeName:Ee.ZodAny,...Me(e)});class mi extends je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Qt(t.data)}}mi.create=e=>new mi({typeName:Ee.ZodUnknown,...Me(e)});class Pr extends je{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:oe.invalid_type,expected:fe.never,received:n.parsedType}),Pe}}Pr.create=e=>new Pr({typeName:Ee.ZodNever,...Me(e)});class Ip extends je{_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 Qt(t.data)}}Ip.create=e=>new Ip({typeName:Ee.ZodVoid,...Me(e)});class Hn extends je{_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=>Kt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rn(n,a,n.path,s)));return Kt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Hn({...this._def,minLength:{value:t,message:ye.toString(n)}})}max(t,n){return new Hn({...this._def,maxLength:{value:t,message:ye.toString(n)}})}length(t,n){return new Hn({...this._def,exactLength:{value:t,message:ye.toString(n)}})}nonempty(t){return this.min(1,t)}}Hn.create=(e,t)=>new Hn({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]=tr.create(gi(r))}return new wt({...e._def,shape:()=>t})}else return e instanceof Hn?new Hn({...e._def,type:gi(e.element)}):e instanceof tr?tr.create(gi(e.unwrap())):e instanceof co?co.create(gi(e.unwrap())):e instanceof Jn?Jn.create(e.items.map(t=>gi(t))):e}class wt extends je{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 Pr&&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 Pr){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=>Kt.mergeObjectSync(r,c)):Kt.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 tr;)i=i._def.innerType;n[r]=i}}),new wt({...this._def,shape:()=>n})}keyof(){return mS(qe.objectKeys(this.shape))}}wt.create=(e,t)=>new wt({shape:()=>e,unknownKeys:"strip",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.strictCreate=(e,t)=>new wt({shape:()=>e,unknownKeys:"strict",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)}),wt.lazycreate=(e,t)=>new wt({shape:e,unknownKeys:"strip",catchall:Pr.create(),typeName:Ee.ZodObject,...Me(t)});class xl extends je{_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 vn(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 vn(l));return ue(n,{code:oe.invalid_union,unionErrors:s}),Pe}}get options(){return this._def.options}}xl.create=(e,t)=>new xl({options:e,typeName:Ee.ZodUnion,...Me(t)});const Qn=e=>e instanceof Tl?Qn(e.schema):e instanceof er?Qn(e.innerType()):e instanceof El?[e.value]:e instanceof lo?e.options:e instanceof Cl?qe.objectValues(e.enum):e instanceof kl?Qn(e._def.innerType):e instanceof yl?[void 0]:e instanceof bl?[null]:e instanceof tr?[void 0,...Qn(e.unwrap())]:e instanceof co?[null,...Qn(e.unwrap())]:e instanceof gS||e instanceof Il?Qn(e.unwrap()):e instanceof Al?Qn(e._def.innerType):[];class _p extends je{_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=Qn(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 _p({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function Op(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=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 wl extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(cS(i)||cS(a))return Pe;const s=Op(i.value,a.value);return s.valid?((uS(i)||uS(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}))}}wl.create=(e,t,n)=>new wl({left:e,right:t,typeName:Ee.ZodIntersection,...Me(n)});class Jn extends je{_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=>Kt.mergeArray(n,a)):Kt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Jn({...this._def,rest:t})}}Jn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jn({items:e,typeName:Ee.ZodTuple,rest:null,...Me(t)})};class Sl extends je{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?Kt.mergeObjectAsync(n,o):Kt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof je?new Sl({keyType:t,valueType:n,typeName:Ee.ZodRecord,...Me(r)}):new Sl({keyType:Xn.create(),valueType:t,typeName:Ee.ZodRecord,...Me(n)})}}class Mp extends je{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 je{_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 Aa extends je{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 Pa){const s=this;return Qt(async function(...l){const c=new vn([]),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 Qt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new vn([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new vn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Aa({...this._def,args:Jn.create(t).rest(mi.create())})}returns(t){return new Aa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Aa({args:t||Jn.create([]).rest(mi.create()),returns:n||mi.create(),typeName:Ee.ZodFunction,...Me(r)})}}class Tl extends je{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})}}Tl.create=(e,t)=>new Tl({getter:e,typeName:Ee.ZodLazy,...Me(t)});class El extends je{_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}}El.create=(e,t)=>new El({value:e,typeName:Ee.ZodLiteral,...Me(t)});function mS(e,t){return new lo({values:e,typeName:Ee.ZodEnum,...Me(t)})}class lo extends je{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(vl(this,Ea)||dS(this,Ea,new Set(this._def.values)),!vl(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 Qt(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=mS;class Cl extends je{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(vl(this,Ca)||dS(this,Ca,new Set(qe.getValidEnumValues(this._def.values))),!vl(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 Qt(t.data)}get enum(){return this._def.values}}Ca=new WeakMap,Cl.create=(e,t)=>new Cl({values:e,typeName:Ee.ZodNativeEnum,...Me(t)});class Pa extends je{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 Qt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Pa.create=(e,t)=>new Pa({type:e,typeName:Ee.ZodPromise,...Me(t)});class er extends je{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)}}er.create=(e,t,n)=>new er({schema:e,typeName:Ee.ZodEffects,effect:t,...Me(n)}),er.createWithPreprocess=(e,t,n)=>new er({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,...Me(n)});class tr extends je{_parse(t){return this._getType(t)===fe.undefined?Qt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}tr.create=(e,t)=>new tr({innerType:e,typeName:Ee.ZodOptional,...Me(t)});class co extends je{_parse(t){return this._getType(t)===fe.null?Qt(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 kl extends je{_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}}kl.create=(e,t)=>new kl({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class Al extends je{_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 gl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new vn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new vn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Al.create=(e,t)=>new Al({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class Dp extends je{_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 gS extends je{_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 Pl extends je{_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 Pl({in:t,out:n,typeName:Ee.ZodPipeline})}}class Il extends je{_parse(t){const n=this._def.innerType._parse(t),r=o=>(pi(o)&&(o.value=Object.freeze(o.value)),o);return gl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Il.create=(e,t)=>new Il({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={})),Xn.create,so.create,Dp.create,hi.create,kp.create,ka.create,Ap.create,yl.create,bl.create,Pp.create,mi.create,Pr.create,Ip.create,Hn.create,wt.create,wt.strictCreate,xl.create,_p.create,wl.create,Jn.create,Sl.create,Mp.create,vi.create,Aa.create,Tl.create,El.create,lo.create,Cl.create,Pa.create,er.create,tr.create,co.create,er.createWithPreprocess,Pl.create;const Gz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},Zz=(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]}}},vS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),sn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):vS(t),o=structuredClone(e);return Zz(o,r,n),o},Xz=(e,t)=>e.localeCompare(t),yi={},yS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return bS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=yS(e._def.innerType);return t==="ZodArray"?n??[]:n}},bS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,yS(n)])),xS=(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]=xS(i,o):n[r]=o||i)}return n},Qz={sort:Xz,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},wS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return Cz.parse(n.toString(),Qz)},Ir=(e,t)=>vS(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),_r=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 _r(e);const n=document.querySelector(`[data-origin="${t}"]`);return _r(n||e)},Jz={state:{},loading:!1,useOnChange:!1},SS=e=>e.dataset.target||e.name,eB=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=wa.LocalStorage.get(t);return Gz(n)?n:{}},clear:()=>void wa.LocalStorage.delete(t),set:n=>wa.LocalStorage.set(t,n)}},tB=(e,t,n=Jz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Le.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??bS(e)??{}),l=E.useCallback(b=>{var A;const S=b.target,w=b.currentTarget;if(S.dataset.optional==="true")return;const C=SS(S),k=Np(S)||(w?_r(w):""),_=Ir(C,e);if(S.setAttribute("data-initialized","true"),_){const L=_.safeParse(k),N=L.success?void 0:((A=L.error.issues[0])==null?void 0:A.message)??"";o($=>sn($??{},C,N))}},[e]),c=E.useCallback(b=>S=>{const w=S.currentTarget,T=Object.values(i.current).reduce((k,_)=>{var I;const A=_.element,L=_.schema.safeParse(_r(A));if(A.dataset.ignore==="ignore"||L.success)return k;const N=(I=L.error.issues[0])==null?void 0:I.message;A.setAttribute("data-initialized","true");const $=A.dataset.name||A.name||"";return sn(k,$,N)},{}),C=Le.empty(T)?null:T;o(C),console.error(C),b==null||b({form:w,errors:C||{}})},[]),u=(b,S=yi)=>{const w=Ir(b,e),T=C=>{var _;if(!Ku(C))return;s(A=>sn(A,b,C.toISOString())),o(A=>sn(A,b,void 0));const k=i.current[b].element;if(k){const A=k.getAttribute("data-origin"),L=document.querySelector(`input[data-target="${A}"]`);L&&L.setCustomValidity("")}(_=S==null?void 0:S.onChange)==null||_.call(S,C)};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,date:Le.string(a[b])?new Date(a[b]):a[b],required:S.required??!w.isOptional(),error:Pn(r,b),ref:C=>{C!==null&&(i.current[b]={element:C,schema:w})}}},d=(b,S=yi)=>{const w=Ir(b,e);return{...S,name:b,id:b,onChange:C=>{var _;const k=C.target.value;s(A=>sn(A,b,k)),(_=S==null?void 0:S.onChange)==null||_.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Pn(r,b,void 0),value:Pn(a,b,void 0)??"",required:S.required??!w.isOptional(),ref:C=>C!==null?i.current[b]={element:C,schema:w}:void 0}},p=(b,S=yi)=>{const w=Ir(b,e);return{...S,name:b,id:b,onChange:C=>{var _;const k=C.target.checked;s(A=>sn(A??{},b,k)),(_=S==null?void 0:S.onChange)==null||_.call(S,C)},form:t,loading:n.loading,onInvalid:l,error:Pn(r,b,void 0),required:S.required??!w.isOptional(),ref:C=>C!==null?void(i.current[b]={element:C,schema:w}):void 0}},f=(b,S=yi)=>{const w=Ir(b,e),T=C=>{var _,A;(_=C.persist)==null||_.call(C);const k=C.target.value;(A=S==null?void 0:S.onChange)==null||A.call(S,C),s(L=>sn(L,b,k))};return{...S,loading:n.loading,name:b,id:b,onChange:T,form:t,onInvalid:l,error:Pn(r,b,void 0),required:S.required??!w.isOptional(),value:Pn(a,b,void 0)||(S==null?void 0:S.value)||"",type:Le.instance(w,so)?"number":(S==null?void 0:S.type)??"text",ref:C=>C===null?void 0:i.current[b]={element:C,schema:w}}},m=(b,S=yi)=>{const w=Ir(b,e);return{...S,name:b,id:b,onChangeOptions:C=>{s(k=>sn(k,b,C))},form:t,loading:n.loading,onInvalid:l,error:Pn(r,b,void 0),required:S.required??!w.isOptional(),value:Pn(a,b,void 0)||(S==null?void 0:S.value)||[],ref:C=>C===null?void 0:void(i.current[b]={element:C,schema:w})}},g=(b,S=yi)=>{const w=Ir(b,e),T=w._def.typeName==="ZodNumber";return{...S,name:b,id:b,onChange:k=>{var A,L;(A=k.persist)==null||A.call(k);const _=T?k.target.valueAsNumber:k.target.value;(L=S==null?void 0:S.onChange)==null||L.call(S,k),s(N=>sn(N,b,_))},form:t,loading:n.loading,onInvalid:l,error:Pn(r,b,void 0),required:S.required??!w.isOptional(),type:T?"number":(S==null?void 0:S.type)??"text",value:Pn(a,b,void 0)||(S==null?void 0:S.value)||"",ref:k=>k===null?void 0:void(i.current[b]={element:k,schema:w})}};E.useEffect(()=>{const b=Object.values(i.current).map(w=>{const T=w.element.dataset.origin?document.querySelector(`[data-target="${w.element.name}"]`):w.element,C=w.schema.safeParse(_r(T)),k=N=>{var V;const $=SS(N.target);if(!$)return!1;const I=N.target,M=Np(N.target)||(N.relatedTarget?_r(N.relatedTarget):""),D=w.schema.safeParse(M);if(I.setAttribute("value",M),D.success)return T.setCustomValidity&&T.setCustomValidity(""),o(F=>{if(Le.null(F))return null;const H=sn(F,$,void 0);return Le.empty(F)||Le.nil(F)||Le.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(Le.null(H))return null;const O=sn(H,$,F||void 0);return Le.empty(O)?null:O})}return!1},_=new AbortController,A=T.getAttribute("data-trigger")||"blur";T.addEventListener(A,k,{signal:_.signal});const L=T.dataset.shadow?!1:T.required?!C.success:!1;return{input:w,hasInitialError:L,unsubscribe:()=>_.abort()}});return b.some(w=>w.hasInitialError)&&o(w=>w===null?{}:w),()=>b.forEach(w=>w.unsubscribe())});const h=b=>S=>{var L;S.preventDefault();const w=S.currentTarget;let T=wS(w);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(w.elements)).forEach(N=>{if(N.tagName==="SELECT"){const $=N;T=sn(T,$.name,$.value)}if(N.tagName==="INPUT"){const $=N,I=Np($)||($?_r($):"");T=sn(T,$.dataset.target||$.name,I)}});const k=xS(T,a),_=e.safeParse(k),A=()=>{var N;tS(w),(N=n.interceptor)==null||N.clear()};if(_.success){const N=JSON.stringify(_.data);return w.setAttribute("data-json",N),(L=n.interceptor)==null||L.clear(),b==null?void 0:b(S,{form:w,event:S,reset:A,setErrors:o,errors:[],success:!0,data:_.data,json:_.data})}return console.group("useForm error"),console.info(_),console.info(_.error.issues),console.error(_.error),console.groupEnd(),w.reportValidity(),b==null?void 0:b(S,{form:w,json:T,event:S,reset:A,setErrors:o,data:T,success:!1,errors:_.error.issues.map(N=>({message:N.message,path:N.path.map($=>String($))}))})},y=b=>dd(a,b)||"",x=b=>({...b,id:t,name:t});return E.useEffect(()=>{var b;n.interceptor&&((b=n.interceptor)==null||b.set(a))},[a]),{get:y,input:g,state:a,errors:r,select:d,checkbox:p,onSubmit:h,setState:s,textarea:f,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:m,disabled:r!==null}},nB=e=>e?JSON.parse(e.getAttribute("data-json")):{},rB=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},TS={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},ES={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},CS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},oB={name:"dark",zIndex:CS,rounded:TS,spacing:ES,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%)"}}}},iB={rounded:TS,spacing:ES,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:CS,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%)"}}}},aB=oB,sB=iB,lB=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...gs,...e.tweaks},parser:e.parser||ps.hsla,map:{...ms,...e.map}}),[e]);return v.jsx(Vo.Provider,{value:t,children:e.children})},cB=()=>{const e=E.useContext(Vo);return e?e.parser:ps.hsla};ee.Alert=YI,ee.Autocomplete=OV,ee.Button=Na,ee.Calendar=Ab,ee.Card=md,ee.Checkbox=Wf,ee.ColType=fi,ee.Collapse=ky,ee.CommandPalette=jF,ee.ComponentsProvider=lB,ee.Context=Vo,ee.DatePicker=NV,ee.Dict=wn,ee.Dropdown=ni,ee.Empty=Pb,ee.Expand=zF,ee.FileUpload=X$,ee.Form=Q$,ee.Input=ba,ee.InputFeedback=Kw,ee.InputField=ya,ee.Menu=HF,ee.MenuItem=RF,ee.Modal=pf,ee.MultiSelect=ij,ee.Notifications=bN,ee.Polymorph=cn,ee.Progress=xN,ee.Radiobox=aj,ee.RenderOnView=aE,ee.Select=ao,ee.Slider=lj,ee.Stats=wN,ee.Switch=cj,ee.Tab=CN,ee.Table=xz,ee.Tabs=TN,ee.Tag=Fa,ee.TaskList=uj,ee.Textarea=dj,ee.Timeline=kN,ee.TimelineItem=Es,ee.Toolbar=WF,ee.Tooltip=mf,ee.TransferList=hj,ee.createColumns=jj,ee.createCssProperties=NM,ee.createDesignTokens=mb,ee.createFormStorage=eB,ee.createOptionCols=pp,ee.createStyles=OM,ee.createTheme=DM,ee.createTokenStyles=FM,ee.css=ke,ee.defaultDarkTheme=aB,ee.defaultLightTheme=sB,ee.defaultTranslations=ms,ee.defaultTweaks=gs,ee.dispatchInput=rm,ee.formReset=tS,ee.formToJson=wS,ee.getCoords=nE,ee.getJsonForm=nB,ee.getModalScrollerRef=Wj,ee.getRemainingSize=Ti,ee.getSchemaShape=Ir,ee.hasVerticalScroll=om,ee.initializeInputDataset=Si,ee.isMobile=wb,ee.isReactComponent=tE,ee.isReactFC=Pc,ee.isSsr=ur,ee.mergeRefs=qn,ee.negate=LM,ee.noop=pd,ee.parsers=ps,ee.path=dd,ee.reduceTokens=cr,ee.safeRegex=fd,ee.splitInto=xb,ee.useColorParser=cB,ee.useForm=tB,ee.useLocale=ud,ee.useNotification=vN,ee.usePrevious=rB,ee.useReactive=Cx,ee.useStableRef=rr,ee.useSwipe=vb,ee.useTablePreferences=Rj,ee.useTranslations=Ct,ee.uuid=$o,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
247
247
  //# sourceMappingURL=index.umd.js.map