@g4rcez/components 2.3.0 → 3.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 (51) hide show
  1. package/dist/components/core/button.jsx +1 -1
  2. package/dist/components/core/tag.d.ts +1 -1
  3. package/dist/components/core/tag.d.ts.map +1 -1
  4. package/dist/components/core/tag.jsx +2 -2
  5. package/dist/components/display/timeline.jsx +1 -1
  6. package/dist/components/floating/command-palette.jsx +12 -12
  7. package/dist/components/floating/modal.jsx +1 -1
  8. package/dist/components/index.d.ts +1 -0
  9. package/dist/components/index.d.ts.map +1 -1
  10. package/dist/components/index.js +1 -0
  11. package/dist/components/page-calendar/calendar-header.d.ts.map +1 -1
  12. package/dist/components/page-calendar/calendar-header.jsx +13 -13
  13. package/dist/components/page-calendar/day-view.d.ts.map +1 -1
  14. package/dist/components/page-calendar/day-view.jsx +5 -2
  15. package/dist/components/page-calendar/event-pill.d.ts.map +1 -1
  16. package/dist/components/page-calendar/event-pill.jsx +4 -2
  17. package/dist/components/page-calendar/month-view.d.ts.map +1 -1
  18. package/dist/components/page-calendar/month-view.jsx +5 -5
  19. package/dist/components/page-calendar/page-calendar.d.ts.map +1 -1
  20. package/dist/components/page-calendar/page-calendar.jsx +3 -1
  21. package/dist/components/page-calendar/week-view.d.ts.map +1 -1
  22. package/dist/components/page-calendar/week-view.jsx +6 -3
  23. package/dist/components/table/index.jsx +1 -1
  24. package/dist/components/table/inner-table.jsx +2 -2
  25. package/dist/components/table/thead.jsx +1 -1
  26. package/dist/config/default-translations.d.ts +7 -0
  27. package/dist/config/default-translations.d.ts.map +1 -1
  28. package/dist/config/default-translations.jsx +7 -0
  29. package/dist/hooks/use-form.d.ts.map +1 -1
  30. package/dist/hooks/use-form.js +1 -0
  31. package/dist/hooks/use-previous.d.ts.map +1 -1
  32. package/dist/hooks/use-previous.js +1 -0
  33. package/dist/hooks/use-reactive.d.ts.map +1 -1
  34. package/dist/hooks/use-reactive.js +1 -0
  35. package/dist/hooks/use-stable-ref.d.ts.map +1 -1
  36. package/dist/hooks/use-stable-ref.js +1 -0
  37. package/dist/hooks/use-swipe.d.ts.map +1 -1
  38. package/dist/hooks/use-swipe.js +1 -0
  39. package/dist/hooks/use-translations.d.ts +7 -0
  40. package/dist/hooks/use-translations.d.ts.map +1 -1
  41. package/dist/index.css +1 -1
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +5734 -5704
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/index.umd.js +16 -16
  46. package/dist/index.umd.js.map +1 -1
  47. package/dist/preset/src/styles/dark.js +117 -117
  48. package/dist/preset/src/styles/light.js +109 -109
  49. package/dist/styles/dark.js +117 -117
  50. package/dist/styles/light.js +109 -109
  51. package/package.json +5 -3
package/dist/index.umd.js CHANGED
@@ -1,28 +1,28 @@
1
- (function(re,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(re=typeof globalThis<"u"?globalThis:re||self,S(re.components={},re.React,re["react/jsx-runtime"],re.ReactDOM))})(this,(function(re,S,h,qi){"use strict";function hm(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=hm(S),ur=hm(qi);function mm(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=mm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gm(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mm(e))&&(r&&(r+=" "),r+=t);return r}const ym=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vm=gm,_o=(e,t)=>n=>{var r;if(t?.variants==null)return vm(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=ym(u)||ym(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(g=>{let[y,m]=g;return Array.isArray(m)?m.includes({...i,...a}[y]):{...i,...a}[y]===m})?[...c,d,f]:c},[]);return vm(e,s,l,n?.class,n?.className)};var bm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fk(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var _c,wm;function Fo(){return wm||(wm=1,_c=TypeError),_c}const Lk=Fk(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Fc,Sm;function da(){if(Sm)return Fc;Sm=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,s=o&&i&&typeof i.get=="function"?i.get:null,a=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,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,k=Array.prototype.join,A=Array.prototype.slice,O=Math.floor,_=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,D=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function C(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||I.call(/e/,K))return K;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var Ue=W<0?-O(-W):O(W);if(Ue!==W){var Ye=String(Ue),$e=b.call(K,Ye.length+1);return x.call(Ye,Oe,"$&_")+"."+x.call(x.call($e,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Oe,"$&_")}var V=Lk,L=V.custom,R=ce(L)?L:null,U={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Fc=function W(K,Oe,Ue,Ye){var $e=Oe||{};if(oe($e,"quoteStyle")&&!oe(U,$e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(oe($e,"maxStringLength")&&(typeof $e.maxStringLength=="number"?$e.maxStringLength<0&&$e.maxStringLength!==1/0:$e.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=oe($e,"customInspect")?$e.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(oe($e,"indent")&&$e.indent!==null&&$e.indent!==" "&&!(parseInt($e.indent,10)===$e.indent&&$e.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(oe($e,"numericSeparator")&&typeof $e.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var gt=$e.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return me(K,$e);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var it=String(K);return gt?C(K,it):it}if(typeof K=="bigint"){var wn=String(K)+"n";return gt?C(K,wn):wn}var to=typeof $e.depth>"u"?5:$e.depth;if(typeof Ue>"u"&&(Ue=0),Ue>=to&&to>0&&typeof K=="object")return te(K)?"[Array]":"[Object]";var no=_t($e,Ue);if(typeof Ye>"u")Ye=[];else if(le(Ye,K)>=0)return"[Circular]";function Pn(Wi,Mc,$W){if(Mc&&(Ye=A.call(Ye),Ye.push(Mc)),$W){var _k={depth:$e.depth};return oe($e,"quoteStyle")&&(_k.quoteStyle=$e.quoteStyle),W(Wi,_k,Ue+1,Ye)}return W(Wi,$e,Ue+1,Ye)}if(typeof K=="function"&&!Y(K)){var Ri=ie(K),Hi=Be(K,Pn);return"[Function"+(Ri?": "+Ri:" (anonymous)")+"]"+(Hi.length>0?" { "+k.call(Hi,", ")+" }":"")}if(ce(K)){var Pk=D?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(K);return typeof K=="object"&&!D?ke(Pk):Pk}if(X(K)){for(var ua="<"+E.call(String(K.nodeName)),am=K.attributes||[],Nc=0;Nc<am.length;Nc++)ua+=" "+am[Nc].name+"="+H(ee(am[Nc].value),"double",$e);return ua+=">",K.childNodes&&K.childNodes.length&&(ua+="..."),ua+="</"+E.call(String(K.nodeName))+">",ua}if(te(K)){if(K.length===0)return"[]";var lm=Be(K,Pn);return no&&!ct(lm)?"["+Qt(lm,no)+"]":"[ "+k.call(lm,", ")+" ]"}if(Z(K)){var cm=Be(K,Pn);return!("cause"in Error.prototype)&&"cause"in K&&!z.call(K,"cause")?"{ ["+String(K)+"] "+k.call(w.call("[cause]: "+Pn(K.cause),cm),", ")+" }":cm.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+k.call(cm,", ")+" }"}if(typeof K=="object"&&ot){if(R&&typeof K[R]=="function"&&V)return V(K,{depth:to-Ue});if(ot!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(be(K)){var Ok=[];return r&&r.call(K,function(Wi,Mc){Ok.push(Pn(Mc,K,!0)+" => "+Pn(Wi,K))}),_e("Map",n.call(K),Ok,no)}if(J(K)){var Dk=[];return a&&a.call(K,function(Wi){Dk.push(Pn(Wi,K))}),_e("Set",s.call(K),Dk,no)}if(de(K))return Me("WeakMap");if(j(K))return Me("WeakSet");if(ne(K))return Me("WeakRef");if(B(K))return ke(Pn(Number(K)));if(Q(K))return ke(Pn(_.call(K)));if(ae(K))return ke(g.call(K));if(pe(K))return ke(Pn(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof bm<"u"&&K===bm)return"{ [object globalThis] }";if(!q(K)&&!Y(K)){var um=Be(K,Pn),Nk=M?M(K)===Object.prototype:K instanceof Object||K.constructor===Object,dm=K instanceof Object?"":"null prototype",Mk=!Nk&&F&&Object(K)===K&&F in K?b.call(he(K),8,-1):dm?"Object":"",VW=Nk||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",fm=VW+(Mk||dm?"["+k.call(w.call([],Mk||[],dm||[]),": ")+"] ":"");return um.length===0?fm+"{}":no?fm+"{"+Qt(um,no)+"}":fm+"{ "+k.call(um,", ")+" }"}return String(K)};function H(W,K,Oe){var Ue=Oe.quoteStyle||K,Ye=U[Ue];return Ye+W+Ye}function ee(W){return x.call(String(W),/"/g,"&quot;")}function se(W){return!F||!(typeof W=="object"&&(F in W||typeof W[F]<"u"))}function te(W){return he(W)==="[object Array]"&&se(W)}function q(W){return he(W)==="[object Date]"&&se(W)}function Y(W){return he(W)==="[object RegExp]"&&se(W)}function Z(W){return he(W)==="[object Error]"&&se(W)}function pe(W){return he(W)==="[object String]"&&se(W)}function B(W){return he(W)==="[object Number]"&&se(W)}function ae(W){return he(W)==="[object Boolean]"&&se(W)}function ce(W){if(D)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 Q(W){if(!W||typeof W!="object"||!_)return!1;try{return _.call(W),!0}catch{}return!1}var ue=Object.prototype.hasOwnProperty||function(W){return W in this};function oe(W,K){return ue.call(W,K)}function he(W){return y.call(W)}function ie(W){if(W.name)return W.name;var K=v.call(m.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function le(W,K){if(W.indexOf)return W.indexOf(K);for(var Oe=0,Ue=W.length;Oe<Ue;Oe++)if(W[Oe]===K)return Oe;return-1}function be(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{s.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 ne(W){if(!p||!W||typeof W!="object")return!1;try{return p.call(W),!0}catch{}return!1}function J(W){if(!s||!W||typeof W!="object")return!1;try{s.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function j(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function X(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function me(W,K){if(W.length>K.maxStringLength){var Oe=W.length-K.maxStringLength,Ue="... "+Oe+" more character"+(Oe>1?"s":"");return me(b.call(W,0,K.maxStringLength),K)+Ue}var Ye=G[K.quoteStyle||"single"];Ye.lastIndex=0;var $e=x.call(x.call(W,Ye,"\\$1"),/[\x00-\x1f]/g,ve);return H($e,"single",K)}function ve(W){var K=W.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Oe?"\\"+Oe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function ke(W){return"Object("+W+")"}function Me(W){return W+" { ? }"}function _e(W,K,Oe,Ue){var Ye=Ue?Qt(Oe,Ue):k.call(Oe,", ");return W+" ("+K+") {"+Ye+"}"}function ct(W){for(var K=0;K<W.length;K++)if(le(W[K],`
2
- `)>=0)return!1;return!0}function _t(W,K){var Oe;if(W.indent===" ")Oe=" ";else if(typeof W.indent=="number"&&W.indent>0)Oe=k.call(Array(W.indent+1)," ");else return null;return{base:Oe,prev:k.call(Array(K+1),Oe)}}function Qt(W,K){if(W.length===0)return"";var Oe=`
3
- `+K.prev+K.base;return Oe+k.call(W,","+Oe)+`
4
- `+K.prev}function Be(W,K){var Oe=te(W),Ue=[];if(Oe){Ue.length=W.length;for(var Ye=0;Ye<W.length;Ye++)Ue[Ye]=oe(W,Ye)?K(W[Ye],W):""}var $e=typeof N=="function"?N(W):[],ot;if(D){ot={};for(var gt=0;gt<$e.length;gt++)ot["$"+$e[gt]]=$e[gt]}for(var it in W)oe(W,it)&&(Oe&&String(Number(it))===it&&it<W.length||D&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ue.push(K(it,W)+": "+K(W[it],W)):Ue.push(it+": "+K(W[it],W))));if(typeof N=="function")for(var wn=0;wn<$e.length;wn++)z.call(W,$e[wn])&&Ue.push("["+K($e[wn])+"]: "+K(W[$e[wn]],W));return Ue}return Fc}var Lc,Tm;function Vk(){if(Tm)return Lc;Tm=1;var e=da(),t=Fo(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return Lc=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,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},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},Lc}var Vc,Em;function km(){return Em||(Em=1,Vc=Object),Vc}var $c,Cm;function $k(){return Cm||(Cm=1,$c=Error),$c}var zc,Im;function zk(){return Im||(Im=1,zc=EvalError),zc}var jc,Am;function jk(){return Am||(Am=1,jc=RangeError),jc}var Bc,Pm;function Bk(){return Pm||(Pm=1,Bc=ReferenceError),Bc}var Rc,Om;function Rk(){return Om||(Om=1,Rc=SyntaxError),Rc}var Hc,Dm;function Hk(){return Dm||(Dm=1,Hc=URIError),Hc}var Wc,Nm;function Wk(){return Nm||(Nm=1,Wc=Math.abs),Wc}var qc,Mm;function qk(){return Mm||(Mm=1,qc=Math.floor),qc}var Uc,_m;function Uk(){return _m||(_m=1,Uc=Math.max),Uc}var Gc,Fm;function Gk(){return Fm||(Fm=1,Gc=Math.min),Gc}var Yc,Lm;function Yk(){return Lm||(Lm=1,Yc=Math.pow),Yc}var Kc,Vm;function Kk(){return Vm||(Vm=1,Kc=Math.round),Kc}var Zc,$m;function Zk(){return $m||($m=1,Zc=Number.isNaN||function(t){return t!==t}),Zc}var Xc,zm;function Xk(){if(zm)return Xc;zm=1;var e=Zk();return Xc=function(n){return e(n)||n===0?n:n<0?-1:1},Xc}var Qc,jm;function Qk(){return jm||(jm=1,Qc=Object.getOwnPropertyDescriptor),Qc}var Jc,Bm;function Rm(){if(Bm)return Jc;Bm=1;var e=Qk();if(e)try{e([],"length")}catch{e=null}return Jc=e,Jc}var eu,Hm;function Jk(){if(Hm)return eu;Hm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return eu=e,eu}var tu,Wm;function eC(){return Wm||(Wm=1,tu=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 s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),tu}var nu,qm;function tC(){if(qm)return nu;qm=1;var e=typeof Symbol<"u"&&Symbol,t=eC();return nu=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},nu}var ru,Um;function Gm(){return Um||(Um=1,ru=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ru}var ou,Ym;function Km(){if(Ym)return ou;Ym=1;var e=km();return ou=e.getPrototypeOf||null,ou}var iu,Zm;function nC(){if(Zm)return iu;Zm=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 f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return iu=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,f=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),g=[],y=0;y<p;y++)g[y]="$"+y;if(d=Function("binder","return function ("+s(g,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},iu}var su,Xm;function fa(){if(Xm)return su;Xm=1;var e=nC();return su=Function.prototype.bind||e,su}var au,Qm;function lu(){return Qm||(Qm=1,au=Function.prototype.call),au}var cu,Jm;function eg(){return Jm||(Jm=1,cu=Function.prototype.apply),cu}var uu,tg;function rC(){return tg||(tg=1,uu=typeof Reflect<"u"&&Reflect&&Reflect.apply),uu}var du,ng;function oC(){if(ng)return du;ng=1;var e=fa(),t=eg(),n=lu(),r=rC();return du=r||e.call(n,t),du}var fu,rg;function og(){if(rg)return fu;rg=1;var e=fa(),t=Fo(),n=lu(),r=oC();return fu=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},fu}var pu,ig;function iC(){if(ig)return pu;ig=1;var e=og(),t=Rm(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return pu=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,pu}var hu,sg;function sC(){if(sg)return hu;sg=1;var e=Gm(),t=Km(),n=iC();return hu=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,hu}var mu,ag;function aC(){if(ag)return mu;ag=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=fa();return mu=n.call(e,t),mu}var gu,lg;function yu(){if(lg)return gu;lg=1;var e,t=km(),n=$k(),r=zk(),o=jk(),i=Bk(),s=Rk(),a=Fo(),l=Hk(),c=Wk(),u=qk(),d=Uk(),f=Gk(),p=Yk(),g=Kk(),y=Xk(),m=Function,v=function(Y){try{return m('"use strict"; return ('+Y+").constructor;")()}catch{}},b=Rm(),x=Jk(),T=function(){throw new a},E=b?(function(){try{return arguments.callee,T}catch{try{return b(arguments,"callee").get}catch{return T}}})():T,I=tC()(),w=sC(),k=Km(),A=Gm(),O=eg(),_=lu(),N={},$=typeof Uint8Array>"u"||!w?e:w(Uint8Array),D={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][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%":m,"%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%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":E,"%TypedArray%":$,"%TypeError%":a,"%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%":_,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(Y){var F=w(w(Y));D["%Error.prototype%"]=F}var z=function Y(Z){var pe;if(Z==="%AsyncFunction%")pe=v("async function () {}");else if(Z==="%GeneratorFunction%")pe=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")pe=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var B=Y("%AsyncGeneratorFunction%");B&&(pe=B.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ae=Y("%AsyncGenerator%");ae&&w&&(pe=w(ae.prototype))}return D[Z]=pe,pe},M={__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"]},C=fa(),V=aC(),L=C.call(_,Array.prototype.concat),R=C.call(O,Array.prototype.splice),U=C.call(_,String.prototype.replace),G=C.call(_,String.prototype.slice),H=C.call(_,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,se=/\\(\\)?/g,te=function(Z){var pe=G(Z,0,1),B=G(Z,-1);if(pe==="%"&&B!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&pe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ae=[];return U(Z,ee,function(ce,Q,ue,oe){ae[ae.length]=ue?U(oe,se,"$1"):Q||ce}),ae},q=function(Z,pe){var B=Z,ae;if(V(M,B)&&(ae=M[B],B="%"+ae[0]+"%"),V(D,B)){var ce=D[B];if(ce===N&&(ce=z(B)),typeof ce>"u"&&!pe)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ae,name:B,value:ce}}throw new s("intrinsic "+Z+" does not exist!")};return gu=function(Z,pe){if(typeof Z!="string"||Z.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,Z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=te(Z),ae=B.length>0?B[0]:"",ce=q("%"+ae+"%",pe),Q=ce.name,ue=ce.value,oe=!1,he=ce.alias;he&&(ae=he[0],R(B,L([0,1],he)));for(var ie=1,le=!0;ie<B.length;ie+=1){var be=B[ie],de=G(be,0,1),ne=G(be,-1);if((de==='"'||de==="'"||de==="`"||ne==='"'||ne==="'"||ne==="`")&&de!==ne)throw new s("property names with quotes must have matching quotes");if((be==="constructor"||!le)&&(oe=!0),ae+="."+be,Q="%"+ae+"%",V(D,Q))ue=D[Q];else if(ue!=null){if(!(be in ue)){if(!pe)throw new a("base intrinsic for "+Z+" exists, but the property is not available.");return}if(b&&ie+1>=B.length){var J=b(ue,be);le=!!J,le&&"get"in J&&!("originalValue"in J.get)?ue=J.get:ue=ue[be]}else le=V(ue,be),ue=ue[be];le&&!oe&&(D[Q]=ue)}}return ue},gu}var vu,cg;function ug(){if(cg)return vu;cg=1;var e=yu(),t=og(),n=t([e("%String.prototype.indexOf%")]);return vu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},vu}var bu,dg;function fg(){if(dg)return bu;dg=1;var e=yu(),t=ug(),n=da(),r=Fo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return bu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var g=l(d,p);return c(d)===0&&(d=void 0),g}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?a(d,p):!1},set:function(p,g){d||(d=new o),s(d,p,g)}};return f},bu}var xu,pg;function lC(){if(pg)return xu;pg=1;var e=yu(),t=ug(),n=da(),r=fg(),o=Fo(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return xu=i?function(){var d,f,p={assert:function(g){if(!p.has(g))throw new o("Side channel does not contain "+n(g))},delete:function(g){if(i&&g&&(typeof g=="object"||typeof g=="function")){if(d)return c(d,g)}else if(r&&f)return f.delete(g);return!1},get:function(g){return i&&g&&(typeof g=="object"||typeof g=="function")&&d?s(d,g):f&&f.get(g)},has:function(g){return i&&g&&(typeof g=="object"||typeof g=="function")&&d?l(d,g):!!f&&f.has(g)},set:function(g,y){i&&g&&(typeof g=="object"||typeof g=="function")?(d||(d=new i),a(d,g,y)):r&&(f||(f=r()),f.set(g,y))}};return p}:r,xu}var wu,hg;function mg(){if(hg)return wu;hg=1;var e=Fo(),t=da(),n=Vk(),r=fg(),o=lC(),i=o||r||n;return wu=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},wu}var gg=e=>Array.isArray(e),Su=e=>e===void 0,Tu=e=>e===null,cC=Function.bind.call(Function.call,Object.prototype.toString),uC=e=>!!e&&cC(e)==="[object Error]"||e instanceof Error,yg=(e,t)=>e instanceof t,dC=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},fC=e=>Object.prototype.toString.call(e)==="[object Date]"&&yg(e,Date),Re={array:gg,date:fC,empty:e=>Tu(e)||Su(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:yg,isError:uC,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Tu(e)||Su(e),null:Tu,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!gg(e)&&typeof e=="object",primitive:dC,string:e=>typeof e=="string",undefined:Su},pC=e=>Object.keys(e),Hn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},hC=e=>e.replace(/[^0-9]/g,"");const mC=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},gC=(e,t)=>({classGroupId:e,validator:t}),vg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),pa="-",bg=[],yC="arbitrary..",vC=e=>{const t=xC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return bC(s);const a=s.split(pa),l=a[0]===""&&a.length>1?1:0;return xg(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?mC(c,l):l:c||bg}return n[s]||bg}}},xg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=xg(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(pa):e.slice(t).join(pa),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},bC=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?yC+r:void 0})(),xC=e=>{const{theme:t,classGroups:n}=e;return wC(n,t)},wC=(e,t)=>{const n=vg();for(const r in e){const o=e[r];Eu(o,n,r,t)}return n},Eu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];SC(s,t,n,r)}},SC=(e,t,n,r)=>{if(typeof e=="string"){TC(e,t,n);return}if(typeof e=="function"){EC(e,t,n,r);return}kC(e,t,n,r)},TC=(e,t,n)=>{const r=e===""?t:wg(t,e);r.classGroupId=n},EC=(e,t,n,r)=>{if(CC(e)){Eu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(gC(n,e))},kC=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Eu(l,wg(t,a),n,r)}},wg=(e,t)=>{let n=e;const r=t.split(pa),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=vg(),n.nextPart.set(s,a)),n=a}return n},CC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,IC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},ku="!",Sg=":",AC=[],Tg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),PC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let y=0;y<u;y++){const m=o[y];if(s===0&&a===0){if(m===Sg){i.push(o.slice(l,y)),l=y+1;continue}if(m==="/"){c=y;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(ku)?(f=d.slice(0,-1),p=!0):d.startsWith(ku)&&(f=d.slice(1),p=!0);const g=c&&c>l?c-l:void 0;return Tg(i,p,f,g)};if(t){const o=t+Sg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Tg(AC,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},OC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},DC=e=>({cache:IC(e.cacheSize),parseClassName:PC(e),sortModifiers:OC(e),...vC(e)}),NC=/\s+/,MC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(NC);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!y,v=r(m?g.substring(0,y):g);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(g),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+ku:b,T=x+v;if(s.indexOf(T)>-1)continue;s.push(T);const E=o(v,m);for(let I=0;I<E.length;++I){const w=E[I];s.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},_C=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Eg(n))&&(o&&(o+=" "),o+=r);return o},Eg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Eg(e[r]))&&(n&&(n+=" "),n+=t);return n},FC=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=DC(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=MC(l,n);return o(l,u),u};return i=s,(...l)=>i(_C(...l))},LC=[],$t=e=>{const t=n=>n[e]||LC;return t.isThemeGetter=!0,t},kg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VC=/^\d+\/\d+$/,$C=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zC=/\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$/,jC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,BC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lo=e=>VC.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),Cu=e=>e.endsWith("%")&&qe(e.slice(0,-1)),dr=e=>$C.test(e),HC=()=>!0,WC=e=>zC.test(e)&&!jC.test(e),Ig=()=>!1,qC=e=>BC.test(e),UC=e=>RC.test(e),GC=e=>!Se(e)&&!Te(e),YC=e=>Vo(e,Ng,Ig),Se=e=>kg.test(e),ro=e=>Vo(e,Mg,WC),Iu=e=>Vo(e,JC,qe),Ag=e=>Vo(e,Og,Ig),KC=e=>Vo(e,Dg,UC),ha=e=>Vo(e,_g,qC),Te=e=>Cg.test(e),Ui=e=>$o(e,Mg),ZC=e=>$o(e,eI),Pg=e=>$o(e,Og),XC=e=>$o(e,Ng),QC=e=>$o(e,Dg),ma=e=>$o(e,_g,!0),Vo=(e,t,n)=>{const r=kg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$o=(e,t,n=!1)=>{const r=Cg.exec(e);return r?r[1]?t(r[1]):n:!1},Og=e=>e==="position"||e==="percentage",Dg=e=>e==="image"||e==="url",Ng=e=>e==="length"||e==="size"||e==="bg-size",Mg=e=>e==="length",JC=e=>e==="number",eI=e=>e==="family-name",_g=e=>e==="shadow",tI=FC(()=>{const e=$t("color"),t=$t("font"),n=$t("text"),r=$t("font-weight"),o=$t("tracking"),i=$t("leading"),s=$t("breakpoint"),a=$t("container"),l=$t("spacing"),c=$t("radius"),u=$t("shadow"),d=$t("inset-shadow"),f=$t("text-shadow"),p=$t("drop-shadow"),g=$t("blur"),y=$t("perspective"),m=$t("aspect"),v=$t("ease"),b=$t("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Te,Se],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[Te,Se,l],A=()=>[Lo,"full","auto",...k()],O=()=>[Tr,"none","subgrid",Te,Se],_=()=>["auto",{span:["full",Tr,Te,Se]},Tr,Te,Se],N=()=>[Tr,"auto",Te,Se],$=()=>["auto","min","max","fr",Te,Se],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],M=()=>[Lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,Te,Se],V=()=>[...T(),Pg,Ag,{position:[Te,Se]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",XC,YC,{size:[Te,Se]}],U=()=>[Cu,Ui,ro],G=()=>["","none","full",c,Te,Se],H=()=>["",qe,Ui,ro],ee=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[qe,Cu,Pg,Ag],q=()=>["","none",g,Te,Se],Y=()=>["none",qe,Te,Se],Z=()=>["none",qe,Te,Se],pe=()=>[qe,Te,Se],B=()=>[Lo,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[dr],breakpoint:[dr],color:[HC],container:[dr],"drop-shadow":[dr],ease:["in","out","in-out"],font:[GC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[dr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[dr],shadow:[dr],spacing:["px",qe],text:[dr],"text-shadow":[dr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lo,Se,Te,m]}],container:["container"],columns:[{columns:[qe,Se,Te,a]}],"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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Tr,"auto",Te,Se]}],basis:[{basis:[Lo,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Lo,"auto","initial","none",Se]}],grow:[{grow:["",qe,Te,Se]}],shrink:[{shrink:["",qe,Te,Se]}],order:[{order:[Tr,"first","last","none",Te,Se]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[a,"screen",...M()]}],"min-w":[{"min-w":[a,"screen","none",...M()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Ui,ro]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,Iu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cu,Se]}],"font-family":[{font:[ZC,Se,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,Te,Se]}],"line-clamp":[{"line-clamp":[qe,"none",Te,Iu]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Te,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Te,ro]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[qe,"auto",Te,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,Te,Se],radial:["",Te,Se],conic:[Tr,Te,Se]},QC,KC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"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:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Te,Se]}],"outline-w":[{outline:["",qe,Ui,ro]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,ma,ha]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,ma,ha]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[qe,ro]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,ma,ha]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[qe,Te,Se]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Te,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Se]}],filter:[{filter:["","none",Te,Se]}],blur:[{blur:q()}],brightness:[{brightness:[qe,Te,Se]}],contrast:[{contrast:[qe,Te,Se]}],"drop-shadow":[{"drop-shadow":["","none",p,ma,ha]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",qe,Te,Se]}],"hue-rotate":[{"hue-rotate":[qe,Te,Se]}],invert:[{invert:["",qe,Te,Se]}],saturate:[{saturate:[qe,Te,Se]}],sepia:[{sepia:["",qe,Te,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Se]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Te,Se]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Te,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Te,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Te,Se]}],"backdrop-invert":[{"backdrop-invert":["",qe,Te,Se]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Te,Se]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Te,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Te,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Te,Se]}],ease:[{ease:["linear","initial",v,Te,Se]}],delay:[{delay:[qe,Te,Se]}],animate:[{animate:["none",b,Te,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Te,Se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Te,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",Te,Se]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",Te,Se]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[qe,Ui,ro,Iu]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),fr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},nI=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Au=e=>Re.function(e),Pe=(...e)=>tI(gm(e)),Fg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Gi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Lg=e=>e.scrollHeight>e.clientHeight,Yi=(e,t)=>{if(e&&e.getBoundingClientRect){const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)}return 320},rI=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},Vg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,s=o.bottom<=r.bottom,a=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&s&&a&&l},un=S.forwardRef(function(t,n){const r=t.as||"span";return h.jsx(r,{ref:n,...t,as:void 0})}),oI={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",tiny:"h-6 p-2 px-3 text-xs"},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"}},iI=_o("size-2 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"}}}),sI=_o("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:oI,defaultVariants:{theme:"primary",size:"default"}}),zo=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return h.jsxs(un,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Pe(sI({size:s,theme:o?"loading":i}),t),children:[n?h.jsx("span",{"aria-hidden":"true",className:iI({theme:n})}):null,r,a.children]})}),aI=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return h.jsx("form",{...e,onSubmit:t})};var Dt=function(){return Dt=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},Dt.apply(this,arguments)};function Pu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ou(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Ki=function(e){return e.replace(new RegExp(" ","g")," ")},$g=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},lI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},zg=function(e,t,n){var r=e.length-2,o=lI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},jg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ga=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},cI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Du=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},uI=function(e){return e==="money"||e==="currency"},dI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Dt(Dt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ya=function(e,t){var n=$g(jg(e),t.fraction.length),r="".concat(t.currency).concat(zg(n,t.group,t.decimal));return Ki(r)},fI=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Pu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var g=dI(r,i,a);return g.currency=Ki("".concat(g.currency.trim()," ")),g.literal=Ki(g.literal.trim()),g},[r,i]),f=function(g){var y=ya(g.target.value,d),m=ga(y);g.target.value=y,g.target.setAttribute("data-number",m.toString()),l?.(g),m!==0&&(u.current.selectionEnd=y.length)};S.useEffect(function(){if(u.current!==null){var g=u.current.value;if(g!==""){var y=ya(g,d),m=ga(y);u.current.value=y,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l?.(Dt(Dt({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=y.length)}}},[d]);var p=c.defaultValue?ya(c.defaultValue,d):void 0;return S.createElement("input",Dt({},c,{value:typeof c.value=="string"?ya(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),pI=1,hI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},mI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Dt(Dt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},va=function(e,t){var n=$g(jg(e),t.fraction.length),r="".concat(zg(n,t.group,t.decimal)," ").concat(t.percentSign);return Ki(r)},gI=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Pu(e,["locale","mask","onChange","onKeyUp"]),a=S.useRef(null),l=Ou(S.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return a.current}),S.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(va(b,d))},[s.value]);var d=S.useMemo(function(){var v=mI(r);return v.percentSign=Ki("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-pI,p=function(v){var b,x=a.current;x&&(x.setSelectionRange(f,f),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},g=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,T=b.selectionEnd,E=x!==T,I=f<x;!E&&I&&p()}i?.(v)},y=function(v){var b=va(v.target.value,d),x=ga(b);u(b),v.target.value=b,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=va(v,d),x=ga(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(Dt(Dt({},T),{target:a.current,currentTarget:a.current}))}}},[]),S.useEffect(function(){return p()},[c]);var m=s.defaultValue?va(s.defaultValue,d):void 0;return S.createElement("input",Dt({},s,{defaultValue:m,inputMode:"decimal",onChange:y,onFocus:p,onKeyUp:g,ref:a,type:"text"}))}),Zi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},yI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=ba[i];s===void 0?r.push(i.replace(Zi.dots,"\\.").replace(Zi.openParenthesis,"\\(").replace(Zi.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Zi.leadingBars,"\\")},Xi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Nu(o,n);var i=yI(o);return n?"^".concat(i,"$"):i},vI=function(e){return e.replace(Zi.escape,"\\$&")},Nu=function(e,t){var n=e.map(function(r){return typeof r=="string"?vI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ba={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},bI=/\d/,Bg="(dd) 9dddd-dddd",Rg="(dd) dddd-dddd",Hg="ddd.ddd.ddd-dd",Wg="dd.ddd.ddd/dddd-dd",xa=function(e){return e.replace(/\D/g,"")},xI=["2",/[0-3]/,":",/[0-5]/,/\d/],wI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],rn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Hg,isoDate:"dddd-dd-dd",cnpj:Wg,telephone:Rg,cellphone:Bg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return xa(e).length<=11?Hg:Wg},int:function(e){return e===void 0&&(e=""),bI.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=xa(e);return t.length<11?Rg:Bg},time:function(e){var t=xa(e),n=t[0];return n==="2"?xI:wI}},on=function(e,t,n){var r;return n===void 0&&(n={}),Dt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Xi(e,"",!0),infinity:n.infinity},n)},Kt={cellTelephone:on(rn.cellTelephone,"tel"),cellphone:on(rn.cellphone,"tel"),cep:on(rn.cep,"decimal"),cnpj:on(rn.cnpj,"decimal"),color:on(rn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:on(rn.cpf,"decimal"),cpfCnpj:on(rn.cpfCnpj,"decimal",{transform:xa}),creditCard:on(rn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:on(rn.date,"decimal"),int:on(rn.int,"decimal",{pattern:"[0-9]+"}),isoDate:on(rn.isoDate,"decimal"),telephone:on(rn.telephone,"tel"),time:on(rn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:on(rn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function qg(e,t,n,r){var o,i;r===void 0&&(r=ba);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(a+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Ug=function(e){return e},SI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Xi(e,n,t));return r.test(n)};function TI(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var EI=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=Pu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),g=S.useRef(null);S.useImperativeHandle(t,function(){return g.current});var y=Du(a),m=Du(d),v=Du(u),b=S.useRef(SI(u,i,p.value||p.defaultValue)),x=f??"input",T=Ou(S.useState(""),2),E=T[0],I=T[1],w=TI(E),k=S.useCallback(function(F,z){var M,C,V=(M=F??z)!==null&&M!==void 0?M:"";if(u===void 0)return V;var L=(C=V?.toString())!==null&&C!==void 0?C:"";return qg(L,typeof u=="function"?u(L):u,s??Ug,c??ba)},[s,u,c]),A=Ou(S.useState(function(){return k(p.value,p.defaultValue)}),2),O=A[0],_=A[1],N=k(p.defaultValue,p.defaultValue),$=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var F=u(O);return Array.isArray(F)?Nu(F,i):Xi(u,O,i)}return typeof u=="string"?Xi(u,O,i):Nu(u,i)},[l,O,i,u]);S.useEffect(function(){if(p.value!==void 0){var F=k(p.value,p.defaultValue);_(F),g.current!==null&&(g.current.value=F)}},[p.value,u,s,p.defaultValue]);var D=function(F){var z,M,C,V,L,R=F.currentTarget,U=F.target.value;if(v.current===void 0)return _(U),(z=m.current)===null||z===void 0||z.call(m,U),(M=y.current)===null||M===void 0||M.call(y,F),d?.(U);var G=new RegExp(Xi(v.current,U,i)),H=(C=R.selectionEnd)!==null&&C!==void 0?C:0,ee=function(Z,pe,B){if(Z.type!=="number")return Z.setSelectionRange(pe,B)};if(r&&b.current&&U.length>=O.length)return R.value=O,ee(R,H-1,H-1);var se=!1;U.length<w.length&&(b.current=!1,se=!0),G.test(U)&&(b.current=!0);var te=H,q=U[te-1],Y=qg(U,typeof v.current=="function"?v.current(U):v.current,s??Ug,c??ba);for(R.value=Y,_(Y);te<Y.length&&Y.charAt(te-1)!==q;)te+=1;se?ee(R,H,H):ee(R,te,te),F.target.value=Y,I(Y),(V=m.current)===null||V===void 0||V.call(m,Y),(L=y.current)===null||L===void 0||L.call(y,F)};return S.createElement(x,Dt({},p,{ref:g,pattern:$,onChange:D,defaultValue:Gg(p.defaultValue)?N:void 0,value:Gg(p.value)?k(p.value,p.value):p.value}))}),Gg=function(e){return typeof e=="string"},Yg=S.forwardRef(function(e,t){return uI(e.mask)?S.createElement(fI,Dt({},e,{mask:void 0,ref:t})):hI(e.mask)?S.createElement(gI,Dt({},e,{mask:void 0,ref:t})):S.createElement(EI,Dt({},e,{ref:t}))}),sn=function(e){return function(t){return S.createElement(Yg,Dt({},e,t))}};sn(Kt.cellTelephone),sn(Kt.cellphone),sn(Kt.cep),sn(Kt.cnpj),sn(Kt.color),sn(Kt.cpf),sn(Kt.cpfCnpj),sn(Kt.creditCard),sn(Kt.date),sn(Kt.int),sn(Kt.isoDate),sn(Kt.telephone),sn(Kt.time),sn(Kt.uuid);var Kg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&cI(Kt,t.mask)?Kt[t.mask]:{mask:t.mask}},[t.mask]),o=Dt(Dt({},t),r);return S.createElement(Yg,Dt({},o,{ref:n}))});const Zg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const kI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const CI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Xg=e=>{const t=CI(e);return t.charAt(0).toUpperCase()+t.slice(1)};var II={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const AI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const PI=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>S.createElement("svg",{ref:l,...II,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zg("lucide",o),...!i&&!AI(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(PI,{ref:i,iconNode:t,className:Zg(`lucide-${kI(Xg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Xg(e),n};const OI=Xe("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const DI=Xe("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const Qg=Xe("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const NI=Xe("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const Jg=Xe("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Mu=Xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ey=Xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const wa=Xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const _u=Xe("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const MI=Xe("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);const _I=Xe("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const FI=Xe("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const LI=Xe("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const ty=Xe("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ny=Xe("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const ry=Xe("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const VI=Xe("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const $I=Xe("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const Fu=Xe("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const zI=Xe("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Er=Xe("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const jI=Xe("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const BI=Xe("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const RI=Xe("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const Lu=Xe("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const HI=Xe("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const WI=Xe("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Vu=Xe("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const Sa=Xe("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const $u=Xe("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const qI=Xe("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const jo=Xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ta={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>)`},kr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(kr(s,t,n,a))},[]),oy=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:oy(s,t,n,a)}},{}),iy={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Ea=(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)},UI={default:e=>Ea(e,{result:iy.default}),dark:e=>Ea(e,{result:iy.dark})},Bo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},GI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),zu=(e,t)=>{const n=kr(e.colors,Bo(t?.colors)),r=kr(e.spacing,Bo(t?.spacing)),o=kr(e.rounded,Bo(t?.rounded)),i=kr(e.shadow,Bo(t?.rounded)),s=kr(e.zIndex,Bo(t?.zIndex??GI)),a=e.custom?kr(e.custom,Bo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},YI=(e,t)=>Ea(zu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),KI=(e,t)=>zu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),ZI=(e,t)=>Ea(zu(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ka={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",pageCalendarMonthView:"Month view",pageCalendarWeekView:"Week view",pageCalendarDayView:"Day view",pageCalendarPrevious:"Previous",pageCalendarNext:"Next",pageCalendarToday:"Today",pageCalendarAddEvent:"Add event",pageCalendarWeekLabel:e=>`Week ${e}`,pageCalendarFilter:"Filter:",pageCalendarMoreEvents:e=>`+${e} more...`,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",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",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=>h.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},Ca={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},oo=S.createContext({parser:Ta.hsla,tweaks:Ca,floatingRef:void 0,map:ka,locale:void 0}),Tt=()=>{const e=S.useContext(oo);return e?e.map:ka},ju=()=>{const e=S.useContext(oo);return e?e.tweaks:Ca};function Ia(){return typeof window<"u"}function Cr(e){return Aa(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wn(e){var t;return(t=(Aa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Aa(e){return Ia()?e instanceof Node||e instanceof Wt(e).Node:!1}function tt(e){return Ia()?e instanceof Element||e instanceof Wt(e).Element:!1}function Pt(e){return Ia()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Qi(e){return!Ia()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}const XI=new Set(["inline","contents"]);function Ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!XI.has(o)}const QI=new Set(["table","td","th"]);function JI(e){return QI.has(Cr(e))}const eA=[":popover-open",":modal"];function Pa(e){return eA.some(t=>{try{return e.matches(t)}catch{return!1}})}const tA=["transform","translate","scale","rotate","perspective"],nA=["transform","translate","scale","rotate","perspective","filter"],rA=["paint","layout","strict","content"];function Bu(e){const t=Oa(),n=tt(e)?dn(e):e;return tA.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)||nA.some(r=>(n.willChange||"").includes(r))||rA.some(r=>(n.contain||"").includes(r))}function oA(e){let t=hr(e);for(;Pt(t)&&!pr(t);){if(Bu(t))return t;if(Pa(t))return null;t=hr(t)}return null}function Oa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const iA=new Set(["html","body","#document"]);function pr(e){return iA.has(Cr(e))}function dn(e){return Wt(e).getComputedStyle(e)}function Da(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(Cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qi(e)&&e.host||Wn(e);return Qi(t)?t.host:t}function sy(e){const t=hr(e);return pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&Ji(t)?t:sy(t)}function Ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){const a=Ru(s);return t.concat(s,s.visualViewport||[],Ji(o)?o:[],a&&n?Ir(a):[])}return t.concat(o,Ir(o,[],n))}function Ru(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const sA=["top","right","bottom","left"],ay=["start","end"],ly=sA.reduce((e,t)=>e.concat(t,t+"-"+ay[0],t+"-"+ay[1]),[]),Ar=Math.min,fn=Math.max,Na=Math.round,Ro=Math.floor,qn=e=>({x:e,y:e}),aA={left:"right",right:"left",bottom:"top",top:"bottom"},lA={start:"end",end:"start"};function Hu(e,t,n){return fn(e,Ar(t,n))}function io(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function On(e){return e.split("-")[1]}function cy(e){return e==="x"?"y":"x"}function Wu(e){return e==="y"?"height":"width"}const cA=new Set(["top","bottom"]);function mr(e){return cA.has(Un(e))?"y":"x"}function qu(e){return cy(mr(e))}function uy(e,t,n){n===void 0&&(n=!1);const r=On(e),o=qu(e),i=Wu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_a(s)),[s,_a(s)]}function uA(e){const t=_a(e);return[Ma(e),t,Ma(t)]}function Ma(e){return e.replace(/start|end/g,t=>lA[t])}const dy=["left","right"],fy=["right","left"],dA=["top","bottom"],fA=["bottom","top"];function pA(e,t,n){switch(e){case"top":case"bottom":return n?t?fy:dy:t?dy:fy;case"left":case"right":return t?dA:fA;default:return[]}}function hA(e,t,n,r){const o=On(e);let i=pA(Un(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ma)))),i}function _a(e){return e.replace(/left|right|bottom|top/g,t=>aA[t])}function mA(e){return{top:0,right:0,bottom:0,left:0,...e}}function py(e){return typeof e!="number"?mA(e):{top:e,right:e,bottom:e,left:e}}function Fa(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}}var gA=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],La=gA.join(","),hy=typeof Element>"u",Ho=hy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Va=!hy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},$a=function(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",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):$a(t.parentNode));return s},yA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},my=function(t,n,r){if($a(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(La));return n&&Ho.call(t,La)&&o.unshift(t),o=o.filter(r),o},za=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!$a(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=za(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Ho.call(s,La);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!$a(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=za(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},gy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},yy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yA(t))&&!gy(t)?0:t.tabIndex},vA=function(t,n){var r=yy(t);return r<0&&n&&!gy(t)?0:r},bA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},vy=function(t){return t.tagName==="INPUT"},xA=function(t){return vy(t)&&t.type==="hidden"},wA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},SA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},TA=function(t){if(!t.name)return!0;var n=t.form||Va(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},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(s){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",s.message),!1}var i=SA(o,t.form);return!i||i===t},EA=function(t){return vy(t)&&t.type==="radio"},kA=function(t){return EA(t)&&!TA(t)},CA=function(t){var n,r=t&&Va(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Va(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},by=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},IA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ho.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Ho.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Va(t);if(c&&!c.shadowRoot&&o(c)===!0)return by(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(CA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return by(t);return!1},AA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Ho.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Uu=function(t,n){return!(n.disabled||xA(n)||IA(n,t)||wA(n)||AA(n))},Gu=function(t,n){return!(kA(n)||yy(n)<0||!Uu(t,n))},PA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},xy=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=vA(a,s),c=s?xy(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(bA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Wo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=za([t],n.includeContainer,{filter:Gu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:PA}):r=my(t,n.includeContainer,Gu.bind(null,n)),xy(r)},OA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=za([t],n.includeContainer,{filter:Uu.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=my(t,n.includeContainer,Uu.bind(null,n)),r},wy=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,La)===!1?!1:Gu(n,t)};function Yu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Sy(){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 Ty(){return/apple/i.test(navigator.vendor)}function Ku(){const e=/android/i;return e.test(Yu())||e.test(Sy())}function DA(){return Yu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Ey(){return Sy().includes("jsdom/")}const ky="data-floating-ui-focusable",NA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Zu="ArrowLeft",Xu="ArrowRight",MA="ArrowUp",_A="ArrowDown";function Gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Rt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Yn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Qu(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 FA(e){return e.matches("html,body")}function qt(e){return e?.ownerDocument||document}function Ju(e){return Pt(e)&&e.matches(NA)}function ed(e){return e?e.getAttribute("role")==="combobox"&&Ju(e):!1}function LA(e){if(!e||Ey())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ja(e){return e?e.hasAttribute(ky)?e:e.querySelector("["+ky+"]")||e:null}function so(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...so(e,o.id,n)])}function VA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),so(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function Cy(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(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Ut(e){e.preventDefault(),e.stopPropagation()}function $A(e){return"nativeEvent"in e}function Iy(e){return e.mozInputSource===0&&e.isTrusted?!0:Ku()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ay(e){return Ey()?!1:!Ku()&&e.width===0&&e.height===0||Ku()&&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 qo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var zA=typeof document<"u",jA=function(){},nt=zA?S.useLayoutEffect:jA;const BA={...P};function Ht(e){const t=P.useRef(e);return nt(()=>{t.current=e}),t}const RA=BA.useInsertionEffect||(e=>e());function Ct(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return RA(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Ba(e,t,n){return Math.floor(e/t)!==n}function es(e,t){return t<0||t>=e.current.length}function td(e,t){return Zt(e,{disabledIndices:t})}function Py(e,t){return Zt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Zt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&Ra(e,s,o));return s}function HA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===MA){if(d&&Ut(n),u===-1)f=c;else if(f=Zt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const p=u%s,g=c%s,y=c-(g-p);g===p?f=c:f=g>p?y:y-s}es(e,f)&&(f=u)}if(n.key===_A&&(d&&Ut(n),u===-1?f=l:(f=Zt(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=Zt(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),es(e,f)&&(f=u)),r==="both"){const p=Ro(u/s);n.key===(i?Zu:Xu)&&(d&&Ut(n),u%s!==s-1?(f=Zt(e,{startingIndex:u,disabledIndices:a}),o&&Ba(f,s,p)&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a})),Ba(f,s,p)&&(f=u)),n.key===(i?Xu:Zu)&&(d&&Ut(n),u%s!==0?(f=Zt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Ba(f,s,p)&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Ba(f,s,p)&&(f=u));const g=Ro(c/s)===p;es(e,f)&&(o&&g?f=n.key===(i?Xu:Zu)?c:Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function WA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function qA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function UA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Ra(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const ts=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oy(e,t){const n=Wo(e,ts()),r=n.length;if(r===0)return;const o=Gn(qt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function Dy(e){return Oy(qt(e).body,1)||e}function Ny(e){return Oy(qt(e).body,-1)||e}function ns(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Rt(n,r)}function GA(e){Wo(e,ts()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function My(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 _y(e,t,n){let{reference:r,floating:o}=e;const i=mr(t),s=qu(t),a=Wu(s),l=Un(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(On(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}async function YA(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=io(t,e),g=py(p),m=a[f?d==="floating"?"reference":"floating":d],v=Fa(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Fa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-E.top+g.top)/T.y,bottom:(E.bottom-v.bottom+g.bottom)/T.y,left:(v.left-E.left+g.left)/T.x,right:(E.right-v.right+g.right)/T.x}}const KA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=_y(c,r,l),f=r,p={},g=0;for(let m=0;m<a.length;m++){var y;const{name:v,fn:b}=a[m],{x,y:T,data:E,reset:I}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:{...s,detectOverflow:(y=s.detectOverflow)!=null?y:YA},elements:{reference:e,floating:t}});u=x??u,d=T??d,p={...p,[v]:{...p[v],...E}},I&&g<=50&&(g++,typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:d}=_y(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}},ZA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=io(e,t)||{};if(c==null)return{};const d=py(u),f={x:n,y:r},p=qu(o),g=Wu(p),y=await s.getDimensions(c),m=p==="y",v=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",T=i.reference[g]+i.reference[p]-f[p]-i.floating[g],E=f[p]-i.reference[p],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(I)))&&(w=a.floating[x]||i.floating[g]);const k=T/2-E/2,A=w/2-y[g]/2-1,O=Ar(d[v],A),_=Ar(d[b],A),N=O,$=w-y[g]-_,D=w/2-y[g]/2+k,F=Hu(N,D,$),z=!l.arrow&&On(o)!=null&&D!==F&&i.reference[g]/2-(D<N?O:_)-y[g]/2<0,M=z?D<N?D-N:D-$:0;return{[p]:f[p]+M,data:{[p]:F,centerOffset:D-F-M,...z&&{alignmentOffset:M}},reset:z}}});function XA(e,t,n){return(e?[...n.filter(o=>On(o)===e),...n.filter(o=>On(o)!==e)]:n.filter(o=>Un(o)===o)).filter(o=>e?On(o)===e||(t?Ma(o)!==o:!1):!0)}const QA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=ly,autoAlignment:p=!0,...g}=io(e,t),y=d!==void 0||f===ly?XA(d||null,p,f):f,m=await l.detectOverflow(t,g),v=((n=s.autoPlacement)==null?void 0:n.index)||0,b=y[v];if(b==null)return{};const x=uy(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:y[0]}};const T=[m[Un(b)],m[x[0]],m[x[1]]],E=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:T}],I=y[v+1];if(I)return{data:{index:v+1,overflows:E},reset:{placement:I}};const w=E.map(O=>{const _=On(O.placement);return[O.placement,_&&u?O.overflows.slice(0,2).reduce((N,$)=>N+$,0):O.overflows[0],O.overflows]}).sort((O,_)=>O[1]-_[1]),A=((o=w.filter(O=>O[2].slice(0,On(O[0])?2:3).every(_=>_<=0))[0])==null?void 0:o[0])||w[0][0];return A!==a?{data:{index:v+1,overflows:E},reset:{placement:A}}:{}}}},JA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...m}=io(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Un(o),b=mr(a),x=Un(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!y?[_a(a)]:uA(a)),I=g!=="none";!f&&I&&E.push(...hA(a,y,g,T));const w=[a,...E],k=await l.detectOverflow(t,m),A=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(k[v]),d){const D=uy(o,s,T);A.push(k[D[0]],k[D[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(D=>D<=0)){var _,N;const D=(((_=i.flip)==null?void 0:_.index)||0)+1,F=w[D];if(F&&(!(d==="alignment"?b!==mr(F):!1)||O.every(C=>mr(C.placement)===b?C.overflows[0]>0:!0)))return{data:{index:D,overflows:O},reset:{placement:F}};let z=(N=O.filter(M=>M.overflows[0]<=0).sort((M,C)=>M.overflows[1]-C.overflows[1])[0])==null?void 0:N.placement;if(!z)switch(p){case"bestFit":{var $;const M=($=O.filter(C=>{if(I){const V=mr(C.placement);return V===b||V==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(V=>V>0).reduce((V,L)=>V+L,0)]).sort((C,V)=>C[1]-V[1])[0])==null?void 0:$[0];M&&(z=M);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},eP=new Set(["left","top"]);async function tP(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Un(n),a=On(n),l=mr(n)==="y",c=eP.has(s)?-1:1,u=i&&l?-1:1,d=io(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const nP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await tP(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},rP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=io(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=mr(Un(o)),p=cy(f);let g=u[p],y=u[f];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=g+d[v],T=g-d[b];g=Hu(x,g,T)}if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=y+d[v],T=y-d[b];y=Hu(x,y,T)}const m=l.fn({...t,[p]:g,[f]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:s,[f]:a}}}}}},oP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=io(e,t),u=await s.detectOverflow(t,c),d=Un(o),f=On(o),p=mr(o)==="y",{width:g,height:y}=i.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=f==="end"?"top":"bottom");const b=y-u.top-u.bottom,x=g-u.left-u.right,T=Ar(y-u[m],b),E=Ar(g-u[v],x),I=!t.middlewareData.shift;let w=T,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const O=fn(u.left,0),_=fn(u.right,0),N=fn(u.top,0),$=fn(u.bottom,0);p?k=g-2*(O!==0||_!==0?O+_:fn(u.left,u.right)):w=y-2*(N!==0||$!==0?N+$:fn(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const A=await s.getDimensions(a.floating);return g!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Fy(e){const t=dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Na(n)!==i||Na(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function nd(e){return tt(e)?e:e.contextElement}function Uo(e){const t=nd(e);if(!Pt(t))return qn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Fy(t);let s=(i?Na(n.width):n.width)/r,a=(i?Na(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const iP=qn(0);function Ly(e){const t=Wt(e);return!Oa()||!t.visualViewport?iP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function ao(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=nd(e);let s=qn(1);t&&(r?tt(r)&&(s=Uo(r)):s=Uo(e));const a=sP(i,n,r)?Ly(i):qn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Wt(i),p=r&&tt(r)?Wt(r):r;let g=f,y=Ru(g);for(;y&&r&&p!==g;){const m=Uo(y),v=y.getBoundingClientRect(),b=dn(y),x=v.left+(y.clientLeft+parseFloat(b.paddingLeft))*m.x,T=v.top+(y.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=T,g=Wt(y),y=Ru(g)}}return Fa({width:u,height:d,x:l,y:c})}function Ha(e,t){const n=Da(e).scrollLeft;return t?t.left+n:ao(Wn(e)).left+n}function Vy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ha(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function aP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Wn(r),a=t?Pa(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=qn(1);const u=qn(0),d=Pt(r);if((d||!d&&!i)&&((Cr(r)!=="body"||Ji(s))&&(l=Da(r)),Pt(r))){const p=ao(r);c=Uo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=s&&!d&&!i?Vy(s,l):qn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function lP(e){return Array.from(e.getClientRects())}function cP(e){const t=Wn(e),n=Da(e),r=e.ownerDocument.body,o=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ha(e);const a=-n.scrollTop;return dn(r).direction==="rtl"&&(s+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const $y=25;function uP(e,t){const n=Wt(e),r=Wn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Oa();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Ha(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=$y&&(i-=g)}else c<=$y&&(i+=c);return{width:i,height:s,x:a,y:l}}const dP=new Set(["absolute","fixed"]);function fP(e,t){const n=ao(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pt(e)?Uo(e):qn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function zy(e,t,n){let r;if(t==="viewport")r=uP(e,n);else if(t==="document")r=cP(Wn(e));else if(tt(t))r=fP(t,n);else{const o=Ly(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fa(r)}function jy(e,t){const n=hr(e);return n===t||!tt(n)||pr(n)?!1:dn(n).position==="fixed"||jy(n,t)}function pP(e,t){const n=t.get(e);if(n)return n;let r=Ir(e,[],!1).filter(a=>tt(a)&&Cr(a)!=="body"),o=null;const i=dn(e).position==="fixed";let s=i?hr(e):e;for(;tt(s)&&!pr(s);){const a=dn(s),l=Bu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&dP.has(o.position)||Ji(s)&&!l&&jy(e,s))?r=r.filter(u=>u!==s):o=a,s=hr(s)}return t.set(e,r),r}function hP(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Pa(t)?[]:pP(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=zy(t,u,o);return c.top=fn(d.top,c.top),c.right=Ar(d.right,c.right),c.bottom=Ar(d.bottom,c.bottom),c.left=fn(d.left,c.left),c},zy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mP(e){const{width:t,height:n}=Fy(e);return{width:t,height:n}}function gP(e,t,n){const r=Pt(t),o=Wn(t),i=n==="fixed",s=ao(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=qn(0);function c(){l.x=Ha(o)}if(r||!r&&!i)if((Cr(t)!=="body"||Ji(o))&&(a=Da(t)),r){const p=ao(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?Vy(o,a):qn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function rd(e){return dn(e).position==="static"}function By(e,t){if(!Pt(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wn(e)===n&&(n=n.ownerDocument.body),n}function Ry(e,t){const n=Wt(e);if(Pa(e))return n;if(!Pt(e)){let o=hr(e);for(;o&&!pr(o);){if(tt(o)&&!rd(o))return o;o=hr(o)}return n}let r=By(e,t);for(;r&&JI(r)&&rd(r);)r=By(r,t);return r&&pr(r)&&rd(r)&&!Bu(r)?n:r||oA(e)||n}const yP=async function(e){const t=this.getOffsetParent||Ry,n=this.getDimensions,r=await n(e.floating);return{reference:gP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vP(e){return dn(e).direction==="rtl"}const bP={convertOffsetParentRelativeRectToViewportRelativeRect:aP,getDocumentElement:Wn,getClippingRect:hP,getOffsetParent:Ry,getElementRects:yP,getClientRects:lP,getDimensions:mP,getScale:Uo,isElement:tt,isRTL:vP};function Hy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xP(e,t){let n=null,r;const o=Wn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const g=Ro(d),y=Ro(o.clientWidth-(u+f)),m=Ro(o.clientHeight-(d+p)),v=Ro(u),x={rootMargin:-g+"px "+-y+"px "+-m+"px "+-v+"px",threshold:fn(0,Ar(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!Hy(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function lo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=nd(e),u=o||i?[...c?Ir(c):[],...Ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?xP(c,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let g,y=l?ao(e):null;l&&m();function m(){const v=ao(e);y&&!Hy(y,v)&&n(),y=v,g=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const wP=nP,SP=QA,TP=rP,EP=JA,kP=oP,Wy=ZA,CP=(e,t,n)=>{const r=new Map,o={platform:bP,...n},i={...o.platform,_c:r};return KA(e,t,{...o,platform:i})};var IP=typeof document<"u",AP=function(){},Wa=IP?S.useLayoutEffect:AP;function qa(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(!qa(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)&&!qa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function qy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uy(e,t){const n=qy(e);return Math.round(t*n)/n}function od(e){const t=P.useRef(e);return Wa(()=>{t.current=e}),t}function PP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);qa(f,r)||p(r);const[g,y]=P.useState(null),[m,v]=P.useState(null),b=P.useCallback(C=>{C!==I.current&&(I.current=C,y(C))},[]),x=P.useCallback(C=>{C!==w.current&&(w.current=C,v(C))},[]),T=i||g,E=s||m,I=P.useRef(null),w=P.useRef(null),k=P.useRef(u),A=l!=null,O=od(l),_=od(o),N=od(c),$=P.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};_.current&&(C.platform=_.current),CP(I.current,w.current,C).then(V=>{const L={...V,isPositioned:N.current!==!1};D.current&&!qa(k.current,L)&&(k.current=L,ur.flushSync(()=>{d(L)}))})},[f,t,n,_,N]);Wa(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const D=P.useRef(!1);Wa(()=>(D.current=!0,()=>{D.current=!1}),[]),Wa(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(O.current)return O.current(T,E,$);$()}},[T,E,$,O,A]);const F=P.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=P.useMemo(()=>({reference:T,floating:E}),[T,E]),M=P.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const V=Uy(z.floating,u.x),L=Uy(z.floating,u.y);return a?{...C,transform:"translate("+V+"px, "+L+"px)",...qy(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:L}},[n,a,z.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:F,elements:z,floatingStyles:M}),[u,$,F,z,M])}const OP=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?Wy({element:r.current,padding:o}).fn(n):{}:r?Wy({element:r,padding:o}).fn(n):{}}}},Go=(e,t)=>({...wP(e),options:[e,t]}),Ua=(e,t)=>({...TP(e),options:[e,t]}),Ga=(e,t)=>({...EP(e),options:[e,t]}),Gy=(e,t)=>({...kP(e),options:[e,t]}),Yy=(e,t)=>({...SP(e),options:[e,t]}),id=(e,t)=>({...OP(e),options:[e,t]});function DP(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Ky=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function NP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Set),s=P.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=P.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=P.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(DP).forEach((d,f)=>{c.set(d,f)}),c},[o]);return h.jsx(Ky.Provider,{value:P.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function Zy(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=P.useContext(Ky),[a,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const p=t!==void 0;s.current[a]=p?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const MP="data-floating-ui-focusable",Xy="active",Qy="selected",rs="ArrowLeft",os="ArrowRight",Jy="ArrowUp",Ya="ArrowDown",_P={...P};let ev=!1,FP=0;const tv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+FP++;function LP(){const[e,t]=P.useState(()=>ev?tv():void 0);return nt(()=>{e==null&&t(tv())},[]),P.useEffect(()=>{ev=!0},[]),e}const is=_P.useId||LP;let ss;process.env.NODE_ENV!=="production"&&(ss=new Set);function Ka(){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=ss)!=null&&e.has(o))){var i;(i=ss)==null||i.add(o),console.warn(o)}}function VP(){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=ss)!=null&&e.has(o))){var i;(i=ss)==null||i.add(o),console.error(o)}}const sd=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:g,...y}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Ka("The `ref` prop is required for `FloatingArrow`."));const v=is(),[b,x]=P.useState(!1);if(nt(()=>{if(!o)return;dn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&s!=null&&s.x||!I&&s!=null&&s.y)&&(w=null);const k=u*2,A=k/2,O=a/2*(c/-8+1),_=l/2*c/4,N=!!p,$=w&&E==="end"?"bottom":"top";let D=w&&E==="end"?"right":"left";w&&b&&(D=E==="end"?"left":"right");const F=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-_))+(" Q"+a/2+","+l+" "+O+","+(l-_))+" Z",C={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[T];return h.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:N?a:a+k,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[D]:F,[$]:z,[T]:I||N?"100%":"calc(100% - "+k/2+"px)",transform:[C,g].filter(V=>!!V).join(" "),...y},children:[k>0&&h.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:M}),h.jsx("path",{stroke:k&&!p?m.fill:"none",d:M}),h.jsx("clipPath",{id:v,children:h.jsx("rect",{x:-A,y:A*(N?-1:1),width:a+k,height:a})})]})});function nv(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const rv=P.createContext(null),ov=P.createContext(null),Pr=()=>{var e;return((e=P.useContext(rv))==null?void 0:e.id)||null},Or=()=>P.useContext(ov);function $P(e){const t=is(),n=Or(),o=Pr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function zP(e){const{children:t,id:n}=e,r=Pr();return h.jsx(rv.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function jP(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(s=>{n.current=[...n.current,s]},[]),o=P.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=P.useState(()=>nv());return h.jsx(ov.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function co(e){return"data-floating-ui-"+e}function Gt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const iv=co("safe-polygon");function ad(e,t,n){if(n&&!qo(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function ld(e){return typeof e=="function"?e():e}function sv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Or(),g=Pr(),y=Ht(c),m=Ht(l),v=Ht(n),b=Ht(d),x=P.useRef(),T=P.useRef(-1),E=P.useRef(),I=P.useRef(-1),w=P.useRef(!0),k=P.useRef(!1),A=P.useRef(()=>{}),O=P.useRef(!1),_=Ct(()=>{var M;const C=(M=o.current.openEvent)==null?void 0:M.type;return C?.includes("mouse")&&C!=="mousedown"});P.useEffect(()=>{if(!a)return;function M(C){let{open:V}=C;V||(Gt(T),Gt(I),w.current=!0,O.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[a,i]),P.useEffect(()=>{if(!a||!y.current||!n)return;function M(V){_()&&r(!1,V,"hover")}const C=qt(s.floating).documentElement;return C.addEventListener("mouseleave",M),()=>{C.removeEventListener("mouseleave",M)}},[s.floating,n,r,a,y,_]);const N=P.useCallback(function(M,C,V){C===void 0&&(C=!0),V===void 0&&(V="hover");const L=ad(m.current,"close",x.current);L&&!E.current?(Gt(T),T.current=window.setTimeout(()=>r(!1,M,V),L)):C&&(Gt(T),r(!1,M,V))},[m,r]),$=Ct(()=>{A.current(),E.current=void 0}),D=Ct(()=>{if(k.current){const M=qt(s.floating).body;M.style.pointerEvents="",M.removeAttribute(iv),k.current=!1}}),F=Ct(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);P.useEffect(()=>{if(!a)return;function M(U){if(Gt(T),w.current=!1,u&&!qo(x.current)||ld(b.current)>0&&!ad(m.current,"open"))return;const G=ad(m.current,"open",x.current);G?T.current=window.setTimeout(()=>{v.current||r(!0,U,"hover")},G):n||r(!0,U,"hover")}function C(U){if(F()){D();return}A.current();const G=qt(s.floating);if(Gt(I),O.current=!1,y.current&&o.current.floatingContext){n||Gt(T),E.current=y.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){D(),$(),F()||N(U,!0,"safe-polygon")}});const ee=E.current;G.addEventListener("mousemove",ee),A.current=()=>{G.removeEventListener("mousemove",ee)};return}(x.current!=="touch"||!Rt(s.floating,U.relatedTarget))&&N(U)}function V(U){F()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:p,x:U.clientX,y:U.clientY,onClose(){D(),$(),F()||N(U)}})(U))}function L(){Gt(T)}function R(U){F()||N(U,!1)}if(tt(s.domReference)){const U=s.domReference,G=s.floating;return n&&U.addEventListener("mouseleave",V),f&&U.addEventListener("mousemove",M,{once:!0}),U.addEventListener("mouseenter",M),U.addEventListener("mouseleave",C),G&&(G.addEventListener("mouseleave",V),G.addEventListener("mouseenter",L),G.addEventListener("mouseleave",R)),()=>{n&&U.removeEventListener("mouseleave",V),f&&U.removeEventListener("mousemove",M),U.removeEventListener("mouseenter",M),U.removeEventListener("mouseleave",C),G&&(G.removeEventListener("mouseleave",V),G.removeEventListener("mouseenter",L),G.removeEventListener("mouseleave",R))}}},[s,a,e,u,f,N,$,D,r,n,v,p,m,y,o,F,b]),nt(()=>{var M;if(a&&n&&(M=y.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&_()){k.current=!0;const V=s.floating;if(tt(s.domReference)&&V){var C;const L=qt(s.floating).body;L.setAttribute(iv,"");const R=s.domReference,U=p==null||(C=p.nodesRef.current.find(G=>G.id===g))==null||(C=C.context)==null?void 0:C.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",R.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{L.style.pointerEvents="",R.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,g,s,p,y,_]),nt(()=>{n||(x.current=void 0,O.current=!1,$(),D())},[n,$,D]),P.useEffect(()=>()=>{$(),Gt(T),Gt(I),D()},[a,s.domReference,$,D]);const z=P.useMemo(()=>{function M(C){x.current=C.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(C){const{nativeEvent:V}=C;function L(){!w.current&&!v.current&&r(!0,V,"hover")}u&&!qo(x.current)||n||ld(b.current)===0||O.current&&C.movementX**2+C.movementY**2<2||(Gt(I),x.current==="touch"?L():(O.current=!0,I.current=window.setTimeout(L,ld(b.current))))}}},[u,r,n,v,b]);return P.useMemo(()=>a?{reference:z}:{},[a,z])}let av=0;function uo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(av);const i=()=>e?.focus({preventScroll:n});o?i():av=requestAnimationFrame(i)}function cd(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function BP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function RP(e){return e?.ownerDocument||document}const Yo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function lv(e){return e==="inert"?Yo.inert:e==="aria-hidden"?Yo["aria-hidden"]:Yo.none}let Za=new WeakSet,Xa={},ud=0;const HP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,cv=e=>e&&(e.host||cv(e.parentNode)),WP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=cv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function qP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=WP(t,e),a=new Set,l=new Set(s),c=[];Xa[o]||(Xa[o]=new WeakMap);const u=Xa[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,g=>{if(Cr(g)!=="script")if(a.has(g))f(g);else{const y=i?g.getAttribute(i):null,m=y!==null&&y!=="false",v=lv(i),b=(v.get(g)||0)+1,x=(u.get(g)||0)+1;v.set(g,b),u.set(g,x),c.push(g),b===1&&m&&Za.add(g),x===1&&g.setAttribute(o,""),!m&&i&&g.setAttribute(i,i==="inert"?"":"true")}})}return ud++,()=>{c.forEach(p=>{const g=lv(i),m=(g.get(p)||0)-1,v=(u.get(p)||0)-1;g.set(p,m),u.set(p,v),m||(!Za.has(p)&&i&&p.removeAttribute(i),Za.delete(p)),v||p.removeAttribute(o)}),ud--,ud||(Yo.inert=new WeakMap,Yo["aria-hidden"]=new WeakMap,Yo.none=new WeakMap,Za=new WeakSet,Xa={})}}function uv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=RP(e[0]).body;return qP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const dd={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},Qa=P.forwardRef(function(t,n){const[r,o]=P.useState();nt(()=>{Ty()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[co("focus-guard")]:"",style:dd};return h.jsx("span",{...t,...i})}),UP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},dv=P.createContext(null),fv=co("portal");function GP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=is(),o=pv(),[i,s]=P.useState(null),a=P.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),nt(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(fv,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!Aa(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(fv,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function gr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=GP({id:n,root:r}),[s,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=s?.modal,p=s?.open,g=!!s&&!s.modal&&s.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||f)return;function y(m){i&&ns(m)&&(m.type==="focusin"?My:GA)(i)}return i.addEventListener("focusin",y,!0),i.addEventListener("focusout",y,!0),()=>{i.removeEventListener("focusin",y,!0),i.removeEventListener("focusout",y,!0)}},[i,o,f]),P.useEffect(()=>{i&&(p||My(i))},[p,i]),h.jsxs(dv.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[g&&i&&h.jsx(Qa,{"data-type":"outside",ref:l,onFocus:y=>{if(ns(y,i)){var m;(m=u.current)==null||m.focus()}else{const v=s?s.domReference:null,b=Ny(v);b?.focus()}}}),g&&i&&h.jsx("span",{"aria-owns":i.id,style:UP}),i&&ur.createPortal(t,i),g&&i&&h.jsx(Qa,{"data-type":"outside",ref:c,onFocus:y=>{if(ns(y,i)){var m;(m=d.current)==null||m.focus()}else{const v=s?s.domReference:null,b=Dy(v);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const pv=()=>P.useContext(dv);function hv(e){return P.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const YP=20;let Dr=[];function fd(){Dr=Dr.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function KP(e){fd(),e&&Cr(e)!=="body"&&(Dr.push(new WeakRef(e)),Dr.length>YP&&(Dr=Dr.slice(-20)))}function mv(){fd();const e=Dr[Dr.length-1];return e?.deref()}function ZP(e){const t=ts();return wy(e,t)?e:Wo(e,t)[0]||e}function gv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=ts(),i=OA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return wy(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const XP=P.forwardRef(function(t,n){return h.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:dd})});function fo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:g,onOpenChange:y,events:m,dataRef:v,elements:{domReference:b,floating:x}}=t,T=Ct(()=>{var B;return(B=v.current.floatingContext)==null?void 0:B.nodeId}),E=Ct(p),I=typeof s=="number"&&s<0,w=ed(b)&&I,k=HP(),A=k?i:!0,O=!A||k&&f,_=Ht(o),N=Ht(s),$=Ht(a),D=Or(),F=pv(),z=P.useRef(null),M=P.useRef(null),C=P.useRef(!1),V=P.useRef(!1),L=P.useRef(-1),R=P.useRef(-1),U=F!=null,G=ja(x),H=Ct(function(B){return B===void 0&&(B=G),B?Wo(B,ts()):[]}),ee=Ct(B=>{const ae=H(B);return _.current.map(ce=>b&&ce==="reference"?b:G&&ce==="floating"?G:ae).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function B(ce){if(ce.key==="Tab"){Rt(G,Gn(qt(G)))&&H().length===0&&!w&&Ut(ce);const Q=ee(),ue=Yn(ce);_.current[0]==="reference"&&ue===b&&(Ut(ce),ce.shiftKey?uo(Q[Q.length-1]):uo(Q[1])),_.current[1]==="floating"&&ue===G&&ce.shiftKey&&(Ut(ce),uo(Q[0]))}}const ae=qt(G);return ae.addEventListener("keydown",B),()=>{ae.removeEventListener("keydown",B)}},[r,b,G,c,_,w,H,ee]),P.useEffect(()=>{if(r||!x)return;function B(ae){const ce=Yn(ae),ue=H().indexOf(ce);ue!==-1&&(L.current=ue)}return x.addEventListener("focusin",B),()=>{x.removeEventListener("focusin",B)}},[r,x,H]),P.useEffect(()=>{if(r||!d)return;function B(){V.current=!0,setTimeout(()=>{V.current=!1})}function ae(ue){const oe=ue.relatedTarget,he=ue.currentTarget,ie=Yn(ue);queueMicrotask(()=>{const le=T(),be=!(Rt(b,oe)||Rt(x,oe)||Rt(oe,x)||Rt(F?.portalNode,oe)||oe!=null&&oe.hasAttribute(co("focus-guard"))||D&&(so(D.nodesRef.current,le).find(de=>{var ne,J;return Rt((ne=de.context)==null?void 0:ne.elements.floating,oe)||Rt((J=de.context)==null?void 0:J.elements.domReference,oe)})||Cy(D.nodesRef.current,le).find(de=>{var ne,J,j;return[(ne=de.context)==null?void 0:ne.elements.floating,ja((J=de.context)==null?void 0:J.elements.floating)].includes(oe)||((j=de.context)==null?void 0:j.elements.domReference)===oe})));if(he===b&&G&&gv(G,_),l&&he!==b&&!(ie!=null&&ie.isConnected)&&Gn(qt(G))===qt(G).body){Pt(G)&&G.focus();const de=L.current,ne=H(),J=ne[de]||ne[ne.length-1]||G;Pt(J)&&J.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!c)&&oe&&be&&!V.current&&oe!==mv()&&(C.current=!0,y(!1,ue,"focus-out"))})}const ce=!!(!D&&F);function Q(){Gt(R),v.current.insideReactTree=!0,R.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Pt(b))return b.addEventListener("focusout",ae),b.addEventListener("pointerdown",B),x.addEventListener("focusout",ae),ce&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",ae),b.removeEventListener("pointerdown",B),x.removeEventListener("focusout",ae),ce&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,D,F,y,d,l,H,w,T,_,v]);const se=P.useRef(null),te=P.useRef(null),q=hv([se,F?.beforeInsideRef]),Y=hv([te,F?.afterInsideRef]);P.useEffect(()=>{var B,ae;if(r||!x)return;const ce=Array.from((F==null||(B=F.portalNode)==null?void 0:B.querySelectorAll("["+co("portal")+"]"))||[]),ue=(ae=(D?Cy(D.nodesRef.current,T()):[]).find(ie=>{var le;return ed(((le=ie.context)==null?void 0:le.elements.domReference)||null)}))==null||(ae=ae.context)==null?void 0:ae.elements.domReference,oe=[x,ue,...ce,...E(),z.current,M.current,se.current,te.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,_.current.includes("reference")||w?b:null].filter(ie=>ie!=null),he=c||w?uv(oe,!O,O):uv(oe);return()=>{he()}},[r,b,x,c,_,F,w,A,O,D,T,E]),nt(()=>{if(r||!Pt(G))return;const B=qt(G),ae=Gn(B);queueMicrotask(()=>{const ce=ee(G),Q=N.current,ue=(typeof Q=="number"?ce[Q]:Q.current)||G,oe=Rt(G,ae);!I&&!oe&&g&&uo(ue,{preventScroll:ue===G})})},[r,g,G,I,ee,N]),nt(()=>{if(r||!G)return;const B=qt(G),ae=Gn(B);KP(ae);function ce(oe){let{reason:he,event:ie,nested:le}=oe;if(["hover","safe-polygon"].includes(he)&&ie.type==="mouseleave"&&(C.current=!0),he==="outside-press")if(le)C.current=!1;else if(Iy(ie)||Ay(ie))C.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?C.current=!1:C.current=!0}}m.on("openchange",ce);const Q=B.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,dd),U&&b&&b.insertAdjacentElement("afterend",Q);function ue(){if(typeof $.current=="boolean"){const oe=b||mv();return oe&&oe.isConnected?oe:Q}return $.current.current||Q}return()=>{m.off("openchange",ce);const oe=Gn(B),he=Rt(x,oe)||D&&so(D.nodesRef.current,T(),!1).some(le=>{var be;return Rt((be=le.context)==null?void 0:be.elements.floating,oe)}),ie=ue();queueMicrotask(()=>{const le=ZP(ie);$.current&&!C.current&&Pt(le)&&(!(le!==oe&&oe!==B.body)||he)&&le.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,$,v,m,D,U,b,T]),P.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(fd)}),[r]),nt(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:g,onOpenChange:y,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,c,g,y,d,b]),nt(()=>{r||G&&gv(G,_)},[r,G,_]);function Z(B){return r||!u||!c?null:h.jsx(XP,{ref:B==="start"?z:M,onClick:ae=>y(!1,ae.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const pe=!r&&A&&(c?!w:!0)&&(U||c);return h.jsxs(h.Fragment,{children:[pe&&h.jsx(Qa,{"data-type":"inside",ref:q,onFocus:B=>{if(c){const ce=ee();uo(o[0]==="reference"?ce[0]:ce[ce.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(C.current=!1,ns(B,F.portalNode)){const ce=Dy(b);ce?.focus()}else{var ae;(ae=F.beforeOutsideRef.current)==null||ae.focus()}}}),!w&&Z("start"),n,Z("end"),pe&&h.jsx(Qa,{"data-type":"inside",ref:Y,onFocus:B=>{if(c)uo(ee()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(C.current=!0),ns(B,F.portalNode)){const ce=Ny(b);ce?.focus()}else{var ae;(ae=F.afterOutsideRef.current)==null||ae.focus()}}})]})}let Ja=0;const yv="--floating-ui-scrollbar-width";function QP(){const e=Yu(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(yv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(yv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let vv=()=>{};const pd=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return Ja++,Ja===1&&(vv=QP()),()=>{Ja--,Ja===0&&vv()}},[r]),h.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function bv(e){return Pt(e.target)&&e.target.tagName==="BUTTON"}function JP(e){return Pt(e.target)&&e.target.tagName==="A"}function xv(e){return Ju(e)}function Ko(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=P.useRef(),p=P.useRef(!1),g=P.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const m=f.current;y.button===0&&a!=="click"&&(qo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,y.nativeEvent,"click"):(y.preventDefault(),r(!0,y.nativeEvent,"click"))))},onClick(y){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}qo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,y.nativeEvent,"click"):r(!0,y.nativeEvent,"click"))},onKeyDown(y){f.current=void 0,!(y.defaultPrevented||!u||bv(y))&&(y.key===" "&&!xv(i)&&(y.preventDefault(),p.current=!0),!JP(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!u||bv(y)||xv(i)||y.key===" "&&p.current&&(p.current=!1,r(!(n&&l),y.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return P.useMemo(()=>s?{reference:g}:{},[s,g])}function eO(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=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=s.width,d=s.height,f=s.x,p=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function wv(e){return e!=null&&e.clientX!=null}function tO(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=P.useRef(!1),f=P.useRef(null),[p,g]=P.useState(),[y,m]=P.useState([]),v=Ct((I,w)=>{d.current||r.current.openEvent&&!wv(r.current.openEvent)||s.setPositionReference(eO(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=Ct(I=>{c!=null||u!=null||(n?f.current||m([]):v(I.clientX,I.clientY))}),x=qo(p)?o:n,T=P.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const I=Wt(o);function w(k){const A=Yn(k);Rt(o,A)?(I.removeEventListener("mousemove",w),f.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||wv(r.current.openEvent)){I.addEventListener("mousemove",w);const k=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=k,k}s.setPositionReference(i)},[x,a,c,u,o,r,s,i,v]);P.useEffect(()=>T(),[T,y]),P.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),nt(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const E=P.useMemo(()=>{function I(w){let{pointerType:k}=w;g(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return P.useMemo(()=>a?{reference:E}:{},[a,E])}const nO={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},rO={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Sv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Nr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:g}=t,y=Or(),m=Ct(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,b=P.useRef(!1),{escapeKey:x,outsidePress:T}=Sv(p),{escapeKey:E,outsidePress:I}=Sv(g),w=P.useRef(!1),k=Ct(D=>{var F;if(!n||!s||!a||D.key!=="Escape"||w.current)return;const z=(F=i.current.floatingContext)==null?void 0:F.nodeId,M=y?so(y.nodesRef.current,z):[];if(!x&&(D.stopPropagation(),M.length>0)){let C=!0;if(M.forEach(V=>{var L;if((L=V.context)!=null&&L.open&&!V.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,$A(D)?D.nativeEvent:D,"escape-key")}),A=Ct(D=>{var F;const z=()=>{var M;k(D),(M=Yn(D))==null||M.removeEventListener("keydown",z)};(F=Yn(D))==null||F.addEventListener("keydown",z)}),O=Ct(D=>{var F;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||z||typeof v=="function"&&!v(D))return;const C=Yn(D),V="["+co("inert")+"]",L=qt(o.floating).querySelectorAll(V);let R=tt(C)?C:null;for(;R&&!pr(R);){const ee=hr(R);if(pr(ee)||!tt(ee))break;R=ee}if(L.length&&tt(C)&&!FA(C)&&!Rt(C,o.floating)&&Array.from(L).every(ee=>!Rt(R,ee)))return;if(Pt(C)&&$){const ee=pr(C),se=dn(C),te=/auto|scroll/,q=ee||te.test(se.overflowX),Y=ee||te.test(se.overflowY),Z=q&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,pe=Y&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,B=se.direction==="rtl",ae=pe&&(B?D.offsetX<=C.offsetWidth-C.clientWidth:D.offsetX>C.clientWidth),ce=Z&&D.offsetY>C.clientHeight;if(ae||ce)return}const U=(F=i.current.floatingContext)==null?void 0:F.nodeId,G=y&&so(y.nodesRef.current,U).some(ee=>{var se;return Qu(D,(se=ee.context)==null?void 0:se.elements.floating)});if(Qu(D,o.floating)||Qu(D,o.domReference)||G)return;const H=y?so(y.nodesRef.current,U):[];if(H.length>0){let ee=!0;if(H.forEach(se=>{var te;if((te=se.context)!=null&&te.open&&!se.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,D,"outside-press")}),_=Ct(D=>{var F;const z=()=>{var M;O(D),(M=Yn(D))==null||M.removeEventListener(c,z)};(F=Yn(D))==null||F.addEventListener(c,z)});P.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let D=-1;function F(L){r(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(D),w.current=!0}function M(){D=window.setTimeout(()=>{w.current=!1},Oa()?5:0)}const C=qt(o.floating);a&&(C.addEventListener("keydown",E?A:k,E),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",M)),v&&C.addEventListener(c,I?_:O,I);let V=[];return f&&(tt(o.domReference)&&(V=Ir(o.domReference)),tt(o.floating)&&(V=V.concat(Ir(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(Ir(o.reference.contextElement)))),V=V.filter(L=>{var R;return L!==((R=C.defaultView)==null?void 0:R.visualViewport)}),V.forEach(L=>{L.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(C.removeEventListener("keydown",E?A:k,E),C.removeEventListener("compositionstart",z),C.removeEventListener("compositionend",M)),v&&C.removeEventListener(c,I?_:O,I),V.forEach(L=>{L.removeEventListener("scroll",F)}),window.clearTimeout(D)}},[i,o,a,v,c,n,r,f,s,x,T,k,E,A,O,I,_]),P.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const N=P.useMemo(()=>({onKeyDown:k,...u&&{[nO[d]]:D=>{r(!1,D.nativeEvent,"reference-press")},...d!=="click"&&{onClick(D){r(!1,D.nativeEvent,"reference-press")}}}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[rO[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return P.useMemo(()=>s?{reference:N,floating:$}:{},[s,N,$])}function oO(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=is(),i=P.useRef({}),[s]=P.useState(()=>nv()),a=Pr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&VP("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=Ct((p,g,y)=>{i.current.openEvent=p?g:void 0,s.emit("openchange",{open:p,event:g,reason:y,nested:a}),n?.(p,g,y)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=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:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Kn(e){e===void 0&&(e={});const{nodeId:t}=e,n=oO({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=P.useState(null),[a,l]=P.useState(null),u=o?.domReference||i,d=P.useRef(null),f=Or();nt(()=>{u&&(d.current=u)},[u]);const p=PP({...e,elements:{...o,...a&&{reference:a}}}),g=P.useCallback(x=>{const T=tt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),p.refs.setReference(T)},[p.refs]),y=P.useCallback(x=>{(tt(x)||x===null)&&(d.current=x,s(x)),(tt(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!tt(x))&&p.refs.setReference(x)},[p.refs]),m=P.useMemo(()=>({...p.refs,setReference:y,setPositionReference:g,domReference:d}),[p.refs,y,g]),v=P.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),b=P.useMemo(()=>({...p,...r,refs:m,elements:v,nodeId:t}),[p,m,v,t,r]);return nt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(T=>T.id===t);x&&(x.context=b)}),P.useMemo(()=>({...p,context:b,refs:m,elements:v}),[p,m,v,b])}function hd(){return DA()&&Ty()}function iO(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(-1),d=P.useRef(!0);P.useEffect(()=>{if(!a)return;const p=Wt(s.domReference);function g(){!n&&Pt(s.domReference)&&s.domReference===Gn(qt(s.domReference))&&(c.current=!0)}function y(){d.current=!0}function m(){d.current=!1}return p.addEventListener("blur",g),hd()&&(p.addEventListener("keydown",y,!0),p.addEventListener("pointerdown",m,!0)),()=>{p.removeEventListener("blur",g),hd()&&(p.removeEventListener("keydown",y,!0),p.removeEventListener("pointerdown",m,!0))}},[s.domReference,n,a]),P.useEffect(()=>{if(!a)return;function p(g){let{reason:y}=g;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,a]),P.useEffect(()=>()=>{Gt(u)},[]);const f=P.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const g=Yn(p.nativeEvent);if(l&&tt(g)){if(hd()&&!p.relatedTarget){if(!d.current&&!Ju(g))return}else if(!LA(g))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const g=p.relatedTarget,y=p.nativeEvent,m=tt(g)&&g.hasAttribute(co("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=Gn(s.domReference?s.domReference.ownerDocument:document);!g&&b===s.domReference||Rt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Rt(s.domReference,b)||m||r(!1,y,"focus")})}}),[i,s.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function md(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Xy]:s,[Qy]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[MP]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Xy,Qy].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),s[c]=function(){for(var f,p=arguments.length,g=new Array(p),y=0;y<p;y++)g[y]=arguments[y];return(f=r.get(c))==null?void 0:f.map(m=>m(...g)).find(m=>m!==void 0)}}}else s[c]=u}),s),{})}}function Zn(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=P.useCallback(a=>md(a,e,"reference"),t),i=P.useCallback(a=>md(a,e,"floating"),n),s=P.useCallback(a=>md(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const sO="Escape";function el(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function tl(e,t){return el(t,e===Jy||e===Ya,e===rs||e===os)}function gd(e,t,n){return el(t,e===Ya,n?e===rs:e===os)||e==="Enter"||e===" "||e===""}function Tv(e,t,n){return el(t,n?e===rs:e===os,e===Ya)}function Ev(e,t,n,r){const o=n?e===os:e===rs,i=e===Jy;return t==="both"||t==="horizontal"&&r&&r>1?e===sO:el(t,o,i)}function nl(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:g=!1,virtual:y=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:k,itemSizes:A,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Ka("`useListNavigation` looping must be enabled to allow escaping."),y||Ka("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Ka("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=ja(o.floating),N=Ht(_),$=Pr(),D=Or();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const F=Ct(()=>{l(C.current===-1?null:C.current)}),z=ed(o.domReference),M=P.useRef(m),C=P.useRef(u??-1),V=P.useRef(null),L=P.useRef(!0),R=P.useRef(F),U=P.useRef(!!o.floating),G=P.useRef(n),H=P.useRef(!1),ee=P.useRef(!1),se=Ht(x),te=Ht(n),q=Ht(w),Y=Ht(u),[Z,pe]=P.useState(),[B,ae]=P.useState(),ce=Ct(()=>{function de(X){if(y){var me;(me=X.id)!=null&&me.endsWith("-fui-option")&&(X.id=i+"-"+Math.random().toString(16).slice(2,10)),pe(X.id),D?.events.emit("virtualfocus",X),k&&(k.current=X)}else uo(X,{sync:H.current,preventScroll:!0})}const ne=s.current[C.current],J=ee.current;ne&&de(ne),(H.current?X=>X():requestAnimationFrame)(()=>{const X=s.current[C.current]||ne;if(!X)return;ne||de(X);const me=q.current;me&&ue&&(J||!L.current)&&(X.scrollIntoView==null||X.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});nt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(ee.current=!0,C.current=u,F()):U.current&&(C.current=-1,R.current()))},[c,n,o.floating,u,F]),nt(()=>{if(c&&n&&o.floating)if(a==null){if(H.current=!1,Y.current!=null)return;if(U.current&&(C.current=-1,ce()),(!G.current||!U.current)&&M.current&&(V.current!=null||M.current===!0&&V.current==null)){let de=0;const ne=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(ne),de++):(C.current=V.current==null||gd(V.current,T,g)||p?td(s,se.current):Py(s,se.current),V.current=null,F())};ne()}}else es(s,a)||(C.current=a,ce(),ee.current=!1)},[c,n,o.floating,a,Y,p,s,T,g,F,ce,se]),nt(()=>{var de;if(!c||o.floating||!D||y||!U.current)return;const ne=D.nodesRef.current,J=(de=ne.find(me=>me.id===$))==null||(de=de.context)==null?void 0:de.elements.floating,j=Gn(qt(o.floating)),X=ne.some(me=>me.context&&Rt(me.context.elements.floating,j));J&&!X&&L.current&&J.focus({preventScroll:!0})},[c,o.floating,D,$,y]),nt(()=>{if(!c||!D||!y||$)return;function de(ne){ae(ne.id),k&&(k.current=ne)}return D.events.on("virtualfocus",de),()=>{D.events.off("virtualfocus",de)}},[c,D,y,$,k]),nt(()=>{R.current=F,G.current=n,U.current=!!o.floating}),nt(()=>{n||(V.current=null,M.current=m)},[n,m]);const Q=a!=null,ue=P.useMemo(()=>{function de(J){if(!te.current)return;const j=s.current.indexOf(J);j!==-1&&C.current!==j&&(C.current=j,F())}return{onFocus(J){let{currentTarget:j}=J;H.current=!0,de(j)},onClick:J=>{let{currentTarget:j}=J;return j.focus({preventScroll:!0})},onMouseMove(J){let{currentTarget:j}=J;H.current=!0,ee.current=!1,v&&de(j)},onPointerLeave(J){let{pointerType:j}=J;if(!(!L.current||j==="touch")&&(H.current=!0,!!v&&(C.current=-1,F(),!y))){var X;(X=N.current)==null||X.focus({preventScroll:!0})}}}},[te,N,v,s,F,y]),oe=P.useCallback(()=>{var de;return E??(D==null||(de=D.nodesRef.current.find(ne=>ne.id===$))==null||(de=de.context)==null||(de=de.dataRef)==null?void 0:de.current.orientation)},[$,D,E]),he=Ct(de=>{if(L.current=!1,H.current=!0,de.which===229||!te.current&&de.currentTarget===N.current)return;if(p&&Ev(de.key,T,g,I)){tl(de.key,oe())||Ut(de),r(!1,de.nativeEvent,"list-navigation"),Pt(o.domReference)&&(y?D?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const ne=C.current,J=td(s,x),j=Py(s,x);if(z||(de.key==="Home"&&(Ut(de),C.current=J,F()),de.key==="End"&&(Ut(de),C.current=j,F())),I>1){const X=A||Array.from({length:s.current.length},()=>({width:1,height:1})),me=WA(X,I,O),ve=me.findIndex(_e=>_e!=null&&!Ra(s,_e,x)),ke=me.reduce((_e,ct,_t)=>ct!=null&&!Ra(s,ct,x)?_t:_e,-1),Me=me[HA({current:me.map(_e=>_e!=null?s.current[_e]:null)},{event:de,orientation:T,loop:f,rtl:g,cols:I,disabledIndices:UA([...(typeof x!="function"?x:null)||s.current.map((_e,ct)=>Ra(s,ct,x)?ct:void 0),void 0],me),minIndex:ve,maxIndex:ke,prevIndex:qA(C.current>j?J:C.current,X,me,I,de.key===Ya?"bl":de.key===(g?rs:os)?"tr":"tl"),stopEvent:!0})];if(Me!=null&&(C.current=Me,F()),T==="both")return}if(tl(de.key,T)){if(Ut(de),n&&!y&&Gn(de.currentTarget.ownerDocument)===de.currentTarget){C.current=gd(de.key,T,g)?J:j,F();return}gd(de.key,T,g)?f?C.current=ne>=j?d&&ne!==s.current.length?-1:J:Zt(s,{startingIndex:ne,disabledIndices:x}):C.current=Math.min(j,Zt(s,{startingIndex:ne,disabledIndices:x})):f?C.current=ne<=J?d&&ne!==-1?s.current.length:j:Zt(s,{startingIndex:ne,decrement:!0,disabledIndices:x}):C.current=Math.max(J,Zt(s,{startingIndex:ne,decrement:!0,disabledIndices:x})),es(s,C.current)&&(C.current=-1),F()}}),ie=P.useMemo(()=>y&&n&&Q&&{"aria-activedescendant":B||Z},[y,n,Q,B,Z]),le=P.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:ie,onKeyDown:he,onPointerMove(){L.current=!0}}),[ie,he,T,z]),be=P.useMemo(()=>{function de(J){m==="auto"&&Iy(J.nativeEvent)&&(M.current=!0)}function ne(J){M.current=m,m==="auto"&&Ay(J.nativeEvent)&&(M.current=!0)}return{...ie,onKeyDown(J){L.current=!1;const j=J.key.startsWith("Arrow"),X=["Home","End"].includes(J.key),me=j||X,ve=Tv(J.key,T,g),ke=Ev(J.key,T,g,I),Me=Tv(J.key,oe(),g),_e=tl(J.key,T),ct=(p?Me:_e)||J.key==="Enter"||J.key.trim()==="";if(y&&n){const W=D?.nodesRef.current.find(Oe=>Oe.parentId==null),K=D&&W?VA(D.nodesRef.current,W.id):null;if(me&&K&&k){const Oe=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ve||ke){var _t,Qt;const Ue=((_t=K.context)==null?void 0:_t.elements.domReference)===J.currentTarget,Ye=ke&&!Ue?(Qt=K.context)==null?void 0:Qt.elements.domReference:ve?s.current.find($e=>$e?.id===Z):null;Ye&&(Ut(J),Ye.dispatchEvent(Oe),ae(void 0))}if((_e||X)&&K.context&&K.context.open&&K.parentId&&J.currentTarget!==K.context.elements.domReference){var Be;Ut(J),(Be=K.context.elements.domReference)==null||Be.dispatchEvent(Oe);return}}return he(J)}if(!(!n&&!b&&j)){if(ct){const W=tl(J.key,oe());V.current=p&&W?null:J.key}if(p){Me&&(Ut(J),n?(C.current=td(s,se.current),F()):r(!0,J.nativeEvent,"list-navigation"));return}_e&&(u!=null&&(C.current=u),Ut(J),!n&&b?r(!0,J.nativeEvent,"list-navigation"):he(J),n&&F())}},onFocus(){n&&!y&&(C.current=-1,F())},onPointerDown:ne,onPointerEnter:ne,onMouseDown:de,onClick:de}},[Z,ie,I,he,se,m,s,p,F,r,n,b,T,oe,g,u,D,y,k]);return P.useMemo(()=>c?{reference:be,floating:le,item:ue}:{},[c,be,le,ue])}const aO=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function yr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=is(),u=((n=i.domReference)==null?void 0:n.id)||c,d=P.useMemo(()=>{var b;return((b=ja(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=aO.get(l))!=null?r:l,g=Pr()!=null,y=P.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&g&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,g,o,u,l]),m=P.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),v=P.useCallback(b=>{let{active:x,selected:T}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return P.useMemo(()=>a?{reference:y,floating:m,item:v}:{},[a,y,m,v])}const kv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Zo(e,t){return typeof e=="function"?e(t):e}function lO(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 cO(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=P.useState("unmounted"),c=lO(n,s);return!c&&a==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{ur.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Cv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=P.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[p,g]=P.useState(()=>({...Zo(i,c),...Zo(n,c)})),{isMounted:y,status:m}=cO(e,{duration:s}),v=Ht(n),b=Ht(r),x=Ht(o),T=Ht(i);return nt(()=>{const E=Zo(v.current,c),I=Zo(x.current,c),w=Zo(T.current,c),k=Zo(b.current,c)||Object.keys(E).reduce((A,O)=>(A[O]="",A),{});if(m==="initial"&&g(A=>({transitionProperty:A.transitionProperty,...w,...E})),m==="open"&&g({transitionProperty:Object.keys(k).map(kv).join(","),transitionDuration:d+"ms",...w,...k}),m==="close"){const A=I||E;g({transitionProperty:Object.keys(A).map(kv).join(","),transitionDuration:f+"ms",...w,...A})}},[f,x,v,b,T,d,m,c]),{isMounted:y,styles:p}}function uO(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,g=P.useRef(-1),y=P.useRef(""),m=P.useRef((n=p??s)!=null?n:-1),v=P.useRef(null),b=Ct(a),x=Ct(l),T=Ht(u),E=Ht(f);nt(()=>{r&&(Gt(g),v.current=null,y.current="")},[r]),nt(()=>{if(r&&y.current===""){var O;m.current=(O=p??s)!=null?O:-1}},[r,p,s]);const I=Ct(O=>{O?o.current.typing||(o.current.typing=O,x(O)):o.current.typing&&(o.current.typing=O,x(O))}),w=Ct(O=>{function _(z,M,C){const V=T.current?T.current(M,C):M.find(L=>L?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return V?z.indexOf(V):-1}const N=i.current;if(y.current.length>0&&y.current[0]!==" "&&(_(N,N,y.current)===-1?I(!1):O.key===" "&&Ut(O)),N==null||E.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Ut(O),I(!0)),N.every(z=>{var M,C;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((C=z[1])==null?void 0:C.toLocaleLowerCase()):!0})&&y.current===O.key&&(y.current="",m.current=v.current),y.current+=O.key,Gt(g),g.current=window.setTimeout(()=>{y.current="",m.current=v.current,I(!1)},d);const D=m.current,F=_(N,[...N.slice((D||0)+1),...N.slice(0,(D||0)+1)],y.current);F!==-1?(b(F),v.current=F):O.key!==" "&&(y.current="",I(!1))}),k=P.useMemo(()=>({onKeyDown:w}),[w]),A=P.useMemo(()=>({onKeyDown:w,onKeyUp(O){O.key===" "&&I(!1)}}),[w,I]);return P.useMemo(()=>c?{reference:k,floating:A}:{},[c,k,A])}function Iv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Iv(e,o.id,n)])}function Av(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function dO(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Pv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),g=p-l;if(s===null||a===null||g===0)return s=d,a=f,l=p,null;const y=d-s,m=f-a,b=Math.sqrt(y*y+m*m)/g;return s=d,a=f,l=p,b}const u=d=>{let{x:f,y:p,placement:g,elements:y,onClose:m,nodeId:v,tree:b}=d;return function(T){function E(){Gt(o),m()}if(Gt(o),!y.domReference||!y.floating||g==null||f==null||p==null)return;const{clientX:I,clientY:w}=T,k=[I,w],A=BP(T),O=T.type==="mouseleave",_=cd(y.floating,A),N=cd(y.domReference,A),$=y.domReference.getBoundingClientRect(),D=y.floating.getBoundingClientRect(),F=g.split("-")[0],z=f>D.right-D.width/2,M=p>D.bottom-D.height/2,C=dO(k,$),V=D.width>$.width,L=D.height>$.height,R=(V?$:D).left,U=(V?$:D).right,G=(L?$:D).top,H=(L?$:D).bottom;if(_&&(i=!0,!O))return;if(N&&(i=!1),N&&!O){i=!0;return}if(O&&tt(T.relatedTarget)&&cd(y.floating,T.relatedTarget)||b&&Iv(b.nodesRef.current,v).length)return;if(F==="top"&&p>=$.bottom-1||F==="bottom"&&p<=$.top+1||F==="left"&&f>=$.right-1||F==="right"&&f<=$.left+1)return E();let ee=[];switch(F){case"top":ee=[[R,$.top+1],[R,D.bottom-1],[U,D.bottom-1],[U,$.top+1]];break;case"bottom":ee=[[R,D.top+1],[R,$.bottom-1],[U,$.bottom-1],[U,D.top+1]];break;case"left":ee=[[D.right-1,H],[D.right-1,G],[$.left+1,G],[$.left+1,H]];break;case"right":ee=[[$.right-1,H],[$.right-1,G],[D.left+1,G],[D.left+1,H]];break}function se(te){let[q,Y]=te;switch(F){case"top":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y+t+1],pe=[V?q-t/2:z?q+t*4:q-t*4,Y+t+1],B=[[D.left,z||V?D.bottom-t:D.top],[D.right,z?V?D.bottom-t:D.top:D.bottom-t]];return[Z,pe,...B]}case"bottom":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y-t],pe=[V?q-t/2:z?q+t*4:q-t*4,Y-t],B=[[D.left,z||V?D.top+t:D.bottom],[D.right,z?V?D.top+t:D.bottom:D.top+t]];return[Z,pe,...B]}case"left":{const Z=[q+t+1,L?Y+t/2:M?Y+t*4:Y-t*4],pe=[q+t+1,L?Y-t/2:M?Y+t*4:Y-t*4];return[...[[M||L?D.right-t:D.left,D.top],[M?L?D.right-t:D.left:D.right-t,D.bottom]],Z,pe]}case"right":{const Z=[q-t,L?Y+t/2:M?Y+t*4:Y-t*4],pe=[q-t,L?Y-t/2:M?Y+t*4:Y-t*4],B=[[M||L?D.left+t:D.right,D.top],[M?L?D.left+t:D.right:D.left+t,D.bottom]];return[Z,pe,...B]}}}if(!Av([I,w],ee)){if(i&&!C)return E();if(!O&&r){const te=c(T.clientX,T.clientY);if(te!==null&&te<.1)return E()}Av([I,w],se([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const Ov=200,fO=500,Xo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},Dv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Nv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},yd=(e,t)=>{const n=Dv(t,Nv.basic,e)||Dv(t,Nv.extend,e);return n===void 0||n===e?void 0:n},Mr=()=>typeof window>"u",vd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Mv=(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},pO=e=>!e,Qo=()=>{},_v=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},bd=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=Qo,followCursor:d=!1,...f},p){const[g,y]=S.useState(n??!1),m=S.useRef(null),v=t||"span",b=D=>{y(D),u?.(D)},{refs:x,floatingStyles:T,context:E}=Kn({placement:i,open:g,whileElementsMounted:lo,onOpenChange:n?void 0:b,middleware:[Ua(),Go(5),Yy(),id({padding:5,element:m}),Ga({fallbackAxisSideDirection:"start"})]}),I=Nr(E,{enabled:l}),w=yr(E,{role:"tooltip",enabled:l}),k=iO(E,{enabled:l?s:!1}),A=Ko(E,{enabled:l?c:!1}),O=tO(E,{enabled:!!l&&!!d}),_=sv(E,{move:!0,delay:{open:Ov},enabled:l?a:!1,handleClose:c?Pv():null}),{getReferenceProps:N,getFloatingProps:$}=Zn([w,I,O,s?k:void 0,a?_:void 0,c?A:void 0]);return S.useEffect(()=>y(n===void 0?!1:n),[n]),h.jsxs(S.Fragment,{children:[h.jsx(v,{...N(f),ref:fr(x.setReference,p),children:r}),g&&h.jsx(gr,{children:h.jsxs(un,{...$(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[h.jsx(sd,{ref:m,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),Fv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>h.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:h.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:[s,e||o?h.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?h.jsx(bd,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:h.jsx("span",{className:"cursor-help",children:h.jsx(Er,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:h.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?h.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[h.jsx(_u,{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}),h.jsx(_I,{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]}),as=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:g,componentName:y,placeholder:m,hideLeft:v=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=ju(),k=T!==void 0?T:w.input.iconFeedback,A=d??p,O=Tt(),_=e??O.inputOptionalLabel;return h.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":y,"data-interactive":!!i,className:Pe("group flex min-h-0 min-w-0 max-w-full flex-col items-start",r),children:[h.jsxs("label",{form:u,htmlFor:A,className:"relative inline-flex w-full max-w-full cursor-text flex-row flex-wrap justify-between gap-1 text-field-label text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:h.jsx(Fv,{info:a,hideLeft:v,reportStatus:k,title:g,placeholder:m,children:_||n?h.jsxs(S.Fragment,{children:[b?null:h.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors group-focus-within:text-primary group-hover:text-primary aria-disabled:text-disabled",children:_}),n?h.jsx(S.Fragment,{children:n}):null]}):null}),h.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 ${f}`,children:[t?h.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?h.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),h.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}),h.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})]})}),Lv=(e,t,n,r)=>S.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:g="text",labelClassName:y,feedback:m=null,hideLeft:v=!1,loading:b,hiddenLabel:x,...T},E)=>{const I=e,w=T.id??T.name,k=S.useRef(null);return S.useEffect(()=>{if(k.current===null)return;const A=k.current,O=Gi(k.current),_=r?.(A),N=$=>{const D=$;if(D.key==="Enter"&&A.enterKeyHint==="next"){const F=A.getAttribute("data-next");if(F){const z=document.getElementById(F);if(z)return z.focus(),void D.preventDefault()}}};return A.addEventListener("keydown",N),()=>{_?.(),O(),A.removeEventListener("keydown",N)}},[]),h.jsx(as,{...n,info:i,left:s,error:l,right:c,form:T.form,loading:b,name:T.name,feedback:m,hideLeft:v,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:x,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:p,labelClassName:y,placeholder:T.placeholder,container:Pe(u,n.container),children:h.jsx(I,{...n,...T,id:w,name:w,type:g,"data-next":a,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:fr(E,k),className:Pe("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",T.className)})})}),Jo=Lv(Kg,"input",{type:"text"}),hO=_o("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",tiny:"h-6 px-2 py-1 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-1 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-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Jt=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return h.jsxs(un,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Pe(hO({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),po=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:p,left:g,error:y,...m},v)=>{const b=Tt(),x=S.useRef(null),T=m.id??m.name;S.useImperativeHandle(v,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,k=Gi(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{k(),I.abort()}},[]);const E=()=>x.current?.focus();return h.jsx(as,{info:n,left:g,error:y,form:m.form,loading:c,name:m.name,feedback:o,hideLeft:f,required:e,title:m.title,container:d,componentName:"select",rightLabel:a,hiddenLabel:l,interactive:s,id:m.name||m.id,optionalText:u,labelClassName:i,placeholder:m.placeholder,right:h.jsxs("label",{htmlFor:T,children:[p,h.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[h.jsx(Mu,{size:20}),h.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:h.jsxs("select",{...m,id:T,name:T,required:e,ref:fr(v,x),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:Pe("input select group h-10 w-full flex-1 appearance-none rounded-md text-base","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",m.className),children:[h.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(I=>S.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${T}-select-option-${I.value}`}))]})})});function an(e){return e?.ownerDocument||document}function mO({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=P.useRef(e!==void 0),[i,s]=P.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){P.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
1
+ (function(ne,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(ne=typeof globalThis<"u"?globalThis:ne||self,S(ne.components={},ne.React,ne["react/jsx-runtime"],ne.ReactDOM))})(this,(function(ne,S,p,qi){"use strict";function gm(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=gm(S),ur=gm(qi);function ym(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=ym(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vm(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ym(e))&&(r&&(r+=" "),r+=t);return r}const bm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xm=vm,_o=(e,t)=>n=>{var r;if(t?.variants==null)return xm(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=bm(u)||bm(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(m=>{let[y,g]=m;return Array.isArray(g)?g.includes({...i,...a}[y]):{...i,...a}[y]===g})?[...c,d,f]:c},[]);return xm(e,s,l,n?.class,n?.className)};var wm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function LC(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Vc,Tm;function Fo(){return Tm||(Tm=1,Vc=TypeError),Vc}const VC=LC(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var $c,Em;function pa(){if(Em)return $c;Em=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,s=o&&i&&typeof i.get=="function"?i.get:null,a=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,f=typeof WeakRef=="function"&&WeakRef.prototype,h=f?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,C=Array.prototype.join,A=Array.prototype.slice,O=Math.floor,_=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,D=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function k(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||I.call(/e/,K))return K;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var Ue=W<0?-O(-W):O(W);if(Ue!==W){var Ye=String(Ue),$e=b.call(K,Ye.length+1);return x.call(Ye,Oe,"$&_")+"."+x.call(x.call($e,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Oe,"$&_")}var V=VC,L=V.custom,R=ce(L)?L:null,U={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$c=function W(K,Oe,Ue,Ye){var $e=Oe||{};if(oe($e,"quoteStyle")&&!oe(U,$e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(oe($e,"maxStringLength")&&(typeof $e.maxStringLength=="number"?$e.maxStringLength<0&&$e.maxStringLength!==1/0:$e.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=oe($e,"customInspect")?$e.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(oe($e,"indent")&&$e.indent!==null&&$e.indent!==" "&&!(parseInt($e.indent,10)===$e.indent&&$e.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(oe($e,"numericSeparator")&&typeof $e.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var gt=$e.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return me(K,$e);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var it=String(K);return gt?k(K,it):it}if(typeof K=="bigint"){var wn=String(K)+"n";return gt?k(K,wn):wn}var to=typeof $e.depth>"u"?5:$e.depth;if(typeof Ue>"u"&&(Ue=0),Ue>=to&&to>0&&typeof K=="object")return te(K)?"[Array]":"[Object]";var no=_t($e,Ue);if(typeof Ye>"u")Ye=[];else if(le(Ye,K)>=0)return"[Circular]";function Pn(Wi,Lc,$3){if(Lc&&(Ye=A.call(Ye),Ye.push(Lc)),$3){var FC={depth:$e.depth};return oe($e,"quoteStyle")&&(FC.quoteStyle=$e.quoteStyle),W(Wi,FC,Ue+1,Ye)}return W(Wi,$e,Ue+1,Ye)}if(typeof K=="function"&&!Y(K)){var Ri=ie(K),Hi=Be(K,Pn);return"[Function"+(Ri?": "+Ri:" (anonymous)")+"]"+(Hi.length>0?" { "+C.call(Hi,", ")+" }":"")}if(ce(K)){var OC=D?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(K);return typeof K=="object"&&!D?Ce(OC):OC}if(X(K)){for(var fa="<"+E.call(String(K.nodeName)),cm=K.attributes||[],Fc=0;Fc<cm.length;Fc++)fa+=" "+cm[Fc].name+"="+H(ee(cm[Fc].value),"double",$e);return fa+=">",K.childNodes&&K.childNodes.length&&(fa+="..."),fa+="</"+E.call(String(K.nodeName))+">",fa}if(te(K)){if(K.length===0)return"[]";var um=Be(K,Pn);return no&&!ct(um)?"["+Qt(um,no)+"]":"[ "+C.call(um,", ")+" ]"}if(Z(K)){var dm=Be(K,Pn);return!("cause"in Error.prototype)&&"cause"in K&&!z.call(K,"cause")?"{ ["+String(K)+"] "+C.call(w.call("[cause]: "+Pn(K.cause),dm),", ")+" }":dm.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+C.call(dm,", ")+" }"}if(typeof K=="object"&&ot){if(R&&typeof K[R]=="function"&&V)return V(K,{depth:to-Ue});if(ot!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(be(K)){var DC=[];return r&&r.call(K,function(Wi,Lc){DC.push(Pn(Lc,K,!0)+" => "+Pn(Wi,K))}),_e("Map",n.call(K),DC,no)}if(J(K)){var NC=[];return a&&a.call(K,function(Wi){NC.push(Pn(Wi,K))}),_e("Set",s.call(K),NC,no)}if(de(K))return Me("WeakMap");if(j(K))return Me("WeakSet");if(re(K))return Me("WeakRef");if(B(K))return Ce(Pn(Number(K)));if(Q(K))return Ce(Pn(_.call(K)));if(ae(K))return Ce(m.call(K));if(pe(K))return Ce(Pn(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof wm<"u"&&K===wm)return"{ [object globalThis] }";if(!q(K)&&!Y(K)){var fm=Be(K,Pn),MC=M?M(K)===Object.prototype:K instanceof Object||K.constructor===Object,pm=K instanceof Object?"":"null prototype",_C=!MC&&F&&Object(K)===K&&F in K?b.call(he(K),8,-1):pm?"Object":"",V3=MC||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",hm=V3+(_C||pm?"["+C.call(w.call([],_C||[],pm||[]),": ")+"] ":"");return fm.length===0?hm+"{}":no?hm+"{"+Qt(fm,no)+"}":hm+"{ "+C.call(fm,", ")+" }"}return String(K)};function H(W,K,Oe){var Ue=Oe.quoteStyle||K,Ye=U[Ue];return Ye+W+Ye}function ee(W){return x.call(String(W),/"/g,"&quot;")}function se(W){return!F||!(typeof W=="object"&&(F in W||typeof W[F]<"u"))}function te(W){return he(W)==="[object Array]"&&se(W)}function q(W){return he(W)==="[object Date]"&&se(W)}function Y(W){return he(W)==="[object RegExp]"&&se(W)}function Z(W){return he(W)==="[object Error]"&&se(W)}function pe(W){return he(W)==="[object String]"&&se(W)}function B(W){return he(W)==="[object Number]"&&se(W)}function ae(W){return he(W)==="[object Boolean]"&&se(W)}function ce(W){if(D)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 Q(W){if(!W||typeof W!="object"||!_)return!1;try{return _.call(W),!0}catch{}return!1}var ue=Object.prototype.hasOwnProperty||function(W){return W in this};function oe(W,K){return ue.call(W,K)}function he(W){return y.call(W)}function ie(W){if(W.name)return W.name;var K=v.call(g.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function le(W,K){if(W.indexOf)return W.indexOf(K);for(var Oe=0,Ue=W.length;Oe<Ue;Oe++)if(W[Oe]===K)return Oe;return-1}function be(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{s.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 re(W){if(!h||!W||typeof W!="object")return!1;try{return h.call(W),!0}catch{}return!1}function J(W){if(!s||!W||typeof W!="object")return!1;try{s.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function j(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function X(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function me(W,K){if(W.length>K.maxStringLength){var Oe=W.length-K.maxStringLength,Ue="... "+Oe+" more character"+(Oe>1?"s":"");return me(b.call(W,0,K.maxStringLength),K)+Ue}var Ye=G[K.quoteStyle||"single"];Ye.lastIndex=0;var $e=x.call(x.call(W,Ye,"\\$1"),/[\x00-\x1f]/g,ve);return H($e,"single",K)}function ve(W){var K=W.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Oe?"\\"+Oe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function Ce(W){return"Object("+W+")"}function Me(W){return W+" { ? }"}function _e(W,K,Oe,Ue){var Ye=Ue?Qt(Oe,Ue):C.call(Oe,", ");return W+" ("+K+") {"+Ye+"}"}function ct(W){for(var K=0;K<W.length;K++)if(le(W[K],`
2
+ `)>=0)return!1;return!0}function _t(W,K){var Oe;if(W.indent===" ")Oe=" ";else if(typeof W.indent=="number"&&W.indent>0)Oe=C.call(Array(W.indent+1)," ");else return null;return{base:Oe,prev:C.call(Array(K+1),Oe)}}function Qt(W,K){if(W.length===0)return"";var Oe=`
3
+ `+K.prev+K.base;return Oe+C.call(W,","+Oe)+`
4
+ `+K.prev}function Be(W,K){var Oe=te(W),Ue=[];if(Oe){Ue.length=W.length;for(var Ye=0;Ye<W.length;Ye++)Ue[Ye]=oe(W,Ye)?K(W[Ye],W):""}var $e=typeof N=="function"?N(W):[],ot;if(D){ot={};for(var gt=0;gt<$e.length;gt++)ot["$"+$e[gt]]=$e[gt]}for(var it in W)oe(W,it)&&(Oe&&String(Number(it))===it&&it<W.length||D&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ue.push(K(it,W)+": "+K(W[it],W)):Ue.push(it+": "+K(W[it],W))));if(typeof N=="function")for(var wn=0;wn<$e.length;wn++)z.call(W,$e[wn])&&Ue.push("["+K($e[wn])+"]: "+K(W[$e[wn]],W));return Ue}return $c}var zc,Cm;function $C(){if(Cm)return zc;Cm=1;var e=pa(),t=Fo(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return zc=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,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},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},zc}var jc,km;function Im(){return km||(km=1,jc=Object),jc}var Bc,Am;function zC(){return Am||(Am=1,Bc=Error),Bc}var Rc,Pm;function jC(){return Pm||(Pm=1,Rc=EvalError),Rc}var Hc,Om;function BC(){return Om||(Om=1,Hc=RangeError),Hc}var Wc,Dm;function RC(){return Dm||(Dm=1,Wc=ReferenceError),Wc}var qc,Nm;function HC(){return Nm||(Nm=1,qc=SyntaxError),qc}var Uc,Mm;function WC(){return Mm||(Mm=1,Uc=URIError),Uc}var Gc,_m;function qC(){return _m||(_m=1,Gc=Math.abs),Gc}var Yc,Fm;function UC(){return Fm||(Fm=1,Yc=Math.floor),Yc}var Kc,Lm;function GC(){return Lm||(Lm=1,Kc=Math.max),Kc}var Zc,Vm;function YC(){return Vm||(Vm=1,Zc=Math.min),Zc}var Xc,$m;function KC(){return $m||($m=1,Xc=Math.pow),Xc}var Qc,zm;function ZC(){return zm||(zm=1,Qc=Math.round),Qc}var Jc,jm;function XC(){return jm||(jm=1,Jc=Number.isNaN||function(t){return t!==t}),Jc}var eu,Bm;function QC(){if(Bm)return eu;Bm=1;var e=XC();return eu=function(n){return e(n)||n===0?n:n<0?-1:1},eu}var tu,Rm;function JC(){return Rm||(Rm=1,tu=Object.getOwnPropertyDescriptor),tu}var nu,Hm;function Wm(){if(Hm)return nu;Hm=1;var e=JC();if(e)try{e([],"length")}catch{e=null}return nu=e,nu}var ru,qm;function ek(){if(qm)return ru;qm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ru=e,ru}var ou,Um;function tk(){return Um||(Um=1,ou=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 s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),ou}var iu,Gm;function nk(){if(Gm)return iu;Gm=1;var e=typeof Symbol<"u"&&Symbol,t=tk();return iu=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},iu}var su,Ym;function Km(){return Ym||(Ym=1,su=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),su}var au,Zm;function Xm(){if(Zm)return au;Zm=1;var e=Im();return au=e.getPrototypeOf||null,au}var lu,Qm;function rk(){if(Qm)return lu;Qm=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 f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return lu=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,f=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},h=n(0,c.length-u.length),m=[],y=0;y<h;y++)m[y]="$"+y;if(d=Function("binder","return function ("+s(m,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var g=function(){};g.prototype=c.prototype,d.prototype=new g,g.prototype=null}return d},lu}var cu,Jm;function ha(){if(Jm)return cu;Jm=1;var e=rk();return cu=Function.prototype.bind||e,cu}var uu,eg;function du(){return eg||(eg=1,uu=Function.prototype.call),uu}var fu,tg;function ng(){return tg||(tg=1,fu=Function.prototype.apply),fu}var pu,rg;function ok(){return rg||(rg=1,pu=typeof Reflect<"u"&&Reflect&&Reflect.apply),pu}var hu,og;function ik(){if(og)return hu;og=1;var e=ha(),t=ng(),n=du(),r=ok();return hu=r||e.call(n,t),hu}var mu,ig;function sg(){if(ig)return mu;ig=1;var e=ha(),t=Fo(),n=du(),r=ik();return mu=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},mu}var gu,ag;function sk(){if(ag)return gu;ag=1;var e=sg(),t=Wm(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return gu=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,gu}var yu,lg;function ak(){if(lg)return yu;lg=1;var e=Km(),t=Xm(),n=sk();return yu=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,yu}var vu,cg;function lk(){if(cg)return vu;cg=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=ha();return vu=n.call(e,t),vu}var bu,ug;function xu(){if(ug)return bu;ug=1;var e,t=Im(),n=zC(),r=jC(),o=BC(),i=RC(),s=HC(),a=Fo(),l=WC(),c=qC(),u=UC(),d=GC(),f=YC(),h=KC(),m=ZC(),y=QC(),g=Function,v=function(Y){try{return g('"use strict"; return ('+Y+").constructor;")()}catch{}},b=Wm(),x=ek(),T=function(){throw new a},E=b?(function(){try{return arguments.callee,T}catch{try{return b(arguments,"callee").get}catch{return T}}})():T,I=nk()(),w=ak(),C=Xm(),A=Km(),O=ng(),_=du(),N={},$=typeof Uint8Array>"u"||!w?e:w(Uint8Array),D={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][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%":g,"%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%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":E,"%TypedArray%":$,"%TypeError%":a,"%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%":_,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":h,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(Y){var F=w(w(Y));D["%Error.prototype%"]=F}var z=function Y(Z){var pe;if(Z==="%AsyncFunction%")pe=v("async function () {}");else if(Z==="%GeneratorFunction%")pe=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")pe=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var B=Y("%AsyncGeneratorFunction%");B&&(pe=B.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ae=Y("%AsyncGenerator%");ae&&w&&(pe=w(ae.prototype))}return D[Z]=pe,pe},M={__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"]},k=ha(),V=lk(),L=k.call(_,Array.prototype.concat),R=k.call(O,Array.prototype.splice),U=k.call(_,String.prototype.replace),G=k.call(_,String.prototype.slice),H=k.call(_,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,se=/\\(\\)?/g,te=function(Z){var pe=G(Z,0,1),B=G(Z,-1);if(pe==="%"&&B!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&pe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ae=[];return U(Z,ee,function(ce,Q,ue,oe){ae[ae.length]=ue?U(oe,se,"$1"):Q||ce}),ae},q=function(Z,pe){var B=Z,ae;if(V(M,B)&&(ae=M[B],B="%"+ae[0]+"%"),V(D,B)){var ce=D[B];if(ce===N&&(ce=z(B)),typeof ce>"u"&&!pe)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ae,name:B,value:ce}}throw new s("intrinsic "+Z+" does not exist!")};return bu=function(Z,pe){if(typeof Z!="string"||Z.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,Z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=te(Z),ae=B.length>0?B[0]:"",ce=q("%"+ae+"%",pe),Q=ce.name,ue=ce.value,oe=!1,he=ce.alias;he&&(ae=he[0],R(B,L([0,1],he)));for(var ie=1,le=!0;ie<B.length;ie+=1){var be=B[ie],de=G(be,0,1),re=G(be,-1);if((de==='"'||de==="'"||de==="`"||re==='"'||re==="'"||re==="`")&&de!==re)throw new s("property names with quotes must have matching quotes");if((be==="constructor"||!le)&&(oe=!0),ae+="."+be,Q="%"+ae+"%",V(D,Q))ue=D[Q];else if(ue!=null){if(!(be in ue)){if(!pe)throw new a("base intrinsic for "+Z+" exists, but the property is not available.");return}if(b&&ie+1>=B.length){var J=b(ue,be);le=!!J,le&&"get"in J&&!("originalValue"in J.get)?ue=J.get:ue=ue[be]}else le=V(ue,be),ue=ue[be];le&&!oe&&(D[Q]=ue)}}return ue},bu}var wu,dg;function fg(){if(dg)return wu;dg=1;var e=xu(),t=sg(),n=t([e("%String.prototype.indexOf%")]);return wu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},wu}var Su,pg;function hg(){if(pg)return Su;pg=1;var e=xu(),t=fg(),n=pa(),r=Fo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return Su=!!o&&function(){var d,f={assert:function(h){if(!f.has(h))throw new r("Side channel does not contain "+n(h))},delete:function(h){if(d){var m=l(d,h);return c(d)===0&&(d=void 0),m}return!1},get:function(h){if(d)return i(d,h)},has:function(h){return d?a(d,h):!1},set:function(h,m){d||(d=new o),s(d,h,m)}};return f},Su}var Tu,mg;function ck(){if(mg)return Tu;mg=1;var e=xu(),t=fg(),n=pa(),r=hg(),o=Fo(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return Tu=i?function(){var d,f,h={assert:function(m){if(!h.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&&f)return f.delete(m);return!1},get:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?s(d,m):f&&f.get(m)},has:function(m){return i&&m&&(typeof m=="object"||typeof m=="function")&&d?l(d,m):!!f&&f.has(m)},set:function(m,y){i&&m&&(typeof m=="object"||typeof m=="function")?(d||(d=new i),a(d,m,y)):r&&(f||(f=r()),f.set(m,y))}};return h}:r,Tu}var Eu,gg;function yg(){if(gg)return Eu;gg=1;var e=Fo(),t=pa(),n=$C(),r=hg(),o=ck(),i=o||r||n;return Eu=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},Eu}var vg=e=>Array.isArray(e),Cu=e=>e===void 0,ku=e=>e===null,uk=Function.bind.call(Function.call,Object.prototype.toString),dk=e=>!!e&&uk(e)==="[object Error]"||e instanceof Error,bg=(e,t)=>e instanceof t,fk=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},pk=e=>Object.prototype.toString.call(e)==="[object Date]"&&bg(e,Date),Re={array:vg,date:pk,empty:e=>ku(e)||Cu(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:bg,isError:dk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>ku(e)||Cu(e),null:ku,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!vg(e)&&typeof e=="object",primitive:fk,string:e=>typeof e=="string",undefined:Cu},hk=e=>Object.keys(e),Hn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},mk=e=>e.replace(/[^0-9]/g,"");const gk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},yk=(e,t)=>({classGroupId:e,validator:t}),xg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ma="-",wg=[],vk="arbitrary..",bk=e=>{const t=wk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return xk(s);const a=s.split(ma),l=a[0]===""&&a.length>1?1:0;return Sg(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?gk(c,l):l:c||wg}return n[s]||wg}}},Sg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Sg(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(ma):e.slice(t).join(ma),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},xk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?vk+r:void 0})(),wk=e=>{const{theme:t,classGroups:n}=e;return Sk(n,t)},Sk=(e,t)=>{const n=xg();for(const r in e){const o=e[r];Iu(o,n,r,t)}return n},Iu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Tk(s,t,n,r)}},Tk=(e,t,n,r)=>{if(typeof e=="string"){Ek(e,t,n);return}if(typeof e=="function"){Ck(e,t,n,r);return}kk(e,t,n,r)},Ek=(e,t,n)=>{const r=e===""?t:Tg(t,e);r.classGroupId=n},Ck=(e,t,n,r)=>{if(Ik(e)){Iu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(yk(n,e))},kk=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Iu(l,Tg(t,a),n,r)}},Tg=(e,t)=>{let n=e;const r=t.split(ma),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=xg(),n.nextPart.set(s,a)),n=a}return n},Ik=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ak=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Au="!",Eg=":",Pk=[],Cg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Ok=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let y=0;y<u;y++){const g=o[y];if(s===0&&a===0){if(g===Eg){i.push(o.slice(l,y)),l=y+1;continue}if(g==="/"){c=y;continue}}g==="["?s++:g==="]"?s--:g==="("?a++:g===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,h=!1;d.endsWith(Au)?(f=d.slice(0,-1),h=!0):d.startsWith(Au)&&(f=d.slice(1),h=!0);const m=c&&c>l?c-l:void 0;return Cg(i,h,f,m)};if(t){const o=t+Eg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Cg(Pk,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Dk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Nk=e=>({cache:Ak(e.cacheSize),parseClassName:Ok(e),sortModifiers:Dk(e),...bk(e)}),Mk=/\s+/,_k=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Mk);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let g=!!y,v=r(g?m.substring(0,y):m);if(!v){if(!g){l=u+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=u+(l.length>0?" "+l:l);continue}g=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=h?b+Au:b,T=x+v;if(s.indexOf(T)>-1)continue;s.push(T);const E=o(v,g);for(let I=0;I<E.length;++I){const w=E[I];s.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},Fk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=kg(n))&&(o&&(o+=" "),o+=r);return o},kg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=kg(e[r]))&&(n&&(n+=" "),n+=t);return n},Lk=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=Nk(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=_k(l,n);return o(l,u),u};return i=s,(...l)=>i(Fk(...l))},Vk=[],$t=e=>{const t=n=>n[e]||Vk;return t.isThemeGetter=!0,t},Ig=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ag=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$k=/^\d+\/\d+$/,zk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jk=/\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$/,Bk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lo=e=>$k.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),Pu=e=>e.endsWith("%")&&qe(e.slice(0,-1)),dr=e=>zk.test(e),Wk=()=>!0,qk=e=>jk.test(e)&&!Bk.test(e),Pg=()=>!1,Uk=e=>Rk.test(e),Gk=e=>Hk.test(e),Yk=e=>!Se(e)&&!Te(e),Kk=e=>Vo(e,_g,Pg),Se=e=>Ig.test(e),ro=e=>Vo(e,Fg,qk),Ou=e=>Vo(e,eI,qe),Og=e=>Vo(e,Ng,Pg),Zk=e=>Vo(e,Mg,Gk),ga=e=>Vo(e,Lg,Uk),Te=e=>Ag.test(e),Ui=e=>$o(e,Fg),Xk=e=>$o(e,tI),Dg=e=>$o(e,Ng),Qk=e=>$o(e,_g),Jk=e=>$o(e,Mg),ya=e=>$o(e,Lg,!0),Vo=(e,t,n)=>{const r=Ig.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$o=(e,t,n=!1)=>{const r=Ag.exec(e);return r?r[1]?t(r[1]):n:!1},Ng=e=>e==="position"||e==="percentage",Mg=e=>e==="image"||e==="url",_g=e=>e==="length"||e==="size"||e==="bg-size",Fg=e=>e==="length",eI=e=>e==="number",tI=e=>e==="family-name",Lg=e=>e==="shadow",nI=Lk(()=>{const e=$t("color"),t=$t("font"),n=$t("text"),r=$t("font-weight"),o=$t("tracking"),i=$t("leading"),s=$t("breakpoint"),a=$t("container"),l=$t("spacing"),c=$t("radius"),u=$t("shadow"),d=$t("inset-shadow"),f=$t("text-shadow"),h=$t("drop-shadow"),m=$t("blur"),y=$t("perspective"),g=$t("aspect"),v=$t("ease"),b=$t("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Te,Se],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],C=()=>[Te,Se,l],A=()=>[Lo,"full","auto",...C()],O=()=>[Tr,"none","subgrid",Te,Se],_=()=>["auto",{span:["full",Tr,Te,Se]},Tr,Te,Se],N=()=>[Tr,"auto",Te,Se],$=()=>["auto","min","max","fr",Te,Se],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],M=()=>[Lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,Te,Se],V=()=>[...T(),Dg,Og,{position:[Te,Se]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",Qk,Kk,{size:[Te,Se]}],U=()=>[Pu,Ui,ro],G=()=>["","none","full",c,Te,Se],H=()=>["",qe,Ui,ro],ee=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[qe,Pu,Dg,Og],q=()=>["","none",m,Te,Se],Y=()=>["none",qe,Te,Se],Z=()=>["none",qe,Te,Se],pe=()=>[qe,Te,Se],B=()=>[Lo,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[dr],breakpoint:[dr],color:[Wk],container:[dr],"drop-shadow":[dr],ease:["in","out","in-out"],font:[Yk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[dr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[dr],shadow:[dr],spacing:["px",qe],text:[dr],"text-shadow":[dr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lo,Se,Te,g]}],container:["container"],columns:[{columns:[qe,Se,Te,a]}],"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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Tr,"auto",Te,Se]}],basis:[{basis:[Lo,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Lo,"auto","initial","none",Se]}],grow:[{grow:["",qe,Te,Se]}],shrink:[{shrink:["",qe,Te,Se]}],order:[{order:[Tr,"first","last","none",Te,Se]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[a,"screen",...M()]}],"min-w":[{"min-w":[a,"screen","none",...M()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Ui,ro]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,Ou]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pu,Se]}],"font-family":[{font:[Xk,Se,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,Te,Se]}],"line-clamp":[{"line-clamp":[qe,"none",Te,Ou]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",Te,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Te,ro]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[qe,"auto",Te,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,Te,Se],radial:["",Te,Se],conic:[Tr,Te,Se]},Jk,Zk]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"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:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Te,Se]}],"outline-w":[{outline:["",qe,Ui,ro]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ya,ga]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ya,ga]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[qe,ro]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,ya,ga]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[qe,Te,Se]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Te,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Se]}],filter:[{filter:["","none",Te,Se]}],blur:[{blur:q()}],brightness:[{brightness:[qe,Te,Se]}],contrast:[{contrast:[qe,Te,Se]}],"drop-shadow":[{"drop-shadow":["","none",h,ya,ga]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",qe,Te,Se]}],"hue-rotate":[{"hue-rotate":[qe,Te,Se]}],invert:[{invert:["",qe,Te,Se]}],saturate:[{saturate:[qe,Te,Se]}],sepia:[{sepia:["",qe,Te,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Se]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Te,Se]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Te,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Te,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Te,Se]}],"backdrop-invert":[{"backdrop-invert":["",qe,Te,Se]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Te,Se]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Te,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Te,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Te,Se]}],ease:[{ease:["linear","initial",v,Te,Se]}],delay:[{delay:[qe,Te,Se]}],animate:[{animate:["none",b,Te,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Te,Se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Te,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",Te,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Se]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[qe,Ui,ro,Ou]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),fr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},rI=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Du=e=>Re.function(e),Pe=(...e)=>nI(vm(e)),Vg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Gi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},$g=e=>e.scrollHeight>e.clientHeight,Yi=(e,t)=>{if(e&&e.getBoundingClientRect){const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)}return 320},oI=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},zg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,s=o.bottom<=r.bottom,a=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&s&&a&&l},un=S.forwardRef(function(t,n){const r=t.as||"span";return p.jsx(r,{ref:n,...t,as:void 0})}),iI={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",tiny:"h-5 p-1 px-2 text-xs",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"}},sI=_o("size-2 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"}}}),aI=_o("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap ease-linear duration-300 transition-all",{variants:iI,defaultVariants:{theme:"primary",size:"default"}}),zo=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return p.jsxs(un,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Pe(aI({size:s,theme:o?"loading":i}),t),children:[n?p.jsx("span",{"aria-hidden":"true",className:sI({theme:n})}):null,r,a.children]})}),lI=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return p.jsx("form",{...e,onSubmit:t})};var Dt=function(){return Dt=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},Dt.apply(this,arguments)};function Nu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Mu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Ki=function(e){return e.replace(new RegExp(" ","g")," ")},jg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},cI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Bg=function(e,t,n){var r=e.length-2,o=cI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Rg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},va=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},uI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},_u=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},dI=function(e){return e==="money"||e==="currency"},fI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Dt(Dt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ba=function(e,t){var n=jg(Rg(e),t.fraction.length),r="".concat(t.currency).concat(Bg(n,t.group,t.decimal));return Ki(r)},pI=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Nu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var m=fI(r,i,a);return m.currency=Ki("".concat(m.currency.trim()," ")),m.literal=Ki(m.literal.trim()),m},[r,i]),f=function(m){var y=ba(m.target.value,d),g=va(y);m.target.value=y,m.target.setAttribute("data-number",g.toString()),l?.(m),g!==0&&(u.current.selectionEnd=y.length)};S.useEffect(function(){if(u.current!==null){var m=u.current.value;if(m!==""){var y=ba(m,d),g=va(y);u.current.value=y,u.current.setAttribute("data-number",g.toString());var v=new InputEvent("change",{});l?.(Dt(Dt({},v),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=y.length)}}},[d]);var h=c.defaultValue?ba(c.defaultValue,d):void 0;return S.createElement("input",Dt({},c,{value:typeof c.value=="string"?ba(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),hI=1,mI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},gI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Dt(Dt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},xa=function(e,t){var n=jg(Rg(e),t.fraction.length),r="".concat(Bg(n,t.group,t.decimal)," ").concat(t.percentSign);return Ki(r)},yI=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Nu(e,["locale","mask","onChange","onKeyUp"]),a=S.useRef(null),l=Mu(S.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return a.current}),S.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(xa(b,d))},[s.value]);var d=S.useMemo(function(){var v=gI(r);return v.percentSign=Ki("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-hI,h=function(v){var b,x=a.current;x&&(x.setSelectionRange(f,f),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},m=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,T=b.selectionEnd,E=x!==T,I=f<x;!E&&I&&h()}i?.(v)},y=function(v){var b=xa(v.target.value,d),x=va(b);u(b),v.target.value=b,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=xa(v,d),x=va(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(Dt(Dt({},T),{target:a.current,currentTarget:a.current}))}}},[]),S.useEffect(function(){return h()},[c]);var g=s.defaultValue?xa(s.defaultValue,d):void 0;return S.createElement("input",Dt({},s,{defaultValue:g,inputMode:"decimal",onChange:y,onFocus:h,onKeyUp:m,ref:a,type:"text"}))}),Zi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},vI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=wa[i];s===void 0?r.push(i.replace(Zi.dots,"\\.").replace(Zi.openParenthesis,"\\(").replace(Zi.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Zi.leadingBars,"\\")},Xi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Fu(o,n);var i=vI(o);return n?"^".concat(i,"$"):i},bI=function(e){return e.replace(Zi.escape,"\\$&")},Fu=function(e,t){var n=e.map(function(r){return typeof r=="string"?bI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},wa={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},xI=/\d/,Hg="(dd) 9dddd-dddd",Wg="(dd) dddd-dddd",qg="ddd.ddd.ddd-dd",Ug="dd.ddd.ddd/dddd-dd",Sa=function(e){return e.replace(/\D/g,"")},wI=["2",/[0-3]/,":",/[0-5]/,/\d/],SI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],rn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:qg,isoDate:"dddd-dd-dd",cnpj:Ug,telephone:Wg,cellphone:Hg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Sa(e).length<=11?qg:Ug},int:function(e){return e===void 0&&(e=""),xI.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Sa(e);return t.length<11?Wg:Hg},time:function(e){var t=Sa(e),n=t[0];return n==="2"?wI:SI}},on=function(e,t,n){var r;return n===void 0&&(n={}),Dt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Xi(e,"",!0),infinity:n.infinity},n)},Kt={cellTelephone:on(rn.cellTelephone,"tel"),cellphone:on(rn.cellphone,"tel"),cep:on(rn.cep,"decimal"),cnpj:on(rn.cnpj,"decimal"),color:on(rn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:on(rn.cpf,"decimal"),cpfCnpj:on(rn.cpfCnpj,"decimal",{transform:Sa}),creditCard:on(rn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:on(rn.date,"decimal"),int:on(rn.int,"decimal",{pattern:"[0-9]+"}),isoDate:on(rn.isoDate,"decimal"),telephone:on(rn.telephone,"tel"),time:on(rn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:on(rn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Gg(e,t,n,r){var o,i;r===void 0&&(r=wa);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Yg=function(e){return e},TI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Xi(e,n,t));return r.test(n)};function EI(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var CI=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Nu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),m=S.useRef(null);S.useImperativeHandle(t,function(){return m.current});var y=_u(a),g=_u(d),v=_u(u),b=S.useRef(TI(u,i,h.value||h.defaultValue)),x=f??"input",T=Mu(S.useState(""),2),E=T[0],I=T[1],w=EI(E),C=S.useCallback(function(F,z){var M,k,V=(M=F??z)!==null&&M!==void 0?M:"";if(u===void 0)return V;var L=(k=V?.toString())!==null&&k!==void 0?k:"";return Gg(L,typeof u=="function"?u(L):u,s??Yg,c??wa)},[s,u,c]),A=Mu(S.useState(function(){return C(h.value,h.defaultValue)}),2),O=A[0],_=A[1],N=C(h.defaultValue,h.defaultValue),$=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var F=u(O);return Array.isArray(F)?Fu(F,i):Xi(u,O,i)}return typeof u=="string"?Xi(u,O,i):Fu(u,i)},[l,O,i,u]);S.useEffect(function(){if(h.value!==void 0){var F=C(h.value,h.defaultValue);_(F),m.current!==null&&(m.current.value=F)}},[h.value,u,s,h.defaultValue]);var D=function(F){var z,M,k,V,L,R=F.currentTarget,U=F.target.value;if(v.current===void 0)return _(U),(z=g.current)===null||z===void 0||z.call(g,U),(M=y.current)===null||M===void 0||M.call(y,F),d?.(U);var G=new RegExp(Xi(v.current,U,i)),H=(k=R.selectionEnd)!==null&&k!==void 0?k:0,ee=function(Z,pe,B){if(Z.type!=="number")return Z.setSelectionRange(pe,B)};if(r&&b.current&&U.length>=O.length)return R.value=O,ee(R,H-1,H-1);var se=!1;U.length<w.length&&(b.current=!1,se=!0),G.test(U)&&(b.current=!0);var te=H,q=U[te-1],Y=Gg(U,typeof v.current=="function"?v.current(U):v.current,s??Yg,c??wa);for(R.value=Y,_(Y);te<Y.length&&Y.charAt(te-1)!==q;)te+=1;se?ee(R,H,H):ee(R,te,te),F.target.value=Y,I(Y),(V=g.current)===null||V===void 0||V.call(g,Y),(L=y.current)===null||L===void 0||L.call(y,F)};return S.createElement(x,Dt({},h,{ref:m,pattern:$,onChange:D,defaultValue:Kg(h.defaultValue)?N:void 0,value:Kg(h.value)?C(h.value,h.value):h.value}))}),Kg=function(e){return typeof e=="string"},Zg=S.forwardRef(function(e,t){return dI(e.mask)?S.createElement(pI,Dt({},e,{mask:void 0,ref:t})):mI(e.mask)?S.createElement(yI,Dt({},e,{mask:void 0,ref:t})):S.createElement(CI,Dt({},e,{ref:t}))}),sn=function(e){return function(t){return S.createElement(Zg,Dt({},e,t))}};sn(Kt.cellTelephone),sn(Kt.cellphone),sn(Kt.cep),sn(Kt.cnpj),sn(Kt.color),sn(Kt.cpf),sn(Kt.cpfCnpj),sn(Kt.creditCard),sn(Kt.date),sn(Kt.int),sn(Kt.isoDate),sn(Kt.telephone),sn(Kt.time),sn(Kt.uuid);var Xg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&uI(Kt,t.mask)?Kt[t.mask]:{mask:t.mask}},[t.mask]),o=Dt(Dt({},t),r);return S.createElement(Zg,Dt({},o,{ref:n}))});const Qg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const kI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const II=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Jg=e=>{const t=II(e);return t.charAt(0).toUpperCase()+t.slice(1)};var AI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const PI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const OI=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>S.createElement("svg",{ref:l,...AI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Qg("lucide",o),...!i&&!PI(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(OI,{ref:i,iconNode:t,className:Qg(`lucide-${kI(Jg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Jg(e),n};const DI=Xe("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const NI=Xe("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const ey=Xe("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const MI=Xe("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const ty=Xe("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Lu=Xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ny=Xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Ta=Xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Vu=Xe("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const _I=Xe("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);const FI=Xe("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const LI=Xe("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const VI=Xe("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const ry=Xe("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const oy=Xe("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const iy=Xe("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const $I=Xe("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const zI=Xe("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const $u=Xe("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const jI=Xe("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Er=Xe("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const BI=Xe("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const RI=Xe("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const HI=Xe("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const zu=Xe("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const WI=Xe("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const qI=Xe("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const ju=Xe("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const Ea=Xe("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Bu=Xe("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const UI=Xe("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const jo=Xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ca={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,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(Cr(s,t,n,a))},[]),sy=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:sy(s,t,n,a)}},{}),ay={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ka=(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)},GI={default:e=>ka(e,{result:ay.default}),dark:e=>ka(e,{result:ay.dark})},Bo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},YI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Ru=(e,t)=>{const n=Cr(e.colors,Bo(t?.colors)),r=Cr(e.spacing,Bo(t?.spacing)),o=Cr(e.rounded,Bo(t?.rounded)),i=Cr(e.shadow,Bo(t?.rounded)),s=Cr(e.zIndex,Bo(t?.zIndex??YI)),a=e.custom?Cr(e.custom,Bo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},KI=(e,t)=>ka(Ru(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),ZI=(e,t)=>Ru(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),XI=(e,t)=>ka(Ru(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Ia={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",pageCalendarMonthView:"Month view",pageCalendarWeekView:"Week view",pageCalendarDayView:"Day view",pageCalendarPrevious:"Previous",pageCalendarNext:"Next",pageCalendarToday:"Today",pageCalendarAddEvent:"Add event",pageCalendarWeekLabel:e=>`Week ${e}`,pageCalendarFilter:"Filter:",pageCalendarMoreEvents:e=>`+${e} more...`,pageCalendarLabel:"Calendar",pageCalendarNavigation:"Calendar navigation",pageCalendarMonthGrid:"Calendar month",pageCalendarFilterEnabled:"enabled",pageCalendarFilterDisabled:"disabled",pageCalendarEventCount:e=>e===1?"1 event":`${e} events`,pageCalendarEventAt:(e,t)=>`${e} at ${t}`,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",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",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=>p.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},Aa={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},oo=S.createContext({parser:Ca.hsla,tweaks:Aa,floatingRef:void 0,map:Ia,locale:void 0}),vt=()=>{const e=S.useContext(oo);return e?e.map:Ia},Hu=()=>{const e=S.useContext(oo);return e?e.tweaks:Aa};function Pa(){return typeof window<"u"}function kr(e){return Oa(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wn(e){var t;return(t=(Oa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Oa(e){return Pa()?e instanceof Node||e instanceof Wt(e).Node:!1}function tt(e){return Pa()?e instanceof Element||e instanceof Wt(e).Element:!1}function Pt(e){return Pa()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Qi(e){return!Pa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}const QI=new Set(["inline","contents"]);function Ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!QI.has(o)}const JI=new Set(["table","td","th"]);function eA(e){return JI.has(kr(e))}const tA=[":popover-open",":modal"];function Da(e){return tA.some(t=>{try{return e.matches(t)}catch{return!1}})}const nA=["transform","translate","scale","rotate","perspective"],rA=["transform","translate","scale","rotate","perspective","filter"],oA=["paint","layout","strict","content"];function Wu(e){const t=Na(),n=tt(e)?dn(e):e;return nA.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)||rA.some(r=>(n.willChange||"").includes(r))||oA.some(r=>(n.contain||"").includes(r))}function iA(e){let t=hr(e);for(;Pt(t)&&!pr(t);){if(Wu(t))return t;if(Da(t))return null;t=hr(t)}return null}function Na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sA=new Set(["html","body","#document"]);function pr(e){return sA.has(kr(e))}function dn(e){return Wt(e).getComputedStyle(e)}function Ma(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(kr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qi(e)&&e.host||Wn(e);return Qi(t)?t.host:t}function ly(e){const t=hr(e);return pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&Ji(t)?t:ly(t)}function Ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ly(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){const a=qu(s);return t.concat(s,s.visualViewport||[],Ji(o)?o:[],a&&n?Ir(a):[])}return t.concat(o,Ir(o,[],n))}function qu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const aA=["top","right","bottom","left"],cy=["start","end"],uy=aA.reduce((e,t)=>e.concat(t,t+"-"+cy[0],t+"-"+cy[1]),[]),Ar=Math.min,fn=Math.max,_a=Math.round,Ro=Math.floor,qn=e=>({x:e,y:e}),lA={left:"right",right:"left",bottom:"top",top:"bottom"},cA={start:"end",end:"start"};function Uu(e,t,n){return fn(e,Ar(t,n))}function io(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function On(e){return e.split("-")[1]}function dy(e){return e==="x"?"y":"x"}function Gu(e){return e==="y"?"height":"width"}const uA=new Set(["top","bottom"]);function mr(e){return uA.has(Un(e))?"y":"x"}function Yu(e){return dy(mr(e))}function fy(e,t,n){n===void 0&&(n=!1);const r=On(e),o=Yu(e),i=Gu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=La(s)),[s,La(s)]}function dA(e){const t=La(e);return[Fa(e),t,Fa(t)]}function Fa(e){return e.replace(/start|end/g,t=>cA[t])}const py=["left","right"],hy=["right","left"],fA=["top","bottom"],pA=["bottom","top"];function hA(e,t,n){switch(e){case"top":case"bottom":return n?t?hy:py:t?py:hy;case"left":case"right":return t?fA:pA;default:return[]}}function mA(e,t,n,r){const o=On(e);let i=hA(Un(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Fa)))),i}function La(e){return e.replace(/left|right|bottom|top/g,t=>lA[t])}function gA(e){return{top:0,right:0,bottom:0,left:0,...e}}function my(e){return typeof e!="number"?gA(e):{top:e,right:e,bottom:e,left:e}}function Va(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}}var yA=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],$a=yA.join(","),gy=typeof Element>"u",Ho=gy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,za=!gy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ja=function(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",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ja(t.parentNode));return s},vA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},yy=function(t,n,r){if(ja(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll($a));return n&&Ho.call(t,$a)&&o.unshift(t),o=o.filter(r),o},Ba=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!ja(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=Ba(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Ho.call(s,$a);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!ja(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var h=Ba(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},vy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},by=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||vA(t))&&!vy(t)?0:t.tabIndex},bA=function(t,n){var r=by(t);return r<0&&n&&!vy(t)?0:r},xA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xy=function(t){return t.tagName==="INPUT"},wA=function(t){return xy(t)&&t.type==="hidden"},SA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},TA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},EA=function(t){if(!t.name)return!0;var n=t.form||za(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},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(s){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",s.message),!1}var i=TA(o,t.form);return!i||i===t},CA=function(t){return xy(t)&&t.type==="radio"},kA=function(t){return CA(t)&&!EA(t)},IA=function(t){var n,r=t&&za(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=za(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},wy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},AA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ho.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Ho.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=za(t);if(c&&!c.shadowRoot&&o(c)===!0)return wy(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(IA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wy(t);return!1},PA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Ho.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ku=function(t,n){return!(n.disabled||wA(n)||AA(n,t)||SA(n)||PA(n))},Zu=function(t,n){return!(kA(n)||by(n)<0||!Ku(t,n))},OA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Sy=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=bA(a,s),c=s?Sy(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(xA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Wo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ba([t],n.includeContainer,{filter:Zu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:OA}):r=yy(t,n.includeContainer,Zu.bind(null,n)),Sy(r)},DA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ba([t],n.includeContainer,{filter:Ku.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=yy(t,n.includeContainer,Ku.bind(null,n)),r},Ty=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,$a)===!1?!1:Zu(n,t)};function Xu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ey(){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 Cy(){return/apple/i.test(navigator.vendor)}function Qu(){const e=/android/i;return e.test(Xu())||e.test(Ey())}function NA(){return Xu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function ky(){return Ey().includes("jsdom/")}const Iy="data-floating-ui-focusable",MA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ju="ArrowLeft",ed="ArrowRight",_A="ArrowUp",FA="ArrowDown";function Gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Rt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Yn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function td(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function LA(e){return e.matches("html,body")}function qt(e){return e?.ownerDocument||document}function nd(e){return Pt(e)&&e.matches(MA)}function rd(e){return e?e.getAttribute("role")==="combobox"&&nd(e):!1}function VA(e){if(!e||ky())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ra(e){return e?e.hasAttribute(Iy)?e:e.querySelector("["+Iy+"]")||e:null}function so(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...so(e,o.id,n)])}function $A(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),so(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function Ay(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(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Ut(e){e.preventDefault(),e.stopPropagation()}function zA(e){return"nativeEvent"in e}function Py(e){return e.mozInputSource===0&&e.isTrusted?!0:Qu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Oy(e){return ky()?!1:!Qu()&&e.width===0&&e.height===0||Qu()&&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 qo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var jA=typeof document<"u",BA=function(){},nt=jA?S.useLayoutEffect:BA;const RA={...P};function Ht(e){const t=P.useRef(e);return nt(()=>{t.current=e}),t}const HA=RA.useInsertionEffect||(e=>e());function kt(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return HA(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Ha(e,t,n){return Math.floor(e/t)!==n}function es(e,t){return t<0||t>=e.current.length}function od(e,t){return Zt(e,{disabledIndices:t})}function Dy(e,t){return Zt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Zt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&Wa(e,s,o));return s}function WA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===_A){if(d&&Ut(n),u===-1)f=c;else if(f=Zt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const h=u%s,m=c%s,y=c-(m-h);m===h?f=c:f=m>h?y:y-s}es(e,f)&&(f=u)}if(n.key===FA&&(d&&Ut(n),u===-1?f=l:(f=Zt(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=Zt(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),es(e,f)&&(f=u)),r==="both"){const h=Ro(u/s);n.key===(i?Ju:ed)&&(d&&Ut(n),u%s!==s-1?(f=Zt(e,{startingIndex:u,disabledIndices:a}),o&&Ha(f,s,h)&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a})),Ha(f,s,h)&&(f=u)),n.key===(i?ed:Ju)&&(d&&Ut(n),u%s!==0?(f=Zt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Ha(f,s,h)&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Ha(f,s,h)&&(f=u));const m=Ro(c/s)===h;es(e,f)&&(o&&m?f=n.key===(i?ed:Ju)?c:Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function qA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function UA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function GA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Wa(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const ts=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ny(e,t){const n=Wo(e,ts()),r=n.length;if(r===0)return;const o=Gn(qt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function My(e){return Ny(qt(e).body,1)||e}function _y(e){return Ny(qt(e).body,-1)||e}function ns(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Rt(n,r)}function YA(e){Wo(e,ts()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Fy(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 Ly(e,t,n){let{reference:r,floating:o}=e;const i=mr(t),s=Yu(t),a=Gu(s),l=Un(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(On(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}async function KA(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=io(t,e),m=my(h),g=a[f?d==="floating"?"reference":"floating":d],v=Va(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Va(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-E.top+m.top)/T.y,bottom:(E.bottom-v.bottom+m.bottom)/T.y,left:(v.left-E.left+m.left)/T.x,right:(E.right-v.right+m.right)/T.x}}const ZA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ly(c,r,l),f=r,h={},m=0;for(let g=0;g<a.length;g++){var y;const{name:v,fn:b}=a[g],{x,y:T,data:E,reset:I}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:{...s,detectOverflow:(y=s.detectOverflow)!=null?y:KA},elements:{reference:e,floating:t}});u=x??u,d=T??d,h={...h,[v]:{...h[v],...E}},I&&m<=50&&(m++,typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:d}=Ly(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}},XA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=io(e,t)||{};if(c==null)return{};const d=my(u),f={x:n,y:r},h=Yu(o),m=Gu(h),y=await s.getDimensions(c),g=h==="y",v=g?"top":"left",b=g?"bottom":"right",x=g?"clientHeight":"clientWidth",T=i.reference[m]+i.reference[h]-f[h]-i.floating[m],E=f[h]-i.reference[h],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(I)))&&(w=a.floating[x]||i.floating[m]);const C=T/2-E/2,A=w/2-y[m]/2-1,O=Ar(d[v],A),_=Ar(d[b],A),N=O,$=w-y[m]-_,D=w/2-y[m]/2+C,F=Uu(N,D,$),z=!l.arrow&&On(o)!=null&&D!==F&&i.reference[m]/2-(D<N?O:_)-y[m]/2<0,M=z?D<N?D-N:D-$:0;return{[h]:f[h]+M,data:{[h]:F,centerOffset:D-F-M,...z&&{alignmentOffset:M}},reset:z}}});function QA(e,t,n){return(e?[...n.filter(o=>On(o)===e),...n.filter(o=>On(o)!==e)]:n.filter(o=>Un(o)===o)).filter(o=>e?On(o)===e||(t?Fa(o)!==o:!1):!0)}const JA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=uy,autoAlignment:h=!0,...m}=io(e,t),y=d!==void 0||f===uy?QA(d||null,h,f):f,g=await l.detectOverflow(t,m),v=((n=s.autoPlacement)==null?void 0:n.index)||0,b=y[v];if(b==null)return{};const x=fy(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:y[0]}};const T=[g[Un(b)],g[x[0]],g[x[1]]],E=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:T}],I=y[v+1];if(I)return{data:{index:v+1,overflows:E},reset:{placement:I}};const w=E.map(O=>{const _=On(O.placement);return[O.placement,_&&u?O.overflows.slice(0,2).reduce((N,$)=>N+$,0):O.overflows[0],O.overflows]}).sort((O,_)=>O[1]-_[1]),A=((o=w.filter(O=>O[2].slice(0,On(O[0])?2:3).every(_=>_<=0))[0])==null?void 0:o[0])||w[0][0];return A!==a?{data:{index:v+1,overflows:E},reset:{placement:A}}:{}}}},eP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...g}=io(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Un(o),b=mr(a),x=Un(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!y?[La(a)]:dA(a)),I=m!=="none";!f&&I&&E.push(...mA(a,y,m,T));const w=[a,...E],C=await l.detectOverflow(t,g),A=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(C[v]),d){const D=fy(o,s,T);A.push(C[D[0]],C[D[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(D=>D<=0)){var _,N;const D=(((_=i.flip)==null?void 0:_.index)||0)+1,F=w[D];if(F&&(!(d==="alignment"?b!==mr(F):!1)||O.every(k=>mr(k.placement)===b?k.overflows[0]>0:!0)))return{data:{index:D,overflows:O},reset:{placement:F}};let z=(N=O.filter(M=>M.overflows[0]<=0).sort((M,k)=>M.overflows[1]-k.overflows[1])[0])==null?void 0:N.placement;if(!z)switch(h){case"bestFit":{var $;const M=($=O.filter(k=>{if(I){const V=mr(k.placement);return V===b||V==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(V=>V>0).reduce((V,L)=>V+L,0)]).sort((k,V)=>k[1]-V[1])[0])==null?void 0:$[0];M&&(z=M);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},tP=new Set(["left","top"]);async function nP(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Un(n),a=On(n),l=mr(n)==="y",c=tP.has(s)?-1:1,u=i&&l?-1:1,d=io(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const rP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await nP(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},oP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=io(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=mr(Un(o)),h=dy(f);let m=u[h],y=u[f];if(s){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=m+d[v],T=m-d[b];m=Uu(x,m,T)}if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=y+d[v],T=y-d[b];y=Uu(x,y,T)}const g=l.fn({...t,[h]:m,[f]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:s,[f]:a}}}}}},iP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=io(e,t),u=await s.detectOverflow(t,c),d=Un(o),f=On(o),h=mr(o)==="y",{width:m,height:y}=i.floating;let g,v;d==="top"||d==="bottom"?(g=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");const b=y-u.top-u.bottom,x=m-u.left-u.right,T=Ar(y-u[g],b),E=Ar(m-u[v],x),I=!t.middlewareData.shift;let w=T,C=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const O=fn(u.left,0),_=fn(u.right,0),N=fn(u.top,0),$=fn(u.bottom,0);h?C=m-2*(O!==0||_!==0?O+_:fn(u.left,u.right)):w=y-2*(N!==0||$!==0?N+$:fn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:w});const A=await s.getDimensions(a.floating);return m!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Vy(e){const t=dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=_a(n)!==i||_a(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function id(e){return tt(e)?e:e.contextElement}function Uo(e){const t=id(e);if(!Pt(t))return qn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vy(t);let s=(i?_a(n.width):n.width)/r,a=(i?_a(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const sP=qn(0);function $y(e){const t=Wt(e);return!Na()||!t.visualViewport?sP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function ao(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=id(e);let s=qn(1);t&&(r?tt(r)&&(s=Uo(r)):s=Uo(e));const a=aP(i,n,r)?$y(i):qn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Wt(i),h=r&&tt(r)?Wt(r):r;let m=f,y=qu(m);for(;y&&r&&h!==m;){const g=Uo(y),v=y.getBoundingClientRect(),b=dn(y),x=v.left+(y.clientLeft+parseFloat(b.paddingLeft))*g.x,T=v.top+(y.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=x,c+=T,m=Wt(y),y=qu(m)}}return Va({width:u,height:d,x:l,y:c})}function qa(e,t){const n=Ma(e).scrollLeft;return t?t.left+n:ao(Wn(e)).left+n}function zy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-qa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function lP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Wn(r),a=t?Da(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=qn(1);const u=qn(0),d=Pt(r);if((d||!d&&!i)&&((kr(r)!=="body"||Ji(s))&&(l=Ma(r)),Pt(r))){const h=ao(r);c=Uo(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=s&&!d&&!i?zy(s,l):qn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function cP(e){return Array.from(e.getClientRects())}function uP(e){const t=Wn(e),n=Ma(e),r=e.ownerDocument.body,o=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+qa(e);const a=-n.scrollTop;return dn(r).direction==="rtl"&&(s+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const jy=25;function dP(e,t){const n=Wt(e),r=Wn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Na();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=qa(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-h);m<=jy&&(i-=m)}else c<=jy&&(i+=c);return{width:i,height:s,x:a,y:l}}const fP=new Set(["absolute","fixed"]);function pP(e,t){const n=ao(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pt(e)?Uo(e):qn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function By(e,t,n){let r;if(t==="viewport")r=dP(e,n);else if(t==="document")r=uP(Wn(e));else if(tt(t))r=pP(t,n);else{const o=$y(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Va(r)}function Ry(e,t){const n=hr(e);return n===t||!tt(n)||pr(n)?!1:dn(n).position==="fixed"||Ry(n,t)}function hP(e,t){const n=t.get(e);if(n)return n;let r=Ir(e,[],!1).filter(a=>tt(a)&&kr(a)!=="body"),o=null;const i=dn(e).position==="fixed";let s=i?hr(e):e;for(;tt(s)&&!pr(s);){const a=dn(s),l=Wu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&fP.has(o.position)||Ji(s)&&!l&&Ry(e,s))?r=r.filter(u=>u!==s):o=a,s=hr(s)}return t.set(e,r),r}function mP(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Da(t)?[]:hP(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=By(t,u,o);return c.top=fn(d.top,c.top),c.right=Ar(d.right,c.right),c.bottom=Ar(d.bottom,c.bottom),c.left=fn(d.left,c.left),c},By(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gP(e){const{width:t,height:n}=Vy(e);return{width:t,height:n}}function yP(e,t,n){const r=Pt(t),o=Wn(t),i=n==="fixed",s=ao(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=qn(0);function c(){l.x=qa(o)}if(r||!r&&!i)if((kr(t)!=="body"||Ji(o))&&(a=Ma(t)),r){const h=ao(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?zy(o,a):qn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function sd(e){return dn(e).position==="static"}function Hy(e,t){if(!Pt(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wn(e)===n&&(n=n.ownerDocument.body),n}function Wy(e,t){const n=Wt(e);if(Da(e))return n;if(!Pt(e)){let o=hr(e);for(;o&&!pr(o);){if(tt(o)&&!sd(o))return o;o=hr(o)}return n}let r=Hy(e,t);for(;r&&eA(r)&&sd(r);)r=Hy(r,t);return r&&pr(r)&&sd(r)&&!Wu(r)?n:r||iA(e)||n}const vP=async function(e){const t=this.getOffsetParent||Wy,n=this.getDimensions,r=await n(e.floating);return{reference:yP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bP(e){return dn(e).direction==="rtl"}const xP={convertOffsetParentRelativeRectToViewportRelativeRect:lP,getDocumentElement:Wn,getClippingRect:mP,getOffsetParent:Wy,getElementRects:vP,getClientRects:cP,getDimensions:gP,getScale:Uo,isElement:tt,isRTL:bP};function qy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wP(e,t){let n=null,r;const o=Wn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||t(),!f||!h)return;const m=Ro(d),y=Ro(o.clientWidth-(u+f)),g=Ro(o.clientHeight-(d+h)),v=Ro(u),x={rootMargin:-m+"px "+-y+"px "+-g+"px "+-v+"px",threshold:fn(0,Ar(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!qy(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function lo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=id(e),u=o||i?[...c?Ir(c):[],...Ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?wP(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m,y=l?ao(e):null;l&&g();function g(){const v=ao(e);y&&!qy(y,v)&&n(),y=v,m=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const SP=rP,TP=JA,EP=oP,CP=eP,kP=iP,Uy=XA,IP=(e,t,n)=>{const r=new Map,o={platform:xP,...n},i={...o.platform,_c:r};return ZA(e,t,{...o,platform:i})};var AP=typeof document<"u",PP=function(){},Ua=AP?S.useLayoutEffect:PP;function Ga(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(!Ga(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)&&!Ga(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Gy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yy(e,t){const n=Gy(e);return Math.round(t*n)/n}function ad(e){const t=P.useRef(e);return Ua(()=>{t.current=e}),t}function OP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=P.useState(r);Ga(f,r)||h(r);const[m,y]=P.useState(null),[g,v]=P.useState(null),b=P.useCallback(k=>{k!==I.current&&(I.current=k,y(k))},[]),x=P.useCallback(k=>{k!==w.current&&(w.current=k,v(k))},[]),T=i||m,E=s||g,I=P.useRef(null),w=P.useRef(null),C=P.useRef(u),A=l!=null,O=ad(l),_=ad(o),N=ad(c),$=P.useCallback(()=>{if(!I.current||!w.current)return;const k={placement:t,strategy:n,middleware:f};_.current&&(k.platform=_.current),IP(I.current,w.current,k).then(V=>{const L={...V,isPositioned:N.current!==!1};D.current&&!Ga(C.current,L)&&(C.current=L,ur.flushSync(()=>{d(L)}))})},[f,t,n,_,N]);Ua(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const D=P.useRef(!1);Ua(()=>(D.current=!0,()=>{D.current=!1}),[]),Ua(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(O.current)return O.current(T,E,$);$()}},[T,E,$,O,A]);const F=P.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=P.useMemo(()=>({reference:T,floating:E}),[T,E]),M=P.useMemo(()=>{const k={position:n,left:0,top:0};if(!z.floating)return k;const V=Yy(z.floating,u.x),L=Yy(z.floating,u.y);return a?{...k,transform:"translate("+V+"px, "+L+"px)",...Gy(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:L}},[n,a,z.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:F,elements:z,floatingStyles:M}),[u,$,F,z,M])}const DP=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?Uy({element:r.current,padding:o}).fn(n):{}:r?Uy({element:r,padding:o}).fn(n):{}}}},Go=(e,t)=>({...SP(e),options:[e,t]}),Ya=(e,t)=>({...EP(e),options:[e,t]}),Ka=(e,t)=>({...CP(e),options:[e,t]}),Ky=(e,t)=>({...kP(e),options:[e,t]}),Zy=(e,t)=>({...TP(e),options:[e,t]}),ld=(e,t)=>({...DP(e),options:[e,t]});function NP(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Xy=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function MP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Set),s=P.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=P.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=P.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(NP).forEach((d,f)=>{c.set(d,f)}),c},[o]);return p.jsx(Xy.Provider,{value:P.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function Qy(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=P.useContext(Xy),[a,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const h=t!==void 0;s.current[a]=h?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const _P="data-floating-ui-focusable",Jy="active",ev="selected",rs="ArrowLeft",os="ArrowRight",tv="ArrowUp",Za="ArrowDown",FP={...P};let nv=!1,LP=0;const rv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+LP++;function VP(){const[e,t]=P.useState(()=>nv?rv():void 0);return nt(()=>{e==null&&t(rv())},[]),P.useEffect(()=>{nv=!0},[]),e}const is=FP.useId||VP;let ss;process.env.NODE_ENV!=="production"&&(ss=new Set);function Xa(){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=ss)!=null&&e.has(o))){var i;(i=ss)==null||i.add(o),console.warn(o)}}function $P(){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=ss)!=null&&e.has(o))){var i;(i=ss)==null||i.add(o),console.error(o)}}const cd=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:h,style:{transform:m,...y}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||Xa("The `ref` prop is required for `FloatingArrow`."));const v=is(),[b,x]=P.useState(!1);if(nt(()=>{if(!o)return;dn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&s!=null&&s.x||!I&&s!=null&&s.y)&&(w=null);const C=u*2,A=C/2,O=a/2*(c/-8+1),_=l/2*c/4,N=!!h,$=w&&E==="end"?"bottom":"top";let D=w&&E==="end"?"right":"left";w&&b&&(D=E==="end"?"left":"right");const F=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=h||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-_))+(" Q"+a/2+","+l+" "+O+","+(l-_))+" Z",k={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[T];return p.jsxs("svg",{...g,"aria-hidden":!0,ref:n,width:N?a:a+C,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[D]:F,[$]:z,[T]:I||N?"100%":"calc(100% - "+C/2+"px)",transform:[k,m].filter(V=>!!V).join(" "),...y},children:[C>0&&p.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:C+(h?0:1),d:M}),p.jsx("path",{stroke:C&&!h?g.fill:"none",d:M}),p.jsx("clipPath",{id:v,children:p.jsx("rect",{x:-A,y:A*(N?-1:1),width:a+C,height:a})})]})});function ov(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const iv=P.createContext(null),sv=P.createContext(null),Pr=()=>{var e;return((e=P.useContext(iv))==null?void 0:e.id)||null},Or=()=>P.useContext(sv);function zP(e){const t=is(),n=Or(),o=Pr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function jP(e){const{children:t,id:n}=e,r=Pr();return p.jsx(iv.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function BP(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(s=>{n.current=[...n.current,s]},[]),o=P.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=P.useState(()=>ov());return p.jsx(sv.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function co(e){return"data-floating-ui-"+e}function Gt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const av=co("safe-polygon");function ud(e,t,n){if(n&&!qo(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function dd(e){return typeof e=="function"?e():e}function lv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=Or(),m=Pr(),y=Ht(c),g=Ht(l),v=Ht(n),b=Ht(d),x=P.useRef(),T=P.useRef(-1),E=P.useRef(),I=P.useRef(-1),w=P.useRef(!0),C=P.useRef(!1),A=P.useRef(()=>{}),O=P.useRef(!1),_=kt(()=>{var M;const k=(M=o.current.openEvent)==null?void 0:M.type;return k?.includes("mouse")&&k!=="mousedown"});P.useEffect(()=>{if(!a)return;function M(k){let{open:V}=k;V||(Gt(T),Gt(I),w.current=!0,O.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[a,i]),P.useEffect(()=>{if(!a||!y.current||!n)return;function M(V){_()&&r(!1,V,"hover")}const k=qt(s.floating).documentElement;return k.addEventListener("mouseleave",M),()=>{k.removeEventListener("mouseleave",M)}},[s.floating,n,r,a,y,_]);const N=P.useCallback(function(M,k,V){k===void 0&&(k=!0),V===void 0&&(V="hover");const L=ud(g.current,"close",x.current);L&&!E.current?(Gt(T),T.current=window.setTimeout(()=>r(!1,M,V),L)):k&&(Gt(T),r(!1,M,V))},[g,r]),$=kt(()=>{A.current(),E.current=void 0}),D=kt(()=>{if(C.current){const M=qt(s.floating).body;M.style.pointerEvents="",M.removeAttribute(av),C.current=!1}}),F=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);P.useEffect(()=>{if(!a)return;function M(U){if(Gt(T),w.current=!1,u&&!qo(x.current)||dd(b.current)>0&&!ud(g.current,"open"))return;const G=ud(g.current,"open",x.current);G?T.current=window.setTimeout(()=>{v.current||r(!0,U,"hover")},G):n||r(!0,U,"hover")}function k(U){if(F()){D();return}A.current();const G=qt(s.floating);if(Gt(I),O.current=!1,y.current&&o.current.floatingContext){n||Gt(T),E.current=y.current({...o.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),$(),F()||N(U,!0,"safe-polygon")}});const ee=E.current;G.addEventListener("mousemove",ee),A.current=()=>{G.removeEventListener("mousemove",ee)};return}(x.current!=="touch"||!Rt(s.floating,U.relatedTarget))&&N(U)}function V(U){F()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),$(),F()||N(U)}})(U))}function L(){Gt(T)}function R(U){F()||N(U,!1)}if(tt(s.domReference)){const U=s.domReference,G=s.floating;return n&&U.addEventListener("mouseleave",V),f&&U.addEventListener("mousemove",M,{once:!0}),U.addEventListener("mouseenter",M),U.addEventListener("mouseleave",k),G&&(G.addEventListener("mouseleave",V),G.addEventListener("mouseenter",L),G.addEventListener("mouseleave",R)),()=>{n&&U.removeEventListener("mouseleave",V),f&&U.removeEventListener("mousemove",M),U.removeEventListener("mouseenter",M),U.removeEventListener("mouseleave",k),G&&(G.removeEventListener("mouseleave",V),G.removeEventListener("mouseenter",L),G.removeEventListener("mouseleave",R))}}},[s,a,e,u,f,N,$,D,r,n,v,h,g,y,o,F,b]),nt(()=>{var M;if(a&&n&&(M=y.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&_()){C.current=!0;const V=s.floating;if(tt(s.domReference)&&V){var k;const L=qt(s.floating).body;L.setAttribute(av,"");const R=s.domReference,U=h==null||(k=h.nodesRef.current.find(G=>G.id===m))==null||(k=k.context)==null?void 0:k.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",R.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{L.style.pointerEvents="",R.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,m,s,h,y,_]),nt(()=>{n||(x.current=void 0,O.current=!1,$(),D())},[n,$,D]),P.useEffect(()=>()=>{$(),Gt(T),Gt(I),D()},[a,s.domReference,$,D]);const z=P.useMemo(()=>{function M(k){x.current=k.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(k){const{nativeEvent:V}=k;function L(){!w.current&&!v.current&&r(!0,V,"hover")}u&&!qo(x.current)||n||dd(b.current)===0||O.current&&k.movementX**2+k.movementY**2<2||(Gt(I),x.current==="touch"?L():(O.current=!0,I.current=window.setTimeout(L,dd(b.current))))}}},[u,r,n,v,b]);return P.useMemo(()=>a?{reference:z}:{},[a,z])}let cv=0;function uo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(cv);const i=()=>e?.focus({preventScroll:n});o?i():cv=requestAnimationFrame(i)}function fd(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function RP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function HP(e){return e?.ownerDocument||document}const Yo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function uv(e){return e==="inert"?Yo.inert:e==="aria-hidden"?Yo["aria-hidden"]:Yo.none}let Qa=new WeakSet,Ja={},pd=0;const WP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,dv=e=>e&&(e.host||dv(e.parentNode)),qP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function UP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=qP(t,e),a=new Set,l=new Set(s),c=[];Ja[o]||(Ja[o]=new WeakMap);const u=Ja[o];s.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,m=>{if(kr(m)!=="script")if(a.has(m))f(m);else{const y=i?m.getAttribute(i):null,g=y!==null&&y!=="false",v=uv(i),b=(v.get(m)||0)+1,x=(u.get(m)||0)+1;v.set(m,b),u.set(m,x),c.push(m),b===1&&g&&Qa.add(m),x===1&&m.setAttribute(o,""),!g&&i&&m.setAttribute(i,i==="inert"?"":"true")}})}return pd++,()=>{c.forEach(h=>{const m=uv(i),g=(m.get(h)||0)-1,v=(u.get(h)||0)-1;m.set(h,g),u.set(h,v),g||(!Qa.has(h)&&i&&h.removeAttribute(i),Qa.delete(h)),v||h.removeAttribute(o)}),pd--,pd||(Yo.inert=new WeakMap,Yo["aria-hidden"]=new WeakMap,Yo.none=new WeakMap,Qa=new WeakSet,Ja={})}}function fv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=HP(e[0]).body;return UP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const hd={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},el=P.forwardRef(function(t,n){const[r,o]=P.useState();nt(()=>{Cy()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[co("focus-guard")]:"",style:hd};return p.jsx("span",{...t,...i})}),GP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},pv=P.createContext(null),hv=co("portal");function YP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=is(),o=mv(),[i,s]=P.useState(null),a=P.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),nt(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(hv,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!Oa(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(hv,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function gr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=YP({id:n,root:r}),[s,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=s?.modal,h=s?.open,m=!!s&&!s.modal&&s.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||f)return;function y(g){i&&ns(g)&&(g.type==="focusin"?Fy:YA)(i)}return i.addEventListener("focusin",y,!0),i.addEventListener("focusout",y,!0),()=>{i.removeEventListener("focusin",y,!0),i.removeEventListener("focusout",y,!0)}},[i,o,f]),P.useEffect(()=>{i&&(h||Fy(i))},[h,i]),p.jsxs(pv.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[m&&i&&p.jsx(el,{"data-type":"outside",ref:l,onFocus:y=>{if(ns(y,i)){var g;(g=u.current)==null||g.focus()}else{const v=s?s.domReference:null,b=_y(v);b?.focus()}}}),m&&i&&p.jsx("span",{"aria-owns":i.id,style:GP}),i&&ur.createPortal(t,i),m&&i&&p.jsx(el,{"data-type":"outside",ref:c,onFocus:y=>{if(ns(y,i)){var g;(g=d.current)==null||g.focus()}else{const v=s?s.domReference:null,b=My(v);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const mv=()=>P.useContext(pv);function gv(e){return P.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const KP=20;let Dr=[];function md(){Dr=Dr.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function ZP(e){md(),e&&kr(e)!=="body"&&(Dr.push(new WeakRef(e)),Dr.length>KP&&(Dr=Dr.slice(-20)))}function yv(){md();const e=Dr[Dr.length-1];return e?.deref()}function XP(e){const t=ts();return Ty(e,t)?e:Wo(e,t)[0]||e}function vv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=ts(),i=DA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return Ty(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const QP=P.forwardRef(function(t,n){return p.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:hd})});function fo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:h=()=>[]}=e,{open:m,onOpenChange:y,events:g,dataRef:v,elements:{domReference:b,floating:x}}=t,T=kt(()=>{var B;return(B=v.current.floatingContext)==null?void 0:B.nodeId}),E=kt(h),I=typeof s=="number"&&s<0,w=rd(b)&&I,C=WP(),A=C?i:!0,O=!A||C&&f,_=Ht(o),N=Ht(s),$=Ht(a),D=Or(),F=mv(),z=P.useRef(null),M=P.useRef(null),k=P.useRef(!1),V=P.useRef(!1),L=P.useRef(-1),R=P.useRef(-1),U=F!=null,G=Ra(x),H=kt(function(B){return B===void 0&&(B=G),B?Wo(B,ts()):[]}),ee=kt(B=>{const ae=H(B);return _.current.map(ce=>b&&ce==="reference"?b:G&&ce==="floating"?G:ae).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function B(ce){if(ce.key==="Tab"){Rt(G,Gn(qt(G)))&&H().length===0&&!w&&Ut(ce);const Q=ee(),ue=Yn(ce);_.current[0]==="reference"&&ue===b&&(Ut(ce),ce.shiftKey?uo(Q[Q.length-1]):uo(Q[1])),_.current[1]==="floating"&&ue===G&&ce.shiftKey&&(Ut(ce),uo(Q[0]))}}const ae=qt(G);return ae.addEventListener("keydown",B),()=>{ae.removeEventListener("keydown",B)}},[r,b,G,c,_,w,H,ee]),P.useEffect(()=>{if(r||!x)return;function B(ae){const ce=Yn(ae),ue=H().indexOf(ce);ue!==-1&&(L.current=ue)}return x.addEventListener("focusin",B),()=>{x.removeEventListener("focusin",B)}},[r,x,H]),P.useEffect(()=>{if(r||!d)return;function B(){V.current=!0,setTimeout(()=>{V.current=!1})}function ae(ue){const oe=ue.relatedTarget,he=ue.currentTarget,ie=Yn(ue);queueMicrotask(()=>{const le=T(),be=!(Rt(b,oe)||Rt(x,oe)||Rt(oe,x)||Rt(F?.portalNode,oe)||oe!=null&&oe.hasAttribute(co("focus-guard"))||D&&(so(D.nodesRef.current,le).find(de=>{var re,J;return Rt((re=de.context)==null?void 0:re.elements.floating,oe)||Rt((J=de.context)==null?void 0:J.elements.domReference,oe)})||Ay(D.nodesRef.current,le).find(de=>{var re,J,j;return[(re=de.context)==null?void 0:re.elements.floating,Ra((J=de.context)==null?void 0:J.elements.floating)].includes(oe)||((j=de.context)==null?void 0:j.elements.domReference)===oe})));if(he===b&&G&&vv(G,_),l&&he!==b&&!(ie!=null&&ie.isConnected)&&Gn(qt(G))===qt(G).body){Pt(G)&&G.focus();const de=L.current,re=H(),J=re[de]||re[re.length-1]||G;Pt(J)&&J.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!c)&&oe&&be&&!V.current&&oe!==yv()&&(k.current=!0,y(!1,ue,"focus-out"))})}const ce=!!(!D&&F);function Q(){Gt(R),v.current.insideReactTree=!0,R.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Pt(b))return b.addEventListener("focusout",ae),b.addEventListener("pointerdown",B),x.addEventListener("focusout",ae),ce&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",ae),b.removeEventListener("pointerdown",B),x.removeEventListener("focusout",ae),ce&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,D,F,y,d,l,H,w,T,_,v]);const se=P.useRef(null),te=P.useRef(null),q=gv([se,F?.beforeInsideRef]),Y=gv([te,F?.afterInsideRef]);P.useEffect(()=>{var B,ae;if(r||!x)return;const ce=Array.from((F==null||(B=F.portalNode)==null?void 0:B.querySelectorAll("["+co("portal")+"]"))||[]),ue=(ae=(D?Ay(D.nodesRef.current,T()):[]).find(ie=>{var le;return rd(((le=ie.context)==null?void 0:le.elements.domReference)||null)}))==null||(ae=ae.context)==null?void 0:ae.elements.domReference,oe=[x,ue,...ce,...E(),z.current,M.current,se.current,te.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,_.current.includes("reference")||w?b:null].filter(ie=>ie!=null),he=c||w?fv(oe,!O,O):fv(oe);return()=>{he()}},[r,b,x,c,_,F,w,A,O,D,T,E]),nt(()=>{if(r||!Pt(G))return;const B=qt(G),ae=Gn(B);queueMicrotask(()=>{const ce=ee(G),Q=N.current,ue=(typeof Q=="number"?ce[Q]:Q.current)||G,oe=Rt(G,ae);!I&&!oe&&m&&uo(ue,{preventScroll:ue===G})})},[r,m,G,I,ee,N]),nt(()=>{if(r||!G)return;const B=qt(G),ae=Gn(B);ZP(ae);function ce(oe){let{reason:he,event:ie,nested:le}=oe;if(["hover","safe-polygon"].includes(he)&&ie.type==="mouseleave"&&(k.current=!0),he==="outside-press")if(le)k.current=!1;else if(Py(ie)||Oy(ie))k.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?k.current=!1:k.current=!0}}g.on("openchange",ce);const Q=B.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,hd),U&&b&&b.insertAdjacentElement("afterend",Q);function ue(){if(typeof $.current=="boolean"){const oe=b||yv();return oe&&oe.isConnected?oe:Q}return $.current.current||Q}return()=>{g.off("openchange",ce);const oe=Gn(B),he=Rt(x,oe)||D&&so(D.nodesRef.current,T(),!1).some(le=>{var be;return Rt((be=le.context)==null?void 0:be.elements.floating,oe)}),ie=ue();queueMicrotask(()=>{const le=XP(ie);$.current&&!k.current&&Pt(le)&&(!(le!==oe&&oe!==B.body)||he)&&le.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,$,v,g,D,U,b,T]),P.useEffect(()=>(queueMicrotask(()=>{k.current=!1}),()=>{queueMicrotask(md)}),[r]),nt(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:m,onOpenChange:y,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,c,m,y,d,b]),nt(()=>{r||G&&vv(G,_)},[r,G,_]);function Z(B){return r||!u||!c?null:p.jsx(QP,{ref:B==="start"?z:M,onClick:ae=>y(!1,ae.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const pe=!r&&A&&(c?!w:!0)&&(U||c);return p.jsxs(p.Fragment,{children:[pe&&p.jsx(el,{"data-type":"inside",ref:q,onFocus:B=>{if(c){const ce=ee();uo(o[0]==="reference"?ce[0]:ce[ce.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(k.current=!1,ns(B,F.portalNode)){const ce=My(b);ce?.focus()}else{var ae;(ae=F.beforeOutsideRef.current)==null||ae.focus()}}}),!w&&Z("start"),n,Z("end"),pe&&p.jsx(el,{"data-type":"inside",ref:Y,onFocus:B=>{if(c)uo(ee()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(k.current=!0),ns(B,F.portalNode)){const ce=_y(b);ce?.focus()}else{var ae;(ae=F.afterOutsideRef.current)==null||ae.focus()}}})]})}let tl=0;const bv="--floating-ui-scrollbar-width";function JP(){const e=Xu(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(bv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(bv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let xv=()=>{};const gd=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return tl++,tl===1&&(xv=JP()),()=>{tl--,tl===0&&xv()}},[r]),p.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function wv(e){return Pt(e.target)&&e.target.tagName==="BUTTON"}function eO(e){return Pt(e.target)&&e.target.tagName==="A"}function Sv(e){return nd(e)}function Ko(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=P.useRef(),h=P.useRef(!1),m=P.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const g=f.current;y.button===0&&a!=="click"&&(qo(g,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,y.nativeEvent,"click"):(y.preventDefault(),r(!0,y.nativeEvent,"click"))))},onClick(y){const g=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}qo(g,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,y.nativeEvent,"click"):r(!0,y.nativeEvent,"click"))},onKeyDown(y){f.current=void 0,!(y.defaultPrevented||!u||wv(y))&&(y.key===" "&&!Sv(i)&&(y.preventDefault(),h.current=!0),!eO(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!u||wv(y)||Sv(i)||y.key===" "&&h.current&&(h.current=!1,r(!(n&&l),y.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return P.useMemo(()=>s?{reference:m}:{},[s,m])}function tO(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=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=s.width,d=s.height,f=s.x,h=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function Tv(e){return e!=null&&e.clientX!=null}function nO(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=P.useRef(!1),f=P.useRef(null),[h,m]=P.useState(),[y,g]=P.useState([]),v=kt((I,w)=>{d.current||r.current.openEvent&&!Tv(r.current.openEvent)||s.setPositionReference(tO(i,{x:I,y:w,axis:l,dataRef:r,pointerType:h}))}),b=kt(I=>{c!=null||u!=null||(n?f.current||g([]):v(I.clientX,I.clientY))}),x=qo(h)?o:n,T=P.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const I=Wt(o);function w(C){const A=Yn(C);Rt(o,A)?(I.removeEventListener("mousemove",w),f.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||Tv(r.current.openEvent)){I.addEventListener("mousemove",w);const C=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=C,C}s.setPositionReference(i)},[x,a,c,u,o,r,s,i,v]);P.useEffect(()=>T(),[T,y]),P.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),nt(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const E=P.useMemo(()=>{function I(w){let{pointerType:C}=w;m(C)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return P.useMemo(()=>a?{reference:E}:{},[a,E])}const rO={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},oO={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ev=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Nr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:m}=t,y=Or(),g=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,b=P.useRef(!1),{escapeKey:x,outsidePress:T}=Ev(h),{escapeKey:E,outsidePress:I}=Ev(m),w=P.useRef(!1),C=kt(D=>{var F;if(!n||!s||!a||D.key!=="Escape"||w.current)return;const z=(F=i.current.floatingContext)==null?void 0:F.nodeId,M=y?so(y.nodesRef.current,z):[];if(!x&&(D.stopPropagation(),M.length>0)){let k=!0;if(M.forEach(V=>{var L;if((L=V.context)!=null&&L.open&&!V.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}r(!1,zA(D)?D.nativeEvent:D,"escape-key")}),A=kt(D=>{var F;const z=()=>{var M;C(D),(M=Yn(D))==null||M.removeEventListener("keydown",z)};(F=Yn(D))==null||F.addEventListener("keydown",z)}),O=kt(D=>{var F;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||z||typeof v=="function"&&!v(D))return;const k=Yn(D),V="["+co("inert")+"]",L=qt(o.floating).querySelectorAll(V);let R=tt(k)?k:null;for(;R&&!pr(R);){const ee=hr(R);if(pr(ee)||!tt(ee))break;R=ee}if(L.length&&tt(k)&&!LA(k)&&!Rt(k,o.floating)&&Array.from(L).every(ee=>!Rt(R,ee)))return;if(Pt(k)&&$){const ee=pr(k),se=dn(k),te=/auto|scroll/,q=ee||te.test(se.overflowX),Y=ee||te.test(se.overflowY),Z=q&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,pe=Y&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,B=se.direction==="rtl",ae=pe&&(B?D.offsetX<=k.offsetWidth-k.clientWidth:D.offsetX>k.clientWidth),ce=Z&&D.offsetY>k.clientHeight;if(ae||ce)return}const U=(F=i.current.floatingContext)==null?void 0:F.nodeId,G=y&&so(y.nodesRef.current,U).some(ee=>{var se;return td(D,(se=ee.context)==null?void 0:se.elements.floating)});if(td(D,o.floating)||td(D,o.domReference)||G)return;const H=y?so(y.nodesRef.current,U):[];if(H.length>0){let ee=!0;if(H.forEach(se=>{var te;if((te=se.context)!=null&&te.open&&!se.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,D,"outside-press")}),_=kt(D=>{var F;const z=()=>{var M;O(D),(M=Yn(D))==null||M.removeEventListener(c,z)};(F=Yn(D))==null||F.addEventListener(c,z)});P.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let D=-1;function F(L){r(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(D),w.current=!0}function M(){D=window.setTimeout(()=>{w.current=!1},Na()?5:0)}const k=qt(o.floating);a&&(k.addEventListener("keydown",E?A:C,E),k.addEventListener("compositionstart",z),k.addEventListener("compositionend",M)),v&&k.addEventListener(c,I?_:O,I);let V=[];return f&&(tt(o.domReference)&&(V=Ir(o.domReference)),tt(o.floating)&&(V=V.concat(Ir(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(Ir(o.reference.contextElement)))),V=V.filter(L=>{var R;return L!==((R=k.defaultView)==null?void 0:R.visualViewport)}),V.forEach(L=>{L.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(k.removeEventListener("keydown",E?A:C,E),k.removeEventListener("compositionstart",z),k.removeEventListener("compositionend",M)),v&&k.removeEventListener(c,I?_:O,I),V.forEach(L=>{L.removeEventListener("scroll",F)}),window.clearTimeout(D)}},[i,o,a,v,c,n,r,f,s,x,T,C,E,A,O,I,_]),P.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const N=P.useMemo(()=>({onKeyDown:C,...u&&{[rO[d]]:D=>{r(!1,D.nativeEvent,"reference-press")},...d!=="click"&&{onClick(D){r(!1,D.nativeEvent,"reference-press")}}}}),[C,r,u,d]),$=P.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[oO[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return P.useMemo(()=>s?{reference:N,floating:$}:{},[s,N,$])}function iO(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=is(),i=P.useRef({}),[s]=P.useState(()=>ov()),a=Pr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!tt(h)&&$P("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=kt((h,m,y)=>{i.current.openEvent=h?m:void 0,s.emit("openchange",{open:h,event:m,reason:y,nested:a}),n?.(h,m,y)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=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:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Kn(e){e===void 0&&(e={});const{nodeId:t}=e,n=iO({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=P.useState(null),[a,l]=P.useState(null),u=o?.domReference||i,d=P.useRef(null),f=Or();nt(()=>{u&&(d.current=u)},[u]);const h=OP({...e,elements:{...o,...a&&{reference:a}}}),m=P.useCallback(x=>{const T=tt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),h.refs.setReference(T)},[h.refs]),y=P.useCallback(x=>{(tt(x)||x===null)&&(d.current=x,s(x)),(tt(h.refs.reference.current)||h.refs.reference.current===null||x!==null&&!tt(x))&&h.refs.setReference(x)},[h.refs]),g=P.useMemo(()=>({...h.refs,setReference:y,setPositionReference:m,domReference:d}),[h.refs,y,m]),v=P.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),b=P.useMemo(()=>({...h,...r,refs:g,elements:v,nodeId:t}),[h,g,v,t,r]);return nt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(T=>T.id===t);x&&(x.context=b)}),P.useMemo(()=>({...h,context:b,refs:g,elements:v}),[h,g,v,b])}function yd(){return NA()&&Cy()}function sO(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(-1),d=P.useRef(!0);P.useEffect(()=>{if(!a)return;const h=Wt(s.domReference);function m(){!n&&Pt(s.domReference)&&s.domReference===Gn(qt(s.domReference))&&(c.current=!0)}function y(){d.current=!0}function g(){d.current=!1}return h.addEventListener("blur",m),yd()&&(h.addEventListener("keydown",y,!0),h.addEventListener("pointerdown",g,!0)),()=>{h.removeEventListener("blur",m),yd()&&(h.removeEventListener("keydown",y,!0),h.removeEventListener("pointerdown",g,!0))}},[s.domReference,n,a]),P.useEffect(()=>{if(!a)return;function h(m){let{reason:y}=m;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),P.useEffect(()=>()=>{Gt(u)},[]);const f=P.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const m=Yn(h.nativeEvent);if(l&&tt(m)){if(yd()&&!h.relatedTarget){if(!d.current&&!nd(m))return}else if(!VA(m))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const m=h.relatedTarget,y=h.nativeEvent,g=tt(m)&&m.hasAttribute(co("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=Gn(s.domReference?s.domReference.ownerDocument:document);!m&&b===s.domReference||Rt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Rt(s.domReference,b)||g||r(!1,y,"focus")})}}),[i,s.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function vd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Jy]:s,[ev]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[_P]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Jy,ev].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),s[c]=function(){for(var f,h=arguments.length,m=new Array(h),y=0;y<h;y++)m[y]=arguments[y];return(f=r.get(c))==null?void 0:f.map(g=>g(...m)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function Zn(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=P.useCallback(a=>vd(a,e,"reference"),t),i=P.useCallback(a=>vd(a,e,"floating"),n),s=P.useCallback(a=>vd(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const aO="Escape";function nl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function rl(e,t){return nl(t,e===tv||e===Za,e===rs||e===os)}function bd(e,t,n){return nl(t,e===Za,n?e===rs:e===os)||e==="Enter"||e===" "||e===""}function Cv(e,t,n){return nl(t,n?e===rs:e===os,e===Za)}function kv(e,t,n,r){const o=n?e===os:e===rs,i=e===tv;return t==="both"||t==="horizontal"&&r&&r>1?e===aO:nl(t,o,i)}function ol(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:h=!1,rtl:m=!1,virtual:y=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:C,itemSizes:A,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Xa("`useListNavigation` looping must be enabled to allow escaping."),y||Xa("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Xa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=Ra(o.floating),N=Ht(_),$=Pr(),D=Or();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const F=kt(()=>{l(k.current===-1?null:k.current)}),z=rd(o.domReference),M=P.useRef(g),k=P.useRef(u??-1),V=P.useRef(null),L=P.useRef(!0),R=P.useRef(F),U=P.useRef(!!o.floating),G=P.useRef(n),H=P.useRef(!1),ee=P.useRef(!1),se=Ht(x),te=Ht(n),q=Ht(w),Y=Ht(u),[Z,pe]=P.useState(),[B,ae]=P.useState(),ce=kt(()=>{function de(X){if(y){var me;(me=X.id)!=null&&me.endsWith("-fui-option")&&(X.id=i+"-"+Math.random().toString(16).slice(2,10)),pe(X.id),D?.events.emit("virtualfocus",X),C&&(C.current=X)}else uo(X,{sync:H.current,preventScroll:!0})}const re=s.current[k.current],J=ee.current;re&&de(re),(H.current?X=>X():requestAnimationFrame)(()=>{const X=s.current[k.current]||re;if(!X)return;re||de(X);const me=q.current;me&&ue&&(J||!L.current)&&(X.scrollIntoView==null||X.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});nt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(ee.current=!0,k.current=u,F()):U.current&&(k.current=-1,R.current()))},[c,n,o.floating,u,F]),nt(()=>{if(c&&n&&o.floating)if(a==null){if(H.current=!1,Y.current!=null)return;if(U.current&&(k.current=-1,ce()),(!G.current||!U.current)&&M.current&&(V.current!=null||M.current===!0&&V.current==null)){let de=0;const re=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(re),de++):(k.current=V.current==null||bd(V.current,T,m)||h?od(s,se.current):Dy(s,se.current),V.current=null,F())};re()}}else es(s,a)||(k.current=a,ce(),ee.current=!1)},[c,n,o.floating,a,Y,h,s,T,m,F,ce,se]),nt(()=>{var de;if(!c||o.floating||!D||y||!U.current)return;const re=D.nodesRef.current,J=(de=re.find(me=>me.id===$))==null||(de=de.context)==null?void 0:de.elements.floating,j=Gn(qt(o.floating)),X=re.some(me=>me.context&&Rt(me.context.elements.floating,j));J&&!X&&L.current&&J.focus({preventScroll:!0})},[c,o.floating,D,$,y]),nt(()=>{if(!c||!D||!y||$)return;function de(re){ae(re.id),C&&(C.current=re)}return D.events.on("virtualfocus",de),()=>{D.events.off("virtualfocus",de)}},[c,D,y,$,C]),nt(()=>{R.current=F,G.current=n,U.current=!!o.floating}),nt(()=>{n||(V.current=null,M.current=g)},[n,g]);const Q=a!=null,ue=P.useMemo(()=>{function de(J){if(!te.current)return;const j=s.current.indexOf(J);j!==-1&&k.current!==j&&(k.current=j,F())}return{onFocus(J){let{currentTarget:j}=J;H.current=!0,de(j)},onClick:J=>{let{currentTarget:j}=J;return j.focus({preventScroll:!0})},onMouseMove(J){let{currentTarget:j}=J;H.current=!0,ee.current=!1,v&&de(j)},onPointerLeave(J){let{pointerType:j}=J;if(!(!L.current||j==="touch")&&(H.current=!0,!!v&&(k.current=-1,F(),!y))){var X;(X=N.current)==null||X.focus({preventScroll:!0})}}}},[te,N,v,s,F,y]),oe=P.useCallback(()=>{var de;return E??(D==null||(de=D.nodesRef.current.find(re=>re.id===$))==null||(de=de.context)==null||(de=de.dataRef)==null?void 0:de.current.orientation)},[$,D,E]),he=kt(de=>{if(L.current=!1,H.current=!0,de.which===229||!te.current&&de.currentTarget===N.current)return;if(h&&kv(de.key,T,m,I)){rl(de.key,oe())||Ut(de),r(!1,de.nativeEvent,"list-navigation"),Pt(o.domReference)&&(y?D?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const re=k.current,J=od(s,x),j=Dy(s,x);if(z||(de.key==="Home"&&(Ut(de),k.current=J,F()),de.key==="End"&&(Ut(de),k.current=j,F())),I>1){const X=A||Array.from({length:s.current.length},()=>({width:1,height:1})),me=qA(X,I,O),ve=me.findIndex(_e=>_e!=null&&!Wa(s,_e,x)),Ce=me.reduce((_e,ct,_t)=>ct!=null&&!Wa(s,ct,x)?_t:_e,-1),Me=me[WA({current:me.map(_e=>_e!=null?s.current[_e]:null)},{event:de,orientation:T,loop:f,rtl:m,cols:I,disabledIndices:GA([...(typeof x!="function"?x:null)||s.current.map((_e,ct)=>Wa(s,ct,x)?ct:void 0),void 0],me),minIndex:ve,maxIndex:Ce,prevIndex:UA(k.current>j?J:k.current,X,me,I,de.key===Za?"bl":de.key===(m?rs:os)?"tr":"tl"),stopEvent:!0})];if(Me!=null&&(k.current=Me,F()),T==="both")return}if(rl(de.key,T)){if(Ut(de),n&&!y&&Gn(de.currentTarget.ownerDocument)===de.currentTarget){k.current=bd(de.key,T,m)?J:j,F();return}bd(de.key,T,m)?f?k.current=re>=j?d&&re!==s.current.length?-1:J:Zt(s,{startingIndex:re,disabledIndices:x}):k.current=Math.min(j,Zt(s,{startingIndex:re,disabledIndices:x})):f?k.current=re<=J?d&&re!==-1?s.current.length:j:Zt(s,{startingIndex:re,decrement:!0,disabledIndices:x}):k.current=Math.max(J,Zt(s,{startingIndex:re,decrement:!0,disabledIndices:x})),es(s,k.current)&&(k.current=-1),F()}}),ie=P.useMemo(()=>y&&n&&Q&&{"aria-activedescendant":B||Z},[y,n,Q,B,Z]),le=P.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:ie,onKeyDown:he,onPointerMove(){L.current=!0}}),[ie,he,T,z]),be=P.useMemo(()=>{function de(J){g==="auto"&&Py(J.nativeEvent)&&(M.current=!0)}function re(J){M.current=g,g==="auto"&&Oy(J.nativeEvent)&&(M.current=!0)}return{...ie,onKeyDown(J){L.current=!1;const j=J.key.startsWith("Arrow"),X=["Home","End"].includes(J.key),me=j||X,ve=Cv(J.key,T,m),Ce=kv(J.key,T,m,I),Me=Cv(J.key,oe(),m),_e=rl(J.key,T),ct=(h?Me:_e)||J.key==="Enter"||J.key.trim()==="";if(y&&n){const W=D?.nodesRef.current.find(Oe=>Oe.parentId==null),K=D&&W?$A(D.nodesRef.current,W.id):null;if(me&&K&&C){const Oe=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ve||Ce){var _t,Qt;const Ue=((_t=K.context)==null?void 0:_t.elements.domReference)===J.currentTarget,Ye=Ce&&!Ue?(Qt=K.context)==null?void 0:Qt.elements.domReference:ve?s.current.find($e=>$e?.id===Z):null;Ye&&(Ut(J),Ye.dispatchEvent(Oe),ae(void 0))}if((_e||X)&&K.context&&K.context.open&&K.parentId&&J.currentTarget!==K.context.elements.domReference){var Be;Ut(J),(Be=K.context.elements.domReference)==null||Be.dispatchEvent(Oe);return}}return he(J)}if(!(!n&&!b&&j)){if(ct){const W=rl(J.key,oe());V.current=h&&W?null:J.key}if(h){Me&&(Ut(J),n?(k.current=od(s,se.current),F()):r(!0,J.nativeEvent,"list-navigation"));return}_e&&(u!=null&&(k.current=u),Ut(J),!n&&b?r(!0,J.nativeEvent,"list-navigation"):he(J),n&&F())}},onFocus(){n&&!y&&(k.current=-1,F())},onPointerDown:re,onPointerEnter:re,onMouseDown:de,onClick:de}},[Z,ie,I,he,se,g,s,h,F,r,n,b,T,oe,m,u,D,y,C]);return P.useMemo(()=>c?{reference:be,floating:le,item:ue}:{},[c,be,le,ue])}const lO=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function yr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=is(),u=((n=i.domReference)==null?void 0:n.id)||c,d=P.useMemo(()=>{var b;return((b=Ra(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=lO.get(l))!=null?r:l,m=Pr()!=null,y=P.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,m,o,u,l]),g=P.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),v=P.useCallback(b=>{let{active:x,selected:T}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return P.useMemo(()=>a?{reference:y,floating:g,item:v}:{},[a,y,g,v])}const Iv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Zo(e,t){return typeof e=="function"?e(t):e}function cO(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 uO(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=P.useState("unmounted"),c=cO(n,s);return!c&&a==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{ur.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Av(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=P.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[h,m]=P.useState(()=>({...Zo(i,c),...Zo(n,c)})),{isMounted:y,status:g}=uO(e,{duration:s}),v=Ht(n),b=Ht(r),x=Ht(o),T=Ht(i);return nt(()=>{const E=Zo(v.current,c),I=Zo(x.current,c),w=Zo(T.current,c),C=Zo(b.current,c)||Object.keys(E).reduce((A,O)=>(A[O]="",A),{});if(g==="initial"&&m(A=>({transitionProperty:A.transitionProperty,...w,...E})),g==="open"&&m({transitionProperty:Object.keys(C).map(Iv).join(","),transitionDuration:d+"ms",...w,...C}),g==="close"){const A=I||E;m({transitionProperty:Object.keys(A).map(Iv).join(","),transitionDuration:f+"ms",...w,...A})}},[f,x,v,b,T,d,g,c]),{isMounted:y,styles:h}}function dO(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,m=P.useRef(-1),y=P.useRef(""),g=P.useRef((n=h??s)!=null?n:-1),v=P.useRef(null),b=kt(a),x=kt(l),T=Ht(u),E=Ht(f);nt(()=>{r&&(Gt(m),v.current=null,y.current="")},[r]),nt(()=>{if(r&&y.current===""){var O;g.current=(O=h??s)!=null?O:-1}},[r,h,s]);const I=kt(O=>{O?o.current.typing||(o.current.typing=O,x(O)):o.current.typing&&(o.current.typing=O,x(O))}),w=kt(O=>{function _(z,M,k){const V=T.current?T.current(M,k):M.find(L=>L?.toLocaleLowerCase().indexOf(k.toLocaleLowerCase())===0);return V?z.indexOf(V):-1}const N=i.current;if(y.current.length>0&&y.current[0]!==" "&&(_(N,N,y.current)===-1?I(!1):O.key===" "&&Ut(O)),N==null||E.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Ut(O),I(!0)),N.every(z=>{var M,k;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((k=z[1])==null?void 0:k.toLocaleLowerCase()):!0})&&y.current===O.key&&(y.current="",g.current=v.current),y.current+=O.key,Gt(m),m.current=window.setTimeout(()=>{y.current="",g.current=v.current,I(!1)},d);const D=g.current,F=_(N,[...N.slice((D||0)+1),...N.slice(0,(D||0)+1)],y.current);F!==-1?(b(F),v.current=F):O.key!==" "&&(y.current="",I(!1))}),C=P.useMemo(()=>({onKeyDown:w}),[w]),A=P.useMemo(()=>({onKeyDown:w,onKeyUp(O){O.key===" "&&I(!1)}}),[w,I]);return P.useMemo(()=>c?{reference:C,floating:A}:{},[c,C,A])}function Pv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Pv(e,o.id,n)])}function Ov(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function fO(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Dv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const h=performance.now(),m=h-l;if(s===null||a===null||m===0)return s=d,a=f,l=h,null;const y=d-s,g=f-a,b=Math.sqrt(y*y+g*g)/m;return s=d,a=f,l=h,b}const u=d=>{let{x:f,y:h,placement:m,elements:y,onClose:g,nodeId:v,tree:b}=d;return function(T){function E(){Gt(o),g()}if(Gt(o),!y.domReference||!y.floating||m==null||f==null||h==null)return;const{clientX:I,clientY:w}=T,C=[I,w],A=RP(T),O=T.type==="mouseleave",_=fd(y.floating,A),N=fd(y.domReference,A),$=y.domReference.getBoundingClientRect(),D=y.floating.getBoundingClientRect(),F=m.split("-")[0],z=f>D.right-D.width/2,M=h>D.bottom-D.height/2,k=fO(C,$),V=D.width>$.width,L=D.height>$.height,R=(V?$:D).left,U=(V?$:D).right,G=(L?$:D).top,H=(L?$:D).bottom;if(_&&(i=!0,!O))return;if(N&&(i=!1),N&&!O){i=!0;return}if(O&&tt(T.relatedTarget)&&fd(y.floating,T.relatedTarget)||b&&Pv(b.nodesRef.current,v).length)return;if(F==="top"&&h>=$.bottom-1||F==="bottom"&&h<=$.top+1||F==="left"&&f>=$.right-1||F==="right"&&f<=$.left+1)return E();let ee=[];switch(F){case"top":ee=[[R,$.top+1],[R,D.bottom-1],[U,D.bottom-1],[U,$.top+1]];break;case"bottom":ee=[[R,D.top+1],[R,$.bottom-1],[U,$.bottom-1],[U,D.top+1]];break;case"left":ee=[[D.right-1,H],[D.right-1,G],[$.left+1,G],[$.left+1,H]];break;case"right":ee=[[$.right-1,H],[$.right-1,G],[D.left+1,G],[D.left+1,H]];break}function se(te){let[q,Y]=te;switch(F){case"top":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y+t+1],pe=[V?q-t/2:z?q+t*4:q-t*4,Y+t+1],B=[[D.left,z||V?D.bottom-t:D.top],[D.right,z?V?D.bottom-t:D.top:D.bottom-t]];return[Z,pe,...B]}case"bottom":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y-t],pe=[V?q-t/2:z?q+t*4:q-t*4,Y-t],B=[[D.left,z||V?D.top+t:D.bottom],[D.right,z?V?D.top+t:D.bottom:D.top+t]];return[Z,pe,...B]}case"left":{const Z=[q+t+1,L?Y+t/2:M?Y+t*4:Y-t*4],pe=[q+t+1,L?Y-t/2:M?Y+t*4:Y-t*4];return[...[[M||L?D.right-t:D.left,D.top],[M?L?D.right-t:D.left:D.right-t,D.bottom]],Z,pe]}case"right":{const Z=[q-t,L?Y+t/2:M?Y+t*4:Y-t*4],pe=[q-t,L?Y-t/2:M?Y+t*4:Y-t*4],B=[[M||L?D.left+t:D.right,D.top],[M?L?D.left+t:D.right:D.left+t,D.bottom]];return[Z,pe,...B]}}}if(!Ov([I,w],ee)){if(i&&!k)return E();if(!O&&r){const te=c(T.clientX,T.clientY);if(te!==null&&te<.1)return E()}Ov([I,w],se([f,h]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const Nv=200,pO=500,Xo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},Mv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),_v={basic:/[,[\]]+?/,extend:/[,[\].]+?/},xd=(e,t)=>{const n=Mv(t,_v.basic,e)||Mv(t,_v.extend,e);return n===void 0||n===e?void 0:n},Mr=()=>typeof window>"u",wd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Fv=(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},hO=e=>!e,Qo=()=>{},Lv=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},Sd=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=Qo,followCursor:d=!1,...f},h){const[m,y]=S.useState(n??!1),g=S.useRef(null),v=t||"span",b=D=>{y(D),u?.(D)},{refs:x,floatingStyles:T,context:E}=Kn({placement:i,open:m,whileElementsMounted:lo,onOpenChange:n?void 0:b,middleware:[Ya(),Go(5),Zy(),ld({padding:5,element:g}),Ka({fallbackAxisSideDirection:"start"})]}),I=Nr(E,{enabled:l}),w=yr(E,{role:"tooltip",enabled:l}),C=sO(E,{enabled:l?s:!1}),A=Ko(E,{enabled:l?c:!1}),O=nO(E,{enabled:!!l&&!!d}),_=lv(E,{move:!0,delay:{open:Nv},enabled:l?a:!1,handleClose:c?Dv():null}),{getReferenceProps:N,getFloatingProps:$}=Zn([w,I,O,s?C:void 0,a?_:void 0,c?A:void 0]);return S.useEffect(()=>y(n===void 0?!1:n),[n]),p.jsxs(S.Fragment,{children:[p.jsx(v,{...N(f),ref:fr(x.setReference,h),children:r}),m&&p.jsx(gr,{children:p.jsxs(un,{...$(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[p.jsx(cd,{ref:g,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),Vv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>p.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:p.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:[s,e||o?p.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?p.jsx(Sd,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:p.jsx("span",{className:"cursor-help",children:p.jsx(Er,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:p.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?p.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[p.jsx(Vu,{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}),p.jsx(FI,{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]}),as=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:m,componentName:y,placeholder:g,hideLeft:v=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=Hu(),C=T!==void 0?T:w.input.iconFeedback,A=d??h,O=vt(),_=e??O.inputOptionalLabel;return p.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":y,"data-interactive":!!i,className:Pe("group flex min-h-0 min-w-0 max-w-full flex-col items-start",r),children:[p.jsxs("label",{form:u,htmlFor:A,className:"relative inline-flex w-full max-w-full cursor-text flex-row flex-wrap justify-between gap-1 text-field-label text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:p.jsx(Vv,{info:a,hideLeft:v,reportStatus:C,title:m,placeholder:g,children:_||n?p.jsxs(S.Fragment,{children:[b?null:p.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors group-focus-within:text-primary group-hover:text-primary aria-disabled:text-disabled",children:_}),n?p.jsx(S.Fragment,{children:n}):null]}):null}),p.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 ${f}`,children:[t?p.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?p.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),p.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}),p.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})]})}),$v=(e,t,n,r)=>S.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:h,type:m="text",labelClassName:y,feedback:g=null,hideLeft:v=!1,loading:b,hiddenLabel:x,...T},E)=>{const I=e,w=T.id??T.name,C=S.useRef(null);return S.useEffect(()=>{if(C.current===null)return;const A=C.current,O=Gi(C.current),_=r?.(A),N=$=>{const D=$;if(D.key==="Enter"&&A.enterKeyHint==="next"){const F=A.getAttribute("data-next");if(F){const z=document.getElementById(F);if(z)return z.focus(),void D.preventDefault()}}};return A.addEventListener("keydown",N),()=>{_?.(),O(),A.removeEventListener("keydown",N)}},[]),p.jsx(as,{...n,info:i,left:s,error:l,right:c,form:T.form,loading:b,name:T.name,feedback:g,hideLeft:v,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:x,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:h,labelClassName:y,placeholder:T.placeholder,container:Pe(u,n.container),children:p.jsx(I,{...n,...T,id:w,name:w,type:m,"data-next":a,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:fr(E,C),className:Pe("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",T.className)})})}),Jo=$v(Xg,"input",{type:"text"}),mO=_o("relative overflow-hidden inline-flex duration-300 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-linear 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",tiny:"h-6 px-2 py-1 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-1 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-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Jt=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return p.jsxs(un,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Pe(mO({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),po=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:h,left:m,error:y,...g},v)=>{const b=vt(),x=S.useRef(null),T=g.id??g.name;S.useImperativeHandle(v,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,C=Gi(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{C(),I.abort()}},[]);const E=()=>x.current?.focus();return p.jsx(as,{info:n,left:m,error:y,form:g.form,loading:c,name:g.name,feedback:o,hideLeft:f,required:e,title:g.title,container:d,componentName:"select",rightLabel:a,hiddenLabel:l,interactive:s,id:g.name||g.id,optionalText:u,labelClassName:i,placeholder:g.placeholder,right:p.jsxs("label",{htmlFor:T,children:[h,p.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[p.jsx(Lu,{size:20}),p.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:p.jsxs("select",{...g,id:T,name:T,required:e,ref:fr(v,x),"data-selected":!!g.value||!1,title:typeof g.title=="string"?g.title:void 0,className:Pe("input select group h-10 w-full flex-1 appearance-none rounded-md text-base","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:[p.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(I=>S.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${T}-select-option-${I.value}`}))]})})});function an(e){return e?.ownerDocument||document}function gO({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=P.useRef(e!==void 0),[i,s]=P.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){P.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
5
5
  `))},[r,n,e]);const{current:c}=P.useRef(t);P.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
6
- `))},[JSON.stringify(t)])}const l=P.useCallback(c=>{o||s(c)},[]);return[a,l]}const Vv={};function Xn(e,t){const n=P.useRef(Vv);return n.current===Vv&&(n.current=e(t)),n}const xd=P[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],gO=xd&&xd!==P.useLayoutEffect?xd:e=>e();function ut(e){const t=Xn(yO).current;return t.next=e,gO(t.effect),t.trampoline}function yO(){const e={next:void 0,callback:vO,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function vO(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const pt=typeof document<"u"?P.useLayoutEffect:()=>{};function wd(e){const t=Xn(bO,e).current;return t.next=e,pt(t.effect),t}function bO(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let Sd;process.env.NODE_ENV!=="production"&&(Sd=new Set);function xO(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Sd.has(t)||(Sd.add(t),console.warn(`Base UI: ${t}`))}}function pn(){}const Dn=Object.freeze({}),wO={clipPath:"inset(50%)",position:"fixed",top:0,left:0},SO="none",$v="track-press",TO="input-change",EO="focus-out",kO="keyboard",CO="drag";function ei(e,t,n,r){let o=!1,i=!1;const s=r??Dn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function zv(e,t,n){const r=Dn;return{reason:e,event:t??new Event("base-ui"),...r}}function IO(e,t){const n=P.useRef(e),r=ut(t);pt(()=>{n.current!==e&&r(n.current)},[e,r]),pt(()=>{n.current=e},[e])}const Td={...P};let jv=0;function AO(e,t="mui"){const[n,r]=P.useState(e),o=e||n;return P.useEffect(()=>{n==null&&(jv+=1,r(`${t}-${jv}`))},[n,t]),o}const Bv=Td.useId;function rl(e,t){if(Bv!==void 0){const n=Bv();return e??(t?`${t}-${n}`:n)}return AO(e,t)}function ol(e){return rl(e,"base-ui")}function Nn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function Ed(e,t,n,r){const o=Xn(Rv).current;return OO(o,e,t,n,r)&&Hv(o,[e,t,n,r]),o.callback}function PO(e){const t=Xn(Rv).current;return DO(t,e)&&Hv(t,e),t.callback}function Rv(){return{callback:null,cleanup:null,refs:[]}}function OO(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function DO(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Hv(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const NO=parseInt(P.version,10);function kd(e){return NO>=e}function Wv(e){if(!P.isValidElement(e))return null;const t=e,n=t.props;return(kd(19)?n?.ref:t.ref)??null}function Cd(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function MO(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function _O(e,t){return typeof e=="function"?e(t):e}function FO(e,t){return typeof e=="function"?e(t):e}const ls={};function Id(e,t,n,r,o){let i={...Ad(e,ls)};return t&&(i=il(i,t)),n&&(i=il(i,n)),r&&(i=il(i,r)),i}function LO(e){if(e.length===0)return ls;if(e.length===1)return Ad(e[0],ls);let t={...Ad(e[0],ls)};for(let n=1;n<e.length;n+=1)t=il(t,e[n]);return t}function il(e,t){return qv(t)?t(e):VO(e,t)}function VO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Cd(e.style,r);break}case"className":{e[n]=Uv(e.className,r);break}default:$O(n,r)?e[n]=zO(e[n],r):e[n]=r}}return e}function $O(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function qv(e){return typeof e=="function"}function Ad(e,t){return qv(e)?e(t):e??ls}function zO(e,t){return t?e?n=>{if(jO(n)){const o=n;Pd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Pd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Uv(e,t){return t?e?t+" "+e:t:e}function jO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ln(e,t,n={}){const r=t.render,o=BO(t,n);if(n.enabled===!1)return null;const i=n.state??Dn;return HO(e,r,o,i)}function BO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Dn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?_O(n,i):void 0,d=c?FO(r,i):void 0,f=c?MO(i,l):Dn,p=c?Cd(f,Array.isArray(a)?LO(a):a)??Dn:Dn;return typeof document<"u"&&(c?Array.isArray(s)?p.ref=PO([p.ref,Wv(o),...s]):p.ref=Ed(p.ref,Wv(o),s):Ed(null,null)),c?(u!==void 0&&(p.className=Uv(p.className,u)),d!==void 0&&(p.style=Cd(p.style,d)),p):Dn}const RO=Symbol.for("react.lazy");function HO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Id(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===RO&&(i=P.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!P.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
7
- `));return P.cloneElement(i,o)}if(e&&typeof e=="string")return WO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Nn(8))}function WO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):P.createElement(e,t)}function Mn(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Gv(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const cs=typeof navigator<"u",Od=KO(),qO=XO(),UO=ZO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),Od.platform==="MacIntel"&&Od.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(Od.platform);const GO=cs&&/apple/i.test(navigator.vendor);cs&&qO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const YO=UO.includes("jsdom/");function KO(){if(!cs)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function ZO(){if(!cs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function XO(){if(!cs)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function ho(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function _r(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Dd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Nd(e){if(!e||YO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}const Yv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Kv(e,t){const n=Wo(e,Yv()),r=n.length;if(r===0)return;const o=ho(an(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function QO(e){return Kv(an(e).body,1)||e}function JO(e){return Kv(an(e).body,-1)||e}function Md(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!_r(n,r)}function eD(e){Wo(e,Yv()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Zv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const _d=P.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(_d.displayName="CompositeListContext");function tD(){return P.useContext(_d)}function nD(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ut(o),s=P.useRef(0),a=Xn(oD).current,l=Xn(rD).current,[c,u]=P.useState(0),d=P.useRef(c),f=ut((v,b)=>{l.set(v,b??null),d.current+=1,u(d.current)}),p=ut(v=>{l.delete(v),d.current+=1,u(d.current)}),g=P.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(iD).forEach((x,T)=>{const E=l.get(x)??{};v.set(x,{...E,index:T})}),v},[l,c]);pt(()=>{if(typeof MutationObserver!="function"||g.size===0)return;const v=new MutationObserver(b=>{const x=new Set,T=E=>x.has(E)?x.delete(E):x.add(E);b.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),x.size===0&&(d.current+=1,u(d.current))});return g.forEach((b,x)=>{x.parentElement&&v.observe(x.parentElement,{childList:!0})}),()=>{v.disconnect()}},[g]),pt(()=>{d.current===c&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),s.current=g.size),i(g)},[i,g,n,r,c]),pt(()=>()=>{n.current=[]},[n]),pt(()=>()=>{r&&(r.current=[])},[r]);const y=ut(v=>(a.add(v),()=>{a.delete(v)}));pt(()=>{a.forEach(v=>v(g))},[a,g]);const m=P.useMemo(()=>({register:f,unregister:p,subscribeMapChange:y,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,p,y,n,r,s]);return h.jsx(_d.Provider,{value:m,children:t})}function rD(){return new Map}function oD(){return new Set}function iD(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 sD(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Xv=P.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:pn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Xv.displayName="FormContext");function Qv(){return P.useContext(Xv)}let Jv=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const aD={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},lD={valid(e){return e===null?null:e?{[Jv.valid]:""}:{[Jv.invalid]:""}}},eb=P.createContext({invalid:void 0,name:void 0,validityData:{state:aD,errors:[],error:"",value:"",initialValue:null},setValidityData:pn,disabled:void 0,touched:!1,setTouched:pn,dirty:!1,setDirty:pn,filled:!1,setFilled:pn,focused:!1,setFocused:pn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Dn)=>e,getInputValidationProps:(e=Dn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(eb.displayName="FieldRootContext");function Fd(e=!0){const t=P.useContext(eb);if(t.setValidityData===pn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Nn(28));return t}function cD(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=Qv(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=Fd(),f=ut(e.getValue);pt(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(g=>({...g,initialValue:p}))},[t,d,n,u.initialValue,f]),pt(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:sD(u,l),validate(p=!0){let g=n;g===void 0&&(g=f()),c.current=!0,p?ur.flushSync(()=>s(g)):s(g)}})},[s,i,t,a,f,r,l,c,o,u,n]),pt(()=>{const p=a.current.fields;return()=>{r&&p.delete(r)}},[a,r])}const tb=P.createContext({controlId:void 0,registerControlId:pn,labelId:void 0,setLabelId:pn,messageIds:[],setMessageIds:pn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(tb.displayName="LabelableContext");function nb(){return P.useContext(tb)}function rb(e,t){return e-t}function uD(e,t,n){const r=e.slice();return r[t]=n,r.sort(rb)}function ob(e,t,n,r,o,i){let s=e;return s=Mn(s,n,r),o&&(s=uD(i,t,Mn(s,i[t-1]||-1/0,i[t+1]||1/0))),s}function ib(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,s,a)=>(s===a.length-1||o.push(Math.abs(i-a[s+1])),o),[]);return Math.min(...r)>=t*n}const us={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...lD},Ld=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ld.displayName="SliderRootContext");function sl(){const e=P.useContext(Ld);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Nn(62));return e}function dD(e){return"key"in e?kO:TO}function fD(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?Gv(e,t):!1}const sb=P.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:s=!1,id:a,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:g=0,name:y,onValueChange:m,onValueCommitted:v,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,k=ol(a),A=ut(m),O=ut(v),{clearErrors:_}=Qv(),{state:N,disabled:$,name:D,setTouched:F,setDirty:z,validityData:M,shouldValidateOnChange:C,validation:V}=Fd(),{labelId:L}=nb(),R=r??L,U=$||s,G=D??y,[H,ee]=mO({controlled:I,default:i??p,name:"Slider"}),se=P.useRef(null),te=P.useRef(null),q=P.useRef([]),Y=P.useRef(null),Z=P.useRef(null),pe=P.useRef(-1),B=P.useRef(null),ae=P.useRef(null),ce=P.useRef("none"),Q=wd(l),[ue,oe]=P.useState(-1),[he,ie]=P.useState(-1),[le,be]=P.useState(!1),[de,ne]=P.useState(()=>new Map),[J,j]=P.useState([void 0,void 0]),X=ut(Be=>{oe(Be),Be!==-1&&ie(Be)});cD({id:k,commit:V.commit,value:H,controlRef:te,name:G,getValue:()=>H}),IO(H,()=>{_(G),C()?V.commit(H):V.commit(H,!0);const Be=M.initialValue;let W;Array.isArray(H)&&Array.isArray(Be)?W=!Gv(H,Be):W=H!==Be,z(W)});const me=ut(Be=>{Be&&(te.current=Be)}),ve=Array.isArray(H),ke=P.useMemo(()=>ve?H.slice().sort(rb):[Mn(H,p,f)],[f,p,ve,H]),Me=ut((Be,W)=>{if(Number.isNaN(Be)||fD(Be,H))return;const K=W??ei(SO,void 0,void 0,{activeThumbIndex:-1});ce.current=K.reason;const Oe=K.event,Ue=Oe.constructor??Event,Ye=new Ue(Oe.type,Oe);Object.defineProperty(Ye,"target",{writable:!0,value:{value:Be,name:G}}),K.event=Ye,ae.current=Be,A(Be,K),!K.isCanceled&&ee(Be)}),_e=ut((Be,W,K)=>{const Oe=ob(Be,W,p,f,ve,ke);if(ib(Oe,x,g)){const Ue=dD(K);Me(Oe,ei(Ue,K.nativeEvent,void 0,{activeThumbIndex:W})),F(!0);const Ye=ae.current??Oe;O(Ye,zv(Ue,K.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&xO("Slider `max` must be greater than `min`."),pt(()=>{const Be=ho(an(se.current));U&&Be&&se.current?.contains(Be)&&Be.blur()},[U]),U&&ue!==-1&&X(-1);const ct=P.useMemo(()=>({...N,activeThumbIndex:ue,disabled:U,dragging:le,orientation:b,max:f,min:p,minStepsBetweenValues:g,step:x,values:ke}),[N,ue,U,le,f,p,g,b,x,ke]),_t=P.useMemo(()=>({active:ue,controlRef:te,disabled:U,dragging:le,validation:V,formatOptionsRef:Q,handleInputChange:_e,indicatorPosition:J,inset:E!=="center",labelId:R,largeStep:c,lastUsedThumbIndex:he,lastChangedValueRef:ae,lastChangeReasonRef:ce,locale:u,max:f,min:p,minStepsBetweenValues:g,name:G,onValueCommitted:O,orientation:b,pressedInputRef:Y,pressedThumbCenterOffsetRef:Z,pressedThumbIndexRef:pe,pressedValuesRef:B,registerFieldControlRef:me,renderBeforeHydration:E==="edge",setActive:X,setDragging:be,setIndicatorPosition:j,setValue:Me,state:ct,step:x,thumbCollisionBehavior:T,thumbMap:de,thumbRefs:q,values:ke}),[ue,te,R,U,le,V,Q,_e,J,c,he,ae,ce,u,f,p,g,G,O,b,Y,Z,pe,B,me,X,be,j,Me,ct,x,T,E,de,q,ke]),Qt=ln("div",t,{state:ct,ref:[n,se],props:[{"aria-labelledby":R,id:k,role:"group"},V.getValidationProps,w],stateAttributesMapping:us});return h.jsx(Ld.Provider,{value:_t,children:h.jsx(nD,{elementsRef:q,onMapChange:ne,children:Qt})})});process.env.NODE_ENV!=="production"&&(sb.displayName="SliderRoot");const ab=new Map;function pD(e,t){const n=JSON.stringify({locale:e,options:t}),r=ab.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return ab.set(n,o),o}function ti(e,t,n){return e==null?"":pD(t,n).format(e)}function hD(e,t,n){return e==null?"":n?ti(e,t,n):ti(e/100,t,{style:"percent"})}const mD=[];function ds(e){P.useEffect(e,mD)}const al=null;let lb=globalThis.requestAnimationFrame;class gD{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&lb!==requestAnimationFrame&&(lb=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ll=new gD;class Vd{static create(){return new Vd}static request(t){return ll.request(t)}static cancel(t){return ll.cancel(t)}currentId=al;request(t){this.cancel(),this.currentId=ll.request(()=>{this.currentId=al,t()})}cancel=()=>{this.currentId!==al&&(ll.cancel(this.currentId),this.currentId=al)};disposeEffect=()=>this.cancel}function cb(){const e=Xn(Vd.create).current;return ds(e.disposeEffect),e}const ub=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(ub.displayName="DirectionContext");function db(){return P.useContext(ub)?.direction??"ltr"}function fb(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function yD(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function pb(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(yD(t)))}function hb({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:s,initialValues:a}){if(e.length===0)return[];const l=e.slice(),c=i*s,u=l.length-1,d=a??e,f=r+t*c,p=o-(u-t)*c;l[t]=Mn(n,f,p);for(let g=t+1;g<=u;g+=1){const y=l[g-1]+c,m=o-(u-g)*c,v=d[g]??l[g];let b=Math.max(l[g],y);v<b&&(b=Math.max(v,y)),l[g]=Mn(b,y,m)}for(let g=t-1;g>=0;g-=1){const y=l[g+1]-c,m=r+g*c,v=d[g]??l[g];let b=Math.min(l[g],y);v>b&&(b=Math.min(v,y)),l[g]=Mn(b,m,y)}for(let g=0;g<=u;g+=1)l[g]=Number(l[g].toFixed(12));return l}function vD({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const g=u[o],y=1e-7,m=u.slice(),v=m[o-1],b=m[o+1],x=v!=null?v+p:s,T=b!=null?b-p:a,E=Mn(i,x,T),I=Number(E.toFixed(12));m[o]=I;const w=i>g,k=i<g,A=w&&b!=null&&i>=b-y,O=k&&v!=null&&i<=v+y;if(!A&&!O)return{value:m,thumbIndex:o,didSwap:!1};const _=A?o+1:o-1,N=m.map((z,M)=>{if(M===o)return I;const C=d[M];return C??u[M]});let $=i;A?$=Math.max(i,m[_]):$=Math.min(i,m[_]);const D=hb({values:m,index:_,nextValue:$,min:s,max:a,step:l,minStepsBetweenValues:c,initialValues:N}),F=A?_-1:_+1;if(F>=0&&F<D.length){const z=D[F-1],M=D[F+1];let C=z!=null?z+p:s;C=Math.max(C,s+F*p);let V=M!=null?M-p:a;V=Math.min(V,a-(D.length-1-F)*p);const L=Mn(I,C,V);D[F]=Number(L.toFixed(12))}return{value:D,thumbIndex:_,didSwap:!0}}case"push":return{value:hb({values:u,index:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const g=u.slice(),y=g[o-1],m=g[o+1],v=y!=null?y+p:s,b=m!=null?m-p:a,x=Mn(i,v,b);return g[o]=Number(x.toFixed(12)),{value:g,thumbIndex:o,didSwap:!1}}}}const bD=2;function xD(e,t){if(!e)return{start:0,end:0};function n(i){const s=i!=null?parseFloat(i):0;return Number.isNaN(s)?0:s}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function cl(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const mb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:s,dragging:a,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:g,onValueCommitted:y,orientation:m,pressedInputRef:v,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:k,setValue:A,state:O,step:_,thumbCollisionBehavior:N,thumbRefs:$,values:D}=sl(),F=db(),z=D.length>1,M=m==="vertical",C=P.useRef(null),V=P.useRef(null),L=ut(Q=>{Q&&V.current==null&&V.current==null&&(V.current=getComputedStyle(Q))}),R=P.useRef(null),U=P.useRef(0),G=P.useRef(0),H=wd(D),ee=ut(Q=>{x.current!==Q&&(x.current=Q);const ue=$.current[Q];if(!ue){b.current=null,v.current=null;return}v.current=ue.querySelector('input[type="range"]')}),se=ut(Q=>{const ue=C.current;if(!ue)return null;const{width:oe,height:he,bottom:ie,left:le,right:be}=ue.getBoundingClientRect(),de=xD(V.current,M),ne=G.current,J=(M?he:oe)-de.start-de.end-ne*2,j=b.current??0,X=Q.x-j,me=Q.y-j,ve=M?ie-me-de.end:(F==="rtl"?be-X:X-le)-de.start,ke=Mn((ve-ne)/J,0,1);let Me=(f-p)*ke+p;if(Me=pb(Me,_,p),Me=Mn(Me,p,f),!z)return{value:Me,thumbIndex:0,didSwap:!1};const _e=x.current;if(_e<0)return null;const ct=vD({behavior:N,values:D,currentValues:H.current??D,initialValues:T.current,pressedIndex:_e,nextValue:Me,min:p,max:f,step:_,minStepsBetweenValues:g});return N==="swap"&&ct.didSwap?ee(ct.thumbIndex):x.current=ct.thumbIndex,ct}),te=ut(Q=>{T.current=z?D.slice():null,H.current=D;const ue=x.current;let oe=ue;if(ue>-1&&ue<D.length){if(D[ue]===f){let he=ue;for(;he>0&&D[he-1]===f;)he-=1;oe=he}}else{const he=M?"y":"x";let ie;oe=-1;for(let le=0;le<$.current.length;le+=1){const be=$.current[le];if(tt(be)){const de=fb(be),ne=Math.abs(Q[he]-de[he]);(ie===void 0||ne<=ie)&&(oe=le,ie=ne)}}}if(oe>-1&&oe!==ue&&ee(oe),c){const he=$.current[oe];if(tt(he)){const ie=he.getBoundingClientRect(),le=M?"height":"width";G.current=ie[le]/2}}}),q=ut(Q=>{$.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),Y=ut(Q=>{const ue=cl(Q,R);if(ue==null)return;if(U.current+=1,Q.type==="pointermove"&&Q.buttons===0){Z(Q);return}const oe=se(ue);oe!=null&&ib(oe.value,_,g)&&(!a&&U.current>bD&&k(!0),A(oe.value,ei(CO,Q,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex))});function Z(Q){w(-1),k(!1),v.current=null,b.current=null;const ue=cl(Q,R),oe=ue!=null?se(ue):null;if(oe!=null){const he=d.current;l.commit(u.current??oe.value),y(u.current??oe.value,zv(he,Q))}"pointerType"in Q&&C.current?.hasPointerCapture(Q.pointerId)&&C.current?.releasePointerCapture(Q.pointerId),x.current=-1,R.current=null,T.current=null,B()}const pe=ut(Q=>{if(s)return;const ue=Q.changedTouches[0];ue!=null&&(R.current=ue.identifier);const oe=cl(Q,R);if(oe!=null){te(oe);const ie=se(oe);if(ie==null)return;q(ie.thumbIndex),A(ie.value,ei($v,Q,void 0,{activeThumbIndex:ie.thumbIndex})),H.current=Array.isArray(ie.value)?ie.value:[ie.value],ie.didSwap&&q(ie.thumbIndex)}U.current=0;const he=an(C.current);he.addEventListener("touchmove",Y,{passive:!0}),he.addEventListener("touchend",Z,{passive:!0})}),B=ut(()=>{const Q=an(C.current);Q.removeEventListener("pointermove",Y),Q.removeEventListener("pointerup",Z),Q.removeEventListener("touchmove",Y),Q.removeEventListener("touchend",Z),T.current=null}),ae=cb();return P.useEffect(()=>{const Q=C.current;return Q?(Q.addEventListener("touchstart",pe,{passive:!0}),()=>{Q.removeEventListener("touchstart",pe),ae.cancel(),B()}):()=>B()},[B,pe,C,ae]),P.useEffect(()=>{s&&B()},[s,B]),ln("div",t,{state:O,ref:[n,E,C,L],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const ue=C.current;if(!ue||s||Q.defaultPrevented||!tt(Q.target)||Q.button!==0)return;const oe=cl(Q,R);if(oe!=null){te(oe);const ie=se(oe);if(ie==null)return;_r($.current[ie.thumbIndex],ho(an(ue)))?Q.preventDefault():ae.request(()=>{q(ie.thumbIndex)}),k(!0),b.current!=null||(A(ie.value,ei($v,Q.nativeEvent,void 0,{activeThumbIndex:ie.thumbIndex})),H.current=Array.isArray(ie.value)?ie.value:[ie.value],ie.didSwap&&q(ie.thumbIndex))}Q.nativeEvent.pointerId&&ue.setPointerCapture(Q.nativeEvent.pointerId),U.current=0;const he=an(C.current);he.addEventListener("pointermove",Y,{passive:!0}),he.addEventListener("pointerup",Z,{once:!0})},tabIndex:-1},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(mb.displayName="SliderControl");const gb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:s}=sl();return ln("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(gb.displayName="SliderTrack");const ul={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function dl(e,t,n){return(e-t)*100/(n-t)}const fl="ArrowUp",pl="ArrowDown",hl="ArrowLeft",ml="ArrowRight",gl="Home",yl="End",wD=new Set([hl,ml]),SD=new Set([fl,pl]),TD=new Set([...wD,...SD]);[...TD];const ED=new Set([fl,pl,hl,ml,gl,yl]);let kD=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function CD(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=tD(),f=P.useRef(-1),[p,g]=P.useState(i??(o===kD.GuessFromOrder?()=>{if(f.current===-1){const v=d.current;d.current+=1,f.current=v}return f.current}:-1)),y=P.useRef(null),m=P.useCallback(v=>{if(y.current=v,p!==-1&&v!==null&&(c.current[p]=v,u)){const b=t!==void 0;u.current[p]=b?t:r?.current?.textContent??v.textContent}},[p,c,u,t,r]);return pt(()=>{if(i!=null)return;const v=y.current;if(v)return s(v,n),()=>{a(v)}},[i,s,a,n]),pt(()=>{if(i==null)return l(v=>{const b=y.current?v.get(y.current)?.index:null;b!=null&&g(b)})},[i,l,g]),P.useMemo(()=>({ref:m,index:p}),[p,m])}const yb=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(yb.displayName="CSPContext");const ID={disableStyleElements:!1};function AD(){return P.useContext(yb)??ID}function PD(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=nb(),s=ol(t),a=n?o:void 0,l=Xn(()=>Symbol("labelable-control")),c=P.useRef(!1),u=P.useRef(t!=null),d=ut(()=>{!c.current||i===pn||(c.current=!1,i(l.current,void 0))});return pt(()=>{if(i===pn)return;let f;if(n){const p=r?.current;tt(p)&&p.closest("label")!=null?f=t??null:f=a??s}else if(t!=null)u.current=!0,f=t;else if(u.current)f=s;else{d();return}if(f===void 0){d();return}c.current=!0,i(l.current,f)},[t,r,a,i,n,s,l,d]),P.useEffect(()=>d,[d]),o??s}let OD=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const DD='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',vb="PageUp",bb="PageDown",ND=new Set([fl,pl,hl,ml,gl,yl,vb,bb]);function MD(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${ti(e[t],r,n)} start range`:`${ti(e[t],r,n)} end range`:n?ti(e[t],r,n):void 0}function ni(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const xb=P.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":s,"aria-label":a,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:g,onBlur:y,onFocus:m,onKeyDown:v,tabIndex:b,...x}=t,{nonce:T}=AD(),E=ol(f),{active:I,lastUsedThumbIndex:w,controlRef:k,disabled:A,validation:O,formatOptionsRef:_,handleInputChange:N,inset:$,labelId:D,largeStep:F,locale:z,max:M,min:C,minStepsBetweenValues:V,name:L,orientation:R,pressedInputRef:U,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:H,renderBeforeHydration:ee,setActive:se,setIndicatorPosition:te,state:q,step:Y,values:Z}=sl(),pe=db(),B=c||A,ae=Z.length>1,ce=R==="vertical",Q=pe==="rtl",{setTouched:ue,setFocused:oe,validationMode:he}=Fd(),ie=P.useRef(null),le=P.useRef(null),be=ol(),de=PD(),ne=ae?be:de,J=P.useMemo(()=>({inputId:ne}),[ne]),{ref:j,index:X}=CD({metadata:J}),me=ae?p??X:0,ve=me===Z.length-1,ke=Z[me],Me=dl(ke,C,M),[_e,ct]=P.useState(!1),[_t,Qt]=P.useState();ds(()=>ct(!0));const Be=w>=0&&w<Z.length?w:-1,W=ut(()=>{const ot=k.current,gt=ie.current;if(!ot||!gt)return;const it=gt.getBoundingClientRect(),wn=ot.getBoundingClientRect(),to=ce?"height":"width",no=wn[to]-it[to],Ri=(it[to]/2+no*Me/100)/wn[to]*100;Qt(Ri),me===0?te(Hi=>[Ri,Hi[1]]):ve&&te(Hi=>[Hi[0],Ri])});pt(()=>{$&&queueMicrotask(W)},[W,$]),pt(()=>{$&&W()},[W,$,Me]);const K=P.useCallback(()=>{const ot=ce?"bottom":"insetInlineStart",gt=ce?"left":"top";let it;return ae?I===me?it=2:Be===me&&(it=1):I===me&&(it=1),$?{"--position":`${_t}%`,visibility:ee&&!_e||_t===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:Number.isFinite(Me)?{position:"absolute",[ot]:`${Me}%`,[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:ul},[I,me,$,_e,_t,ae,ee,Q,Be,Me,ce]);let Oe;R==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ue=Id({"aria-label":typeof u=="function"?u(me):a,"aria-labelledby":l??D,"aria-describedby":s,"aria-orientation":R,"aria-valuenow":ke,"aria-valuetext":typeof d=="function"?d(ti(ke,z,_.current??void 0),ke,me):MD(Z,me,_.current??void 0,z),disabled:B,id:ne,max:M,min:C,name:L,onChange(ot){N(ot.target.valueAsNumber,me,ot)},onFocus(){se(me),oe(!0)},onBlur(){ie.current&&(se(-1),ue(!0),oe(!1),he==="onBlur"&&O.commit(ob(ke,me,C,M,ae,Z)))},onKeyDown(ot){if(!ND.has(ot.key))return;ED.has(ot.key)&&ot.stopPropagation();let gt=null;const it=pb(ke,Y,C);switch(ot.key){case fl:gt=ni(it,ot.shiftKey?F:Y,1,C,M);break;case ml:gt=ni(it,ot.shiftKey?F:Y,Q?-1:1,C,M);break;case pl:gt=ni(it,ot.shiftKey?F:Y,-1,C,M);break;case hl:gt=ni(it,ot.shiftKey?F:Y,Q?1:-1,C,M);break;case vb:gt=ni(it,F,1,C,M);break;case bb:gt=ni(it,F,-1,C,M);break;case yl:gt=M,ae&&(gt=Number.isFinite(Z[me+1])?Z[me+1]-Y*V:M);break;case gl:gt=C,ae&&(gt=Number.isFinite(Z[me-1])?Z[me-1]+Y*V:C);break}gt!==null&&(N(gt,me,ot),ot.preventDefault())},step:Y,style:{...ul,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:ke??""},O.getInputValidationProps),Ye=Ed(le,O.inputRef,g);return ln("div",t,{state:q,ref:[n,j,ie],props:[{[OD.index]:me,children:h.jsxs(P.Fragment,{children:[o,h.jsx("input",{ref:Ye,...Ue}),$&&!_e&&ee&&ve&&h.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:DD},suppressHydrationWarning:!0})]}),id:E,onBlur:y,onFocus:m,onPointerDown(ot){if(H.current=me,ie.current!=null){const gt=R==="horizontal"?"x":"y",it=fb(ie.current),wn=(R==="horizontal"?ot.clientX:ot.clientY)-it[gt];G.current=wn}le.current!=null&&U.current!==le.current&&(U.current=le.current)},style:K(),suppressHydrationWarning:ee||void 0,tabIndex:-1},x],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(xb.displayName="SliderThumb");function _D(e,t,n,r,o,i){const s=n===void 0||t&&r===void 0?"hidden":void 0,a=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[a]="var(--start-position)",u[l]="var(--relative-size)",u):(u[a]=0,u[l]="var(--start-position)",u)}function FD(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",a={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return a[o]=0,a[i]=`${n}%`,a;const l=r-n;return a[o]=`${n}%`,a[i]=`${l}%`,a}const wb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:s,inset:a,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=sl(),[g,y]=P.useState(!1);ds(()=>y(!0));const m=u==="vertical",v=p.length>1,b=a?_D(m,v,s[0],s[1],d,g):FD(m,v,dl(p[0],c,l),dl(p[p.length-1],c,l));return ln("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(wb.displayName="SliderIndicator");const Fr=e=>{const t=S.useContext(oo);if(e)return e;if(t)return t.locale||e},LD=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Re.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Re.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),h.jsx(bd,{title:"",ref:r,as:xb,enabled:e.tooltip,className:"focus-within::scale-105 block size-5 cursor-grab rounded-full border-2 border-input-border bg-input-switch shadow-shadow-floating focus-within:border-primary focus-within:outline active:cursor-grabbing",children:t})},VD=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=S.useRef(Xo()),a=r||o||[],l=Fr();return h.jsx(sb,{...i,value:o,locale:l,defaultValue:r,children:h.jsxs(mb,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[h.jsx(gb,{className:"relative h-2 grow rounded-full bg-background",children:h.jsx(wb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(a)?a.map((c,u)=>h.jsx(LD,{tooltip:t??!1},`${s.current}-${u}`)):null]})})},Lr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},$D=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const s=S.useId(),[a,l]=S.useState(o.checked??!1),c=a,u=S.useRef(null),d=Lr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=y=>{d.current&&d.current(y)},g=u.current;return g.addEventListener("change",p),()=>g?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return h.jsxs("fieldset",{className:Pe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[h.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[h.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||s,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),h.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${s}-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:h.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"})}),h.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:h.jsx("span",{className:"font-medium text-foreground",children:e})})]}),h.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),fs=S.createContext({});function Qn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sb=typeof window<"u",vl=Sb?S.useLayoutEffect:S.useEffect,bl=S.createContext(null);function $d(e,t){e.indexOf(t)===-1&&e.push(t)}function ri(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function zD([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Jn=(e,t,n)=>n>t?t:n<e?e:n;function zd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let oi=()=>{},hn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(oi=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(zd(t,n))},hn=(e,t,n)=>{if(!e)throw new Error(zd(t,n))});const vr={},Tb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Eb(e){return typeof e=="object"&&e!==null}const kb=e=>/^0[^.\s]+$/u.test(e);function Cb(e){let t;return()=>(t===void 0&&(t=e()),t)}const Sn=e=>e,jD=(e,t)=>n=>t(e(n)),ps=(...e)=>e.reduce(jD),ii=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class jd{constructor(){this.subscriptions=[]}add(t){return $d(this.subscriptions,t),()=>ri(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const mn=e=>e*1e3,Tn=e=>e/1e3;function Ib(e,t){return t?e*(1e3/t):0}const Ab=new Set;function xl(e,t,n){e||Ab.has(t)||(console.warn(zd(t,n)),Ab.add(t))}const BD=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},Pb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,RD=1e-7,HD=12;function WD(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Pb(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>RD&&++a<HD);return s}function hs(e,t,n,r){if(e===t&&n===r)return Sn;const o=i=>WD(i,0,1,e,n);return i=>i===0||i===1?i:Pb(o(i),t,r)}const Ob=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Db=e=>t=>1-e(1-t),Nb=hs(.33,1.53,.69,.99),Bd=Db(Nb),Mb=Ob(Bd),_b=e=>(e*=2)<1?.5*Bd(e):.5*(2-Math.pow(2,-10*(e-1))),Rd=e=>1-Math.sin(Math.acos(e)),Fb=Db(Rd),Lb=Ob(Rd),qD=hs(.42,0,1,1),UD=hs(0,0,.58,1),Vb=hs(.42,0,.58,1),$b=e=>Array.isArray(e)&&typeof e[0]!="number";function zb(e,t){return $b(e)?e[BD(0,e.length,t)]:e}const jb=e=>Array.isArray(e)&&typeof e[0]=="number",Bb={linear:Sn,easeIn:qD,easeInOut:Vb,easeOut:UD,circIn:Rd,circInOut:Lb,circOut:Fb,backIn:Bd,backInOut:Mb,backOut:Nb,anticipate:_b},GD=e=>typeof e=="string",Hd=e=>{if(jb(e)){hn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return hs(t,n,r,o)}else if(GD(e))return hn(Bb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Bb[e];return e},wl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function YD(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const g=f&&o?n:r;return d&&s.add(u),g.has(u)||g.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const KD=40;function Rb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=wl.reduce((x,T)=>(x[T]=YD(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:g}=s,y=()=>{const x=vr.useManualTiming?o.timestamp:performance.now();n=!1,vr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,KD),1)),o.timestamp=x,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},m=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:wl.reduce((x,T)=>{const E=s[T];return x[T]=(I,w=!1,k=!1)=>(n||m(),E.schedule(I,w,k)),x},{}),cancel:x=>{for(let T=0;T<wl.length;T++)s[wl[T]].cancel(x)},state:o,steps:s}}const{schedule:ht,cancel:br,state:Yt,steps:Wd}=Rb(typeof requestAnimationFrame<"u"?requestAnimationFrame:Sn,!0);let Sl;function ZD(){Sl=void 0}const en={now:()=>(Sl===void 0&&en.set(Yt.isProcessing||vr.useManualTiming?Yt.timestamp:performance.now()),Sl),set:e=>{Sl=e,queueMicrotask(ZD)}},Hb=e=>t=>typeof t=="string"&&t.startsWith(e),Wb=Hb("--"),XD=Hb("var(--"),qd=e=>XD(e)?QD.test(e.split("/*")[0].trim()):!1,QD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const si={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ms={...si,transform:e=>Jn(0,1,e)},Tl={...si,default:1},gs=e=>Math.round(e*1e5)/1e5,Ud=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function JD(e){return e==null}const eN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gd=(e,t)=>n=>!!(typeof n=="string"&&eN.test(n)&&n.startsWith(e)||t&&!JD(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ub=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(Ud);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},tN=e=>Jn(0,255,e),Yd={...si,transform:e=>Math.round(tN(e))},mo={test:Gd("rgb","red"),parse:Ub("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Yd.transform(e)+", "+Yd.transform(t)+", "+Yd.transform(n)+", "+gs(ms.transform(r))+")"};function nN(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Kd={test:Gd("#"),parse:nN,transform:mo.transform},ys=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vr=ys("deg"),er=ys("%"),Ee=ys("px"),rN=ys("vh"),oN=ys("vw"),Gb={...er,parse:e=>er.parse(e)/100,transform:e=>er.transform(e*100)},ai={test:Gd("hsl","hue"),parse:Ub("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+er.transform(gs(t))+", "+er.transform(gs(n))+", "+gs(ms.transform(r))+")"},Ft={test:e=>mo.test(e)||Kd.test(e)||ai.test(e),parse:e=>mo.test(e)?mo.parse(e):ai.test(e)?ai.parse(e):Kd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mo.transform(e):ai.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},iN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function sN(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ud)?.length||0)+(e.match(iN)?.length||0)>0}const Yb="number",Kb="color",aN="var",lN="var(",Zb="${}",cN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function vs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(cN,l=>(Ft.test(l)?(r.color.push(i),o.push(Kb),n.push(Ft.parse(l))):l.startsWith(lN)?(r.var.push(i),o.push(aN),n.push(l)):(r.number.push(i),o.push(Yb),n.push(parseFloat(l))),++i,Zb)).split(Zb);return{values:n,split:a,indexes:r,types:o}}function Xb(e){return vs(e).values}function Qb(e){const{split:t,types:n}=vs(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Yb?i+=gs(o[s]):a===Kb?i+=Ft.transform(o[s]):i+=o[s]}return i}}const uN=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function dN(e){const t=Xb(e);return Qb(e)(t.map(uN))}const _n={test:sN,parse:Xb,createTransformer:Qb,getAnimatableNone:dN};function Zd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fN({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Zd(l,a,e+1/3),i=Zd(l,a,e),s=Zd(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function El(e,t){return n=>n>0?t:e}const vt=(e,t,n)=>e+(t-e)*n,Xd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},pN=[Kd,mo,ai],hN=e=>pN.find(t=>t.test(e));function Jb(e){const t=hN(e);if(oi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===ai&&(n=fN(n)),n}const ex=(e,t)=>{const n=Jb(e),r=Jb(t);if(!n||!r)return El(e,t);const o={...n};return i=>(o.red=Xd(n.red,r.red,i),o.green=Xd(n.green,r.green,i),o.blue=Xd(n.blue,r.blue,i),o.alpha=vt(n.alpha,r.alpha,i),mo.transform(o))},Qd=new Set(["none","hidden"]);function mN(e,t){return Qd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gN(e,t){return n=>vt(e,t,n)}function Jd(e){return typeof e=="number"?gN:typeof e=="string"?qd(e)?El:Ft.test(e)?ex:bN:Array.isArray(e)?tx:typeof e=="object"?Ft.test(e)?ex:yN:El}function tx(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Jd(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function yN(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Jd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function vN(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],s=e.indexes[i][r[i]],a=e.values[s]??0;n[o]=a,r[i]++}return n}const bN=(e,t)=>{const n=_n.createTransformer(t),r=vs(e),o=vs(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Qd.has(e)&&!o.values.length||Qd.has(t)&&!r.values.length?mN(e,t):ps(tx(vN(r,o),o.values),n):(oi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),El(e,t))};function nx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?vt(e,t,n):Jd(e)(e,t)}const xN=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>br(t),now:()=>Yt.isProcessing?Yt.timestamp:en.now()}},rx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},kl=2e4;function ef(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<kl;)t+=n,r=e.next(t);return t>=kl?1/0:t}function ox(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(ef(r),kl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Tn(o)}}const wN=5;function ix(e,t,n){const r=Math.max(t-wN,0);return Ib(n-e(r),t-r)}const It={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},tf=.001;function SN({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:r=It.mass}){let o,i;oi(e<=mn(It.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Jn(It.minDamping,It.maxDamping,s),e=Jn(It.minDuration,It.maxDuration,Tn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,p=nf(c,s),g=Math.exp(-d);return tf-f/p*g},i=c=>{const d=c*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,g=Math.exp(-d),y=nf(Math.pow(c,2),s);return(-o(c)+tf>0?-1:1)*((f-p)*g)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-tf+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=EN(o,i,a);if(e=mn(e),isNaN(l))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const TN=12;function EN(e,t,n){let r=n;for(let o=1;o<TN;o++)r=r-e(r)/t(r);return r}function nf(e,t){return e*Math.sqrt(1-t*t)}const kN=["duration","bounce"],CN=["stiffness","damping","mass"];function sx(e,t){return t.some(n=>e[n]!==void 0)}function IN(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!sx(e,CN)&&sx(e,kN))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Jn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:It.mass,stiffness:o,damping:i}}else{const n=SN({...e,velocity:0});t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function bs(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=IN({...n,velocity:-Tn(n.velocity||0)}),g=f||0,y=c/(2*Math.sqrt(l*u)),m=s-i,v=Tn(Math.sqrt(l/u)),b=Math.abs(m)<5;r||(r=b?It.restSpeed.granular:It.restSpeed.default),o||(o=b?It.restDelta.granular:It.restDelta.default);let x;if(y<1){const E=nf(v,y);x=I=>{const w=Math.exp(-y*v*I);return s-w*((g+y*v*m)/E*Math.sin(E*I)+m*Math.cos(E*I))}}else if(y===1)x=E=>s-Math.exp(-v*E)*(m+(g+v*m)*E);else{const E=v*Math.sqrt(y*y-1);x=I=>{const w=Math.exp(-y*v*I),k=Math.min(E*I,300);return s-w*((g+y*v*m)*Math.sinh(k)+E*m*Math.cosh(k))/E}}const T={calculatedDuration:p&&d||null,next:E=>{const I=x(E);if(p)a.done=E>=d;else{let w=E===0?g:0;y<1&&(w=E===0?mn(g):ix(x,E,I));const k=Math.abs(w)<=r,A=Math.abs(s-I)<=o;a.done=k&&A}return a.value=a.done?s:I,a},toString:()=>{const E=Math.min(ef(T),kl),I=rx(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}bs.applyToOptions=e=>{const t=ox(e,100,bs);return e.ease=t.ease,e.duration=mn(t.duration),e.type="keyframes",e};function rf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=k=>a!==void 0&&k<a||l!==void 0&&k>l,g=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let y=n*t;const m=d+y,v=s===void 0?m:s(m);v!==m&&(y=v-d);const b=k=>-y*Math.exp(-k/r),x=k=>v+b(k),T=k=>{const A=b(k),O=x(k);f.done=Math.abs(A)<=c,f.value=f.done?v:O};let E,I;const w=k=>{p(f.value)&&(E=k,I=bs({keyframes:[f.value,g(f.value)],velocity:ix(x,k,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:k=>{let A=!1;return!I&&E===void 0&&(A=!0,T(k),w(k)),E!==void 0&&k>=E?I.next(k-E):(!A&&T(k),f)}}}function AN(e,t,n){const r=[],o=n||vr.mix||nx,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Sn:t;a=ps(l,a)}r.push(a)}return r}function ax(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(hn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=AN(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ii(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Jn(e[0],e[i-1],u)):c}function lx(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ii(0,t,r);e.push(vt(n,1,o))}}function cx(e){const t=[0];return lx(t,e.length-1),t}function PN(e,t){return e.map(n=>n*t)}function ON(e,t){return e.map(()=>t||Vb).splice(0,e.length-1)}function li({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=$b(r)?r.map(Hd):Hd(r),i={done:!1,value:t[0]},s=PN(n&&n.length===t.length?n:cx(t),e),a=ax(s,t,{ease:Array.isArray(o)?o:ON(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const DN=e=>e!==null;function of(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(DN),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const NN={decay:rf,inertia:rf,tween:li,keyframes:li,spring:bs};function ux(e){typeof e.type=="string"&&(e.type=NN[e.type])}class sf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const MN=e=>e/100;class af extends sf{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==en.now()&&this.tick(en.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ux(t);const{type:n=li,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||li;process.env.NODE_ENV!=="production"&&l!==li&&hn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==li&&typeof a[0]!="number"&&(this.mixKeyframes=ps(MN,nx(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=ef(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:g,onUpdate:y,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const k=Math.min(this.currentTime,o)/a;let A=Math.floor(k),O=k%1;!O&&k>=1&&(O=1),O===1&&A--,A=Math.min(A,d+1),A%2&&(f==="reverse"?(O=1-O,p&&(O-=p/a)):f==="mirror"&&(T=s)),x=Jn(0,1,O)*a}const E=b?{done:!1,value:u[0]}:T.next(x);i&&(E.value=i(E.value));let{done:I}=E;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&g!==rf&&(E.value=of(u,this.options,m,this.speed)),y&&y(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Tn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(this.currentTime)}set time(t){t=mn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(en.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Tn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=xN,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(en.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function _N(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const go=e=>e*180/Math.PI,lf=e=>{const t=go(Math.atan2(e[1],e[0]));return cf(t)},FN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:lf,rotateZ:lf,skewX:e=>go(Math.atan(e[1])),skewY:e=>go(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cf=e=>(e=e%360,e<0&&(e+=360),e),dx=lf,fx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),px=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),LN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fx,scaleY:px,scale:e=>(fx(e)+px(e))/2,rotateX:e=>cf(go(Math.atan2(e[6],e[5]))),rotateY:e=>cf(go(Math.atan2(-e[2],e[0]))),rotateZ:dx,rotate:dx,skewX:e=>go(Math.atan(e[4])),skewY:e=>go(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function uf(e){return e.includes("scale")?1:0}function df(e,t){if(!e||e==="none")return uf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=LN,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=FN,o=a}if(!o)return uf(t);const i=r[t],s=o[1].split(",").map($N);return typeof i=="function"?i(s):s[i]}const VN=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return df(n,t)};function $N(e){return parseFloat(e.trim())}const ci=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ui=new Set(ci),hx=e=>e===si||e===Ee,zN=new Set(["x","y","z"]),jN=ci.filter(e=>!zN.has(e));function BN(e){const t=[];return jN.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $r={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>df(t,"x"),y:(e,{transform:t})=>df(t,"y")};$r.translateX=$r.x,$r.translateY=$r.y;const yo=new Set;let ff=!1,pf=!1,hf=!1;function mx(){if(pf){const e=Array.from(yo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=BN(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{r.getValue(i)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}pf=!1,ff=!1,yo.forEach(e=>e.complete(hf)),yo.clear()}function gx(){yo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pf=!0)})}function RN(){hf=!0,gx(),mx(),hf=!1}class mf{constructor(t,n,r,o,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(yo.add(this),ff||(ff=!0,ht.read(gx),ht.resolveKeyframes(mx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}_N(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yo.delete(this)}cancel(){this.state==="scheduled"&&(yo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const HN=e=>e.startsWith("--");function WN(e,t,n){HN(t)?e.style.setProperty(t,n):e.style[t]=n}const qN={};function yx(e,t){const n=Cb(e);return()=>qN[t]??n()}const UN=yx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),vx=yx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xs([0,.65,.55,1]),circOut:xs([.55,0,1,.45]),backIn:xs([.31,.01,.66,-.59]),backOut:xs([.33,1.53,.69,.99])};function xx(e,t){if(e)return typeof e=="function"?vx()?rx(e,t):"ease-out":jb(e)?xs(e):Array.isArray(e)?e.map(n=>xx(n,t)||bx.easeOut):bx[e]}function GN(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=xx(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function gf(e){return typeof e=="function"&&"applyToOptions"in e}function YN({type:e,...t}){return gf(e)&&vx()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class wx extends sf{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,hn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=YN(t);this.animation=GN(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=of(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):WN(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Tn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=mn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&UN()?(this.animation.timeline=t,Sn):n(this)}}const Sx={anticipate:_b,backInOut:Mb,circInOut:Lb};function KN(e){return e in Sx}function ZN(e){typeof e.ease=="string"&&KN(e.ease)&&(e.ease=Sx[e.ease])}const yf=10;class XN extends wx{constructor(t){ZN(t),ux(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new af({...s,autoplay:!1}),l=Math.max(yf,en.now()-this.startTime),c=Jn(0,yf,l-yf);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Tx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_n.test(e)||e==="0")&&!e.startsWith("url("));function QN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function JN(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=Tx(o,t),a=Tx(i,t);return oi(s===a,`You are trying to animate ${t} from "${o}" to "${i}". "${s?i:o}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:QN(e)||(n==="spring"||gf(n))&&r}function vf(e){e.duration=0,e.type="keyframes"}const eM=new Set(["opacity","clipPath","filter","transform"]),tM=Cb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function nM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return tM()&&n&&eM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const rM=40;class oM extends sf{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=en.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||mf;this.keyframeResolver=new p(a,(g,y,m)=>this.onKeyframesResolved(g,y,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=en.now(),JN(t,i,s,a)||((vr.instantAnimations||!l)&&u?.(of(t,r,n)),t[0]=t[t.length-1],vf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>rM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&nM(f),g=f.motionValue?.owner?.current,y=p?new XN({...f,element:g}):new af(f);y.finished.then(()=>{this.notifyFinished()}).catch(Sn),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),RN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class iM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Ex(this.animations,"duration")}get iterationDuration(){return Ex(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Ex(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class sM extends iM{then(t,n){return this.finished.finally(t).then(()=>{})}}function kx(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}const aM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lM(e){const t=aM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const cM=4;function Cx(e,t,n=1){hn(n<=cM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=lM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Tb(s)?parseFloat(s):s}return qd(o)?Cx(o,t,n+1):o}const uM={type:"spring",stiffness:500,damping:25,restSpeed:10},dM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fM={type:"keyframes",duration:.8},pM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hM=(e,{keyframes:t})=>t.length>2?fM:ui.has(e)?e.startsWith("scale")?dM(t[1]):uM:pM,mM=e=>e!==null;function gM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(mM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function bf(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function xf(e,t){const n=e?.[t]??e?.default??e;return n!==e?bf(n,e):n}function yM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const wf=(e,t,n,r={},o,i)=>s=>{const a=xf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-mn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};yM(a)||Object.assign(u,hM(e,u)),u.duration&&(u.duration=mn(u.duration)),u.repeatDelay&&(u.repeatDelay=mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(vf(u),u.delay===0&&(d=!0)),(vr.instantAnimations||vr.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,vf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=gM(u.keyframes,a);if(f!==void 0){ht.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new af(u):new oM(u)};function Ix(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Sf(e,t,n,r){if(typeof t=="function"){const[o,i]=Ix(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Ix(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function di(e,t,n){const r=e.getProps();return Sf(r,t,n!==void 0?n:r.custom,e)}const Ax=new Set(["width","height","top","left","right","bottom",...ci]),Px=30,vM=e=>!isNaN(parseFloat(e)),ws={current:void 0};class bM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=en.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=en.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=vM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&xl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new jd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ws.current&&ws.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=en.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Px)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Px);return Ib(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zr(e,t){return new bM(e,t)}const Tf=e=>Array.isArray(e);function xM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zr(n))}function wM(e){return Tf(e)?e[e.length-1]||0:e}function SM(e,t){const n=di(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=wM(i[s]);xM(e,s,a)}}const zt=e=>!!(e&&e.getVelocity);function TM(e){return!!(zt(e)&&e.add)}function Ef(e,t){const n=e.getValue("willChange");if(TM(n))return n.add(t);if(!n&&vr.WillChange){const r=new vr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function kf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ox="data-"+kf("framerAppearId");function Dx(e){return e.props[Ox]}function EM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Cf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:s,...a}=t;const l=e.getDefaultTransition();i=i?bf(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in a){const p=e.getValue(f,e.latestValues[f]??null),g=a[f];if(g===void 0||d&&EM(d,f))continue;const y={delay:n,...xf(i||{},f)},m=p.get();if(m!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===m&&!y.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const T=Dx(e);if(T){const E=window.MotionHandoffAnimation(T,f,ht);E!==null&&(y.startTime=E,v=!0)}}Ef(e,f);const b=c??e.shouldReduceMotion;p.start(wf(f,p,g,b&&Ax.has(f)?{type:!1}:y,e,v));const x=p.animation;x&&u.push(x)}if(s){const f=()=>ht.update(()=>{s&&SM(e,s)});u.length?Promise.all(u).then(f):f()}return u}function If(e,t,n={}){const r=di(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Cf(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return kM(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function kM(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(If(l,t,{...s,delay:n+(typeof r=="function"?0:r)+kx(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function CM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>If(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=If(e,t,n);else{const o=typeof t=="function"?di(e,t,n.custom):t;r=Promise.all(Cf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const IM={test:e=>e==="auto",parse:e=>e},Nx=e=>t=>t.test(e),Mx=[si,Ee,er,Vr,oN,rN,IM],_x=e=>Mx.find(Nx(e));function AM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||kb(e):!0}const PM=new Set(["brightness","contrast","saturate","opacity"]);function OM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ud)||[];if(!r)return e;const o=n.replace(r,"");let i=PM.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const DM=/\b([a-z-]*)\(.*?\)/gu,Af={..._n,getAnimatableNone:e=>{const t=e.match(DM);return t?t.map(OM).join(" "):e}},Pf={..._n,getAnimatableNone:e=>{const t=_n.parse(e);return _n.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Fx={...si,transform:Math.round},Of={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,inset:Ee,insetBlock:Ee,insetBlockStart:Ee,insetBlockEnd:Ee,insetInline:Ee,insetInlineStart:Ee,insetInlineEnd:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,paddingBlock:Ee,paddingBlockStart:Ee,paddingBlockEnd:Ee,paddingInline:Ee,paddingInlineStart:Ee,paddingInlineEnd:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,marginBlock:Ee,marginBlockStart:Ee,marginBlockEnd:Ee,marginInline:Ee,marginInlineStart:Ee,marginInlineEnd:Ee,fontSize:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:Vr,rotateX:Vr,rotateY:Vr,rotateZ:Vr,scale:Tl,scaleX:Tl,scaleY:Tl,scaleZ:Tl,skew:Vr,skewX:Vr,skewY:Vr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:ms,originX:Gb,originY:Gb,originZ:Ee},zIndex:Fx,fillOpacity:ms,strokeOpacity:ms,numOctaves:Fx},NM={...Of,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:Af,WebkitFilter:Af,mask:Pf,WebkitMask:Pf},Lx=e=>NM[e],MM=new Set([Af,Pf]);function Vx(e,t){let n=Lx(e);return MM.has(n)||(n=_n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const _M=new Set(["auto","none","0"]);function FM(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!_M.has(i)&&vs(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Vx(n,o)}class LM extends mf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),qd(d))){const f=Cx(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ax.has(r)||t.length!==2)return;const[o,i]=t,s=_x(o),a=_x(i),l=qb(o),c=qb(i);if(l!==c&&$r[r]){this.needsMeasurement=!0;return}if(s!==a)if(hx(s)&&hx(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else $r[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||AM(t[o]))&&r.push(o);r.length&&FM(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$r[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=$r[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const VM=new Set(["opacity","clipPath","filter","transform"]);function Df(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const $x=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Nf(e){return Eb(e)&&"offsetHeight"in e}const{schedule:Mf}=Rb(queueMicrotask,!1),Fn={x:!1,y:!1};function zx(){return Fn.x||Fn.y}function $M(e){return e==="x"||e==="y"?Fn[e]?null:(Fn[e]=!0,()=>{Fn[e]=!1}):Fn.x||Fn.y?null:(Fn.x=Fn.y=!0,()=>{Fn.x=Fn.y=!1})}function jx(e,t){const n=Df(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function zM(e){return!(e.pointerType==="touch"||zx())}function jM(e,t,n={}){const[r,o,i]=jx(e,n);return r.forEach(s=>{let a=!1,l=!1,c;const u=()=>{s.removeEventListener("pointerleave",g)},d=m=>{c&&(c(m),c=void 0),u()},f=m=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(m))},p=()=>{a=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},g=m=>{if(m.pointerType!=="touch"){if(a){l=!0;return}d(m)}},y=m=>{if(!zM(m))return;l=!1;const v=t(s,m);typeof v=="function"&&(c=v,s.addEventListener("pointerleave",g,o))};s.addEventListener("pointerenter",y,o),s.addEventListener("pointerdown",p,o)}),i}const Bx=(e,t)=>t?e===t?!0:Bx(e,t.parentElement):!1,_f=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,BM=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function RM(e){return BM.has(e.tagName)||e.isContentEditable===!0}const HM=new Set(["INPUT","SELECT","TEXTAREA"]);function WM(e){return HM.has(e.tagName)||e.isContentEditable===!0}const Cl=new WeakSet;function Rx(e){return t=>{t.key==="Enter"&&e(t)}}function Ff(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const qM=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Rx(()=>{if(Cl.has(n))return;Ff(n,"down");const o=Rx(()=>{Ff(n,"up")}),i=()=>Ff(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Hx(e){return _f(e)&&!zx()}const Wx=new WeakSet;function UM(e,t,n={}){const[r,o,i]=jx(e,n),s=a=>{const l=a.currentTarget;if(!Hx(a)||Wx.has(a))return;Cl.add(l),n.stopPropagation&&Wx.add(a);const c=t(l,a),u=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Cl.has(l)&&Cl.delete(l),Hx(p)&&typeof c=="function"&&c(p,{success:g})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||Bx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),Nf(a)&&(a.addEventListener("focus",c=>qM(c,o)),!RM(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Il(e){return Eb(e)&&"ownerSVGElement"in e}const Al=new WeakMap;let Pl;const qx=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Il(r)&&"getBBox"in r?r.getBBox()[t]:r[n],GM=qx("inline","width","offsetWidth"),YM=qx("block","height","offsetHeight");function KM({target:e,borderBoxSize:t}){Al.get(e)?.forEach(n=>{n(e,{get width(){return GM(e,t)},get height(){return YM(e,t)}})})}function ZM(e){e.forEach(KM)}function XM(){typeof ResizeObserver>"u"||(Pl=new ResizeObserver(ZM))}function QM(e,t){Pl||XM();const n=Df(e);return n.forEach(r=>{let o=Al.get(r);o||(o=new Set,Al.set(r,o)),o.add(t),Pl?.observe(r)}),()=>{n.forEach(r=>{const o=Al.get(r);o?.delete(t),o?.size||Pl?.unobserve(r)})}}const Ol=new Set;let fi;function JM(){fi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ol.forEach(t=>t(e))},window.addEventListener("resize",fi)}function e_(e){return Ol.add(e),fi||JM(),()=>{Ol.delete(e),!Ol.size&&typeof fi=="function"&&(window.removeEventListener("resize",fi),fi=void 0)}}function Ux(e,t){return typeof e=="function"?e_(e):QM(e,t)}function Gx(e){return Il(e)&&e.tagName==="svg"}function t_(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function n_(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:t_(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=Hd(r)(l/c)*c}return t+l}}function r_(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=ax(o,i,s);return t?a(r):a}const o_=[...Mx,Ft,_n],i_=e=>o_.find(Nx(e)),Yx=()=>({translate:0,scale:1,origin:0,originPoint:0}),pi=()=>({x:Yx(),y:Yx()}),Kx=()=>({min:0,max:0}),Lt=()=>({x:Kx(),y:Kx()}),Ss=new WeakMap;function Dl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ts(e){return typeof e=="string"||Array.isArray(e)}const Lf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vf=["initial",...Lf];function Nl(e){return Dl(e.animate)||Vf.some(t=>Ts(e[t]))}function Zx(e){return!!(Nl(e)||e.variants)}function s_(e,t,n){for(const r in t){const o=t[r],i=n[r];if(zt(o))e.addValue(r,o);else if(zt(i))e.addValue(r,zr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,zr(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ml={current:null},$f={current:!1},a_=typeof window<"u";function Xx(){if($f.current=!0,!!a_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ml.current=e.matches;e.addEventListener("change",t),t()}else Ml.current=!1}const Qx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _l={};function Jx(e){_l=e}function l_(){return _l}class e0{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=mf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=en.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ht.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Nl(n),this.isVariantNode=Zx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const g=f[p];c[p]!==void 0&&zt(g)&&g.set(c[p])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,Ss.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:($f.current||Xx(),this.shouldReduceMotion=Ml.current),process.env.NODE_ENV!=="production"&&xl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),br(this.notifyUpdate),br(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&VM.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new wx({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:mn(u)}),f=s(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=ui.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in _l){const n=_l[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Qx.length;r++){const o=Qx[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=s_(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Tb(r)||kb(r))?r=parseFloat(r):!i_(r)&&_n.test(n)&&(r=Vx(t,n)),this.setBaseTarget(t,zt(r)?r.get():r)),zt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Sf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!zt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new jd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Mf.render(this.render)}}class t0 extends e0{constructor(){super(...arguments),this.KeyframeResolver=LM}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function n0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function c_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function u_(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function zf(e){return e===void 0||e===1}function jf({scale:e,scaleX:t,scaleY:n}){return!zf(e)||!zf(t)||!zf(n)}function vo(e){return jf(e)||r0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function r0(e){return o0(e.x)||o0(e.y)}function o0(e){return e&&e!=="0%"}function Fl(e,t,n){const r=e-n,o=t*r;return n+o}function i0(e,t,n,r,o){return o!==void 0&&(e=Fl(e,o,r)),Fl(e,n,r)+t}function Bf(e,t=0,n=1,r,o){e.min=i0(e.min,t,n,r,o),e.max=i0(e.max,t,n,r,o)}function s0(e,{x:t,y:n}){Bf(e.x,t.translate,t.scale,t.originPoint),Bf(e.y,n.translate,n.scale,n.originPoint)}const a0=.999999999999,l0=1.0000000000001;function d_(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&mi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,s0(e,s)),r&&vo(i.latestValues)&&mi(e,i.latestValues))}t.x<l0&&t.x>a0&&(t.x=1),t.y<l0&&t.y>a0&&(t.y=1)}function hi(e,t){e.min=e.min+t,e.max=e.max+t}function c0(e,t,n,r,o=.5){const i=vt(e.min,e.max,o);Bf(e,t,n,i,r)}function mi(e,t){c0(e.x,t.x,t.scaleX,t.scale,t.originX),c0(e.y,t.y,t.scaleY,t.scale,t.originY)}function u0(e,t){return n0(u_(e.getBoundingClientRect(),t))}function f_(e,t,n){const r=u0(e,n),{scroll:o}=t;return o&&(hi(r.x,o.offset.x),hi(r.y,o.offset.y)),r}const p_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},h_=ci.length;function m_(e,t,n){let r="",o=!0;for(let i=0;i<h_;i++){const s=ci[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{const c=parseFloat(a);l=s.startsWith("scale")?c===1:c===0}if(!l||n){const c=$x(a,Of[s]);if(!l){o=!1;const u=p_[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Rf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(ui.has(l)){s=!0;continue}else if(Wb(l)){o[l]=c;continue}else{const u=$x(c,Of[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=m_(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function d0(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function f0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Es={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=f0(e,t.target.x),r=f0(e,t.target.y);return`${n}% ${r}%`}},g_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_n.parse(e);if(o.length>5)return r;const i=_n.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=vt(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},Hf={borderRadius:{...Es,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Es,borderTopRightRadius:Es,borderBottomLeftRadius:Es,borderBottomRightRadius:Es,boxShadow:g_};function p0(e,{layout:t,layoutId:n}){return ui.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hf[e]||e==="opacity")}function Wf(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const s in r)(zt(r[s])||o&&zt(o[s])||p0(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function y_(e){return window.getComputedStyle(e)}class h0 extends t0{constructor(){super(...arguments),this.type="html",this.renderInstance=d0}readValueFromInstance(t,n){if(ui.has(n))return this.projection?.isProjecting?uf(n):VN(t,n);{const r=y_(t),o=(Wb(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return u0(t,n)}build(t,n,r){Rf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Wf(t,n,r)}}function v_(e,t){return e in t}class b_ extends e0{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(v_(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const x_={offset:"stroke-dashoffset",array:"stroke-dasharray"},w_={offset:"strokeDashoffset",array:"strokeDasharray"};function S_(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?x_:w_;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const T_=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function m0(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Rf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of T_)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&S_(d,o,i,s,!1)}const g0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),y0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function E_(e,t,n,r){d0(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(g0.has(o)?o:kf(o),t.attrs[o])}function v0(e,t,n){const r=Wf(e,t,n);for(const o in e)if(zt(e[o])||zt(t[o])){const i=ci.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class b0 extends t0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ui.has(n)){const r=Lx(n);return r&&r.default||0}return n=g0.has(n)?n:kf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return v0(t,n,r)}build(t,n,r){m0(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){E_(t,n,r,o)}mount(t){this.isSVGTag=y0(t.tagName),super.mount(t)}}const k_=Vf.length;function x0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?x0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<k_;n++){const r=Vf[n],o=e.props[r];(Ts(o)||o===!1)&&(t[r]=o)}return t}function w0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const C_=[...Lf].reverse(),I_=Lf.length;function A_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CM(e,n,r)))}function P_(e){let t=A_(e),n=S0(),r=!0;const o=l=>(c,u)=>{const d=di(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...g}=d;c={...c,...g,...p}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=x0(e.parent)||{},d=[],f=new Set;let p={},g=1/0;for(let m=0;m<I_;m++){const v=C_[m],b=n[v],x=c[v]!==void 0?c[v]:u[v],T=Ts(x),E=v===l?b.isActive:null;E===!1&&(g=m);let I=x===u[v]&&x!==c[v]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...p},!b.isActive&&E===null||!x&&!b.prevProp||Dl(x)||typeof x=="boolean")continue;if(v==="exit"&&b.isActive&&E!==!0){b.prevResolvedValues&&(p={...p,...b.prevResolvedValues});continue}const w=O_(b.prevProp,x);let k=w||v===l&&b.isActive&&!I&&T||m>g&&T,A=!1;const O=Array.isArray(x)?x:[x];let _=O.reduce(o(v),{});E===!1&&(_={});const{prevResolvedValues:N={}}=b,$={...N,..._},D=M=>{k=!0,f.has(M)&&(A=!0,f.delete(M)),b.needsAnimating[M]=!0;const C=e.getValue(M);C&&(C.liveStyle=!1)};for(const M in $){const C=_[M],V=N[M];if(p.hasOwnProperty(M))continue;let L=!1;Tf(C)&&Tf(V)?L=!w0(C,V):L=C!==V,L?C!=null?D(M):f.add(M):C!==void 0&&f.has(M)?D(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=_,b.isActive&&(p={...p,..._}),r&&e.blockInitialAnimation&&(k=!1);const F=I&&w;k&&(!F||A)&&d.push(...O.map(M=>{const C={type:v};if(typeof M=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,L=di(V,M);if(V.enteringChildren&&L){const{delayChildren:R}=L.transition||{};C.delay=kx(V.enteringChildren,e,R)}}return{animation:M,options:C}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const v=di(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),m[v]=b??null}),d.push({animation:m})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=S0()}}}function O_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!w0(t,e):!1}function bo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function S0(){return{animate:bo(!0),whileInView:bo(),whileHover:bo(),whileTap:bo(),whileDrag:bo(),whileFocus:bo(),exit:bo()}}function T0(e,t){e.min=t.min,e.max=t.max}function Ln(e,t){T0(e.x,t.x),T0(e.y,t.y)}function E0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const k0=1e-4,D_=1-k0,N_=1+k0,C0=.01,M_=0-C0,__=0+C0;function tn(e){return e.max-e.min}function F_(e,t,n){return Math.abs(e-t)<=n}function I0(e,t,n,r=.5){e.origin=r,e.originPoint=vt(t.min,t.max,e.origin),e.scale=tn(n)/tn(t),e.translate=vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=D_&&e.scale<=N_||isNaN(e.scale))&&(e.scale=1),(e.translate>=M_&&e.translate<=__||isNaN(e.translate))&&(e.translate=0)}function ks(e,t,n,r){I0(e.x,t.x,n.x,r?r.originX:void 0),I0(e.y,t.y,n.y,r?r.originY:void 0)}function A0(e,t,n){e.min=n.min+t.min,e.max=e.min+tn(t)}function L_(e,t,n){A0(e.x,t.x,n.x),A0(e.y,t.y,n.y)}function P0(e,t,n){e.min=t.min-n.min,e.max=e.min+tn(t)}function Ll(e,t,n){P0(e.x,t.x,n.x),P0(e.y,t.y,n.y)}function O0(e,t,n,r,o){return e-=t,e=Fl(e,1/n,r),o!==void 0&&(e=Fl(e,1/o,r)),e}function V_(e,t=0,n=1,r=.5,o,i=e,s=e){if(er.test(t)&&(t=parseFloat(t),t=vt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=vt(i.min,i.max,r);e===i&&(a-=t),e.min=O0(e.min,t,n,a,o),e.max=O0(e.max,t,n,a,o)}function D0(e,t,[n,r,o],i,s){V_(e,t[n],t[r],t[o],t.scale,i,s)}const $_=["x","scaleX","originX"],z_=["y","scaleY","originY"];function N0(e,t,n,r){D0(e.x,t,$_,n?n.x:void 0,r?r.x:void 0),D0(e.y,t,z_,n?n.y:void 0,r?r.y:void 0)}function M0(e){return e.translate===0&&e.scale===1}function _0(e){return M0(e.x)&&M0(e.y)}function F0(e,t){return e.min===t.min&&e.max===t.max}function j_(e,t){return F0(e.x,t.x)&&F0(e.y,t.y)}function L0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function V0(e,t){return L0(e.x,t.x)&&L0(e.y,t.y)}function $0(e){return tn(e.x)/tn(e.y)}function z0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function tr(e){return[e("x"),e("y")]}function B_(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const j0=["TopLeft","TopRight","BottomLeft","BottomRight"],R_=j0.length,B0=e=>typeof e=="string"?parseFloat(e):e,R0=e=>typeof e=="number"||Ee.test(e);function H_(e,t,n,r,o,i){o?(e.opacity=vt(0,n.opacity??1,W_(r)),e.opacityExit=vt(t.opacity??1,0,q_(r))):i&&(e.opacity=vt(t.opacity??1,n.opacity??1,r));for(let s=0;s<R_;s++){const a=`border${j0[s]}Radius`;let l=H0(t,a),c=H0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||R0(l)===R0(c)?(e[a]=Math.max(vt(B0(l),B0(c),r),0),(er.test(c)||er.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=vt(t.rotate||0,n.rotate||0,r))}function H0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const W_=W0(0,.5,Fb),q_=W0(.5,.95,Sn);function W0(e,t,n){return r=>r<e?0:r>t?1:n(ii(e,t,r))}function q0(e,t,n){const r=zt(e)?e:zr(e);return r.start(wf("",r,t,n)),r.animation}function Cs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const U_=(e,t)=>e.depth-t.depth;class G_{constructor(){this.children=[],this.isDirty=!1}add(t){$d(this.children,t),this.isDirty=!0}remove(t){ri(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(U_),this.isDirty=!1,this.children.forEach(t)}}function Y_(e,t){const n=en.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(br(r),e(i-t))};return ht.setup(r,!0),()=>br(r)}function Vl(e){return zt(e)?e.get():e}class K_{constructor(){this.members=[]}add(t){$d(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;o&&o.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&ri(this.members,r)}t.scheduleRender()}remove(t){if(ri(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o],s=i.instance;if(i.isPresent!==!1&&(!s||s.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,i=t.options.layoutDependency;if(!(o!==void 0&&i!==void 0&&o===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const $l={hasAnimatedSinceResize:!0,hasEverUpdated:!1},qf=["","X","Y","Z"],Z_=1e3;let X_=0;function Uf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function U0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Dx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&U0(r)}function G0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=X_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(e2),this.nodes.forEach(o2),this.nodes.forEach(i2),this.nodes.forEach(t2)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new G_)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new jd),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Il(s)&&!Gx(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{d=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=Y_(f,250),$l.hasAnimatedSinceResize&&($l.hasAnimatedSinceResize=!1,this.nodes.forEach(Z0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||u2,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),v=!this.targetLayout||!V0(this.targetLayout,p),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...xf(g,"layout"),onPlay:y,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||Z0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),br(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(s2),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&U0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Y0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(K0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(r2),this.nodes.forEach(Q_),this.nodes.forEach(J_)):this.nodes.forEach(K0),this.clearAllSnapshots();const a=en.now();Yt.delta=Jn(0,1e3/60,a-Yt.timestamp),Yt.timestamp=a,Yt.isProcessing=!0,Wd.update.process(Yt),Wd.preRender.process(Yt),Wd.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(n2),this.sharedNodes.forEach(a2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!tn(this.snapshot.measuredBox.x)&&!tn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!_0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||vo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),d2(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Lt();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(f2))){const{scroll:c}=this.root;c&&(hi(a.x,c.offset.x),hi(a.y,c.offset.y))}return a}removeElementScroll(s){const a=Lt();if(Ln(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Ln(a,s),hi(a.x,u.offset.x),hi(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=Lt();Ln(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&mi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),vo(u.latestValues)&&mi(l,u.latestValues)}return vo(this.latestValues)&&mi(l,this.latestValues),l}removeTransform(s){const a=Lt();Ln(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!vo(c.latestValues))continue;jf(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Ln(u,d),N0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return vo(this.latestValues)&&N0(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Yt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),L_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ln(this.target,this.layout.layoutBox),s0(this.target,this.targetDelta)):Ln(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||jf(this.parent.latestValues)||r0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),Ll(this.relativeTargetOrigin,a,l),Ln(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Yt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Ln(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;d_(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Lt());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(E0(this.prevProjectionDelta.x,this.projectionDelta.x),E0(this.prevProjectionDelta.y,this.projectionDelta.y)),ks(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!z0(this.projectionDelta.x,this.prevProjectionDelta.x)||!z0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pi(),this.projectionDelta=pi(),this.projectionDeltaWithTransform=pi()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=pi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Lt(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,y=p!==g,m=this.getStack(),v=!m||m.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(c2));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const E=T/1e3;X0(d.x,s.x,E),X0(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ll(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l2(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&j_(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Ln(x,this.relativeTarget)),y&&(this.animationValues=u,H_(u,c,this.latestValues,E,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{$l.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zr(0)),this.motionValue.jump(0,!1),this.currentAnimation=q0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Z_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&nw(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=tn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=tn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Ln(a,l),mi(a,u),ks(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new K_),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Uf("z",s,c,this.animationValues);for(let u=0;u<qf.length;u++)Uf(`rotate${qf[u]}`,s,c,this.animationValues),Uf(`skew${qf[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Vl(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Vl(a?.pointerEvents)||""),this.hasProjected&&!vo(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=B_(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in Hf){if(u[g]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:v}=Hf[g],b=d==="none"?u[g]:y(u[g],c);if(m){const x=m.length;for(let T=0;T<x;T++)s[m[T]]=b}else v?this.options.visualElement.renderState.vars[g]=b:s[g]=b}this.options.layoutId&&(s.pointerEvents=c===this?Vl(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Y0),this.root.sharedNodes.clear()}}}function Q_(e){e.updateLayout()}function J_(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?tr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=tn(d);d.min=n[u].min,d.max=d.min+f}):nw(o,t.layoutBox,n)&&tr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=tn(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const s=pi();ks(s,n,t.layoutBox);const a=pi();i?ks(a,e.applyTransform(r,!0),t.measuredBox):ks(a,n,t.layoutBox);const l=!_0(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();Ll(p,t.layoutBox,d.layoutBox);const g=Lt();Ll(g,n,f.layoutBox),V0(p,g)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function e2(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function t2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function n2(e){e.clearSnapshot()}function Y0(e){e.clearMeasurements()}function K0(e){e.isLayoutDirty=!1}function r2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Z0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function o2(e){e.resolveTargetDelta()}function i2(e){e.calcProjection()}function s2(e){e.resetSkewAndRotation()}function a2(e){e.removeLeadSnapshot()}function X0(e,t,n){e.translate=vt(t.translate,0,n),e.scale=vt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Q0(e,t,n,r){e.min=vt(t.min,n.min,r),e.max=vt(t.max,n.max,r)}function l2(e,t,n,r){Q0(e.x,t.x,n.x,r),Q0(e.y,t.y,n.y,r)}function c2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const u2={duration:.45,ease:[.4,0,.1,1]},J0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ew=J0("applewebkit/")&&!J0("chrome/")?Math.round:Sn;function tw(e){e.min=ew(e.min),e.max=ew(e.max)}function d2(e){tw(e.x),tw(e.y)}function nw(e,t,n){return e==="position"||e==="preserve-aspect"&&!F_($0(t),$0(n),.2)}function f2(e){return e!==e.root&&e.scroll?.wasRoot}const p2=G0({attachResizeListener:(e,t)=>Cs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),h2=e=>!e.isLayoutDirty&&e.willUpdate(!1);function rw(){const e=new Set,t=new WeakMap,n=()=>e.forEach(h2);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const Gf={current:void 0},ow=G0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gf.current){const e=new p2({});e.mount(window),e.setOptions({layoutScroll:!0}),Gf.current=e}return Gf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function iw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function m2(...e){return t=>{let n=!1;const r=e.map(o=>{const i=iw(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():iw(e[o],null)}}}}function g2(...e){return P.useCallback(m2(...e),e)}class y2 extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=Nf(r)&&r.offsetWidth||0,i=Nf(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function v2({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:i}){const s=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=S.useContext(xo),u=e.props?.ref??e?.ref,d=g2(a,u);return S.useInsertionEffect(()=>{const{width:f,height:p,top:g,left:y,right:m,bottom:v}=l.current;if(t||i===!1||!a.current||!f||!p)return;const b=n==="left"?`left: ${y}`:`right: ${m}`,x=r==="bottom"?`bottom: ${v}`:`top: ${g}`;a.current.dataset.motionPopId=s;const T=document.createElement("style");c&&(T.nonce=c);const E=o??document.head;return E.appendChild(T),T.sheet&&T.sheet.insertRule(`
6
+ `))},[JSON.stringify(t)])}const l=P.useCallback(c=>{o||s(c)},[]);return[a,l]}const zv={};function Xn(e,t){const n=P.useRef(zv);return n.current===zv&&(n.current=e(t)),n}const Td=P[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],yO=Td&&Td!==P.useLayoutEffect?Td:e=>e();function ut(e){const t=Xn(vO).current;return t.next=e,yO(t.effect),t.trampoline}function vO(){const e={next:void 0,callback:bO,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function bO(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const pt=typeof document<"u"?P.useLayoutEffect:()=>{};function Ed(e){const t=Xn(xO,e).current;return t.next=e,pt(t.effect),t}function xO(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let Cd;process.env.NODE_ENV!=="production"&&(Cd=new Set);function wO(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Cd.has(t)||(Cd.add(t),console.warn(`Base UI: ${t}`))}}function pn(){}const Dn=Object.freeze({}),SO={clipPath:"inset(50%)",position:"fixed",top:0,left:0},TO="none",jv="track-press",EO="input-change",CO="focus-out",kO="keyboard",IO="drag";function ei(e,t,n,r){let o=!1,i=!1;const s=r??Dn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function Bv(e,t,n){const r=Dn;return{reason:e,event:t??new Event("base-ui"),...r}}function AO(e,t){const n=P.useRef(e),r=ut(t);pt(()=>{n.current!==e&&r(n.current)},[e,r]),pt(()=>{n.current=e},[e])}const kd={...P};let Rv=0;function PO(e,t="mui"){const[n,r]=P.useState(e),o=e||n;return P.useEffect(()=>{n==null&&(Rv+=1,r(`${t}-${Rv}`))},[n,t]),o}const Hv=kd.useId;function il(e,t){if(Hv!==void 0){const n=Hv();return e??(t?`${t}-${n}`:n)}return PO(e,t)}function sl(e){return il(e,"base-ui")}function Nn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function Id(e,t,n,r){const o=Xn(Wv).current;return DO(o,e,t,n,r)&&qv(o,[e,t,n,r]),o.callback}function OO(e){const t=Xn(Wv).current;return NO(t,e)&&qv(t,e),t.callback}function Wv(){return{callback:null,cleanup:null,refs:[]}}function DO(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function NO(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function qv(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const MO=parseInt(P.version,10);function Ad(e){return MO>=e}function Uv(e){if(!P.isValidElement(e))return null;const t=e,n=t.props;return(Ad(19)?n?.ref:t.ref)??null}function Pd(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function _O(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function FO(e,t){return typeof e=="function"?e(t):e}function LO(e,t){return typeof e=="function"?e(t):e}const ls={};function Od(e,t,n,r,o){let i={...Dd(e,ls)};return t&&(i=al(i,t)),n&&(i=al(i,n)),r&&(i=al(i,r)),i}function VO(e){if(e.length===0)return ls;if(e.length===1)return Dd(e[0],ls);let t={...Dd(e[0],ls)};for(let n=1;n<e.length;n+=1)t=al(t,e[n]);return t}function al(e,t){return Gv(t)?t(e):$O(e,t)}function $O(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Pd(e.style,r);break}case"className":{e[n]=Yv(e.className,r);break}default:zO(n,r)?e[n]=jO(e[n],r):e[n]=r}}return e}function zO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Gv(e){return typeof e=="function"}function Dd(e,t){return Gv(e)?e(t):e??ls}function jO(e,t){return t?e?n=>{if(BO(n)){const o=n;Nd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Nd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Yv(e,t){return t?e?t+" "+e:t:e}function BO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ln(e,t,n={}){const r=t.render,o=RO(t,n);if(n.enabled===!1)return null;const i=n.state??Dn;return WO(e,r,o,i)}function RO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Dn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?FO(n,i):void 0,d=c?LO(r,i):void 0,f=c?_O(i,l):Dn,h=c?Pd(f,Array.isArray(a)?VO(a):a)??Dn:Dn;return typeof document<"u"&&(c?Array.isArray(s)?h.ref=OO([h.ref,Uv(o),...s]):h.ref=Id(h.ref,Uv(o),s):Id(null,null)),c?(u!==void 0&&(h.className=Yv(h.className,u)),d!==void 0&&(h.style=Pd(h.style,d)),h):Dn}const HO=Symbol.for("react.lazy");function WO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Od(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===HO&&(i=P.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!P.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
7
+ `));return P.cloneElement(i,o)}if(e&&typeof e=="string")return qO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Nn(8))}function qO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):P.createElement(e,t)}function Mn(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Kv(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const cs=typeof navigator<"u",Md=ZO(),UO=QO(),GO=XO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),Md.platform==="MacIntel"&&Md.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(Md.platform);const YO=cs&&/apple/i.test(navigator.vendor);cs&&UO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const KO=GO.includes("jsdom/");function ZO(){if(!cs)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function XO(){if(!cs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function QO(){if(!cs)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function ho(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function _r(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function _d(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fd(e){if(!e||KO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}const Zv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Xv(e,t){const n=Wo(e,Zv()),r=n.length;if(r===0)return;const o=ho(an(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function JO(e){return Xv(an(e).body,1)||e}function eD(e){return Xv(an(e).body,-1)||e}function Ld(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!_r(n,r)}function tD(e){Wo(e,Zv()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Qv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Vd=P.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Vd.displayName="CompositeListContext");function nD(){return P.useContext(Vd)}function rD(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ut(o),s=P.useRef(0),a=Xn(iD).current,l=Xn(oD).current,[c,u]=P.useState(0),d=P.useRef(c),f=ut((v,b)=>{l.set(v,b??null),d.current+=1,u(d.current)}),h=ut(v=>{l.delete(v),d.current+=1,u(d.current)}),m=P.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(sD).forEach((x,T)=>{const E=l.get(x)??{};v.set(x,{...E,index:T})}),v},[l,c]);pt(()=>{if(typeof MutationObserver!="function"||m.size===0)return;const v=new MutationObserver(b=>{const x=new Set,T=E=>x.has(E)?x.delete(E):x.add(E);b.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),x.size===0&&(d.current+=1,u(d.current))});return m.forEach((b,x)=>{x.parentElement&&v.observe(x.parentElement,{childList:!0})}),()=>{v.disconnect()}},[m]),pt(()=>{d.current===c&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),s.current=m.size),i(m)},[i,m,n,r,c]),pt(()=>()=>{n.current=[]},[n]),pt(()=>()=>{r&&(r.current=[])},[r]);const y=ut(v=>(a.add(v),()=>{a.delete(v)}));pt(()=>{a.forEach(v=>v(m))},[a,m]);const g=P.useMemo(()=>({register:f,unregister:h,subscribeMapChange:y,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,h,y,n,r,s]);return p.jsx(Vd.Provider,{value:g,children:t})}function oD(){return new Map}function iD(){return new Set}function sD(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 aD(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Jv=P.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:pn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Jv.displayName="FormContext");function eb(){return P.useContext(Jv)}let tb=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const lD={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},cD={valid(e){return e===null?null:e?{[tb.valid]:""}:{[tb.invalid]:""}}},nb=P.createContext({invalid:void 0,name:void 0,validityData:{state:lD,errors:[],error:"",value:"",initialValue:null},setValidityData:pn,disabled:void 0,touched:!1,setTouched:pn,dirty:!1,setDirty:pn,filled:!1,setFilled:pn,focused:!1,setFocused:pn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Dn)=>e,getInputValidationProps:(e=Dn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(nb.displayName="FieldRootContext");function $d(e=!0){const t=P.useContext(nb);if(t.setValidityData===pn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Nn(28));return t}function uD(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=eb(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=$d(),f=ut(e.getValue);pt(()=>{if(!t)return;let h=n;h===void 0&&(h=f()),u.initialValue===null&&h!==null&&d(m=>({...m,initialValue:h}))},[t,d,n,u.initialValue,f]),pt(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:aD(u,l),validate(h=!0){let m=n;m===void 0&&(m=f()),c.current=!0,h?ur.flushSync(()=>s(m)):s(m)}})},[s,i,t,a,f,r,l,c,o,u,n]),pt(()=>{const h=a.current.fields;return()=>{r&&h.delete(r)}},[a,r])}const rb=P.createContext({controlId:void 0,registerControlId:pn,labelId:void 0,setLabelId:pn,messageIds:[],setMessageIds:pn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(rb.displayName="LabelableContext");function ob(){return P.useContext(rb)}function ib(e,t){return e-t}function dD(e,t,n){const r=e.slice();return r[t]=n,r.sort(ib)}function sb(e,t,n,r,o,i){let s=e;return s=Mn(s,n,r),o&&(s=dD(i,t,Mn(s,i[t-1]||-1/0,i[t+1]||1/0))),s}function ab(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,s,a)=>(s===a.length-1||o.push(Math.abs(i-a[s+1])),o),[]);return Math.min(...r)>=t*n}const us={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...cD},zd=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(zd.displayName="SliderRootContext");function ll(){const e=P.useContext(zd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Nn(62));return e}function fD(e){return"key"in e?kO:EO}function pD(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?Kv(e,t):!1}const lb=P.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:s=!1,id:a,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:h=0,minStepsBetweenValues:m=0,name:y,onValueChange:g,onValueCommitted:v,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,C=sl(a),A=ut(g),O=ut(v),{clearErrors:_}=eb(),{state:N,disabled:$,name:D,setTouched:F,setDirty:z,validityData:M,shouldValidateOnChange:k,validation:V}=$d(),{labelId:L}=ob(),R=r??L,U=$||s,G=D??y,[H,ee]=gO({controlled:I,default:i??h,name:"Slider"}),se=P.useRef(null),te=P.useRef(null),q=P.useRef([]),Y=P.useRef(null),Z=P.useRef(null),pe=P.useRef(-1),B=P.useRef(null),ae=P.useRef(null),ce=P.useRef("none"),Q=Ed(l),[ue,oe]=P.useState(-1),[he,ie]=P.useState(-1),[le,be]=P.useState(!1),[de,re]=P.useState(()=>new Map),[J,j]=P.useState([void 0,void 0]),X=ut(Be=>{oe(Be),Be!==-1&&ie(Be)});uD({id:C,commit:V.commit,value:H,controlRef:te,name:G,getValue:()=>H}),AO(H,()=>{_(G),k()?V.commit(H):V.commit(H,!0);const Be=M.initialValue;let W;Array.isArray(H)&&Array.isArray(Be)?W=!Kv(H,Be):W=H!==Be,z(W)});const me=ut(Be=>{Be&&(te.current=Be)}),ve=Array.isArray(H),Ce=P.useMemo(()=>ve?H.slice().sort(ib):[Mn(H,h,f)],[f,h,ve,H]),Me=ut((Be,W)=>{if(Number.isNaN(Be)||pD(Be,H))return;const K=W??ei(TO,void 0,void 0,{activeThumbIndex:-1});ce.current=K.reason;const Oe=K.event,Ue=Oe.constructor??Event,Ye=new Ue(Oe.type,Oe);Object.defineProperty(Ye,"target",{writable:!0,value:{value:Be,name:G}}),K.event=Ye,ae.current=Be,A(Be,K),!K.isCanceled&&ee(Be)}),_e=ut((Be,W,K)=>{const Oe=sb(Be,W,h,f,ve,Ce);if(ab(Oe,x,m)){const Ue=fD(K);Me(Oe,ei(Ue,K.nativeEvent,void 0,{activeThumbIndex:W})),F(!0);const Ye=ae.current??Oe;O(Ye,Bv(Ue,K.nativeEvent))}});process.env.NODE_ENV!=="production"&&h>=f&&wO("Slider `max` must be greater than `min`."),pt(()=>{const Be=ho(an(se.current));U&&Be&&se.current?.contains(Be)&&Be.blur()},[U]),U&&ue!==-1&&X(-1);const ct=P.useMemo(()=>({...N,activeThumbIndex:ue,disabled:U,dragging:le,orientation:b,max:f,min:h,minStepsBetweenValues:m,step:x,values:Ce}),[N,ue,U,le,f,h,m,b,x,Ce]),_t=P.useMemo(()=>({active:ue,controlRef:te,disabled:U,dragging:le,validation:V,formatOptionsRef:Q,handleInputChange:_e,indicatorPosition:J,inset:E!=="center",labelId:R,largeStep:c,lastUsedThumbIndex:he,lastChangedValueRef:ae,lastChangeReasonRef:ce,locale:u,max:f,min:h,minStepsBetweenValues:m,name:G,onValueCommitted:O,orientation:b,pressedInputRef:Y,pressedThumbCenterOffsetRef:Z,pressedThumbIndexRef:pe,pressedValuesRef:B,registerFieldControlRef:me,renderBeforeHydration:E==="edge",setActive:X,setDragging:be,setIndicatorPosition:j,setValue:Me,state:ct,step:x,thumbCollisionBehavior:T,thumbMap:de,thumbRefs:q,values:Ce}),[ue,te,R,U,le,V,Q,_e,J,c,he,ae,ce,u,f,h,m,G,O,b,Y,Z,pe,B,me,X,be,j,Me,ct,x,T,E,de,q,Ce]),Qt=ln("div",t,{state:ct,ref:[n,se],props:[{"aria-labelledby":R,id:C,role:"group"},V.getValidationProps,w],stateAttributesMapping:us});return p.jsx(zd.Provider,{value:_t,children:p.jsx(rD,{elementsRef:q,onMapChange:re,children:Qt})})});process.env.NODE_ENV!=="production"&&(lb.displayName="SliderRoot");const cb=new Map;function hD(e,t){const n=JSON.stringify({locale:e,options:t}),r=cb.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return cb.set(n,o),o}function ti(e,t,n){return e==null?"":hD(t,n).format(e)}function mD(e,t,n){return e==null?"":n?ti(e,t,n):ti(e/100,t,{style:"percent"})}const gD=[];function ds(e){P.useEffect(e,gD)}const cl=null;let ub=globalThis.requestAnimationFrame;class yD{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&ub!==requestAnimationFrame&&(ub=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ul=new yD;class jd{static create(){return new jd}static request(t){return ul.request(t)}static cancel(t){return ul.cancel(t)}currentId=cl;request(t){this.cancel(),this.currentId=ul.request(()=>{this.currentId=cl,t()})}cancel=()=>{this.currentId!==cl&&(ul.cancel(this.currentId),this.currentId=cl)};disposeEffect=()=>this.cancel}function db(){const e=Xn(jd.create).current;return ds(e.disposeEffect),e}const fb=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(fb.displayName="DirectionContext");function pb(){return P.useContext(fb)?.direction??"ltr"}function hb(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function vD(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function mb(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(vD(t)))}function gb({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:s,initialValues:a}){if(e.length===0)return[];const l=e.slice(),c=i*s,u=l.length-1,d=a??e,f=r+t*c,h=o-(u-t)*c;l[t]=Mn(n,f,h);for(let m=t+1;m<=u;m+=1){const y=l[m-1]+c,g=o-(u-m)*c,v=d[m]??l[m];let b=Math.max(l[m],y);v<b&&(b=Math.max(v,y)),l[m]=Mn(b,y,g)}for(let m=t-1;m>=0;m-=1){const y=l[m+1]-c,g=r+m*c,v=d[m]??l[m];let b=Math.min(l[m],y);v>b&&(b=Math.min(v,y)),l[m]=Mn(b,g,y)}for(let m=0;m<=u;m+=1)l[m]=Number(l[m].toFixed(12));return l}function bD({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const h=l*c;switch(e){case"swap":{const m=u[o],y=1e-7,g=u.slice(),v=g[o-1],b=g[o+1],x=v!=null?v+h:s,T=b!=null?b-h:a,E=Mn(i,x,T),I=Number(E.toFixed(12));g[o]=I;const w=i>m,C=i<m,A=w&&b!=null&&i>=b-y,O=C&&v!=null&&i<=v+y;if(!A&&!O)return{value:g,thumbIndex:o,didSwap:!1};const _=A?o+1:o-1,N=g.map((z,M)=>{if(M===o)return I;const k=d[M];return k??u[M]});let $=i;A?$=Math.max(i,g[_]):$=Math.min(i,g[_]);const D=gb({values:g,index:_,nextValue:$,min:s,max:a,step:l,minStepsBetweenValues:c,initialValues:N}),F=A?_-1:_+1;if(F>=0&&F<D.length){const z=D[F-1],M=D[F+1];let k=z!=null?z+h:s;k=Math.max(k,s+F*h);let V=M!=null?M-h:a;V=Math.min(V,a-(D.length-1-F)*h);const L=Mn(I,k,V);D[F]=Number(L.toFixed(12))}return{value:D,thumbIndex:_,didSwap:!0}}case"push":return{value:gb({values:u,index:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const m=u.slice(),y=m[o-1],g=m[o+1],v=y!=null?y+h:s,b=g!=null?g-h:a,x=Mn(i,v,b);return m[o]=Number(x.toFixed(12)),{value:m,thumbIndex:o,didSwap:!1}}}}const xD=2;function wD(e,t){if(!e)return{start:0,end:0};function n(i){const s=i!=null?parseFloat(i):0;return Number.isNaN(s)?0:s}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function dl(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const yb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:s,dragging:a,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:h,minStepsBetweenValues:m,onValueCommitted:y,orientation:g,pressedInputRef:v,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:C,setValue:A,state:O,step:_,thumbCollisionBehavior:N,thumbRefs:$,values:D}=ll(),F=pb(),z=D.length>1,M=g==="vertical",k=P.useRef(null),V=P.useRef(null),L=ut(Q=>{Q&&V.current==null&&V.current==null&&(V.current=getComputedStyle(Q))}),R=P.useRef(null),U=P.useRef(0),G=P.useRef(0),H=Ed(D),ee=ut(Q=>{x.current!==Q&&(x.current=Q);const ue=$.current[Q];if(!ue){b.current=null,v.current=null;return}v.current=ue.querySelector('input[type="range"]')}),se=ut(Q=>{const ue=k.current;if(!ue)return null;const{width:oe,height:he,bottom:ie,left:le,right:be}=ue.getBoundingClientRect(),de=wD(V.current,M),re=G.current,J=(M?he:oe)-de.start-de.end-re*2,j=b.current??0,X=Q.x-j,me=Q.y-j,ve=M?ie-me-de.end:(F==="rtl"?be-X:X-le)-de.start,Ce=Mn((ve-re)/J,0,1);let Me=(f-h)*Ce+h;if(Me=mb(Me,_,h),Me=Mn(Me,h,f),!z)return{value:Me,thumbIndex:0,didSwap:!1};const _e=x.current;if(_e<0)return null;const ct=bD({behavior:N,values:D,currentValues:H.current??D,initialValues:T.current,pressedIndex:_e,nextValue:Me,min:h,max:f,step:_,minStepsBetweenValues:m});return N==="swap"&&ct.didSwap?ee(ct.thumbIndex):x.current=ct.thumbIndex,ct}),te=ut(Q=>{T.current=z?D.slice():null,H.current=D;const ue=x.current;let oe=ue;if(ue>-1&&ue<D.length){if(D[ue]===f){let he=ue;for(;he>0&&D[he-1]===f;)he-=1;oe=he}}else{const he=M?"y":"x";let ie;oe=-1;for(let le=0;le<$.current.length;le+=1){const be=$.current[le];if(tt(be)){const de=hb(be),re=Math.abs(Q[he]-de[he]);(ie===void 0||re<=ie)&&(oe=le,ie=re)}}}if(oe>-1&&oe!==ue&&ee(oe),c){const he=$.current[oe];if(tt(he)){const ie=he.getBoundingClientRect(),le=M?"height":"width";G.current=ie[le]/2}}}),q=ut(Q=>{$.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),Y=ut(Q=>{const ue=dl(Q,R);if(ue==null)return;if(U.current+=1,Q.type==="pointermove"&&Q.buttons===0){Z(Q);return}const oe=se(ue);oe!=null&&ab(oe.value,_,m)&&(!a&&U.current>xD&&C(!0),A(oe.value,ei(IO,Q,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex))});function Z(Q){w(-1),C(!1),v.current=null,b.current=null;const ue=dl(Q,R),oe=ue!=null?se(ue):null;if(oe!=null){const he=d.current;l.commit(u.current??oe.value),y(u.current??oe.value,Bv(he,Q))}"pointerType"in Q&&k.current?.hasPointerCapture(Q.pointerId)&&k.current?.releasePointerCapture(Q.pointerId),x.current=-1,R.current=null,T.current=null,B()}const pe=ut(Q=>{if(s)return;const ue=Q.changedTouches[0];ue!=null&&(R.current=ue.identifier);const oe=dl(Q,R);if(oe!=null){te(oe);const ie=se(oe);if(ie==null)return;q(ie.thumbIndex),A(ie.value,ei(jv,Q,void 0,{activeThumbIndex:ie.thumbIndex})),H.current=Array.isArray(ie.value)?ie.value:[ie.value],ie.didSwap&&q(ie.thumbIndex)}U.current=0;const he=an(k.current);he.addEventListener("touchmove",Y,{passive:!0}),he.addEventListener("touchend",Z,{passive:!0})}),B=ut(()=>{const Q=an(k.current);Q.removeEventListener("pointermove",Y),Q.removeEventListener("pointerup",Z),Q.removeEventListener("touchmove",Y),Q.removeEventListener("touchend",Z),T.current=null}),ae=db();return P.useEffect(()=>{const Q=k.current;return Q?(Q.addEventListener("touchstart",pe,{passive:!0}),()=>{Q.removeEventListener("touchstart",pe),ae.cancel(),B()}):()=>B()},[B,pe,k,ae]),P.useEffect(()=>{s&&B()},[s,B]),ln("div",t,{state:O,ref:[n,E,k,L],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const ue=k.current;if(!ue||s||Q.defaultPrevented||!tt(Q.target)||Q.button!==0)return;const oe=dl(Q,R);if(oe!=null){te(oe);const ie=se(oe);if(ie==null)return;_r($.current[ie.thumbIndex],ho(an(ue)))?Q.preventDefault():ae.request(()=>{q(ie.thumbIndex)}),C(!0),b.current!=null||(A(ie.value,ei(jv,Q.nativeEvent,void 0,{activeThumbIndex:ie.thumbIndex})),H.current=Array.isArray(ie.value)?ie.value:[ie.value],ie.didSwap&&q(ie.thumbIndex))}Q.nativeEvent.pointerId&&ue.setPointerCapture(Q.nativeEvent.pointerId),U.current=0;const he=an(k.current);he.addEventListener("pointermove",Y,{passive:!0}),he.addEventListener("pointerup",Z,{once:!0})},tabIndex:-1},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(yb.displayName="SliderControl");const vb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:s}=ll();return ln("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(vb.displayName="SliderTrack");const fl={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function pl(e,t,n){return(e-t)*100/(n-t)}const hl="ArrowUp",ml="ArrowDown",gl="ArrowLeft",yl="ArrowRight",vl="Home",bl="End",SD=new Set([gl,yl]),TD=new Set([hl,ml]),ED=new Set([...SD,...TD]);[...ED];const CD=new Set([hl,ml,gl,yl,vl,bl]);let kD=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function ID(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=nD(),f=P.useRef(-1),[h,m]=P.useState(i??(o===kD.GuessFromOrder?()=>{if(f.current===-1){const v=d.current;d.current+=1,f.current=v}return f.current}:-1)),y=P.useRef(null),g=P.useCallback(v=>{if(y.current=v,h!==-1&&v!==null&&(c.current[h]=v,u)){const b=t!==void 0;u.current[h]=b?t:r?.current?.textContent??v.textContent}},[h,c,u,t,r]);return pt(()=>{if(i!=null)return;const v=y.current;if(v)return s(v,n),()=>{a(v)}},[i,s,a,n]),pt(()=>{if(i==null)return l(v=>{const b=y.current?v.get(y.current)?.index:null;b!=null&&m(b)})},[i,l,m]),P.useMemo(()=>({ref:g,index:h}),[h,g])}const bb=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(bb.displayName="CSPContext");const AD={disableStyleElements:!1};function PD(){return P.useContext(bb)??AD}function OD(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=ob(),s=sl(t),a=n?o:void 0,l=Xn(()=>Symbol("labelable-control")),c=P.useRef(!1),u=P.useRef(t!=null),d=ut(()=>{!c.current||i===pn||(c.current=!1,i(l.current,void 0))});return pt(()=>{if(i===pn)return;let f;if(n){const h=r?.current;tt(h)&&h.closest("label")!=null?f=t??null:f=a??s}else if(t!=null)u.current=!0,f=t;else if(u.current)f=s;else{d();return}if(f===void 0){d();return}c.current=!0,i(l.current,f)},[t,r,a,i,n,s,l,d]),P.useEffect(()=>d,[d]),o??s}let DD=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const ND='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',xb="PageUp",wb="PageDown",MD=new Set([hl,ml,gl,yl,vl,bl,xb,wb]);function _D(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${ti(e[t],r,n)} start range`:`${ti(e[t],r,n)} end range`:n?ti(e[t],r,n):void 0}function ni(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const Sb=P.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":s,"aria-label":a,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:h,inputRef:m,onBlur:y,onFocus:g,onKeyDown:v,tabIndex:b,...x}=t,{nonce:T}=PD(),E=sl(f),{active:I,lastUsedThumbIndex:w,controlRef:C,disabled:A,validation:O,formatOptionsRef:_,handleInputChange:N,inset:$,labelId:D,largeStep:F,locale:z,max:M,min:k,minStepsBetweenValues:V,name:L,orientation:R,pressedInputRef:U,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:H,renderBeforeHydration:ee,setActive:se,setIndicatorPosition:te,state:q,step:Y,values:Z}=ll(),pe=pb(),B=c||A,ae=Z.length>1,ce=R==="vertical",Q=pe==="rtl",{setTouched:ue,setFocused:oe,validationMode:he}=$d(),ie=P.useRef(null),le=P.useRef(null),be=sl(),de=OD(),re=ae?be:de,J=P.useMemo(()=>({inputId:re}),[re]),{ref:j,index:X}=ID({metadata:J}),me=ae?h??X:0,ve=me===Z.length-1,Ce=Z[me],Me=pl(Ce,k,M),[_e,ct]=P.useState(!1),[_t,Qt]=P.useState();ds(()=>ct(!0));const Be=w>=0&&w<Z.length?w:-1,W=ut(()=>{const ot=C.current,gt=ie.current;if(!ot||!gt)return;const it=gt.getBoundingClientRect(),wn=ot.getBoundingClientRect(),to=ce?"height":"width",no=wn[to]-it[to],Ri=(it[to]/2+no*Me/100)/wn[to]*100;Qt(Ri),me===0?te(Hi=>[Ri,Hi[1]]):ve&&te(Hi=>[Hi[0],Ri])});pt(()=>{$&&queueMicrotask(W)},[W,$]),pt(()=>{$&&W()},[W,$,Me]);const K=P.useCallback(()=>{const ot=ce?"bottom":"insetInlineStart",gt=ce?"left":"top";let it;return ae?I===me?it=2:Be===me&&(it=1):I===me&&(it=1),$?{"--position":`${_t}%`,visibility:ee&&!_e||_t===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:Number.isFinite(Me)?{position:"absolute",[ot]:`${Me}%`,[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:fl},[I,me,$,_e,_t,ae,ee,Q,Be,Me,ce]);let Oe;R==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ue=Od({"aria-label":typeof u=="function"?u(me):a,"aria-labelledby":l??D,"aria-describedby":s,"aria-orientation":R,"aria-valuenow":Ce,"aria-valuetext":typeof d=="function"?d(ti(Ce,z,_.current??void 0),Ce,me):_D(Z,me,_.current??void 0,z),disabled:B,id:re,max:M,min:k,name:L,onChange(ot){N(ot.target.valueAsNumber,me,ot)},onFocus(){se(me),oe(!0)},onBlur(){ie.current&&(se(-1),ue(!0),oe(!1),he==="onBlur"&&O.commit(sb(Ce,me,k,M,ae,Z)))},onKeyDown(ot){if(!MD.has(ot.key))return;CD.has(ot.key)&&ot.stopPropagation();let gt=null;const it=mb(Ce,Y,k);switch(ot.key){case hl:gt=ni(it,ot.shiftKey?F:Y,1,k,M);break;case yl:gt=ni(it,ot.shiftKey?F:Y,Q?-1:1,k,M);break;case ml:gt=ni(it,ot.shiftKey?F:Y,-1,k,M);break;case gl:gt=ni(it,ot.shiftKey?F:Y,Q?1:-1,k,M);break;case xb:gt=ni(it,F,1,k,M);break;case wb:gt=ni(it,F,-1,k,M);break;case bl:gt=M,ae&&(gt=Number.isFinite(Z[me+1])?Z[me+1]-Y*V:M);break;case vl:gt=k,ae&&(gt=Number.isFinite(Z[me-1])?Z[me-1]+Y*V:k);break}gt!==null&&(N(gt,me,ot),ot.preventDefault())},step:Y,style:{...fl,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:Ce??""},O.getInputValidationProps),Ye=Id(le,O.inputRef,m);return ln("div",t,{state:q,ref:[n,j,ie],props:[{[DD.index]:me,children:p.jsxs(P.Fragment,{children:[o,p.jsx("input",{ref:Ye,...Ue}),$&&!_e&&ee&&ve&&p.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:ND},suppressHydrationWarning:!0})]}),id:E,onBlur:y,onFocus:g,onPointerDown(ot){if(H.current=me,ie.current!=null){const gt=R==="horizontal"?"x":"y",it=hb(ie.current),wn=(R==="horizontal"?ot.clientX:ot.clientY)-it[gt];G.current=wn}le.current!=null&&U.current!==le.current&&(U.current=le.current)},style:K(),suppressHydrationWarning:ee||void 0,tabIndex:-1},x],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(Sb.displayName="SliderThumb");function FD(e,t,n,r,o,i){const s=n===void 0||t&&r===void 0?"hidden":void 0,a=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[a]="var(--start-position)",u[l]="var(--relative-size)",u):(u[a]=0,u[l]="var(--start-position)",u)}function LD(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",a={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return a[o]=0,a[i]=`${n}%`,a;const l=r-n;return a[o]=`${n}%`,a[i]=`${l}%`,a}const Tb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:s,inset:a,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:h}=ll(),[m,y]=P.useState(!1);ds(()=>y(!0));const g=u==="vertical",v=h.length>1,b=a?FD(g,v,s[0],s[1],d,m):LD(g,v,pl(h[0],c,l),pl(h[h.length-1],c,l));return ln("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(Tb.displayName="SliderIndicator");const Fr=e=>{const t=S.useContext(oo);if(e)return e;if(t)return t.locale||e},VD=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Re.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Re.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),p.jsx(Sd,{title:"",ref:r,as:Sb,enabled:e.tooltip,className:"focus-within::scale-105 block size-5 cursor-grab rounded-full border-2 border-input-border bg-input-switch shadow-shadow-floating focus-within:border-primary focus-within:outline active:cursor-grabbing",children:t})},$D=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=S.useRef(Xo()),a=r||o||[],l=Fr();return p.jsx(lb,{...i,value:o,locale:l,defaultValue:r,children:p.jsxs(yb,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[p.jsx(vb,{className:"relative h-2 grow rounded-full bg-background",children:p.jsx(Tb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(a)?a.map((c,u)=>p.jsx(VD,{tooltip:t??!1},`${s.current}-${u}`)):null]})})},Lr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},zD=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const s=S.useId(),[a,l]=S.useState(o.checked??!1),c=a,u=S.useRef(null),d=Lr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const h=y=>{d.current&&d.current(y)},m=u.current;return m.addEventListener("change",h),()=>m?.removeEventListener("change",h)}},[]);const f=()=>{const h=!u.current?.checked;l(h),o?.onCheck?.(h),u.current!==null&&(u.current.checked=h,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return p.jsxs("fieldset",{className:Pe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[p.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[p.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||s,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:h=>l(h.target.checked)}),p.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${s}-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:p.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"})}),p.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:p.jsx("span",{className:"font-medium text-foreground",children:e})})]}),p.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),fs=S.createContext({});function Qn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Eb=typeof window<"u",xl=Eb?S.useLayoutEffect:S.useEffect,wl=S.createContext(null);function Bd(e,t){e.indexOf(t)===-1&&e.push(t)}function ri(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function jD([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Jn=(e,t,n)=>n>t?t:n<e?e:n;function Rd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let oi=()=>{},hn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(oi=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Rd(t,n))},hn=(e,t,n)=>{if(!e)throw new Error(Rd(t,n))});const vr={},Cb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function kb(e){return typeof e=="object"&&e!==null}const Ib=e=>/^0[^.\s]+$/u.test(e);function Ab(e){let t;return()=>(t===void 0&&(t=e()),t)}const Sn=e=>e,BD=(e,t)=>n=>t(e(n)),ps=(...e)=>e.reduce(BD),ii=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Hd{constructor(){this.subscriptions=[]}add(t){return Bd(this.subscriptions,t),()=>ri(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const mn=e=>e*1e3,Tn=e=>e/1e3;function Pb(e,t){return t?e*(1e3/t):0}const Ob=new Set;function Sl(e,t,n){e||Ob.has(t)||(console.warn(Rd(t,n)),Ob.add(t))}const RD=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},Db=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,HD=1e-7,WD=12;function qD(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Db(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>HD&&++a<WD);return s}function hs(e,t,n,r){if(e===t&&n===r)return Sn;const o=i=>qD(i,0,1,e,n);return i=>i===0||i===1?i:Db(o(i),t,r)}const Nb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Mb=e=>t=>1-e(1-t),_b=hs(.33,1.53,.69,.99),Wd=Mb(_b),Fb=Nb(Wd),Lb=e=>(e*=2)<1?.5*Wd(e):.5*(2-Math.pow(2,-10*(e-1))),qd=e=>1-Math.sin(Math.acos(e)),Vb=Mb(qd),$b=Nb(qd),UD=hs(.42,0,1,1),GD=hs(0,0,.58,1),zb=hs(.42,0,.58,1),jb=e=>Array.isArray(e)&&typeof e[0]!="number";function Bb(e,t){return jb(e)?e[RD(0,e.length,t)]:e}const Rb=e=>Array.isArray(e)&&typeof e[0]=="number",Hb={linear:Sn,easeIn:UD,easeInOut:zb,easeOut:GD,circIn:qd,circInOut:$b,circOut:Vb,backIn:Wd,backInOut:Fb,backOut:_b,anticipate:Lb},YD=e=>typeof e=="string",Ud=e=>{if(Rb(e)){hn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return hs(t,n,r,o)}else if(YD(e))return hn(Hb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Hb[e];return e},Tl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function KD(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const m=f&&o?n:r;return d&&s.add(u),m.has(u)||m.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const ZD=40;function Wb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Tl.reduce((x,T)=>(x[T]=KD(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:m}=s,y=()=>{const x=vr.useManualTiming?o.timestamp:performance.now();n=!1,vr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,ZD),1)),o.timestamp=x,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),h.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},g=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:Tl.reduce((x,T)=>{const E=s[T];return x[T]=(I,w=!1,C=!1)=>(n||g(),E.schedule(I,w,C)),x},{}),cancel:x=>{for(let T=0;T<Tl.length;T++)s[Tl[T]].cancel(x)},state:o,steps:s}}const{schedule:ht,cancel:br,state:Yt,steps:Gd}=Wb(typeof requestAnimationFrame<"u"?requestAnimationFrame:Sn,!0);let El;function XD(){El=void 0}const en={now:()=>(El===void 0&&en.set(Yt.isProcessing||vr.useManualTiming?Yt.timestamp:performance.now()),El),set:e=>{El=e,queueMicrotask(XD)}},qb=e=>t=>typeof t=="string"&&t.startsWith(e),Ub=qb("--"),QD=qb("var(--"),Yd=e=>QD(e)?JD.test(e.split("/*")[0].trim()):!1,JD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Gb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const si={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ms={...si,transform:e=>Jn(0,1,e)},Cl={...si,default:1},gs=e=>Math.round(e*1e5)/1e5,Kd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eN(e){return e==null}const tN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zd=(e,t)=>n=>!!(typeof n=="string"&&tN.test(n)&&n.startsWith(e)||t&&!eN(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(Kd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},nN=e=>Jn(0,255,e),Xd={...si,transform:e=>Math.round(nN(e))},mo={test:Zd("rgb","red"),parse:Yb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Xd.transform(e)+", "+Xd.transform(t)+", "+Xd.transform(n)+", "+gs(ms.transform(r))+")"};function rN(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Qd={test:Zd("#"),parse:rN,transform:mo.transform},ys=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vr=ys("deg"),er=ys("%"),Ee=ys("px"),oN=ys("vh"),iN=ys("vw"),Kb={...er,parse:e=>er.parse(e)/100,transform:e=>er.transform(e*100)},ai={test:Zd("hsl","hue"),parse:Yb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+er.transform(gs(t))+", "+er.transform(gs(n))+", "+gs(ms.transform(r))+")"},Ft={test:e=>mo.test(e)||Qd.test(e)||ai.test(e),parse:e=>mo.test(e)?mo.parse(e):ai.test(e)?ai.parse(e):Qd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mo.transform(e):ai.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},sN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function aN(e){return isNaN(e)&&typeof e=="string"&&(e.match(Kd)?.length||0)+(e.match(sN)?.length||0)>0}const Zb="number",Xb="color",lN="var",cN="var(",Qb="${}",uN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function vs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(uN,l=>(Ft.test(l)?(r.color.push(i),o.push(Xb),n.push(Ft.parse(l))):l.startsWith(cN)?(r.var.push(i),o.push(lN),n.push(l)):(r.number.push(i),o.push(Zb),n.push(parseFloat(l))),++i,Qb)).split(Qb);return{values:n,split:a,indexes:r,types:o}}function Jb(e){return vs(e).values}function ex(e){const{split:t,types:n}=vs(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Zb?i+=gs(o[s]):a===Xb?i+=Ft.transform(o[s]):i+=o[s]}return i}}const dN=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function fN(e){const t=Jb(e);return ex(e)(t.map(dN))}const _n={test:aN,parse:Jb,createTransformer:ex,getAnimatableNone:fN};function Jd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pN({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Jd(l,a,e+1/3),i=Jd(l,a,e),s=Jd(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function kl(e,t){return n=>n>0?t:e}const bt=(e,t,n)=>e+(t-e)*n,ef=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},hN=[Qd,mo,ai],mN=e=>hN.find(t=>t.test(e));function tx(e){const t=mN(e);if(oi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===ai&&(n=pN(n)),n}const nx=(e,t)=>{const n=tx(e),r=tx(t);if(!n||!r)return kl(e,t);const o={...n};return i=>(o.red=ef(n.red,r.red,i),o.green=ef(n.green,r.green,i),o.blue=ef(n.blue,r.blue,i),o.alpha=bt(n.alpha,r.alpha,i),mo.transform(o))},tf=new Set(["none","hidden"]);function gN(e,t){return tf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function yN(e,t){return n=>bt(e,t,n)}function nf(e){return typeof e=="number"?yN:typeof e=="string"?Yd(e)?kl:Ft.test(e)?nx:xN:Array.isArray(e)?rx:typeof e=="object"?Ft.test(e)?nx:vN:kl}function rx(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>nf(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function vN(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=nf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function bN(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],s=e.indexes[i][r[i]],a=e.values[s]??0;n[o]=a,r[i]++}return n}const xN=(e,t)=>{const n=_n.createTransformer(t),r=vs(e),o=vs(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?tf.has(e)&&!o.values.length||tf.has(t)&&!r.values.length?gN(e,t):ps(rx(bN(r,o),o.values),n):(oi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),kl(e,t))};function ox(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?bt(e,t,n):nf(e)(e,t)}const wN=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>br(t),now:()=>Yt.isProcessing?Yt.timestamp:en.now()}},ix=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Il=2e4;function rf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Il;)t+=n,r=e.next(t);return t>=Il?1/0:t}function sx(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(rf(r),Il);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Tn(o)}}const SN=5;function ax(e,t,n){const r=Math.max(t-SN,0);return Pb(n-e(r),t-r)}const It={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},of=.001;function TN({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:r=It.mass}){let o,i;oi(e<=mn(It.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Jn(It.minDamping,It.maxDamping,s),e=Jn(It.minDuration,It.maxDuration,Tn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,h=sf(c,s),m=Math.exp(-d);return of-f/h*m},i=c=>{const d=c*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,m=Math.exp(-d),y=sf(Math.pow(c,2),s);return(-o(c)+of>0?-1:1)*((f-h)*m)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-of+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=CN(o,i,a);if(e=mn(e),isNaN(l))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const EN=12;function CN(e,t,n){let r=n;for(let o=1;o<EN;o++)r=r-e(r)/t(r);return r}function sf(e,t){return e*Math.sqrt(1-t*t)}const kN=["duration","bounce"],IN=["stiffness","damping","mass"];function lx(e,t){return t.some(n=>e[n]!==void 0)}function AN(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!lx(e,IN)&&lx(e,kN))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Jn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:It.mass,stiffness:o,damping:i}}else{const n=TN({...e,velocity:0});t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function bs(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=AN({...n,velocity:-Tn(n.velocity||0)}),m=f||0,y=c/(2*Math.sqrt(l*u)),g=s-i,v=Tn(Math.sqrt(l/u)),b=Math.abs(g)<5;r||(r=b?It.restSpeed.granular:It.restSpeed.default),o||(o=b?It.restDelta.granular:It.restDelta.default);let x;if(y<1){const E=sf(v,y);x=I=>{const w=Math.exp(-y*v*I);return s-w*((m+y*v*g)/E*Math.sin(E*I)+g*Math.cos(E*I))}}else if(y===1)x=E=>s-Math.exp(-v*E)*(g+(m+v*g)*E);else{const E=v*Math.sqrt(y*y-1);x=I=>{const w=Math.exp(-y*v*I),C=Math.min(E*I,300);return s-w*((m+y*v*g)*Math.sinh(C)+E*g*Math.cosh(C))/E}}const T={calculatedDuration:h&&d||null,next:E=>{const I=x(E);if(h)a.done=E>=d;else{let w=E===0?m:0;y<1&&(w=E===0?mn(m):ax(x,E,I));const C=Math.abs(w)<=r,A=Math.abs(s-I)<=o;a.done=C&&A}return a.value=a.done?s:I,a},toString:()=>{const E=Math.min(rf(T),Il),I=ix(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}bs.applyToOptions=e=>{const t=sx(e,100,bs);return e.ease=t.ease,e.duration=mn(t.duration),e.type="keyframes",e};function af({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=C=>a!==void 0&&C<a||l!==void 0&&C>l,m=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let y=n*t;const g=d+y,v=s===void 0?g:s(g);v!==g&&(y=v-d);const b=C=>-y*Math.exp(-C/r),x=C=>v+b(C),T=C=>{const A=b(C),O=x(C);f.done=Math.abs(A)<=c,f.value=f.done?v:O};let E,I;const w=C=>{h(f.value)&&(E=C,I=bs({keyframes:[f.value,m(f.value)],velocity:ax(x,C,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:C=>{let A=!1;return!I&&E===void 0&&(A=!0,T(C),w(C)),E!==void 0&&C>=E?I.next(C-E):(!A&&T(C),f)}}}function PN(e,t,n){const r=[],o=n||vr.mix||ox,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Sn:t;a=ps(l,a)}r.push(a)}return r}function cx(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(hn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=PN(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ii(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Jn(e[0],e[i-1],u)):c}function ux(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ii(0,t,r);e.push(bt(n,1,o))}}function dx(e){const t=[0];return ux(t,e.length-1),t}function ON(e,t){return e.map(n=>n*t)}function DN(e,t){return e.map(()=>t||zb).splice(0,e.length-1)}function li({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=jb(r)?r.map(Ud):Ud(r),i={done:!1,value:t[0]},s=ON(n&&n.length===t.length?n:dx(t),e),a=cx(s,t,{ease:Array.isArray(o)?o:DN(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const NN=e=>e!==null;function lf(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(NN),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const MN={decay:af,inertia:af,tween:li,keyframes:li,spring:bs};function fx(e){typeof e.type=="string"&&(e.type=MN[e.type])}class cf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const _N=e=>e/100;class uf extends cf{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==en.now()&&this.tick(en.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;fx(t);const{type:n=li,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||li;process.env.NODE_ENV!=="production"&&l!==li&&hn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==li&&typeof a[0]!="number"&&(this.mixKeyframes=ps(_N,ox(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=rf(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:y,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const C=Math.min(this.currentTime,o)/a;let A=Math.floor(C),O=C%1;!O&&C>=1&&(O=1),O===1&&A--,A=Math.min(A,d+1),A%2&&(f==="reverse"?(O=1-O,h&&(O-=h/a)):f==="mirror"&&(T=s)),x=Jn(0,1,O)*a}const E=b?{done:!1,value:u[0]}:T.next(x);i&&(E.value=i(E.value));let{done:I}=E;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&m!==af&&(E.value=lf(u,this.options,g,this.speed)),y&&y(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Tn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(this.currentTime)}set time(t){t=mn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(en.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Tn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=wN,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(en.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function FN(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const go=e=>e*180/Math.PI,df=e=>{const t=go(Math.atan2(e[1],e[0]));return ff(t)},LN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:df,rotateZ:df,skewX:e=>go(Math.atan(e[1])),skewY:e=>go(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ff=e=>(e=e%360,e<0&&(e+=360),e),px=df,hx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hx,scaleY:mx,scale:e=>(hx(e)+mx(e))/2,rotateX:e=>ff(go(Math.atan2(e[6],e[5]))),rotateY:e=>ff(go(Math.atan2(-e[2],e[0]))),rotateZ:px,rotate:px,skewX:e=>go(Math.atan(e[4])),skewY:e=>go(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pf(e){return e.includes("scale")?1:0}function hf(e,t){if(!e||e==="none")return pf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=VN,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=LN,o=a}if(!o)return pf(t);const i=r[t],s=o[1].split(",").map(zN);return typeof i=="function"?i(s):s[i]}const $N=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return hf(n,t)};function zN(e){return parseFloat(e.trim())}const ci=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ui=new Set(ci),gx=e=>e===si||e===Ee,jN=new Set(["x","y","z"]),BN=ci.filter(e=>!jN.has(e));function RN(e){const t=[];return BN.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $r={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>hf(t,"x"),y:(e,{transform:t})=>hf(t,"y")};$r.translateX=$r.x,$r.translateY=$r.y;const yo=new Set;let mf=!1,gf=!1,yf=!1;function yx(){if(gf){const e=Array.from(yo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=RN(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{r.getValue(i)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}gf=!1,mf=!1,yo.forEach(e=>e.complete(yf)),yo.clear()}function vx(){yo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gf=!0)})}function HN(){yf=!0,vx(),yx(),yf=!1}class vf{constructor(t,n,r,o,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(yo.add(this),mf||(mf=!0,ht.read(vx),ht.resolveKeyframes(yx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}FN(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yo.delete(this)}cancel(){this.state==="scheduled"&&(yo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const WN=e=>e.startsWith("--");function qN(e,t,n){WN(t)?e.style.setProperty(t,n):e.style[t]=n}const UN={};function bx(e,t){const n=Ab(e);return()=>UN[t]??n()}const GN=bx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),xx=bx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xs([0,.65,.55,1]),circOut:xs([.55,0,1,.45]),backIn:xs([.31,.01,.66,-.59]),backOut:xs([.33,1.53,.69,.99])};function Sx(e,t){if(e)return typeof e=="function"?xx()?ix(e,t):"ease-out":Rb(e)?xs(e):Array.isArray(e)?e.map(n=>Sx(n,t)||wx.easeOut):wx[e]}function YN(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Sx(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function bf(e){return typeof e=="function"&&"applyToOptions"in e}function KN({type:e,...t}){return bf(e)&&xx()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Tx extends cf{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,hn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=KN(t);this.animation=YN(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=lf(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):qN(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Tn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=mn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&GN()?(this.animation.timeline=t,Sn):n(this)}}const Ex={anticipate:Lb,backInOut:Fb,circInOut:$b};function ZN(e){return e in Ex}function XN(e){typeof e.ease=="string"&&ZN(e.ease)&&(e.ease=Ex[e.ease])}const xf=10;class QN extends Tx{constructor(t){XN(t),fx(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new uf({...s,autoplay:!1}),l=Math.max(xf,en.now()-this.startTime),c=Jn(0,xf,l-xf);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Cx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_n.test(e)||e==="0")&&!e.startsWith("url("));function JN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function eM(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=Cx(o,t),a=Cx(i,t);return oi(s===a,`You are trying to animate ${t} from "${o}" to "${i}". "${s?i:o}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:JN(e)||(n==="spring"||bf(n))&&r}function wf(e){e.duration=0,e.type="keyframes"}const tM=new Set(["opacity","clipPath","filter","transform"]),nM=Ab(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function rM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return nM()&&n&&tM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const oM=40;class iM extends cf{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=en.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||vf;this.keyframeResolver=new h(a,(m,y,g)=>this.onKeyframesResolved(m,y,f,!g),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=en.now(),eM(t,i,s,a)||((vr.instantAnimations||!l)&&u?.(lf(t,r,n)),t[0]=t[t.length-1],wf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>oM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!c&&rM(f),m=f.motionValue?.owner?.current,y=h?new QN({...f,element:m}):new uf(f);y.finished.then(()=>{this.notifyFinished()}).catch(Sn),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),HN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class sM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return kx(this.animations,"duration")}get iterationDuration(){return kx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function kx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class aM extends sM{then(t,n){return this.finished.finally(t).then(()=>{})}}function Ix(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}const lM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cM(e){const t=lM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const uM=4;function Ax(e,t,n=1){hn(n<=uM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=cM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Cb(s)?parseFloat(s):s}return Yd(o)?Ax(o,t,n+1):o}const dM={type:"spring",stiffness:500,damping:25,restSpeed:10},fM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),pM={type:"keyframes",duration:.8},hM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mM=(e,{keyframes:t})=>t.length>2?pM:ui.has(e)?e.startsWith("scale")?fM(t[1]):dM:hM,gM=e=>e!==null;function yM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(gM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function Sf(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Tf(e,t){const n=e?.[t]??e?.default??e;return n!==e?Sf(n,e):n}function vM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Ef=(e,t,n,r={},o,i)=>s=>{const a=Tf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-mn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};vM(a)||Object.assign(u,mM(e,u)),u.duration&&(u.duration=mn(u.duration)),u.repeatDelay&&(u.repeatDelay=mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(wf(u),u.delay===0&&(d=!0)),(vr.instantAnimations||vr.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,wf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=yM(u.keyframes,a);if(f!==void 0){ht.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new uf(u):new iM(u)};function Px(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Cf(e,t,n,r){if(typeof t=="function"){const[o,i]=Px(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Px(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function di(e,t,n){const r=e.getProps();return Cf(r,t,n!==void 0?n:r.custom,e)}const Ox=new Set(["width","height","top","left","right","bottom",...ci]),Dx=30,bM=e=>!isNaN(parseFloat(e)),ws={current:void 0};class xM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=en.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=en.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=bM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Sl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Hd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ws.current&&ws.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=en.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Dx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dx);return Pb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zr(e,t){return new xM(e,t)}const kf=e=>Array.isArray(e);function wM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zr(n))}function SM(e){return kf(e)?e[e.length-1]||0:e}function TM(e,t){const n=di(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=SM(i[s]);wM(e,s,a)}}const zt=e=>!!(e&&e.getVelocity);function EM(e){return!!(zt(e)&&e.add)}function If(e,t){const n=e.getValue("willChange");if(EM(n))return n.add(t);if(!n&&vr.WillChange){const r=new vr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Af(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Nx="data-"+Af("framerAppearId");function Mx(e){return e.props[Nx]}function CM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Pf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:s,...a}=t;const l=e.getDefaultTransition();i=i?Sf(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in a){const h=e.getValue(f,e.latestValues[f]??null),m=a[f];if(m===void 0||d&&CM(d,f))continue;const y={delay:n,...Tf(i||{},f)},g=h.get();if(g!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===g&&!y.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const T=Mx(e);if(T){const E=window.MotionHandoffAnimation(T,f,ht);E!==null&&(y.startTime=E,v=!0)}}If(e,f);const b=c??e.shouldReduceMotion;h.start(Ef(f,h,m,b&&Ox.has(f)?{type:!1}:y,e,v));const x=h.animation;x&&u.push(x)}if(s){const f=()=>ht.update(()=>{s&&TM(e,s)});u.length?Promise.all(u).then(f):f()}return u}function Of(e,t,n={}){const r=di(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Pf(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return kM(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function kM(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Of(l,t,{...s,delay:n+(typeof r=="function"?0:r)+Ix(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function IM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Of(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Of(e,t,n);else{const o=typeof t=="function"?di(e,t,n.custom):t;r=Promise.all(Pf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const AM={test:e=>e==="auto",parse:e=>e},_x=e=>t=>t.test(e),Fx=[si,Ee,er,Vr,iN,oN,AM],Lx=e=>Fx.find(_x(e));function PM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ib(e):!0}const OM=new Set(["brightness","contrast","saturate","opacity"]);function DM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Kd)||[];if(!r)return e;const o=n.replace(r,"");let i=OM.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const NM=/\b([a-z-]*)\(.*?\)/gu,Df={..._n,getAnimatableNone:e=>{const t=e.match(NM);return t?t.map(DM).join(" "):e}},Nf={..._n,getAnimatableNone:e=>{const t=_n.parse(e);return _n.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Vx={...si,transform:Math.round},Mf={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,inset:Ee,insetBlock:Ee,insetBlockStart:Ee,insetBlockEnd:Ee,insetInline:Ee,insetInlineStart:Ee,insetInlineEnd:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,paddingBlock:Ee,paddingBlockStart:Ee,paddingBlockEnd:Ee,paddingInline:Ee,paddingInlineStart:Ee,paddingInlineEnd:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,marginBlock:Ee,marginBlockStart:Ee,marginBlockEnd:Ee,marginInline:Ee,marginInlineStart:Ee,marginInlineEnd:Ee,fontSize:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:Vr,rotateX:Vr,rotateY:Vr,rotateZ:Vr,scale:Cl,scaleX:Cl,scaleY:Cl,scaleZ:Cl,skew:Vr,skewX:Vr,skewY:Vr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:ms,originX:Kb,originY:Kb,originZ:Ee},zIndex:Vx,fillOpacity:ms,strokeOpacity:ms,numOctaves:Vx},MM={...Mf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:Df,WebkitFilter:Df,mask:Nf,WebkitMask:Nf},$x=e=>MM[e],_M=new Set([Df,Nf]);function zx(e,t){let n=$x(e);return _M.has(n)||(n=_n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const FM=new Set(["auto","none","0"]);function LM(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!FM.has(i)&&vs(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=zx(n,o)}class VM extends vf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Yd(d))){const f=Ax(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ox.has(r)||t.length!==2)return;const[o,i]=t,s=Lx(o),a=Lx(i),l=Gb(o),c=Gb(i);if(l!==c&&$r[r]){this.needsMeasurement=!0;return}if(s!==a)if(gx(s)&&gx(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else $r[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||PM(t[o]))&&r.push(o);r.length&&LM(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$r[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=$r[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const $M=new Set(["opacity","clipPath","filter","transform"]);function _f(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const jx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ff(e){return kb(e)&&"offsetHeight"in e}const{schedule:Lf}=Wb(queueMicrotask,!1),Fn={x:!1,y:!1};function Bx(){return Fn.x||Fn.y}function zM(e){return e==="x"||e==="y"?Fn[e]?null:(Fn[e]=!0,()=>{Fn[e]=!1}):Fn.x||Fn.y?null:(Fn.x=Fn.y=!0,()=>{Fn.x=Fn.y=!1})}function Rx(e,t){const n=_f(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function jM(e){return!(e.pointerType==="touch"||Bx())}function BM(e,t,n={}){const[r,o,i]=Rx(e,n);return r.forEach(s=>{let a=!1,l=!1,c;const u=()=>{s.removeEventListener("pointerleave",m)},d=g=>{c&&(c(g),c=void 0),u()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(g))},h=()=>{a=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},m=g=>{if(g.pointerType!=="touch"){if(a){l=!0;return}d(g)}},y=g=>{if(!jM(g))return;l=!1;const v=t(s,g);typeof v=="function"&&(c=v,s.addEventListener("pointerleave",m,o))};s.addEventListener("pointerenter",y,o),s.addEventListener("pointerdown",h,o)}),i}const Hx=(e,t)=>t?e===t?!0:Hx(e,t.parentElement):!1,Vf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,RM=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function HM(e){return RM.has(e.tagName)||e.isContentEditable===!0}const WM=new Set(["INPUT","SELECT","TEXTAREA"]);function qM(e){return WM.has(e.tagName)||e.isContentEditable===!0}const Al=new WeakSet;function Wx(e){return t=>{t.key==="Enter"&&e(t)}}function $f(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const UM=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Wx(()=>{if(Al.has(n))return;$f(n,"down");const o=Wx(()=>{$f(n,"up")}),i=()=>$f(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function qx(e){return Vf(e)&&!Bx()}const Ux=new WeakSet;function GM(e,t,n={}){const[r,o,i]=Rx(e,n),s=a=>{const l=a.currentTarget;if(!qx(a)||Ux.has(a))return;Al.add(l),n.stopPropagation&&Ux.add(a);const c=t(l,a),u=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Al.has(l)&&Al.delete(l),qx(h)&&typeof c=="function"&&c(h,{success:m})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Hx(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),Ff(a)&&(a.addEventListener("focus",c=>UM(c,o)),!HM(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Pl(e){return kb(e)&&"ownerSVGElement"in e}const Ol=new WeakMap;let Dl;const Gx=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Pl(r)&&"getBBox"in r?r.getBBox()[t]:r[n],YM=Gx("inline","width","offsetWidth"),KM=Gx("block","height","offsetHeight");function ZM({target:e,borderBoxSize:t}){Ol.get(e)?.forEach(n=>{n(e,{get width(){return YM(e,t)},get height(){return KM(e,t)}})})}function XM(e){e.forEach(ZM)}function QM(){typeof ResizeObserver>"u"||(Dl=new ResizeObserver(XM))}function JM(e,t){Dl||QM();const n=_f(e);return n.forEach(r=>{let o=Ol.get(r);o||(o=new Set,Ol.set(r,o)),o.add(t),Dl?.observe(r)}),()=>{n.forEach(r=>{const o=Ol.get(r);o?.delete(t),o?.size||Dl?.unobserve(r)})}}const Nl=new Set;let fi;function e_(){fi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Nl.forEach(t=>t(e))},window.addEventListener("resize",fi)}function t_(e){return Nl.add(e),fi||e_(),()=>{Nl.delete(e),!Nl.size&&typeof fi=="function"&&(window.removeEventListener("resize",fi),fi=void 0)}}function Yx(e,t){return typeof e=="function"?t_(e):JM(e,t)}function Kx(e){return Pl(e)&&e.tagName==="svg"}function n_(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function r_(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:n_(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=Ud(r)(l/c)*c}return t+l}}function o_(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=cx(o,i,s);return t?a(r):a}const i_=[...Fx,Ft,_n],s_=e=>i_.find(_x(e)),Zx=()=>({translate:0,scale:1,origin:0,originPoint:0}),pi=()=>({x:Zx(),y:Zx()}),Xx=()=>({min:0,max:0}),Lt=()=>({x:Xx(),y:Xx()}),Ss=new WeakMap;function Ml(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ts(e){return typeof e=="string"||Array.isArray(e)}const zf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jf=["initial",...zf];function _l(e){return Ml(e.animate)||jf.some(t=>Ts(e[t]))}function Qx(e){return!!(_l(e)||e.variants)}function a_(e,t,n){for(const r in t){const o=t[r],i=n[r];if(zt(o))e.addValue(r,o);else if(zt(i))e.addValue(r,zr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,zr(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Fl={current:null},Bf={current:!1},l_=typeof window<"u";function Jx(){if(Bf.current=!0,!!l_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fl.current=e.matches;e.addEventListener("change",t),t()}else Fl.current=!1}const e0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ll={};function t0(e){Ll=e}function c_(){return Ll}class n0{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=vf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=en.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ht.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=_l(n),this.isVariantNode=Qx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const m=f[h];c[h]!==void 0&&zt(m)&&m.set(c[h])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,Ss.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Bf.current||Jx(),this.shouldReduceMotion=Fl.current),process.env.NODE_ENV!=="production"&&Sl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),br(this.notifyUpdate),br(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&$M.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new Tx({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:mn(u)}),f=s(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=ui.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ll){const n=Ll[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<e0.length;r++){const o=e0[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=a_(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Cb(r)||Ib(r))?r=parseFloat(r):!s_(r)&&_n.test(n)&&(r=zx(t,n)),this.setBaseTarget(t,zt(r)?r.get():r)),zt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Cf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!zt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Hd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Lf.render(this.render)}}class r0 extends n0{constructor(){super(...arguments),this.KeyframeResolver=VM}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function o0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function u_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function d_(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Rf(e){return e===void 0||e===1}function Hf({scale:e,scaleX:t,scaleY:n}){return!Rf(e)||!Rf(t)||!Rf(n)}function vo(e){return Hf(e)||i0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function i0(e){return s0(e.x)||s0(e.y)}function s0(e){return e&&e!=="0%"}function Vl(e,t,n){const r=e-n,o=t*r;return n+o}function a0(e,t,n,r,o){return o!==void 0&&(e=Vl(e,o,r)),Vl(e,n,r)+t}function Wf(e,t=0,n=1,r,o){e.min=a0(e.min,t,n,r,o),e.max=a0(e.max,t,n,r,o)}function l0(e,{x:t,y:n}){Wf(e.x,t.translate,t.scale,t.originPoint),Wf(e.y,n.translate,n.scale,n.originPoint)}const c0=.999999999999,u0=1.0000000000001;function f_(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&mi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,l0(e,s)),r&&vo(i.latestValues)&&mi(e,i.latestValues))}t.x<u0&&t.x>c0&&(t.x=1),t.y<u0&&t.y>c0&&(t.y=1)}function hi(e,t){e.min=e.min+t,e.max=e.max+t}function d0(e,t,n,r,o=.5){const i=bt(e.min,e.max,o);Wf(e,t,n,i,r)}function mi(e,t){d0(e.x,t.x,t.scaleX,t.scale,t.originX),d0(e.y,t.y,t.scaleY,t.scale,t.originY)}function f0(e,t){return o0(d_(e.getBoundingClientRect(),t))}function p_(e,t,n){const r=f0(e,n),{scroll:o}=t;return o&&(hi(r.x,o.offset.x),hi(r.y,o.offset.y)),r}const h_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},m_=ci.length;function g_(e,t,n){let r="",o=!0;for(let i=0;i<m_;i++){const s=ci[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{const c=parseFloat(a);l=s.startsWith("scale")?c===1:c===0}if(!l||n){const c=jx(a,Mf[s]);if(!l){o=!1;const u=h_[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function qf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(ui.has(l)){s=!0;continue}else if(Ub(l)){o[l]=c;continue}else{const u=jx(c,Mf[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=g_(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function p0(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function h0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Es={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=h0(e,t.target.x),r=h0(e,t.target.y);return`${n}% ${r}%`}},y_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_n.parse(e);if(o.length>5)return r;const i=_n.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=bt(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},Uf={borderRadius:{...Es,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Es,borderTopRightRadius:Es,borderBottomLeftRadius:Es,borderBottomRightRadius:Es,boxShadow:y_};function m0(e,{layout:t,layoutId:n}){return ui.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Uf[e]||e==="opacity")}function Gf(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const s in r)(zt(r[s])||o&&zt(o[s])||m0(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function v_(e){return window.getComputedStyle(e)}class g0 extends r0{constructor(){super(...arguments),this.type="html",this.renderInstance=p0}readValueFromInstance(t,n){if(ui.has(n))return this.projection?.isProjecting?pf(n):$N(t,n);{const r=v_(t),o=(Ub(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return f0(t,n)}build(t,n,r){qf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Gf(t,n,r)}}function b_(e,t){return e in t}class x_ extends n0{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(b_(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const w_={offset:"stroke-dashoffset",array:"stroke-dasharray"},S_={offset:"strokeDashoffset",array:"strokeDasharray"};function T_(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?w_:S_;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const E_=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function y0(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(qf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const h of E_)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&T_(d,o,i,s,!1)}const v0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),b0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function C_(e,t,n,r){p0(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(v0.has(o)?o:Af(o),t.attrs[o])}function x0(e,t,n){const r=Gf(e,t,n);for(const o in e)if(zt(e[o])||zt(t[o])){const i=ci.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class w0 extends r0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ui.has(n)){const r=$x(n);return r&&r.default||0}return n=v0.has(n)?n:Af(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return x0(t,n,r)}build(t,n,r){y0(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){C_(t,n,r,o)}mount(t){this.isSVGTag=b0(t.tagName),super.mount(t)}}const k_=jf.length;function S0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?S0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<k_;n++){const r=jf[n],o=e.props[r];(Ts(o)||o===!1)&&(t[r]=o)}return t}function T0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const I_=[...zf].reverse(),A_=zf.length;function P_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>IM(e,n,r)))}function O_(e){let t=P_(e),n=E0(),r=!0;const o=l=>(c,u)=>{const d=di(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...m}=d;c={...c,...m,...h}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=S0(e.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let g=0;g<A_;g++){const v=I_[g],b=n[v],x=c[v]!==void 0?c[v]:u[v],T=Ts(x),E=v===l?b.isActive:null;E===!1&&(m=g);let I=x===u[v]&&x!==c[v]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...h},!b.isActive&&E===null||!x&&!b.prevProp||Ml(x)||typeof x=="boolean")continue;if(v==="exit"&&b.isActive&&E!==!0){b.prevResolvedValues&&(h={...h,...b.prevResolvedValues});continue}const w=D_(b.prevProp,x);let C=w||v===l&&b.isActive&&!I&&T||g>m&&T,A=!1;const O=Array.isArray(x)?x:[x];let _=O.reduce(o(v),{});E===!1&&(_={});const{prevResolvedValues:N={}}=b,$={...N,..._},D=M=>{C=!0,f.has(M)&&(A=!0,f.delete(M)),b.needsAnimating[M]=!0;const k=e.getValue(M);k&&(k.liveStyle=!1)};for(const M in $){const k=_[M],V=N[M];if(h.hasOwnProperty(M))continue;let L=!1;kf(k)&&kf(V)?L=!T0(k,V):L=k!==V,L?k!=null?D(M):f.add(M):k!==void 0&&f.has(M)?D(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=_,b.isActive&&(h={...h,..._}),r&&e.blockInitialAnimation&&(C=!1);const F=I&&w;C&&(!F||A)&&d.push(...O.map(M=>{const k={type:v};if(typeof M=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,L=di(V,M);if(V.enteringChildren&&L){const{delayChildren:R}=L.transition||{};k.delay=Ix(V.enteringChildren,e,R)}}return{animation:M,options:k}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const v=di(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=b??null}),d.push({animation:g})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=E0()}}}function D_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!T0(t,e):!1}function bo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function E0(){return{animate:bo(!0),whileInView:bo(),whileHover:bo(),whileTap:bo(),whileDrag:bo(),whileFocus:bo(),exit:bo()}}function C0(e,t){e.min=t.min,e.max=t.max}function Ln(e,t){C0(e.x,t.x),C0(e.y,t.y)}function k0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const I0=1e-4,N_=1-I0,M_=1+I0,A0=.01,__=0-A0,F_=0+A0;function tn(e){return e.max-e.min}function L_(e,t,n){return Math.abs(e-t)<=n}function P0(e,t,n,r=.5){e.origin=r,e.originPoint=bt(t.min,t.max,e.origin),e.scale=tn(n)/tn(t),e.translate=bt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=N_&&e.scale<=M_||isNaN(e.scale))&&(e.scale=1),(e.translate>=__&&e.translate<=F_||isNaN(e.translate))&&(e.translate=0)}function Cs(e,t,n,r){P0(e.x,t.x,n.x,r?r.originX:void 0),P0(e.y,t.y,n.y,r?r.originY:void 0)}function O0(e,t,n){e.min=n.min+t.min,e.max=e.min+tn(t)}function V_(e,t,n){O0(e.x,t.x,n.x),O0(e.y,t.y,n.y)}function D0(e,t,n){e.min=t.min-n.min,e.max=e.min+tn(t)}function $l(e,t,n){D0(e.x,t.x,n.x),D0(e.y,t.y,n.y)}function N0(e,t,n,r,o){return e-=t,e=Vl(e,1/n,r),o!==void 0&&(e=Vl(e,1/o,r)),e}function $_(e,t=0,n=1,r=.5,o,i=e,s=e){if(er.test(t)&&(t=parseFloat(t),t=bt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=bt(i.min,i.max,r);e===i&&(a-=t),e.min=N0(e.min,t,n,a,o),e.max=N0(e.max,t,n,a,o)}function M0(e,t,[n,r,o],i,s){$_(e,t[n],t[r],t[o],t.scale,i,s)}const z_=["x","scaleX","originX"],j_=["y","scaleY","originY"];function _0(e,t,n,r){M0(e.x,t,z_,n?n.x:void 0,r?r.x:void 0),M0(e.y,t,j_,n?n.y:void 0,r?r.y:void 0)}function F0(e){return e.translate===0&&e.scale===1}function L0(e){return F0(e.x)&&F0(e.y)}function V0(e,t){return e.min===t.min&&e.max===t.max}function B_(e,t){return V0(e.x,t.x)&&V0(e.y,t.y)}function $0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function z0(e,t){return $0(e.x,t.x)&&$0(e.y,t.y)}function j0(e){return tn(e.x)/tn(e.y)}function B0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function tr(e){return[e("x"),e("y")]}function R_(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const R0=["TopLeft","TopRight","BottomLeft","BottomRight"],H_=R0.length,H0=e=>typeof e=="string"?parseFloat(e):e,W0=e=>typeof e=="number"||Ee.test(e);function W_(e,t,n,r,o,i){o?(e.opacity=bt(0,n.opacity??1,q_(r)),e.opacityExit=bt(t.opacity??1,0,U_(r))):i&&(e.opacity=bt(t.opacity??1,n.opacity??1,r));for(let s=0;s<H_;s++){const a=`border${R0[s]}Radius`;let l=q0(t,a),c=q0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||W0(l)===W0(c)?(e[a]=Math.max(bt(H0(l),H0(c),r),0),(er.test(c)||er.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=bt(t.rotate||0,n.rotate||0,r))}function q0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const q_=U0(0,.5,Vb),U_=U0(.5,.95,Sn);function U0(e,t,n){return r=>r<e?0:r>t?1:n(ii(e,t,r))}function G0(e,t,n){const r=zt(e)?e:zr(e);return r.start(Ef("",r,t,n)),r.animation}function ks(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const G_=(e,t)=>e.depth-t.depth;class Y_{constructor(){this.children=[],this.isDirty=!1}add(t){Bd(this.children,t),this.isDirty=!0}remove(t){ri(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(G_),this.isDirty=!1,this.children.forEach(t)}}function K_(e,t){const n=en.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(br(r),e(i-t))};return ht.setup(r,!0),()=>br(r)}function zl(e){return zt(e)?e.get():e}class Z_{constructor(){this.members=[]}add(t){Bd(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;o&&o.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&ri(this.members,r)}t.scheduleRender()}remove(t){if(ri(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o],s=i.instance;if(i.isPresent!==!1&&(!s||s.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,i=t.options.layoutDependency;if(!(o!==void 0&&i!==void 0&&o===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Yf=["","X","Y","Z"],X_=1e3;let Q_=0;function Kf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Y0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Y0(r)}function K0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=Q_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(t2),this.nodes.forEach(i2),this.nodes.forEach(s2),this.nodes.forEach(n2)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Y_)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Hd),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Pl(s)&&!Kx(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{d=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=K_(f,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Q0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||d2,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!z0(this.targetLayout,h),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Tf(m,"layout"),onPlay:y,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||Q0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),br(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(a2),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Y0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Z0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(X0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(o2),this.nodes.forEach(J_),this.nodes.forEach(e2)):this.nodes.forEach(X0),this.clearAllSnapshots();const a=en.now();Yt.delta=Jn(0,1e3/60,a-Yt.timestamp),Yt.timestamp=a,Yt.isProcessing=!0,Gd.update.process(Yt),Gd.preRender.process(Yt),Gd.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Lf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(r2),this.sharedNodes.forEach(l2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!tn(this.snapshot.measuredBox.x)&&!tn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!L0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||vo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),f2(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Lt();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(p2))){const{scroll:c}=this.root;c&&(hi(a.x,c.offset.x),hi(a.y,c.offset.y))}return a}removeElementScroll(s){const a=Lt();if(Ln(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Ln(a,s),hi(a.x,u.offset.x),hi(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=Lt();Ln(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&mi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),vo(u.latestValues)&&mi(l,u.latestValues)}return vo(this.latestValues)&&mi(l,this.latestValues),l}removeTransform(s){const a=Lt();Ln(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!vo(c.latestValues))continue;Hf(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Ln(u,d),_0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return vo(this.latestValues)&&_0(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Yt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),V_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ln(this.target,this.layout.layoutBox),l0(this.target,this.targetDelta)):Ln(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Hf(this.parent.latestValues)||i0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),$l(this.relativeTargetOrigin,a,l),Ln(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Yt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Ln(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;f_(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Lt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(k0(this.prevProjectionDelta.x,this.projectionDelta.x),k0(this.prevProjectionDelta.y,this.projectionDelta.y)),Cs(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!B0(this.projectionDelta.x,this.prevProjectionDelta.x)||!B0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pi(),this.projectionDelta=pi(),this.projectionDeltaWithTransform=pi()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=pi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Lt(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=h!==m,g=this.getStack(),v=!g||g.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(u2));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const E=T/1e3;J0(d.x,s.x,E),J0(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($l(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c2(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&B_(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Ln(x,this.relativeTarget)),y&&(this.animationValues=u,W_(u,c,this.latestValues,E,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{jl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zr(0)),this.motionValue.jump(0,!1),this.currentAnimation=G0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(X_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&ow(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=tn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=tn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Ln(a,l),mi(a,u),Cs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Z_),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Kf("z",s,c,this.animationValues);for(let u=0;u<Yf.length;u++)Kf(`rotate${Yf[u]}`,s,c,this.animationValues),Kf(`skew${Yf[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=zl(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=zl(a?.pointerEvents)||""),this.hasProjected&&!vo(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=R_(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:h}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Uf){if(u[m]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:v}=Uf[m],b=d==="none"?u[m]:y(u[m],c);if(g){const x=g.length;for(let T=0;T<x;T++)s[g[T]]=b}else v?this.options.visualElement.renderState.vars[m]=b:s[m]=b}this.options.layoutId&&(s.pointerEvents=c===this?zl(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Z0),this.root.sharedNodes.clear()}}}function J_(e){e.updateLayout()}function e2(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?tr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=tn(d);d.min=n[u].min,d.max=d.min+f}):ow(o,t.layoutBox,n)&&tr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=tn(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const s=pi();Cs(s,n,t.layoutBox);const a=pi();i?Cs(a,e.applyTransform(r,!0),t.measuredBox):Cs(a,n,t.layoutBox);const l=!L0(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=Lt();$l(h,t.layoutBox,d.layoutBox);const m=Lt();$l(m,n,f.layoutBox),z0(h,m)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function t2(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function n2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function r2(e){e.clearSnapshot()}function Z0(e){e.clearMeasurements()}function X0(e){e.isLayoutDirty=!1}function o2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Q0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function i2(e){e.resolveTargetDelta()}function s2(e){e.calcProjection()}function a2(e){e.resetSkewAndRotation()}function l2(e){e.removeLeadSnapshot()}function J0(e,t,n){e.translate=bt(t.translate,0,n),e.scale=bt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ew(e,t,n,r){e.min=bt(t.min,n.min,r),e.max=bt(t.max,n.max,r)}function c2(e,t,n,r){ew(e.x,t.x,n.x,r),ew(e.y,t.y,n.y,r)}function u2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const d2={duration:.45,ease:[.4,0,.1,1]},tw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nw=tw("applewebkit/")&&!tw("chrome/")?Math.round:Sn;function rw(e){e.min=nw(e.min),e.max=nw(e.max)}function f2(e){rw(e.x),rw(e.y)}function ow(e,t,n){return e==="position"||e==="preserve-aspect"&&!L_(j0(t),j0(n),.2)}function p2(e){return e!==e.root&&e.scroll?.wasRoot}const h2=K0({attachResizeListener:(e,t)=>ks(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),m2=e=>!e.isLayoutDirty&&e.willUpdate(!1);function iw(){const e=new Set,t=new WeakMap,n=()=>e.forEach(m2);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const Zf={current:void 0},sw=K0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zf.current){const e=new h2({});e.mount(window),e.setOptions({layoutScroll:!0}),Zf.current=e}return Zf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function aw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function g2(...e){return t=>{let n=!1;const r=e.map(o=>{const i=aw(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():aw(e[o],null)}}}}function y2(...e){return P.useCallback(g2(...e),e)}class v2 extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=Ff(r)&&r.offsetWidth||0,i=Ff(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function b2({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:i}){const s=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=S.useContext(xo),u=e.props?.ref??e?.ref,d=y2(a,u);return S.useInsertionEffect(()=>{const{width:f,height:h,top:m,left:y,right:g,bottom:v}=l.current;if(t||i===!1||!a.current||!f||!h)return;const b=n==="left"?`left: ${y}`:`right: ${g}`,x=r==="bottom"?`bottom: ${v}`:`top: ${m}`;a.current.dataset.motionPopId=s;const T=document.createElement("style");c&&(T.nonce=c);const E=o??document.head;return E.appendChild(T),T.sheet&&T.sheet.insertRule(`
8
8
  [data-motion-pop-id="${s}"] {
9
9
  position: absolute !important;
10
10
  width: ${f}px !important;
11
- height: ${p}px !important;
11
+ height: ${h}px !important;
12
12
  ${b}px !important;
13
13
  ${x}px !important;
14
14
  }
15
- `),()=>{E.contains(T)&&E.removeChild(T)}},[t]),h.jsx(y2,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:P.cloneElement(e,{ref:d})})}const b2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,anchorY:l,root:c})=>{const u=Qn(x2),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:g=>{u.set(g,!0);for(const y of u.values())if(!y)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((g,y)=>u.set(y,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=h.jsx(v2,{pop:s==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),h.jsx(bl.Provider,{value:p,children:e})};function x2(){return new Map}function sw(e=!0){const t=S.useContext(bl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const s=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const zl=e=>e.key||"";function aw(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const gn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=sw(s),f=S.useMemo(()=>aw(e),[e]),p=s&&!u?[]:f.map(zl),g=S.useRef(!0),y=S.useRef(f),m=Qn(()=>new Map),v=S.useRef(new Set),[b,x]=S.useState(f),[T,E]=S.useState(f);vl(()=>{g.current=!1,y.current=f;for(let k=0;k<T.length;k++){const A=zl(T[k]);p.includes(A)?(m.delete(A),v.current.delete(A)):m.get(A)!==!0&&m.set(A,!1)}},[T,p.length,p.join("-")]);const I=[];if(f!==b){let k=[...f];for(let A=0;A<T.length;A++){const O=T[A],_=zl(O);p.includes(_)||(k.splice(A,0,O),I.push(O))}return i==="wait"&&I.length&&(k=I),E(aw(k)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(fs);return h.jsx(h.Fragment,{children:T.map(k=>{const A=zl(k),O=s&&!u?!1:f===T||p.includes(A),_=()=>{if(v.current.has(A))return;if(v.current.add(A),m.has(A))m.set(A,!0);else return;let N=!0;m.forEach($=>{$||(N=!1)}),N&&(w?.(),E(y.current),s&&d?.(),r&&r())};return h.jsx(b2,{isPresent:O,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:O?void 0:_,anchorX:a,anchorY:l,children:k},A)})})},w2=S.createContext(null);function S2(){const e=S.useRef(!1);return vl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function T2(){const e=S2(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ht.postRender(r),[r]),t]}const lw=e=>e===!0,E2=e=>lw(e===!0)||e==="id",k2=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(fs),o=S.useContext(w2),[i,s]=T2(),a=S.useRef(null),l=r.id||o;a.current===null&&(E2(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:lw(n)&&r.group||rw()});const c=S.useMemo(()=>({...a.current,forceRender:i}),[s]);return h.jsx(fs.Provider,{value:c,children:e})},cw=S.createContext({strict:!1}),uw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let dw=!1;function C2(){if(dw)return;const e={};for(const t in uw)e[t]={isEnabled:n=>uw[t].some(r=>!!n[r])};Jx(e),dw=!0}function fw(){return C2(),l_()}function I2(e){const t=fw();for(const n in e)t[n]={...t[n],...e[n]};Jx(t)}const A2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function jl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||A2.has(e)}let pw=e=>!jl(e);function hw(e){typeof e=="function"&&(pw=t=>t.startsWith("on")?!jl(t):e(t))}try{hw(require("@emotion/is-prop-valid").default)}catch{}function P2(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(pw(o)||n===!0&&jl(o)||!t&&!jl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Yf({children:e,isValidProp:t,...n}){t&&hw(t);const r=S.useContext(xo);n={...r,...n},n.transition=bf(n.transition,r.transition),n.isStatic=Qn(()=>n.isStatic);const o=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return h.jsx(xo.Provider,{value:o,children:e})}const Bl=S.createContext({});function O2(e,t){if(Nl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ts(n)?n:void 0,animate:Ts(r)?r:void 0}}return e.inherit!==!1?t:{}}function D2(e){const{initial:t,animate:n}=O2(e,S.useContext(Bl));return S.useMemo(()=>({initial:t,animate:n}),[mw(t),mw(n)])}function mw(e){return Array.isArray(e)?e.join(" "):e}const Kf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gw(e,t,n){for(const r in t)!zt(t[r])&&!p0(r,n)&&(e[r]=t[r])}function N2({transformTemplate:e},t){return S.useMemo(()=>{const n=Kf();return Rf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function M2(e,t){const n=e.style||{},r={};return gw(r,n,e),Object.assign(r,N2(e,t)),r}function _2(e,t){const n={},r=M2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const yw=()=>({...Kf(),attrs:{}});function F2(e,t,n,r){const o=S.useMemo(()=>{const i=yw();return m0(i,t,y0(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};gw(i,e.style,e),o.style={...i,...o.style}}return o}const L2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Zf(e){return typeof e!="string"||e.includes("-")?!1:!!(L2.indexOf(e)>-1||/[A-Z]/u.test(e))}function V2(e,t,n,{latestValues:r},o,i=!1,s){const l=(s??Zf(e)?F2:_2)(t,r,o,e),c=P2(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>zt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function $2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:z2(n,r,o,e),renderState:t()}}function z2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Vl(i[f]);let{initial:s,animate:a}=e;const l=Nl(e),c=Zx(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!Dl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const g=Sf(e,f[p]);if(g){const{transitionEnd:y,transition:m,...v}=g;for(const b in v){let x=v[b];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[b]=x)}for(const b in y)o[b]=y[b]}}}return o}const vw=e=>(t,n)=>{const r=S.useContext(Bl),o=S.useContext(bl),i=()=>$2(e,t,r,o);return n?i():Qn(i)},j2=vw({scrapeMotionValuesFromProps:Wf,createRenderState:Kf}),B2=vw({scrapeMotionValuesFromProps:v0,createRenderState:yw}),R2=Symbol.for("motionComponentSymbol");function H2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=r.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(o.current=a)}else o.current?(o.current(),o.current=null):s(i);else s&&(s.current=i)},[t])}const bw=S.createContext({});function gi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function W2(e,t,n,r,o,i){const{visualElement:s}=S.useContext(Bl),a=S.useContext(cw),l=S.useContext(bl),c=S.useContext(xo),u=c.reducedMotion,d=c.skipAnimations,f=S.useRef(null),p=S.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const g=f.current,y=S.useContext(bw);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&q2(f.current,n,o,y);const m=S.useRef(!1);S.useInsertionEffect(()=>{g&&m.current&&g.update(n,l)});const v=n[Ox],b=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return vl(()=>{p.current=!0,g&&(m.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),S.useEffect(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),b.current=!1),g.enteringChildren=void 0)}),g}function q2(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:xw(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&gi(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function xw(e){if(e)return e.options.allowProjection!==!1?e.projection:xw(e.parent)}function Xf(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&I2(r);const i=n?n==="svg":Zf(e),s=i?B2:j2;function a(c,u){let d;const f={...S.useContext(xo),...c,layoutId:U2(c)},{isStatic:p}=f,g=D2(c),y=s(c,p);if(!p&&Sb){G2(f,r);const m=Y2(f);d=m.MeasureLayout,g.visualElement=W2(e,y,f,o,m.ProjectionNode,i)}return h.jsxs(Bl.Provider,{value:g,children:[d&&g.visualElement?h.jsx(d,{visualElement:g.visualElement,...f}):null,V2(e,c,H2(y,g.visualElement,u),y,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(a);return l[R2]=e,l}function U2({layoutId:e}){const t=S.useContext(fs).id;return t&&e!==void 0?t+"-"+e:e}function G2(e,t){const n=S.useContext(cw).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?oi(!1,r,"lazy-strict-mode"):hn(!1,r,"lazy-strict-mode")}}function Y2(e){const t=fw(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function K2(e,t){if(typeof Proxy>"u")return Xf;const n=new Map,r=(i,s)=>Xf(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&xl(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,Xf(s,void 0,e,t)),n.get(s))})}const Z2=(e,t)=>t.isSVG??Zf(e)?new b0(t):new h0(t,{allowProjection:e!==S.Fragment});class X2 extends jr{constructor(t){super(t),t.animationState||(t.animationState=P_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Dl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Q2=0;class J2 extends jr{constructor(){super(...arguments),this.id=Q2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const eF={animation:{Feature:X2},exit:{Feature:J2}};function Is(e){return{point:{x:e.pageX,y:e.pageY}}}const tF=e=>t=>_f(t)&&e(t,Is(t));function As(e,t,n,r){return Cs(e,t,tF(n),r)}const ww=({current:e})=>e?e.ownerDocument.defaultView:null,Sw=(e,t)=>Math.abs(e-t);function nF(e,t){const n=Sw(e.x,t.x),r=Sw(e.y,t.y);return Math.sqrt(n**2+r**2)}const Tw=new Set(["auto","scroll"]);class Ew{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Jf(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=nF(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:m}=p,{timestamp:v}=Yt;this.history.push({...m,timestamp:v});const{onStart:b,onMove:x}=this.handlers;g||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Qf(g,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:y,onSessionEnd:m,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Jf(p.type==="pointercancel"?this.lastMoveEventInfo:Qf(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,b),m&&m(p,b)},!_f(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const l=Is(t),c=Qf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Jf(c,this.history)),this.removeListeners=ps(As(this.contextWindow,"pointermove",this.handlePointerMove),As(this.contextWindow,"pointerup",this.handlePointerUp),As(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Tw.has(r.overflowX)||Tw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),br(this.updatePoint)}}function Qf(e,t){return t?{point:t(e.point)}:e}function kw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jf({point:e},t){return{point:e,delta:kw(e,Cw(t)),offset:kw(e,rF(t)),velocity:oF(t,.1)}}function rF(e){return e[0]}function Cw(e){return e[e.length-1]}function oF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Cw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>mn(t)*2&&(r=e[1]);const i=Tn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function iF(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?vt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?vt(n,e,r.max):Math.min(e,n)),e}function Iw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function sF(e,{top:t,left:n,bottom:r,right:o}){return{x:Iw(e.x,n,o),y:Iw(e.y,t,r)}}function Aw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function aF(e,t){return{x:Aw(e.x,t.x),y:Aw(e.y,t.y)}}function lF(e,t){let n=.5;const r=tn(e),o=tn(t);return o>r?n=ii(t.min,t.max-r,e.min):r>o&&(n=ii(e.min,e.max-o,t.min)),Jn(0,1,n)}function cF(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ep=.35;function uF(e=ep){return e===!1?e=0:e===!0&&(e=ep),{x:Pw(e,"left","right"),y:Pw(e,"top","bottom")}}function Pw(e,t,n){return{min:Ow(e,t),max:Ow(e,n)}}function Ow(e,t){return typeof e=="number"?e:e[t]||0}const dF=new WeakMap;class fF{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Is(d).point),this.stopAnimation()},s=(d,f)=>{const{drag:p,dragPropagation:g,onDragStart:y}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$M(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tr(v=>{let b=this.getAxisMotionValue(v).get()||0;if(er.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[v];T&&(b=tn(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),y&&ht.update(()=>y(d,f),!1,!0),Ef(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:y,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(g&&this.currentDirection===null){this.currentDirection=hF(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),m&&ht.update(()=>m(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ew(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:ww(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&ht.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Rl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=iF(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&gi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=sF(r.layoutBox,t):this.constraints=!1,this.elastic=uF(n),o!==this.constraints&&!gi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&tr(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=cF(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gi(t))return!1;const r=t.current;hn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=f_(r,o.root,this.visualElement.getTransformPagePoint());let s=aF(o.layout.layoutBox,i);if(n){const a=n(c_(s));this.hasMutatedConstraints=!!a,a&&(s=n0(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=tr(u=>{if(!Rl(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ef(this.visualElement,t),r.start(wf(t,r,0,n,this.visualElement,!1))}stopAnimation(){tr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){tr(n=>{const{drag:r}=this.getProps();if(!Rl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-vt(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gi(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};tr(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=lF({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),tr(s=>{if(!Rl(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(vt(l,c,o[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;dF.set(this.visualElement,this);const t=this.visualElement.current,n=As(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,p=f!==t&&WM(f);u&&d&&!p&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();gi(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=pF(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ht.read(o);const a=Cs(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(tr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=ep,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Dw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function pF(e,t,n){const r=Ux(e,Dw(n)),o=Ux(t,Dw(n));return()=>{r(),o()}}function Rl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hF(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class mF extends jr{constructor(t){super(t),this.removeGroupControls=Sn,this.removeListeners=Sn,this.controls=new fF(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Sn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const tp=e=>(t,n)=>{e&&ht.update(()=>e(t,n),!1,!0)};class gF extends jr{constructor(){super(...arguments),this.removePointerDownListener=Sn}onPointerDown(t){this.session=new Ew(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ww(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:tp(t),onStart:tp(n),onMove:tp(r),onEnd:(i,s)=>{delete this.session,o&&ht.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=As(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let np=!1;class yF extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),np&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),$l.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),np=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||ht.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Mf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;np=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Nw(e){const[t,n]=sw(),r=S.useContext(fs);return h.jsx(yF,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(bw),isPresent:t,safeToRemove:n})}const vF={pan:{Feature:gF},drag:{Feature:mF,ProjectionNode:ow,MeasureLayout:Nw}};function Mw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&ht.postRender(()=>i(t,Is(t)))}class bF extends jr{mount(){const{current:t}=this.node;t&&(this.unmount=jM(t,(n,r)=>(Mw(this.node,r,"Start"),o=>Mw(this.node,o,"End"))))}unmount(){}}class xF extends jr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ps(Cs(this.node.current,"focus",()=>this.onFocus()),Cs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _w(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&ht.postRender(()=>i(t,Is(t)))}class wF extends jr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=UM(t,(o,i)=>(_w(this.node,i,"Start"),(s,{success:a})=>_w(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const rp=new WeakMap,op=new WeakMap,SF=e=>{const t=rp.get(e.target);t&&t(e)},TF=e=>{e.forEach(SF)};function EF({root:e,...t}){const n=e||document;op.has(n)||op.set(n,{});const r=op.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(TF,{root:e,...t})),r[o]}function kF(e,t,n){const r=EF(t);return rp.set(e,n),r.observe(e),()=>{rp.delete(e),r.unobserve(e)}}const CF={some:0,all:1};class IF extends jr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:CF[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return kF(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(AF(t,n))&&this.startObserver()}unmount(){}}function AF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const PF={...eF,...{inView:{Feature:IF},tap:{Feature:wF},focus:{Feature:xF},hover:{Feature:bF}},...vF,...{layout:{ProjectionNode:ow,MeasureLayout:Nw}}},He=K2(PF,Z2);function OF(e){return S.useEffect(()=>()=>e(),[])}function wo(e){const t=Qn(()=>zr(e)),{isStatic:n}=S.useContext(xo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Fw(e,t){const n=wo(t()),r=()=>n.set(t());return r(),vl(()=>{const o=()=>ht.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),br(r)}}),n}function DF(e){ws.current=[],e();const t=Fw(ws.current,e);return ws.current=void 0,t}function NF(e,t,n,r){if(typeof e=="function")return DF(e);const i=typeof t=="function"?t:r_(t,n,r),s=Array.isArray(e)?Lw(e,i):Lw([e],([l])=>i(l)),a=Array.isArray(e)?void 0:e.accelerate;return a&&!a.isTransformed&&typeof t!="function"&&Array.isArray(n)&&r?.clamp!==!1&&(s.accelerate={...a,times:t,keyframes:n,isTransformed:!0}),s}function Lw(e,t){const n=Qn(()=>[]);return Fw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function MF(){!$f.current&&Xx();const[e]=S.useState(Ml.current);return process.env.NODE_ENV!=="production"&&xl(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),e}function _F(){const e=MF(),{reducedMotion:t}=S.useContext(xo);return t==="never"?!1:t==="always"?!0:e}function ip(e){return typeof e=="object"&&!Array.isArray(e)}function Vw(e,t,n,r){return e==null?[]:typeof e=="string"&&ip(t)?Df(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function FF(e,t,n){return e*(t+1)}function $w(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function LF(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ri(e,o),r--)}}function VF(e,t,n,r,o,i){LF(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:vt(o,i,r[s]),easing:zb(n,s)})}function $F(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function zF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const jF="easeInOut",BF=20;function RF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,s=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const g=e[p];if(typeof g=="string"){c.set(g,d);continue}else if(!Array.isArray(g)){c.set(g.name,$w(d,g.at,u,c));continue}let[y,m,v={}]=g;v.at!==void 0&&(d=$w(d,v.at,u,c));let b=0;const x=(T,E,I,w=0,k=0)=>{const A=HF(T),{delay:O=0,times:_=cx(A),type:N=t.type||"keyframes",repeat:$,repeatType:D,repeatDelay:F=0,...z}=E;let{ease:M=t.ease||"easeOut",duration:C}=E;const V=typeof O=="function"?O(w,k):O,L=A.length,R=gf(N)?N:o?.[N||"keyframes"];if(L<=2&&R){let ee=100;if(L===2&&UF(A)){const q=A[1]-A[0];ee=Math.abs(q)}const se={...t,...z};C!==void 0&&(se.duration=mn(C));const te=ox(se,ee,R);M=te.ease,C=te.duration}C??(C=i);const U=d+V;_.length===1&&_[0]===0&&(_[1]=1);const G=_.length-A.length;if(G>0&&lx(_,G),A.length===1&&A.unshift(null),$){hn($<BF,"Repeat count too high, must be less than 20","repeat-count-high"),C=FF(C,$);const ee=[...A],se=[..._];M=Array.isArray(M)?[...M]:[M];const te=[...M];for(let q=0;q<$;q++){A.push(...ee);for(let Y=0;Y<ee.length;Y++)_.push(se[Y]+(q+1)),M.push(Y===0?"linear":zb(te,Y-1))}$F(_,$)}const H=U+C;VF(I,A,M,_,U,H),b=Math.max(V+C,b),f=Math.max(H,f)};if(zt(y)){const T=zw(y,a);x(m,v,jw("default",T))}else{const T=Vw(y,m,r,l),E=T.length;for(let I=0;I<E;I++){m=m,v=v;const w=T[I],k=zw(w,a);for(const A in m)x(m[A],WF(v,A),jw(A,k),I,E)}}u=d,d+=b}return a.forEach((p,g)=>{for(const y in p){const m=p[y];m.sort(zF);const v=[],b=[],x=[];for(let w=0;w<m.length;w++){const{at:k,value:A,easing:O}=m[w];v.push(A),b.push(ii(0,f,k)),x.push(O||"easeOut")}b[0]!==0&&(b.unshift(0),v.unshift(v[0]),x.unshift(jF)),b[b.length-1]!==1&&(b.push(1),v.push(null)),s.has(g)||s.set(g,{keyframes:{},transition:{}});const T=s.get(g);T.keyframes[y]=v;const{type:E,...I}=t;T.transition[y]={...I,duration:f,ease:x,times:b,...n}}}),s}function zw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function jw(e,t){return t[e]||(t[e]=[]),t[e]}function HF(e){return Array.isArray(e)?e:[e]}function WF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const qF=e=>typeof e=="number",UF=e=>e.every(qF);function GF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Il(e)&&!Gx(e)?new b0(t):new h0(t);n.mount(e),Ss.set(e,n)}function YF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new b_(t);n.mount(e),Ss.set(e,n)}function KF(e,t){return zt(e)||typeof e=="number"||typeof e=="string"&&!ip(t)}function Bw(e,t,n,r){const o=[];if(KF(e,t))o.push(q0(e,ip(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=Vw(e,t,r),s=i.length;hn(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=i[a],c=l instanceof Element?GF:YF;Ss.has(l)||c(l);const u=Ss.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),o.push(...Cf(u,{...t,transition:d},{}))}}return o}function ZF(e,t,n){const r=[],o=e.map(s=>{if(Array.isArray(s)&&typeof s[0]=="function"){const a=s[0],l=zr(0);return l.on("change",a),s.length===1?[l,[0,1]]:s.length===2?[l,[0,1],s[1]]:[l,s[1],s[2]]}return s});return RF(o,t,n,{spring:bs}).forEach(({keyframes:s,transition:a},l)=>{r.push(...Bw(l,s,a))}),r}function XF(e){return Array.isArray(e)&&e.some(Array.isArray)}function Rw(e={}){const{scope:t,reduceMotion:n}=e;function r(o,i,s){let a=[],l;if(XF(o))a=ZF(o,n!==void 0?{reduceMotion:n,...i}:i,t);else{const{onComplete:u,...d}=s||{};typeof u=="function"&&(l=u),a=Bw(o,i,n!==void 0?{reduceMotion:n,...d}:d,t)}const c=new sM(a);return l&&c.finished.then(l),t&&(t.animations.push(c),c.finished.then(()=>{ri(t.animations,c)})),c}return r}const Hw=Rw();function QF(){const e=Qn(()=>({current:null,animations:[]})),t=_F()??void 0,n=S.useMemo(()=>Rw({scope:e,reduceMotion:t}),[e,t]);return OF(()=>{e.animations.forEach(r=>r.stop()),e.animations.length=0}),[e,n]}class JF{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const eL=()=>new JF;function tL(){return Qn(eL)}const Ww=S.createContext(null);function nL(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=vt(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?zD(e,o,o+i):e}function rL({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Qn(()=>He[t]),l=[],c=S.useRef(!1),u=S.useRef(null);hn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(g,y)=>{const m=l.findIndex(v=>g===v.value);m!==-1?l[m].layout=y[n]:l.push({value:g,layout:y[n]}),l.sort(iL)},updateOrder:(g,y,m)=>{if(c.current)return;const v=nL(l,g,y,m);l!==v&&(c.current=!0,r(v.map(oL).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=g=>{u.current=g,typeof s=="function"?s(g):s&&(s.current=g)},p={overflowAnchor:"none",...i.style};return h.jsx(a,{...i,style:p,ref:f,ignoreStrict:!0,children:h.jsx(Ww.Provider,{value:d,children:e})})}const qw=S.forwardRef(rL);function oL(e){return e.value}function iL(e,t){return e.layout.min-t.layout.min}const Hl=50,Uw=25,sL=new Set(["auto","scroll"]),Ps=new WeakMap,Os=new WeakMap;let Ds=null;function aL(){if(Ds){const e=sp(Ds,"y");e&&(Os.delete(e),Ps.delete(e));const t=sp(Ds,"x");t&&t!==e&&(Os.delete(t),Ps.delete(t)),Ds=null}}function lL(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY,o=e===document.body||e===document.documentElement;return sL.has(r)||o}function sp(e,t){let n=e?.parentElement;for(;n;){if(lL(n,t))return n;n=n.parentElement}return null}function cL(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?Math.max(0,r.left):Math.max(0,r.top),i=n==="x"?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),s=e-o,a=i-e;if(s<Hl){const l=1-s/Hl;return{amount:-Uw*l*l,edge:"start"}}else if(a<Hl){const l=1-a/Hl;return{amount:Uw*l*l,edge:"end"}}return{amount:0,edge:null}}function uL(e,t,n,r){if(!e)return;Ds=e;const o=sp(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=cL(i,o,n);if(a===null){Os.delete(o),Ps.delete(o);return}const l=Os.get(o),c=o===document.body||o===document.documentElement;if(l!==a){if(!(a==="start"&&r<0||a==="end"&&r>0))return;Os.set(o,a);const d=n==="x"?o.scrollWidth-(c?window.innerWidth:o.clientWidth):o.scrollHeight-(c?window.innerHeight:o.clientHeight);Ps.set(o,d)}if(s>0){const u=Ps.get(o);if((n==="x"?c?window.scrollX:o.scrollLeft:c?window.scrollY:o.scrollTop)>=u)return}n==="x"?c?window.scrollBy({left:s}):o.scrollLeft+=s:c?window.scrollBy({top:s}):o.scrollTop+=s}function Gw(e,t=0){return zt(e)?e:wo(t)}function dL({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:s=!0,...a},l){const c=Qn(()=>He[r]),u=S.useContext(Ww),d={x:Gw(t.x),y:Gw(t.y)},f=NF([d.x,d.y],([v,b])=>v||b?1:"unset");hn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:g,updateOrder:y,groupRef:m}=u;return h.jsx(c,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:s,onDrag:(v,b)=>{const{velocity:x,point:T}=b,E=d[p].get();y(n,E,x[p]),uL(m.current,T[p],p,x[p]),o&&o(v,b)},onDragEnd:(v,b)=>{aL(),i&&i(v,b)},onLayoutMeasure:v=>{g(n,v)},ref:l,ignoreStrict:!0,children:e})}const Yw=S.forwardRef(dL);var Wl={exports:{}},ap={},ql={exports:{}},lp={};var Kw;function fL(){if(Kw)return lp;Kw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var p=f(),g=r({inst:{value:p,getSnapshot:f}}),y=g[0].inst,m=g[1];return i(function(){y.value=p,y.getSnapshot=f,l(y)&&m({inst:y})},[d,p,f]),o(function(){return l(y)&&m({inst:y}),d(function(){l(y)&&m({inst:y})})},[d]),s(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return lp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,lp}var cp={};var Zw;function pL(){return Zw||(Zw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function t(p,g){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=g();if(!d){var m=g();i(y,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=s({inst:{value:y,getSnapshot:g}});var v=m[0].inst,b=m[1];return l(function(){v.value=y,v.getSnapshot=g,n(v)&&b({inst:v})},[p,y,g]),a(function(){return n(v)&&b({inst:v}),p(function(){n(v)&&b({inst:v})})},[p]),c(y),y}function n(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!i(p,y)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;cp.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),cp}var Xw;function up(){return Xw||(Xw=1,process.env.NODE_ENV==="production"?ql.exports=fL():ql.exports=pL()),ql.exports}var Qw;function hL(){if(Qw)return ap;Qw=1;var e=S,t=up();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return ap.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=a(function(){function v(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&y.hasValue){var w=y.value;if(p(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,T=k)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,p]);var m=o(c,g[0],g[1]);return s(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},ap}var dp={};var Jw;function mL(){return Jw||(Jw=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=up(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;dp.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=a(function(){function v(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&y.hasValue){var w=y.value;if(p(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,T=k)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,p]);var m=o(c,g[0],g[1]);return s(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),dp}var e1;function gL(){return e1||(e1=1,process.env.NODE_ENV==="production"?Wl.exports=hL():Wl.exports=mL()),Wl.exports}var yL=gL(),vL=up(),yi=function(){return yi=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},yi.apply(this,arguments)};function Ns(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function t1(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 vi=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},bL=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},xL=function(e){return Object.entries(e)},n1=function(e){return e instanceof Promise},r1=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)},yi(yi({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},wL=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=performance.now(),c=t.apply(void 0,t1([],Ns(s),!1)),u=function(d,f){return n(function(p){return r1(d,p,i,f)})};return n1(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))}},SL=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,t1([],Ns(s),!1)),c=function(u){return n(function(d){return r1(u,d,i,o.current)})};return n1(l)?l.then(function(u){return c(u)}):c(l)}},fp=function(e,t,n){var r,o,i,s=Ns(S.useState(function(){return e}),2),a=s[0],l=s[1],c=vi(a),u=vi((r=n?.props)!==null&&r!==void 0?r:{}),d=vi(t),f=vi((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=vi((i=n?.interceptor)!==null&&i!==void 0?i:[]),g=S.useRef(e),y=bL(a),m=vi(y),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;f.current.forEach(function(E){E(a,y,T)})}},[a,f,y]);var b=Ns(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:g.current,previousState:function(){return m.current}});return xL(E).reduce(function(I,w){var k,A=Ns(w,2),O=A[0],_=A[1];return yi(yi({},I),(k={},k[O]=n?.debug?wL(O,_,l,T,v,p.current):SL(O,_,l,T,v,p.current),k))},{})}),1),x=b[0];return[a,x,u.current]},TL=Object.defineProperty,o1=Object.getOwnPropertySymbols,EL=Object.prototype.hasOwnProperty,kL=Object.prototype.propertyIsEnumerable,i1=(e,t,n)=>t in e?TL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CL=(e,t)=>{for(var n in t||(t={}))EL.call(t,n)&&i1(e,n,t[n]);if(o1)for(var n of o1(t))kL.call(t,n)&&i1(e,n,t[n]);return e},pp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},IL=(e,t,n,r)=>Gl(pp,e,t,n,r),bi=e=>typeof e=="object",Br=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!bi(e)&&!bi(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=>Br(e[r],t[r]))},AL=(e,t)=>(bi(e)||Array.isArray(e))&&t?e[t]:e,PL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ul=e=>/[0-9.]+/.test(e),s1=e=>["string","number"].includes(typeof e),a1=e=>e==null||e?.length===0||e==="",l1={eq:Br,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:a1,notEmpty:e=>!a1(e),in:(e,t)=>pp(t,n=>Br(e,n)),notIn:(e,t)=>c1(t,n=>!Br(e,n))},OL=e=>{if(e in l1)return l1[e];throw new Error("Linq - Symbol not found")},xi=(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},Gl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=OL(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},DL=(e,t,n,r)=>Gl(xi,e,t,n,r),c1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},NL=(e,t,n,r)=>Gl(c1,e,t,n,r),u1=e=>{if(e===null)return null;const t=CL({},e);return Object.keys(t).forEach(n=>t[n]=bi(e[n])?u1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},d1=(e,t)=>{if(bi(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Br(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Br(t,r))return!0}return!1},ML=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},_L=e=>xi(e,(t,n,r)=>bi(t)?n===r.findIndex(o=>Br(o,t)):n===r.indexOf(t)),FL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},f1=(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())},LL=(e,t)=>f1(e,n=>n[t]),p1=(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},VL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},$L=(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 Ul(e)&&Ul(t)?r.map(s=>Number.parseInt(s)):r},hp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ul(e)&&Ul(t)){const o=[],[i,s]=VL(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return $L(e,t,r)},zL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?hp(r,o,1):hp(r,i,Number.parseInt(o,10))}return s1(e)&&s1(t)?hp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},mp=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},h1=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},jL=(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)},BL=(e,t,n,r)=>Gl(jL,e,t,n,r),m1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(PL(t))},g1=(e=>(e.Asc="asc",e.Desc="desc",e))(g1||{}),RL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),HL=(e,t)=>e.sort(RL(t)),WL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:xi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},qL=class pm{constructor(t=[]){this.array=t}static Range(...t){return zL(...t)}static New(t){return new pm(t)}Where(t,n,r){return this.array=DL(this.array,t,n,r),this}Some(t,n,r){return IL(this.array,t,n,r)}All(t,n,r){return NL(this.array,t,n,r)}Reverse(){return this.array=h1(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=BL(this.array,t,n,r),this}Distinct(){return this.array=_L(this.array),this}First(t){return t===void 0?this.array[0]:FL(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?mp((n,r)=>n+r,0,this.array):mp((n,r)=>n+AL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return LL(this.array,t)}GroupWith(t){return f1(this.array,t)}Except(t){return xi(this.array,n=>!d1(t,n))}Intersect(t){return xi(this.array,n=>d1(t,n))}OrderBy(t,n){let r;return r=t?m1(this.array,t):this.array.toSorted(),this.array=n==="desc"?h1(r):r,this}Includes(t){return pp(this.array,n=>Br(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 mp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(p1(this.array,n=>[t,n]))}Zip(t,n){return p1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:xi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new pm(u1(this.array))}ToObject(t){return ML(this.array,t)}Sort(t){return Array.isArray(t)?HL(this.array,t):m1(this.array,t)}Unique(t){return WL(this.array,t)}},y1=qL;const Yl=0,Rr=1,wi=2,v1=4;function b1(e){return()=>e}function UL(e){e()}function Ms(e,t){return n=>e(t(n))}function x1(e,t){return()=>e(t)}function GL(e,t){return n=>e(t,n)}function gp(e){return e!==void 0}function YL(...e){return()=>{e.map(UL)}}function Si(){}function Kl(e,t){return t(e),e}function KL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Rr,t)}function ze(e,t){e(Yl,t)}function yp(e){e(wi)}function Et(e){return e(v1)}function Ae(e,t){return st(e,GL(t,Yl))}function Vn(e,t){const n=e(Rr,r=>{n(),t(r)});return n}function w1(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function S1(e,t){return e===t}function xt(e=S1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function De(e){return t=>n=>{e(n)&&t(n)}}function we(e){return t=>Ms(t,e)}function nr(e){return t=>()=>{t(e)}}function fe(e,...t){const n=ZL(...t);return((r,o)=>{switch(r){case wi:yp(e);return;case Rr:return st(e,n(o))}})}function rr(e,t){return n=>r=>{n(t=e(t,r))}}function So(e){return t=>n=>{e>0?e--:t(n)}}function xr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function We(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);st(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>{i([s].concat(t))};n===o?a():r=a}}function ZL(...e){return t=>e.reduceRight(KL,t)}function XL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Rr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),Si);case wi:r(),n=null;return}}}function ge(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Yl:t=o;break;case Rr:{o(t);break}case v1:return t}return n(r,o)})}function Xt(e,t){return Kl(ge(t),n=>Ae(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Yl:e.slice().forEach(r=>{r(n)});return;case wi:e.splice(0,e.length);return;case Rr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function yn(e){return Kl(Ke(),t=>Ae(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:QL(),singleton:n}}const QL=()=>Symbol();function JL(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const a=r(o.map(l=>n(l)));return s&&t.set(i,a),a};return n(e)}function Vt(...e){const t=Ke(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);st(i,l=>{n[s]=l,r=r|a,r===o&&ze(t,n)})}),function(i,s){switch(i){case wi:{yp(t);return}case Rr:return r===o&&s(n),st(t,s)}}}function Ne(e,t=S1){return fe(e,xt(t))}function vp(...e){return function(t,n){switch(t){case wi:return;case Rr:return YL(...e.map(r=>st(r,n)))}}}var cn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(cn||{});const eV={0:"debug",3:"error",1:"log",2:"warn"},tV=()=>typeof globalThis>"u"?window:globalThis,Hr=Qe(()=>{const e=ge(3);return{log:ge((t,n,r=1)=>{var o;const i=(o=tV().VIRTUOSO_LOG_LEVEL)!=null?o:Et(e);r>=i&&console[eV[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function or(e,t,n){return bp(e,t,n).callbackRef}function bp(e,t,n){const r=S.useRef(null);let o=s=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return o=s=>{s&&t?(i?.observe(s),r.current=s):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function T1(e,t,n,r,o,i,s,a,l){const c=S.useCallback(u=>{const d=nV(u.children,t,a?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let g;p&&(g=f.ownerDocument.defaultView);const y=s?a?s.scrollLeft:s.scrollTop:p?a?g.scrollX||g.document.documentElement.scrollLeft:g.scrollY||g.document.documentElement.scrollTop:a?f.scrollLeft:f.scrollTop,m=s?a?s.scrollWidth:s.scrollHeight:p?a?g.document.documentElement.scrollWidth:g.document.documentElement.scrollHeight:a?f.scrollWidth:f.scrollHeight,v=s?a?s.offsetWidth:s.offsetHeight:p?a?g.innerWidth:g.innerHeight:a?f.offsetWidth:f.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(y,0),viewportHeight:v}),i?.(a?E1("column-gap",getComputedStyle(u).columnGap,o):E1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,s,r,a]);return bp(c,n,l)}function nV(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},cn.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 E1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,cn.WARN),t==="normal"?0:parseInt(t??"0",10)}function xp(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),g=c.top-p.top;f=p.height-Math.max(0,g),d=g+t.scrollTop}else{const p=s.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:s}=bp(o,!0,n),a=S.useCallback(()=>{o(s.current)},[o,s]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",a);const c=new ResizeObserver(()=>{requestAnimationFrame(a)});return c.observe(t),()=>{t.removeEventListener("scroll",a),c.unobserve(t)}}else{const c=(l=s.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",a),c?.addEventListener("resize",a),()=>{c?.removeEventListener("scroll",a),c?.removeEventListener("resize",a)}}},[a,t,s]),i}const nn=Qe(()=>{const e=Ke(),t=Ke(),n=ge(0),r=Ke(),o=ge(0),i=Ke(),s=Ke(),a=ge(0),l=ge(0),c=ge(0),u=ge(0),d=Ke(),f=Ke(),p=ge(!1),g=ge(!1),y=ge(!1);return Ae(fe(e,we(({scrollTop:m})=>m)),t),Ae(fe(e,we(({scrollHeight:m})=>m)),s),Ae(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:a,horizontalDirection:g,scrollBy:f,scrollContainerState:e,scrollHeight:s,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:y,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),_s={lvl:0};function k1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({end:a-1,start:r,value:o}),r=a,o=l}return i.push({end:1/0,start:r,value:o}),i}function mt(e){return e===_s}function Fs(e,t){if(!mt(e))return t===e.k?e.v:t<e.k?Fs(e.l,t):Fs(e.r,t)}function $n(e,t,n="k"){if(mt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=$n(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return $n(e.l,t,n)}function vn(e,t,n){return mt(e)?A1(t,n,1):t===e.k?jt(e,{k:t,v:n}):t<e.k?P1(jt(e,{l:vn(e.l,t,n)})):P1(jt(e,{r:vn(e.r,t,n)}))}function Ti(){return _s}function Ei(e,t,n){if(mt(e))return[];const r=$n(e,t)[0];return rV(Sp(e,r,n))}function wp(e,t){if(mt(e))return _s;const{k:n,l:r,r:o}=e;if(t===n){if(mt(r))return o;if(mt(o))return r;{const[i,s]=I1(r);return Zl(jt(e,{k:i,l:C1(r),v:s}))}}else return t<n?Zl(jt(e,{l:wp(r,t)})):Zl(jt(e,{r:wp(o,t)}))}function To(e){return mt(e)?[]:[...To(e.l),{k:e.k,v:e.v},...To(e.r)]}function Sp(e,t,n){if(mt(e))return[];const{k:r,l:o,r:i,v:s}=e;let a=[];return r>t&&(a=a.concat(Sp(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(Sp(i,t,n))),a}function Zl(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(Tp(t))return O1(jt(e,{lvl:n-1}));if(!mt(t)&&!mt(t.r))return jt(t.r,{l:jt(t,{r:t.r.l}),lvl:n,r:jt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Tp(e))return Ep(jt(e,{lvl:n-1}));if(!mt(r)&&!mt(r.l)){const o=r.l,i=Tp(o)?r.lvl-1:r.lvl;return jt(o,{l:jt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Ep(jt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function jt(e,t){return A1(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 C1(e){return mt(e.r)?e.l:Zl(jt(e,{r:C1(e.r)}))}function Tp(e){return mt(e)||e.lvl>e.r.lvl}function I1(e){return mt(e.r)?[e.k,e.v]:I1(e.r)}function A1(e,t,n,r=_s,o=_s){return{k:e,l:r,lvl:n,r:o,v:t}}function P1(e){return Ep(O1(e))}function O1(e){const{l:t}=e;return!mt(t)&&t.lvl===e.lvl?jt(t,{r:jt(e,{l:t.r})}):e}function Ep(e){const{lvl:t,r:n}=e;return!mt(n)&&!mt(n.r)&&n.lvl===t&&n.r.lvl===t?jt(n,{l:jt(e,{r:n.l}),lvl:t+1}):e}function rV(e){return k1(e,({k:t,v:n})=>({index:t,value:n}))}function D1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Ls(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const kp=Qe(()=>({recalcInProgress:ge(!1)}),[],{singleton:!0});function N1(e,t,n){return e[Xl(e,t,n)]}function Xl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-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 oV(e,t,n,r){const o=Xl(e,t,r),i=Xl(e,n,r,o);return e.slice(o,i+1)}function zn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ql(e){return!mt(e.groupOffsetTree)}function Cp({index:e},t){return t===e?0:t<e?-1:1}function iV(){return{groupIndices:[],groupOffsetTree:Ti(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Ti()}}function sV(e,t){let n=mt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:s}=r;if(n=Math.min(n,s),mt(e)){e=vn(e,0,i);continue}const a=Ei(e,s-1,o+1);if(a.some(pV(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of a)l?(o>=d||i===f)&&(e=wp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=vn(e,o+1,f));c&&(e=vn(e,s,i))}return[e,n]}function aV(e){return typeof e.groupIndex<"u"}function lV({offset:e},t){return t===e?0:t<e?-1:1}function Vs(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=N1(t,e,Cp),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function M1(e,t){if(!Ql(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _1(e,t,n){if(aV(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=M1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function cV(e,t,n,r=0){return r>0&&(t=Math.max(t,N1(e,r,Cp).offset)),k1(oV(e,t,n,lV),fV)}function uV(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,cn.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&mt(i)&&t.length===2){const f=t[0].size,p=t[1].size;s=n.reduce((g,y)=>vn(vn(g,y,f),y+1,p),s)}else[s,a]=sV(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Ip(e.offsetTree,a,s,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>vn(f,p,Vs(p,d,o)),Ti()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:s}}function dV(e){return To(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function F1(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 Ip(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Xl(o,t-1,Cp),a=o[l].offset;const c=$n(n,t-1);i=c[0],s=c[1],o.length&&o[l].size===$n(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ei(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({index:c,offset:f,size:u}),i=c,a=f,s=u}return{lastIndex:i,lastOffset:a,lastSize:s,offsetTree:o}}function fV(e){return{index:e.index,value:e}}function pV(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 hV={offsetHeight:"height",offsetWidth:"width"},ir=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Xt(r,0),i=Ke(),s=Ke(),a=ge(0),l=ge([]),c=ge(void 0),u=ge(void 0),d=ge(void 0),f=ge(void 0),p=ge((w,k)=>zn(w,hV[k])),g=ge(void 0),y=ge(0),m=iV(),v=Xt(fe(n,We(l,e,y),rr(uV,m),xt()),m),b=Xt(fe(l,xt(),rr((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),we(({prev:w})=>w)),[]);Ae(fe(l,De(w=>w.length>0),We(v,y),we(([w,k,A])=>{const O=w.reduce((_,N,$)=>vn(_,N,Vs(N,k.offsetTree,A)||$),Ti());return{...k,groupIndices:w,groupOffsetTree:O}})),v),Ae(fe(r,We(v),De(([w,{lastIndex:k}])=>w<k),we(([w,{lastIndex:k,lastSize:A}])=>[{endIndex:k,size:A,startIndex:w}])),n),Ae(c,u);const x=Xt(fe(c,we(w=>w===void 0)),!0);Ae(fe(u,De(w=>w!==void 0&&mt(Et(v).sizeTree)),we(w=>{const k=Et(d),A=Et(l).length>0;return k?A?[{endIndex:0,size:k,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ae(fe(f,De(w=>w!==void 0&&w.length>0&&mt(Et(v).sizeTree)),we(w=>{const k=[];let A=w[0],O=0;for(let _=1;_<w.length;_++){const N=w[_];N!==A&&(k.push({endIndex:_-1,size:A,startIndex:O}),A=N,O=_)}return k.push({endIndex:w.length-1,size:A,startIndex:O}),k})),n),Ae(fe(l,We(d,u),De(([,w,k])=>w!==void 0&&k!==void 0),we(([w,k,A])=>{const O=[];for(let _=0;_<w.length;_++){const N=w[_],$=w[_+1];O.push({startIndex:N,endIndex:N,size:k}),$!==void 0&&O.push({startIndex:N+1,endIndex:$-1,size:A})}return O})),n);const T=yn(fe(n,We(v),rr(({sizes:w},[k,A])=>({changed:A!==w,sizes:A}),{changed:!1,sizes:m}),we(w=>w.changed)));st(fe(a,rr((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),we(w=>w.diff)),w=>{const{groupIndices:k}=Et(v);if(w>0)ze(t,!0),ze(i,w+F1(w,k));else if(w<0){const A=Et(b);A.length>0&&(w-=F1(-w,A)),ze(s,w)}}),st(fe(a,We(e)),([w,k])=>{w<0&&k("`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:a},cn.ERROR)});const E=yn(i);Ae(fe(i,We(v),we(([w,k])=>{const A=k.groupIndices.length>0,O=[],_=k.lastSize;if(A){const N=Fs(k.sizeTree,0);let $=0,D=0;for(;$<w;){const z=k.groupIndices[D],M=k.groupIndices.length===D+1?1/0:k.groupIndices[D+1]-z-1;O.push({endIndex:z,size:N,startIndex:z}),O.push({endIndex:z+1+M-1,size:_,startIndex:z+1}),D++,$+=M+1}const F=To(k.sizeTree);return $!==w&&F.shift(),F.reduce((z,{k:M,v:C})=>{let V=z.ranges;return z.prevSize!==0&&(V=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:C,ranges:V}},{prevIndex:w,prevSize:0,ranges:O}).ranges}return To(k.sizeTree).reduce((N,{k:$,v:D})=>({prevIndex:$+w,prevSize:D,ranges:[...N.ranges,{endIndex:$+w-1,size:N.prevSize,startIndex:N.prevIndex}]}),{prevIndex:0,prevSize:_,ranges:[]}).ranges})),n);const I=yn(fe(s,We(v,y),we(([w,{offsetTree:k},A])=>{const O=-w;return Vs(O,k,A)})));return Ae(fe(s,We(v,y),we(([w,k,A])=>{if(k.groupIndices.length>0){if(mt(k.sizeTree))return k;let O=Ti();const _=Et(b);let N=0,$=0,D=0;for(;N<-w;){D=_[$];const F=_[$+1]-D-1;$++,N+=F+1}if(O=To(k.sizeTree).reduce((F,{k:z,v:M})=>vn(F,Math.max(0,z+w),M),O),N!==-w){const F=Fs(k.sizeTree,D);O=vn(O,0,F);const z=$n(k.sizeTree,-w+1)[1];O=vn(O,1,z)}return{...k,sizeTree:O,...Ip(k.offsetTree,0,O,A)}}else{const O=To(k.sizeTree).reduce((_,{k:N,v:$})=>vn(_,Math.max(0,N+w),$),Ti());return{...k,sizeTree:O,...Ip(k.offsetTree,0,O,A)}}})),v),{beforeUnshiftWith:E,data:g,defaultItemSize:u,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:d,gap:y,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:T,shiftWith:s,shiftWithOffset:I,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},bt(Hr,kp),{singleton:!0});function mV(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const L1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),s=Ke(),a=yn(fe(i,we(mV)));return Ae(fe(a,we(l=>l.totalCount)),n),Ae(fe(a,we(l=>l.groupIndices)),e),Ae(fe(Vt(o,t,r),De(([l,c])=>Ql(c)),we(([l,c,u])=>$n(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),we(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},bt(ir,nn)),Wr=Qe(([{log:e}])=>{const t=ge(!1),n=yn(fe(t,De(r=>r),xt()));return st(t,r=>{r&&Et(e)("props updated",{},cn.DEBUG)}),{didMount:n,propsReady:t}},bt(Hr),{singleton:!0}),gV=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function V1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!gV)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const $s=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Ke(),g=Ke(),y=ge(0);let m=null,v=null,b=null;function x(){m&&(m(),m=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),ze(l,!1)}return Ae(fe(p,We(n,d,r,y,a,s,f),We(e,i,o),we(([[T,E,I,w,k,A,O,_],N,$,D])=>{const F=V1(T),{align:z,behavior:M,offset:C}=F,V=w-1,L=_1(F,E,V);let R=Vs(L,E.offsetTree,N)+A;z==="end"?(R+=$+$n(E.sizeTree,L)[1]-I+D,L===V&&(R+=O)):z==="center"?R+=($+$n(E.sizeTree,L)[1]-I+D)/2:R-=k,C&&(R+=C);const U=G=>{x(),G?(_("retrying to scroll to",{location:T},cn.DEBUG),ze(p,T)):(ze(g,!0),_("list did not change, scroll successful",{},cn.DEBUG))};if(x(),M==="smooth"){let G=!1;b=st(t,H=>{G=G||H}),m=Vn(u,()=>{U(G)})}else m=Vn(fe(t,yV(150)),U);return v=setTimeout(()=>{x()},1200),ze(l,!0),_("scrolling from index to",{behavior:M,index:L,top:R},cn.DEBUG),{behavior:M,top:R}})),c),{scrollTargetReached:g,scrollToIndex:p,topListHeight:y}},bt(ir,nn,Hr),{singleton:!0});function yV(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Ap(e,t){e==0?t():requestAnimationFrame(()=>{Ap(e-1,t)})}function Pp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const zs=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:s}])=>{const a=ge(!0),l=ge(0),c=ge(!0);return Ae(fe(s,We(l),De(([u,d])=>!!d),nr(!1)),a),Ae(fe(s,We(l),De(([u,d])=>!!d),nr(!1)),c),st(fe(Vt(t,s),We(a,n,e,c),De(([[,u],d,{sizeTree:f},p,g])=>u&&(!mt(f)||gp(p))&&!d&&!g),We(l)),([,u])=>{Vn(o,()=>{ze(c,!0)}),Ap(4,()=>{Vn(r,()=>{ze(a,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},bt(ir,nn,$s,Wr),{singleton:!0});function $1(e,t){return Math.abs(e-t)<1.01}const js="up",Bs="down",vV="none",bV={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},xV=0,Rs=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const s=ge(!1),a=ge(!0),l=Ke(),c=Ke(),u=ge(4),d=ge(xV),f=Xt(fe(vp(fe(Ne(o),So(1),nr(!0)),fe(Ne(o),So(1),nr(!1),w1(100))),xt()),!1),p=Xt(fe(vp(fe(n,nr(!0)),fe(n,nr(!1),w1(200))),xt()),!1);Ae(fe(Vt(Ne(o),Ne(d)),we(([b,x])=>b<=x),xt()),a),Ae(fe(a,xr(50)),c);const g=yn(fe(Vt(r,Ne(i),Ne(t),Ne(e),Ne(u)),rr((b,[{scrollHeight:x,scrollTop:T},E,I,w,k])=>{const A=T+E-x>-k,O={scrollHeight:x,scrollTop:T,viewportHeight:E};if(A){let N,$;return T>b.state.scrollTop?(N="SCROLLED_DOWN",$=b.state.scrollTop-T):(N="SIZE_DECREASED",$=b.state.scrollTop-T||b.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:$,state:O}}let _;return O.scrollHeight>b.state.scrollHeight?_="SIZE_INCREASED":E<b.state.viewportHeight?_="VIEWPORT_HEIGHT_DECREASING":T<b.state.scrollTop?_="SCROLLING_UPWARDS":_="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:_,state:O}},bV),xt((b,x)=>b&&b.atBottom===x.atBottom))),y=Xt(fe(r,rr((b,{scrollHeight:x,scrollTop:T,viewportHeight:E})=>{if($1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const I=x-(T+E)<1;return b.scrollTop!==T&&I?{changed:!0,jump:b.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),De(b=>b.changed),we(b=>b.jump)),0);Ae(fe(g,we(b=>b.atBottom)),s),Ae(fe(s,xr(50)),l);const m=ge(Bs);Ae(fe(r,we(({scrollTop:b})=>b),xt(),rr((b,x)=>Et(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?js:Bs,prevScrollTop:x},{direction:Bs,prevScrollTop:0}),we(b=>b.direction)),m),Ae(fe(r,xr(50),nr(vV)),m);const v=ge(0);return Ae(fe(f,De(b=>!b),nr(0)),v),Ae(fe(o,xr(100),We(f),De(([b,x])=>x),rr(([b,x],[T])=>[x,T],[0,0]),we(([b,x])=>x-b)),v),{atBottomState:g,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:s,isAtTop:a,isScrolling:f,lastJumpDueToItemResize:y,scrollDirection:m,scrollVelocity:v}},bt(nn)),Hs="top",Ws="bottom",z1="none";function j1(e,t,n){return typeof e=="number"?n===js&&t===Hs||n===Bs&&t===Ws?e:0:n===js?t===Hs?e.main:e.reverse:t===Ws?e.main:e.reverse}function B1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Op=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),s=ge(0),a=ge(0),l=ge(0),c=Xt(fe(Vt(Ne(r),Ne(o),Ne(n),Ne(i,Ls),Ne(l),Ne(s),Ne(t),Ne(e),Ne(a)),we(([u,d,f,[p,g],y,m,v,b,x])=>{const T=u-b,E=m+v,I=Math.max(f-T,0);let w=z1;const k=B1(x,Hs),A=B1(x,Ws);return p-=b,p+=f+v,g+=f+v,g-=b,p>u+E-k&&(w=js),g<u-I+d+A&&(w=Bs),w!==z1?[Math.max(T-f-j1(y,Hs,w)-k,0),T-I-v+d+j1(y,Ws,w)+A]:null}),De(u=>u!=null),xt(Ls)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},bt(nn),{singleton:!0});function wV(e,t,n){if(Ql(t)){const r=M1(e,t);return[{index:$n(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const Dp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Jl(e,t,n,r,o,i){const{lastIndex:s,lastOffset:a,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const y=e[e.length-1];u=y.offset+y.size}const d=n-s,f=a+d*l+(d-1)*r,p=c,g=f-u;return{bottom:u,firstItemIndex:i,items:H1(e,o,i),offsetBottom:g,offsetTop:c,top:p,topItems:H1(t,o,i),topListHeight:t.reduce((y,m)=>m.size+y,0),totalCount:n}}function R1(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=Pp(t,a),c=Array.from({length:a}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Jl(c,[],a,o,n,r)}function H1(e,t,n){if(e.length===0)return[];if(!Ql(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=[],s=Ei(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.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}function W1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const Eo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:g}])=>{const y=ge([]),m=ge(0),v=Ke(),b=ge(0);Ae(i.topItemsIndexes,y);const x=Xt(fe(Vt(p,g,Ne(l,Ls),Ne(o),Ne(r),Ne(c),u,Ne(y),Ne(t),Ne(n),Ne(b),e),De(([w,k,,A,,,,,,,,O])=>{const _=O&&O.length!==A;return w&&!k&&!_}),we(([,,[w,k],A,O,_,N,$,D,F,z,M])=>{var C,V,L,R;const U=O,{offsetTree:G,sizeTree:H}=U,ee=Et(m);if(A===0)return{...Dp,totalCount:A};if(w===0&&k===0)return ee===0?{...Dp,totalCount:A}:R1(ee,_,O,D,F,M||[]);if(mt(H))return ee>0?null:Jl(wV(Pp(_,A),U,M),[],A,F,U,D);const se=[];if($.length>0){const ae=$[0],ce=$[$.length-1];let Q=0;for(const ue of Ei(H,ae,ce)){const oe=ue.value,he=Math.max(ue.start,ae),ie=Math.min(ue.end,ce);for(let le=he;le<=ie;le++)se.push({data:M?.[le],index:le,offset:Q,size:oe}),Q+=oe}}if(!N)return Jl([],se,A,F,U,D);const te=$.length>0?$[$.length-1]+1:0,q=cV(G,w,k,te);if(q.length===0)return null;const Y=A-1,Z=Kl([],ae=>{for(const ce of q){const Q=ce.value;let ue=Q.offset,oe=ce.start;const he=Q.size;if(Q.offset<w){oe+=Math.floor((w-Q.offset+F)/(he+F));const le=oe-ce.start;ue+=le*he+le*F}oe<te&&(ue+=(te-oe)*he,oe=te);const ie=Math.min(ce.end,Y);for(let le=oe;le<=ie&&!(ue>=k);le++)ae.push({data:M?.[le],index:le,offset:ue,size:he}),ue+=he+F}}),pe=W1(z,Hs),B=W1(z,Ws);if(Z.length>0&&(pe>0||B>0)){const ae=Z[0],ce=Z[Z.length-1];if(pe>0&&ae.index>te){const Q=Math.min(pe,ae.index-te),ue=[];let oe=ae.offset;for(let he=ae.index-1;he>=ae.index-Q;he--){const ie=(V=(C=Ei(H,he,he)[0])==null?void 0:C.value)!=null?V:ae.size;oe-=ie+F,ue.unshift({data:M?.[he],index:he,offset:oe,size:ie})}Z.unshift(...ue)}if(B>0&&ce.index<Y){const Q=Math.min(B,Y-ce.index);let ue=ce.offset+ce.size+F;for(let oe=ce.index+1;oe<=ce.index+Q;oe++){const he=(R=(L=Ei(H,oe,oe)[0])==null?void 0:L.value)!=null?R:ce.size;Z.push({data:M?.[oe],index:oe,offset:ue,size:he}),ue+=he+F}}}return Jl(Z,se,A,F,U,D)}),De(w=>w!==null),xt()),Dp);Ae(fe(e,De(gp),we(w=>w?.length)),o),Ae(fe(x,we(w=>w.topListHeight)),d),Ae(d,a),Ae(fe(x,we(w=>[w.top,w.bottom])),s),Ae(fe(x,we(w=>w.items)),v);const T=yn(fe(x,De(({items:w})=>w.length>0),We(o,e),De(([{items:w},k])=>w[w.length-1].originalIndex===k-1),we(([,w,k])=>[w-1,k]),xt(Ls),we(([w])=>w))),E=yn(fe(x,xr(200),De(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),we(({items:w})=>w[0].index),xt())),I=yn(fe(x,De(({items:w})=>w.length>0),we(({items:w})=>{let k=0,A=w.length-1;for(;w[k].type==="group"&&k<A;)k++;for(;w[A].type==="group"&&A>k;)A--;return{endIndex:w[A].index,startIndex:w[k].index}}),xt(D1)));return{endReached:T,initialItemCount:m,itemsRendered:v,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:E,topItemsIndexes:y,...f}},bt(ir,L1,Op,zs,$s,Rs,Wr,kp),{singleton:!0}),q1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),s=Xt(fe(Vt(n,e,r,t,o),we(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return Ae(Ne(s),i),{totalListHeight:s,totalListHeightChanged:i}},bt(nn,Eo),{singleton:!0}),SV=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ge(!1),r=Xt(fe(Vt(n,e,t),De(([o])=>o),we(([,o,i])=>Math.max(0,o-i)),xr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(nn,q1),{singleton:!0}),U1=Qe(()=>({context:ge(null)})),TV=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:s})=>t<s?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,G1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ae(fe(u,We(t,l,n,i,o,r,a),We(e),we(([[d,f,p,g,y,m,v,b],x])=>{const{align:T,behavior:E,calculateViewLocation:I=TV,done:w,...k}=d,A=_1(d,f,g-1),O=Vs(A,f.offsetTree,x)+y+m,_=O+$n(f.sizeTree,A)[1],N=b+m,$=b+p-v,D=I({itemBottom:_,itemTop:O,locationParams:{align:T,behavior:E,...k},viewportBottom:$,viewportTop:N});return D?w&&Vn(fe(s,De(F=>!F),So(Et(s)?1:2)),w):w?.(),D}),De(d=>d!==null)),c),{scrollIntoView:u}},bt(ir,nn,$s,Eo,Hr),{singleton:!0});function Y1(e){return e?e==="smooth"?"smooth":"auto":!1}const EV=(e,t)=>typeof e=="function"?Y1(e(t)):t&&Y1(e),kV=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const g=ge(!1),y=Ke();let m=null;function v(E){ze(s,{align:"end",behavior:E,index:"LAST"})}st(fe(Vt(fe(Ne(t),So(1)),l),We(Ne(g),i,a,d),we(([[E,I],w,k,A,O])=>{let _=I&&A,N="auto";return _&&(N=EV(w,k||O),_=_&&!!N),{followOutputBehavior:N,shouldFollow:_,totalCount:E}}),De(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{m&&(m(),m=null),Et(n)?requestAnimationFrame(()=>{Et(u)("following output to ",{totalCount:I},cn.DEBUG),v(E)}):m=Vn(e,()=>{Et(u)("following output to ",{totalCount:I},cn.DEBUG),v(E),m=null})});function b(E){const I=Vn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Et(u)("scrolling to bottom due to increased size",{},cn.DEBUG),v("auto"))});setTimeout(I,100)}st(fe(Vt(Ne(g),t,c),De(([E,,I])=>E&&I),rr(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),De(({refreshed:E})=>E),We(g,t)),([,E])=>{Et(a)&&b(E!==!1)}),st(y,()=>{b(Et(g)!==!1)}),st(Vt(Ne(g),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ge(null),T=Ke();return Ae(vp(fe(Ne(r),we(E=>{var I;return(I=E?.length)!=null?I:0})),fe(Ne(t))),T),st(fe(Vt(fe(T,So(1)),l),We(Ne(x),a,d,f),we(([[E,I],w,k,A,O])=>I&&k&&w?.({context:O,totalCount:E,scrollingInProgress:A})),De(E=>!!E),xr(0)),E=>{m&&(m(),m=null),Et(n)?requestAnimationFrame(()=>{Et(u)("scrolling into view",{}),ze(p,E)}):m=Vn(e,()=>{Et(u)("scrolling into view",{}),ze(p,E),m=null})}),{autoscrollToBottom:y,followOutput:g,scrollIntoViewOnChange:x}},bt(ir,Rs,$s,zs,Wr,Hr,nn,U1,G1)),CV=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(Ae(fe(a,We(i),De(([,l])=>l!==0),We(o,r,t,n,e),we(([[,l],c,u,d,f,p=[]])=>R1(l,c,u,d,f,p))),s),{}),bt(ir,zs,Eo,Wr),{singleton:!0}),IV=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ge(0);return st(fe(e,We(r),De(([,o])=>o!==0),we(([,o])=>({top:o}))),o=>{Vn(fe(n,So(1),De(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(Wr,nn,Eo),{singleton:!0}),K1=Qe(([{scrollVelocity:e}])=>{const t=ge(!1),n=Ke(),r=ge(!1);return Ae(fe(e,We(r,t,n),De(([o,i])=>!!i),we(([o,i,s,a])=>{const{enter:l,exit:c}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),xt()),t),st(fe(Vt(t,e,n),We(r)),([[o,i,s],a])=>{o&&a&&a.change&&a.change(i,s)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Rs),{singleton:!0}),Np=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=ge(!1),s=ge(void 0);return Ae(fe(Vt(n,r),we(([{scrollHeight:a,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:a,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ae(fe(t,We(r),we(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{customScrollParent:s,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(nn)),AV=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ke(),u=ge(void 0),d=ge(null),f=ge(null);return Ae(a,d),Ae(l,f),st(fe(c,We(t,r,s,d,f,n)),([p,g,y,m,v,b,x])=>{const T=dV(g.sizeTree);m&&v!==null&&b!==null&&(y=v.scrollTop-b.offsetTop),y-=x,p({ranges:T,scrollTop:y})}),Ae(fe(u,De(gp),we(PV)),o),Ae(fe(i,We(u),De(([,p])=>p!==void 0),xt(),we(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(ir,nn,zs,Wr,Np));function PV(e){return{align:"start",index:0,offset:e.scrollTop}}const OV=Qe(([{topItemsIndexes:e}])=>{const t=ge(0);return Ae(fe(t,De(n=>n>=0),we(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(Eo));function Z1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const DV=Z1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),NV=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:g}])=>{const y=yn(fe(l,We(s),rr(([,v,b,x],[{bottom:T,items:E,offsetBottom:I,totalCount:w},k])=>{const A=T+I;let O=0;return b===w&&v.length>0&&E.length>0&&(E[0].originalIndex===0&&v[0].originalIndex===0||(O=A-x,O!==0&&(O+=k))),[O,E,w,A]},[0,[],0,0]),De(([v])=>v!==0),We(r,a,n,o,p,g),De(([,v,b,x,,,T])=>!T&&!x&&v!==0&&b===js),we(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},cn.DEBUG),v))));function m(v){v>0?(ze(t,{behavior:"auto",top:-v}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-v}))}return st(fe(y,We(e,i)),([v,b,x])=>{x&&DV()?ze(e,b-v):m(-v)}),st(fe(Vt(Xt(i,!1),e,g),De(([v,b,x])=>!v&&!x&&b!==0),we(([v,b])=>b),xr(1)),m),Ae(fe(d,we(v=>({top:-v}))),t),st(fe(c,We(f,u),we(([v,{groupIndices:b,lastSize:x,sizeTree:T},E])=>{function I(w){return w*(x+E)}if(b.length===0)return I(v);{let w=0;const k=Fs(T,0);let A=0,O=0;for(;A<v;){A++,w+=k;let _=b.length===O+1?1/0:b[O+1]-b[O]-1;A+_>v&&(w-=k,_=v-A+1),A+=_,w+=I(_),O++}return w}})),v=>{ze(e,v),requestAnimationFrame(()=>{ze(t,{top:v}),requestAnimationFrame(()=>{ze(e,0),ze(g,!1)})})}),{deviation:e}},bt(nn,Rs,Eo,ir,Hr,kp)),MV=Qe(([e,t,n,r,o,i,s,a,l,c,u])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c,...u}),bt(Op,CV,Wr,K1,q1,IV,SV,Np,G1,Hr,U1)),X1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:g,initialTopMostItemIndex:y,scrolledToInitialItem:m},v,b,x,T,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:k},A])=>{const{listState:O,minOverscanItemCount:_,topItemsIndexes:N,rangeChanged:$,...D}=T;return Ae($,A.scrollSeekRangeChanged),Ae(fe(A.windowViewportRect,we(F=>F.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:k,heightEstimates:a,initialItemFinalLocationReached:g,initialTopMostItemIndex:y,scrolledToInitialItem:m,sizeRanges:c,topItemCount:w,topItemsIndexes:N,totalCount:f,...x,groupIndices:s,itemSize:l,listState:O,minOverscanItemCount:_,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:p,rangeChanged:$,...D,...A,...v,sizes:u,...b}},bt(ir,zs,nn,AV,kV,Eo,$s,NV,OV,L1,MV));function _V(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)Object.hasOwn(r,s)||(n[s]=t[s]);return n}const ec=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Mp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=S.createContext({});function l(m,v){m.propsReady&&ze(m.propsReady,!1);for(const b of r){const x=m[t.required[b]];ze(x,v[b])}for(const b of o)if(b in v){const x=m[t.optional[b]];ze(x,v[b])}m.propsReady&&ze(m.propsReady,!0)}function c(m){return i.reduce((v,b)=>(v[b]=x=>{const T=m[t.methods[b]];ze(T,x)},v),{})}function u(m){return s.reduce((v,b)=>(v[b]=XL(m[t.events[b]]),v),{})}const d=S.forwardRef((m,v)=>{const{children:b,...x}=m,[T]=S.useState(()=>Kl(JL(e),w=>{l(w,x)})),[E]=S.useState(x1(u,T));ec(()=>{for(const w of s)w in x&&st(E[w],x[w]);return()=>{Object.values(E).map(yp)}},[x,E,T]),ec(()=>{l(T,x)}),S.useImperativeHandle(v,b1(c(T)));const I=n;return h.jsx(a.Provider,{value:T,children:n?h.jsx(I,{..._V([...r,...o,...s],x),children:b}):b})}),f=m=>{const v=S.useContext(a);return S.useCallback(b=>{ze(v[m],b)},[v,m])},p=m=>{const v=S.useContext(a)[m],b=S.useCallback(x=>st(v,x),[v]);return S.useSyncExternalStore(b,()=>Et(v),()=>Et(v))},g=m=>{const v=S.useContext(a)[m],[b,x]=S.useState(x1(Et,v));return ec(()=>st(v,T=>{T!==b&&x(b1(T))}),[v,b]),b},y=S.version.startsWith("18")?p:g;return{Component:d,useEmitter:(m,v)=>{const b=S.useContext(a)[m];ec(()=>st(b,v),[v,b])},useEmitterValue:y,usePublisher:f}}const tc=S.createContext(void 0),Q1=S.createContext(void 0),J1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function _p(e){return"self"in e}function FV(e){return"body"in e}function eS(e,t,n,r=Si,o,i){const s=S.useRef(null),a=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,g,y;const m=f.target;if(FV(m)||_p(m)){const b=_p(m)?m:m.defaultView;y=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,g=i?b.innerWidth:b.innerHeight}else y=i?m.scrollLeft:m.scrollTop,p=i?m.scrollWidth:m.scrollHeight,g=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:p,scrollTop:Math.max(y,0),viewportHeight:g})};f.suppressFlushSync?v():qi.flushSync(v),a.current!==null&&(y===a.current||y<=0||y===p-g)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||s.current;return r(o||s.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[s,c,n,r,o]);function u(f){const p=s.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const g=f.behavior==="smooth";let y,m,v;_p(p)?(m=Math.max(zn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),y=i?p.innerWidth:p.innerHeight,v=i?window.scrollX:window.scrollY):(m=p[i?"scrollWidth":"scrollHeight"],y=zn(p,i?"width":"height"),v=p[i?"scrollLeft":"scrollTop"]);const b=m-y;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),$1(y,m)||f.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:y}),g&&t(!0);return}g?(a.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),s.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:s,scrollToCallback:u}}const Fp="-webkit-sticky",tS="sticky",Lp=Z1(()=>{if(typeof document>"u")return tS;const e=document.createElement("div");return e.style.position=Fp,e.style.position===Fp?Fp:tS});function Vp(e){return e}const LV=Qe(()=>{const e=ge(a=>`Item ${a}`),t=ge(a=>`Group ${a}`),n=ge({}),r=ge(Vp),o=ge("div"),i=ge(Si),s=(a,l=null)=>Xt(fe(n,we(c=>c[a]),xt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),VV=Qe(([e,t])=>({...e,...t}),bt(X1,LV)),$V=({height:e})=>h.jsx("div",{style:{height:e}}),zV={overflowAnchor:"none",position:Lp(),zIndex:1},nS={overflowAnchor:"none"},jV={...nS,display:"inline-block",height:"100%"},rS=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=En("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=En("windowScrollContainerState"),s=En("scrollContainerState"),a=o||r?i:s,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),g=En("gap"),y=Fe("horizontalDirection"),{callbackRef:m}=T1(n,f,d,e?Si:a,p,g,o,y,Fe("skipAnimationFrameInResizeObserver")),[v,b]=S.useState(0);jp("deviation",D=>{v!==D&&b(D)});const x=Fe("EmptyPlaceholder"),T=Fe("ScrollSeekPlaceholder")||$V,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),A=Fe("isSeeking"),O=Fe("groupIndices").length>0,_=Fe("alignToBottom"),N=Fe("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:_?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:_?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?h.jsx(x,{...wt(x,c)}):h.jsx(E,{...wt(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:$,children:(e?t.topItems:t.items).map(D=>{const F=D.originalIndex,z=k(F+t.firstItemIndex,D.data,c);return A?S.createElement(T,{...wt(T,c),height:D.size,index:D.index,key:z,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?S.createElement(w,{...wt(w,c),"data-index":F,"data-item-index":D.index,"data-known-size":D.size,key:z,style:zV},u(D.index,c)):S.createElement(I,{...wt(I,c),...oS(I,D.data),"data-index":F,"data-item-group-index":D.groupIndex,"data-item-index":D.index,"data-known-size":D.size,key:z,style:y?jV:nS},O?l(D.index,D.groupIndex,D.data,c):l(D.index,D.data,c))})})}),BV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},RV={outline:"none",overflowX:"auto",position:"relative"},ki=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),HV={position:Lp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function oS(e,t){return{item:typeof e=="string"?void 0:t}}const WV=S.memo(function(){const e=Fe("HeaderComponent"),t=En("headerHeight"),n=Fe("HeaderFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...wt(e,o)})}):null}),qV=S.memo(function(){const e=Fe("FooterComponent"),t=En("footerHeight"),n=Fe("HeaderFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...wt(e,o)})}):null});function $p({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:g}=eS(a,c,l,u,void 0,d);return e("scrollTo",g),e("scrollBy",f),h.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?RV:BV,...o},tabIndex:0,...s,...wt(l,i),children:r})})}function zp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),g=t("scrollerRef"),{scrollByCallback:y,scrollerRef:m,scrollToCallback:v}=eS(a,c,l,g,f);return J1(()=>{var b;return m.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{m.current=null}},[m,f]),e("windowScrollTo",v),e("scrollBy",y),h.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...s,...wt(l,i),children:r})})}const UV=({children:e})=>{const t=S.useContext(tc),n=En("viewportHeight"),r=En("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),s=S.useMemo(()=>Ms(n,l=>zn(l,i?"width":"height")),[n,i]),a=or(s,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),h.jsx("div",{"data-viewport-type":"element",ref:a,style:ki(o),children:e})},GV=({children:e})=>{const t=S.useContext(tc),n=En("windowViewportRect"),r=En("fixedItemHeight"),o=Fe("customScrollParent"),i=xp(n,o,Fe("skipAnimationFrameInResizeObserver")),s=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),h.jsx("div",{"data-viewport-type":"window",ref:i,style:ki(s),children:e})},YV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...HV,marginTop:`${n}px`},o=Fe("context");return h.jsx(t,{style:r,...wt(t,o),children:e})},KV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return h.jsxs(r||t?QV:XV,{...e,context:o,children:[n&&h.jsx(YV,{children:h.jsx(rS,{showTopList:!0})}),h.jsxs(r||t?GV:UV,{children:[h.jsx(WV,{}),h.jsx(rS,{}),h.jsx(qV,{})]})]})}),{Component:ZV,useEmitter:jp,useEmitterValue:Fe,usePublisher:En}=Mp(VV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},KV),XV=$p({useEmitter:jp,useEmitterValue:Fe,usePublisher:En}),QV=zp({useEmitter:jp,useEmitterValue:Fe,usePublisher:En}),Bp=ZV,JV=Qe(()=>{const e=ge(c=>h.jsxs("td",{children:["Item $",c]})),t=ge(null),n=ge(c=>h.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ge(null),o=ge(null),i=ge({}),s=ge(Vp),a=ge(Si),l=(c,u=null)=>Xt(fe(i,we(d=>d[c]),xt()),u);return{components:i,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),e$=Qe(([e,t])=>({...e,...t}),bt(X1,JV)),t$=({height:e})=>h.jsx("tr",{children:h.jsx("td",{style:{height:e}})}),n$=({height:e})=>h.jsx("tr",{children:h.jsx("td",{style:{border:0,height:e,padding:0}})}),r$={overflowAnchor:"none"},iS={position:Lp(),zIndex:2,overflowAnchor:"none"},sS=S.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),s=je("fixedHeaderHeight"),a=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||t$,d=je("GroupComponent"),f=je("TableRowComponent"),p=(e?t.topItems:[]).reduce((y,m,v)=>(v===0?y.push(m.size):y.push(y[v-1]+m.size),y),[]),g=(e?t.topItems:t.items).map(y=>{const m=y.originalIndex,v=n(m+r,y.data,o),b=e?m===0?0:p[m-1]:0;return i?S.createElement(u,{...wt(u,o),height:y.size,index:y.index,key:v,type:y.type||"item"}):y.type==="group"?S.createElement(d,{...wt(d,o),"data-index":m,"data-item-index":y.index,"data-known-size":y.size,key:v,style:{...iS,top:s}},c(y.index,o)):S.createElement(f,{...wt(f,o),...oS(f,y.data),"data-index":m,"data-item-index":y.index,"data-known-size":y.size,"data-item-group-index":y.groupIndex,key:v,style:e?{...iS,top:s+b}:r$},a?l(y.index,y.groupIndex,y.data,o):l(y.index,y.data,o))});return h.jsx(h.Fragment,{children:g})}),o$=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=jn("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=jn("windowScrollContainerState"),s=jn("scrollContainerState"),a=o||r?i:s,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=T1(n,c,l,a,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,g]=S.useState(0);Rp("deviation",O=>{p!==O&&(f.current.style.marginTop=`${O}px`,g(O))});const y=je("EmptyPlaceholder"),m=je("FillerRow")||n$,v=je("TableBodyComponent"),b=je("paddingTopAddition"),x=je("statefulTotalCount"),T=je("context");if(x===0&&y)return h.jsx(y,{...wt(y,T)});const E=(t?e.topItems:[]).reduce((O,_)=>O+_.size,0),I=e.offsetTop+b+p-E,w=e.offsetBottom,k=I>0?h.jsx(m,{context:T,height:I},"padding-top"):null,A=w>0?h.jsx(m,{context:T,height:w},"padding-bottom"):null;return h.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...wt(v,T),children:[k,t&&h.jsx(sS,{showTopList:!0}),h.jsx(sS,{}),A]})}),i$=({children:e})=>{const t=S.useContext(tc),n=jn("viewportHeight"),r=jn("fixedItemHeight"),o=or(S.useMemo(()=>Ms(n,i=>zn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),h.jsx("div",{"data-viewport-type":"element",ref:o,style:ki(!1),children:e})},s$=({children:e})=>{const t=S.useContext(tc),n=jn("windowViewportRect"),r=jn("fixedItemHeight"),o=je("customScrollParent"),i=xp(n,o,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),h.jsx("div",{"data-viewport-type":"window",ref:i,style:ki(!1),children:e})},a$=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=jn("fixedHeaderHeight"),o=jn("fixedFooterHeight"),i=je("fixedHeaderContent"),s=je("fixedFooterContent"),a=je("context"),l=or(S.useMemo(()=>Ms(r,v=>zn(v,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=or(S.useMemo(()=>Ms(o,v=>zn(v,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?u$:c$,d=n||t?s$:i$,f=je("TableComponent"),p=je("TableHeadComponent"),g=je("TableFooterComponent"),y=i?h.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,a),children:i()},"TableHead"):null,m=s?h.jsx(g,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(g,a),children:s()},"TableFoot"):null;return h.jsx(u,{...e,...wt(u,a),children:h.jsx(d,{children:h.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,a),children:[y,h.jsx(o$,{},"TableBody"),m]})})})}),{Component:l$,useEmitter:Rp,useEmitterValue:je,usePublisher:jn}=Mp(e$,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},a$),c$=$p({useEmitter:Rp,useEmitterValue:je,usePublisher:jn}),u$=zp({useEmitter:Rp,useEmitterValue:je,usePublisher:jn}),d$=l$,aS={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},f$={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:lS,floor:nc,max:qs,min:Hp,round:cS}=Math;function uS(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function p$(e){return{...f$,items:e}}function rc(e,t){return e&&e.width===t.width&&e.height===t.height}function h$(e,t){return e&&e.column===t.column&&e.row===t.row}const m$=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:g,propsReady:y},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T},E])=>{const I=ge(0),w=ge(0),k=ge(aS),A=ge({height:0,width:0}),O=ge({height:0,width:0}),_=Ke(),N=Ke(),$=ge(0),D=ge(null),F=ge({column:0,row:0}),z=Ke(),M=Ke(),C=ge(!1),V=ge(0),L=ge(!0),R=ge(!1),U=ge(!1);st(fe(g,We(V),De(([q,Y])=>!!Y)),()=>{ze(L,!1)}),st(fe(Vt(g,L,O,A,V,R),De(([q,Y,Z,pe,,B])=>q&&!Y&&Z.height!==0&&pe.height!==0&&!B)),([,,,,q])=>{ze(R,!0),Ap(1,()=>{ze(_,q)}),Vn(fe(c),()=>{ze(t,[0,0]),ze(L,!0)})}),Ae(fe(M,De(q=>q!=null&&q.scrollTop>0),nr(0)),w),st(fe(g,We(M),De(([,q])=>q!=null)),([,q])=>{q&&(ze(A,q.viewport),ze(O,q.item),ze(F,q.gap),q.scrollTop>0&&(ze(C,!0),Vn(fe(c,So(1)),Y=>{ze(C,!1)}),ze(l,{top:q.scrollTop})))}),Ae(fe(A,we(({height:q})=>q)),d),Ae(fe(Vt(Ne(A,rc),Ne(O,rc),Ne(F,(q,Y)=>q&&q.column===Y.column&&q.row===Y.row),Ne(c)),we(([q,Y,Z,pe])=>({gap:Z,item:Y,scrollTop:pe,viewport:q}))),z),Ae(fe(Vt(Ne(I),r,Ne(F,h$),Ne(O,rc),Ne(A,rc),Ne(D),Ne(w),Ne(C),Ne(L),Ne(V)),De(([,,,,,,,q])=>!q),we(([q,[Y,Z],pe,B,ae,ce,Q,,ue,oe])=>{const{column:he,row:ie}=pe,{height:le,width:be}=B,{width:de}=ae;if(Q===0&&(q===0||de===0))return aS;if(be===0){const _e=Pp(oe,q),ct=_e+Math.max(Q-1,0);return p$(uS(_e,ct,ce))}const ne=dS(de,be,he);let J,j;ue?Y===0&&Z===0&&Q>0?(J=0,j=Q-1):(J=ne*nc((Y+ie)/(le+ie)),j=ne*lS((Z+ie)/(le+ie))-1,j=Hp(q-1,qs(j,ne-1)),J=Hp(j,qs(0,J))):(J=0,j=-1);const X=uS(J,j,ce),{bottom:me,top:ve}=fS(ae,pe,B,X),ke=lS(q/ne),Me=ke*le+(ke-1)*ie-me;return{bottom:me,itemHeight:le,items:X,itemWidth:be,offsetBottom:Me,offsetTop:ve,top:ve}})),k),Ae(fe(D,De(q=>q!==null),we(q=>q.length)),I),Ae(fe(Vt(A,O,k,F),De(([q,Y,{items:Z}])=>Z.length>0&&Y.height!==0&&q.height!==0),we(([q,Y,{items:Z},pe])=>{const{bottom:B,top:ae}=fS(q,pe,Y,Z);return[ae,B]}),xt(Ls)),t);const G=ge(!1);Ae(fe(c,We(G),we(([q,Y])=>Y||q!==0)),G);const H=yn(fe(Vt(k,I),De(([{items:q}])=>q.length>0),We(G),De(([[q,Y],Z])=>{const pe=q.items[q.items.length-1].index===Y-1;return(Z||q.bottom>0&&q.itemHeight>0&&q.offsetBottom===0&&q.items.length===Y)&&pe}),we(([[,q]])=>q-1),xt())),ee=yn(fe(Ne(k),De(({items:q})=>q.length>0&&q[0].index===0),nr(0),xt())),se=yn(fe(Ne(k),We(C),De(([{items:q},Y])=>q.length>0&&!Y),we(([{items:q}])=>({endIndex:q[q.length-1].index,startIndex:q[0].index})),xt(D1),xr(0)));Ae(se,p.scrollSeekRangeChanged),Ae(fe(_,We(A,O,I,F),we(([q,Y,Z,pe,B])=>{const ae=V1(q),{align:ce,behavior:Q,offset:ue}=ae;let oe=ae.index;oe==="LAST"&&(oe=pe-1),oe=qs(0,oe,Hp(pe-1,oe));let he=Wp(Y,B,Z,oe);return ce==="end"?he=cS(he-Y.height+Z.height):ce==="center"&&(he=cS(he-Y.height/2+Z.height/2)),ue&&(he+=ue),{behavior:Q,top:he}})),l);const te=Xt(fe(k,we(q=>q.offsetBottom+q.bottom)),0);return Ae(fe(T,we(q=>({height:q.visibleHeight,width:q.visibleWidth}))),A),{customScrollParent:m,data:D,deviation:$,footerHeight:o,gap:F,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:O,overscan:n,restoreStateFrom:M,scrollBy:s,scrollContainerState:a,scrollHeight:N,scrollTo:l,scrollToIndex:_,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:v,viewportDimensions:A,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T,...p,gridState:k,horizontalDirection:U,initialTopMostItemIndex:V,totalListHeight:te,...f,endReached:H,propsReady:y,rangeChanged:se,startReached:ee,stateChanged:z,stateRestoreInProgress:C,...E}},bt(Op,nn,Rs,K1,Wr,Np,Hr));function dS(e,t,n){return qs(1,nc((e+n)/(nc(t)+n)))}function fS(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Wp(e,t,n,r[0].index);return{bottom:Wp(e,t,n,r[r.length-1].index)+o,top:i}}function Wp(e,t,n,r){const o=dS(e.width,n.width,t.column),i=nc(r/o),s=i*n.height+qs(0,i-1)*t.row;return s>0?s+t.row:s}const g$=Qe(()=>{const e=ge(d=>`Item ${d}`),t=ge({}),n=ge(null),r=ge("virtuoso-grid-item"),o=ge("virtuoso-grid-list"),i=ge(Vp),s=ge("div"),a=ge(Si),l=(d,f=null)=>Xt(fe(t,we(p=>p[d]),xt()),f),c=ge(!1),u=ge(!1);return Ae(Ne(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),y$=Qe(([e,t])=>({...e,...t}),bt(m$,g$)),v$=S.memo(function(){const e=kt("gridState"),t=kt("listClassName"),n=kt("itemClassName"),r=kt("itemContent"),o=kt("computeItemKey"),i=kt("isSeeking"),s=kn("scrollHeight"),a=kt("ItemComponent"),l=kt("ListComponent"),c=kt("ScrollSeekPlaceholder"),u=kt("context"),d=kn("itemDimensions"),f=kn("gap"),p=kt("log"),g=kt("stateRestoreInProgress"),y=kn("reportReadyState"),m=or(S.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;s(b);const x=v.firstChild;if(x){const{height:T,width:E}=x.getBoundingClientRect();d({height:T,width:E})}f({column:hS("column-gap",getComputedStyle(v).columnGap,p),row:hS("row-gap",getComputedStyle(v).rowGap,p)})},[s,d,f,p]),!0,!1);return J1(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),g?null:h.jsx(l,{className:t,ref:m,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const b=o(v.index,v.data,u);return i?h.jsx(c,{...wt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},b):S.createElement(a,{...wt(a,u),className:n,"data-index":v.index,key:b},r(v.index,v.data,u))})})}),b$=S.memo(function(){const e=kt("HeaderComponent"),t=kn("headerHeight"),n=kt("headerFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,!1),o=kt("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...wt(e,o)})}):null}),x$=S.memo(function(){const e=kt("FooterComponent"),t=kn("footerHeight"),n=kt("headerFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,!1),o=kt("context");return e?h.jsx(n,{ref:r,children:h.jsx(e,{...wt(e,o)})}):null}),w$=({children:e})=>{const t=S.useContext(Q1),n=kn("itemDimensions"),r=kn("viewportDimensions"),o=or(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),h.jsx("div",{ref:o,style:ki(!1),children:e})},S$=({children:e})=>{const t=S.useContext(Q1),n=kn("windowViewportRect"),r=kn("itemDimensions"),o=kt("customScrollParent"),i=xp(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),h.jsx("div",{ref:i,style:ki(!1),children:e})},T$=S.memo(function({...e}){const t=kt("useWindowScroll"),n=kt("customScrollParent"),r=n||t?k$:E$,o=n||t?S$:w$,i=kt("context");return h.jsx(r,{...e,...wt(r,i),children:h.jsxs(o,{children:[h.jsx(b$,{}),h.jsx(v$,{}),h.jsx(x$,{})]})})}),{useEmitter:pS,useEmitterValue:kt,usePublisher:kn}=Mp(y$,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},T$),E$=$p({useEmitter:pS,useEmitterValue:kt,usePublisher:kn}),k$=zp({useEmitter:pS,useEmitterValue:kt,usePublisher:kn});function hS(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,cn.WARN),t==="normal"?0:parseInt(t??"0",10)}const mS=e=>{const t=e.Icon??ry,n=Tt();return h.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[h.jsx(t,{size:64,className:"text-disabled"}),h.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},qp=h.jsx("div",{className:"h-6 w-10/12 animate-pulse rounded bg-muted"}),Us=e=>h.jsx(un,{...e,as:e.as||"span",className:Pe("block h-8 w-32 animate-pulse rounded bg-muted",e.className)});function C$(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 a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const I$=e=>{const t=S.useId(),n=Tt(),r=S.useMemo(()=>C$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return h.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 border-t-muted p-3 text-sm lg:flex-nowrap lg:justify-between",children:[h.jsx("p",{children:h.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?h.jsxs(S.Fragment,{children:[h.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),h.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>h.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),h.jsx("nav",{children:h.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?h.jsx("li",{children:h.jsx(un,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:h.jsx(S.Fragment,{children:typeof i=="string"?h.jsx("li",{children:"..."}):h.jsx("li",{children:h.jsx(un,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?h.jsx("li",{children:h.jsx(un,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},A$=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",s=()=>o("opacity-0"),a=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;a();const u=new IntersectionObserver(d=>d.forEach(a),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),h.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:s,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:h.jsx("div",{ref:n,className:"isolate block",children:e.children})})},P$=(e,t,n)=>{const r=n.cols,o=n.loading;return h.jsx(S.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=yd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=s===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`typography group-table-cell flex border-collapse flex-col whitespace-pre-wrap border border-y border-b border-table-border p-[var(--table-cell-padding)] md:table-cell md:border-b-0 md:border-r md:border-l-transparent md:last:border-r-transparent ${u}`},d?h.jsx(A$,{children:h.jsx(f,{col:i,row:t,rowIndex:e})}):null,h.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),h.jsx("span",{className:"relative",children:o?qp:c?h.jsx(S.Fragment,{children:h.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l})}):h.jsx(S.Fragment,{children:Re.nil(l)?"":l})}))})})},Ci=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[Go(10),Ga({fallbackAxisSideDirection:"end"}),Ua(),id({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Kn({open:n,middleware:i,transform:!0,whileElementsMounted:lo,onOpenChange:(g,y)=>{const m=y?.relatedTarget;m&&m.dataset.floating==="true"&&!g||(r(g),e.onChange?.(g))}}),c=Ko(l),u=Nr(l),d=yr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Zn([c,u,d]);return h.jsxs(S.Fragment,{children:[h.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&h.jsx(gr,{preserveTabOrder:!0,id:`${t}-portal`,children:h.jsx(fo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:h.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:s.setFloating,"aria-labelledby":t,style:a,...p(),children:[h.jsx(sd,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),h.jsx("header",{className:"mb-2",children:h.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})};var Up={},gS;function O$(){return gS||(gS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,v)=>{try{Object.keys(m).forEach(v)}catch(b){window.console.log(b)}},n=m=>m==null,r=m=>{const v=typeof m;return v==="string"||v==="number"||v==="boolean"||n(m)},o=(m,v)=>{const b=v.getItem(m);try{return JSON.parse(b)}catch{return b??null}},i=m=>Object.keys(m).reduce((v,b)=>({...v,[b]:o(b,m)}),{}),s=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,v)=>(m[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(v=>v(m))},d=[{name:"expires",parse:m=>`expires=${s(m.expires??a)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${s(m.expires??a)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const v=m.domain??"";return v===""?"":`domain=${m.multiDomain?".":""}${v}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],f={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(v=>v.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const v=f.json()[m];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((E,I)=>{const w=I.parse(b);return w===""?E:E.concat(w)},[`${encodeURIComponent(m)}=${x}`]).join(";");document.cookie=T,u()}},p=m=>{const v=new Set,b=x=>{m().removeItem(x);const T=i(m());v.forEach(E=>E(T))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(m()):m(),has:x=>{const T=m().getItem(x);return!n(T)},deleteAll:()=>{t(m(),b),v.forEach(x=>x(m()))},get:x=>o(x,m()),set:(x,T)=>{m().setItem(x,JSON.stringify(T)),v.forEach(E=>E(m()))}}},g=p(()=>window.sessionStorage),y=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=y,e.SessionStorage=g,e.createStorage=p})(Up)),Up}var Gs=O$();const Gp=e=>e.headerLabel??e.thead??e.id,Yp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ii=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ii||{});const Kp=e=>e.type==="number"?e.valueAsNumber:e.value,D$=e=>{let t=[];return e({add:(s,a,l)=>t.push({...l,id:s,thead:a}),remove:s=>t=t.filter(a=>a.id!==s),getAll:()=>Array.from(t),filter:s=>t=Array.from(t.filter(s))}),t},N$={},M$=(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 s=r.get(o.id);return s===void 0?e[i]:s})},_$=(e,t,n=N$)=>{const r=Mr()?null:Gs.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=fp({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:M$(t,r?.cols)},s=>{const a=l=>{const c=s.state(),u={...c,...l};return Mr()||Gs.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(s.state()),{set:l=>a(l)}});return{...o,...i,name:e}},F$=e=>{const t=Lr(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const s=n.current.querySelector(`th[data-tableheader="${i.id}"]`);s&&(s.style.width="auto")})},[t]);return[n,r]},L$=()=>Mr()?void 0:document.querySelector('[data-component="modal-body"]'),V$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),$$=(e,t)=>e.toSorted(V$(t)),yS=(e,t,n)=>({label:t,id:Xo(),type:n,value:e.id}),z$=e=>{const t=Tt(),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,yS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return h.jsx(S.Fragment,{children:h.jsx(Ci,{title:t.tableSortDropdownTitle,trigger:h.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[h.jsx(Qg,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:h.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>h.jsxs("li",{className:"flex flex-nowrap gap-3",children:[h.jsx(po,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),h.jsx(po,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),h.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:h.jsx(Sa,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-primary",children:[h.jsx(Lu,{size:14})," ",t.tableSortAddButton]})})]})})})},j$=e=>{const t=Tt(),[n,r]=S.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=yS(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Gp(e.col);return h.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[h.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?h.jsx(DI,{size:14}):null,n==="desc"?h.jsx(OI,{size:14}):null,n==="undefined"?h.jsx(Qg,{size:14}):null]})},vS=S.createContext({}),B$=vS.Provider,R$=()=>S.useContext(vS),Zp=(e,t,n,r={})=>{const o=e.id,i=e.type??Ii.Text,s=t[i]??[],a=s.find(c=>c["data-default"])?.value??s[0]?.value,l=n[a];return{id:Xo(),operation:l,label:Gp(e),name:o,type:i,value:"",...r}},Xp=()=>{const e=Tt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[Ii.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ii.Boolean]:[t.is,t.isNot],[Ii.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},H$=e=>{const t=Tt(),n=Xp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Zp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(g=>u===g.id);return Zp(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=Kp(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return h.jsx(S.Fragment,{children:h.jsx(Ci,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:h.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[h.jsx(jI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:h.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return h.jsxs("li",{className:"flex flex-nowrap gap-3",children:[h.jsx(po,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),h.jsx(po,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),h.jsx(Jo,{optionalText:"","data-id":l.id,onChange:a,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),h.jsx("div",{className:"mt-5 flex items-center justify-center",children:h.jsx("button",{"data-id":l.id,type:"button",onClick:s,children:h.jsx(Sa,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[h.jsx(Lu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},W$=({filter:e,onDelete:t,set:n})=>{const r=Tt(),o=Xp(),i=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},s=a=>{const l=a.target.dataset.id||"",c=Kp(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return h.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[h.jsx(po,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),h.jsx(Jo,{optionalText:" ","data-id":e.id,onChange:s,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),h.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:h.jsx(Sa,{className:"text-danger",size:14})})]})},q$={top:0,left:0,right:0,bottom:-1},U$=e=>{const t=ju(),n=Tt(),r=e.filters.filter(y=>y.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,s=e.header.allowFilter??t.table.filters??!0,a=Xp(),l=o?HI:WI,c=S.useRef(null),u=y=>{const m=y.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==m))},d=S.useCallback(y=>{if(y===null)return;c.current=y;const m=new AbortController;return y.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),f=e.sorters.find(y=>e.header.id===y.value),p=f?.type?f.type===g1.Asc?"ascending":"descending":"none",g=Gp(e.header);return h.jsxs(Yw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`typography relative min-w-0 cursor-grab font-medium md:h-14 ${e.header.thProps?.className??""}`,children:[h.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:h.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?h.jsx(Ci,{arrow:!0,trigger:h.jsxs("span",{children:[h.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",g]}),h.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:h.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",h.jsx("span",{className:"font-medium",children:g})]}),children:h.jsxs("ul",{className:"font-medium",children:[r.length===0?null:h.jsx(S.Fragment,{children:r.map(y=>h.jsx("li",{className:"my-1",children:h.jsx(W$,{onDelete:u,filter:y,set:e.setFilters})},`thead-filter-${y.id}`))}),h.jsx("li",{children:h.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(y=>y.concat(Zp(e.header,a.options,a.operations))),children:[h.jsx(Lu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,h.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?h.jsx(j$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:h.jsx(He.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:q$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-transparent hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:y=>{y.currentTarget.focus()},onKeyDown:y=>{if(y.key==="ArrowLeft"||y.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const m=c.current.getBoundingClientRect().width,b=(y.shiftKey?50:10)*(y.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(m+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(y,m)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=m.delta.x;c.current.style.width=`${Math.abs(v+b)}px`}})]})},G$=e=>{const[t,n]=F$(e.setCols);return h.jsx(qw,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:h.jsx(gn,{children:e.headers.map((r,o)=>h.jsx(U$,{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}`))})})},Y$=S.forwardRef(({context:e,className:t="",...n},r)=>h.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:h.jsx(gn,{children:n.children})})),K$=S.forwardRef(({context:e,className:t="",...n},r)=>h.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-separate border-spacing-0 text-left ${t??""}`})),Z$=S.forwardRef(({context:e,...t},n)=>{const r=R$(),o={...t?.style,top:Re.number(r.sticky)?`${r.sticky}px`:void 0};return h.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"group:sticky top-0 hidden bg-transparent md:table-header-group"})}),X$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return h.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 pb-4 md:table-row ${n?.className??""}`})}),Q$=S.forwardRef((e,t)=>e.context.loadingMore?h.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:h.jsx("tr",{role:"row",className:"bg-card-background",children:h.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:h.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),J$={TableRow:X$,TableFoot:Q$,TableHead:Z$,Table:K$,TableBody:Y$},ez=[0,0,0,0,0,0,0,0,0,0],tz=e=>h.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?qp:h.jsx(mS,{})}),nz=()=>h.jsx(S.Fragment,{}),rz=[],bS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:s,getScrollRef:a,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=Lr(s),g=Lr(u.loadingMore),y=S.useMemo(()=>{if(u.loading)return ez;if(c)return u.rows;const b=new y1(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():$$(b.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&g.current?(p.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[g,p]);const m=y.length===0,v={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return h.jsxs("div",{className:"group relative flex w-full flex-col whitespace-nowrap rounded-lg",children:[h.jsx(d$,{components:J$,context:v,totalCount:y.length,itemContent:m?nz:P$,data:m?rz:y,useWindowScroll:!a,customScrollParent:a?a():void 0,fixedHeaderContent:()=>h.jsx(G$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),m?h.jsx(tz,{loading:u.loading}):null,h.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"}),l!==null?h.jsx(I$,{...l}):null]})},oz=({item:e,onPointerDown:t})=>{const n=wo(0);return h.jsxs(Yw,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[h.jsx("button",{type:"button",className:"cursor-grab",children:h.jsx(zI,{size:14})}),h.jsx("span",{children:e.groupName})]},e.groupId)},iz=e=>{const t=Tt(),n=Yp(e.cols),r=tL(),[o,i]=S.useState(e.groups[0]?.thead||""),s=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new y1(e.rows).GroupBy(u),g=e.cols.find(y=>y.id===u);e.setGroups(pC(p).map((y,m)=>{const v=p[y];return{...g,groupId:Xo(),groupKey:u,index:m,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return h.jsx(S.Fragment,{children:h.jsxs(Ci,{arrow:!1,title:t.tableGroupLabel,trigger:h.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[h.jsx(qI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[h.jsxs("div",{className:"flex flex-nowrap items-center",children:[h.jsx(po,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),h.jsx(Jt,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:h.jsx(Sa,{size:16,className:"text-danger"})})]}),e.groups.length>0?h.jsxs("section",{className:"my-4",children:[h.jsx("header",{children:h.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),h.jsx(k2,{children:h.jsx(qw,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>h.jsx(oz,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},sz=e=>h.jsx("header",{className:"mb-1 min-w-full",children:h.jsxs("div",{className:"flex min-w-full flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[h.jsxs("div",{className:"items-centeend flex w-fit gap-4 whitespace-nowrap py-2",children:[h.jsx("span",{children:h.jsx(H$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),h.jsx("span",{children:h.jsx(z$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),h.jsx("span",{children:h.jsx(iz,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),h.jsx("ul",{className:"flex w-full flex-1 flex-grow flex-row flex-wrap items-center gap-4 md:justify-end",children:e.filters.map(t=>h.jsxs("li",{className:"flex items-center gap-1 rounded-xl border border-card-border px-4 py-0.5",children:[h.jsxs("span",{children:[h.jsx("span",{className:"mr-2 inline-block aspect-square size-3 rounded-full bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),h.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[h.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),h.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=Kp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),az=(e,t)=>typeof t=="function"?t(e):t,oc=(e,t,n)=>e===t?void 0:n?.(t),lz=e=>{const t=ju(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Yp(e.cols),[e.cols]),[i,s]=fp({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const l=c=>u=>{const d=a.state();return{...d,[c]:az(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(a,l)=>(e.set?.(a),oc(l?.filters??[],a.filters??[],e.setFilters),oc(l?.sorters??[],a.sorters??[],e.setSorters),oc(l?.groups??[],a.groups??[],e.setGroups),oc(l?.cols??[],a.cols??[],e.setCols),a)]});return S.useEffect(()=>{s.cols(e.cols)},[e.cols]),h.jsx(B$,{value:n,children:h.jsxs(gn,{initial:!1,children:[r?h.jsx(sz,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?h.jsx(bS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):h.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((a,l)=>h.jsx("div",{className:"min-w-full",children:h.jsx(bS,{...e,group:a,index:l,cols:i.cols,pagination:null,rows:a.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},ic=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:s="",...a})=>h.jsxs(un,{...a,as:r||"div","data-component":"card",className:Pe("flex w-full flex-col gap-4 rounded-card border border-card-border bg-card-background py-3 shadow-shadow-card",i),children:[e?h.jsx("header",{"data-component":"card-title",className:Pe("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",s),children:e}):o,h.jsx("div",{"data-component":"card-body",className:Pe("min-w-full px-6",a.className),children:t?h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(Us,{className:"w-full"}),h.jsx(Us,{className:"w-8/12"}),h.jsx(Us,{className:"w-10/12"}),h.jsx(Us,{className:"w-1/2"})]}):n})]});ic.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",s=t||"h2",a=n||"nav";return h.jsxs(i,{...o,title:Re.string(o.title)?o.title:void 0,className:Pe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[h.jsx(s,{className:"font-semibold",children:o.title}),r?h.jsx(a,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const cz=e=>{const t=e.interactive??!0,n=e.Icon??Er;return h.jsx(ic,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex items-center gap-4 px-0",children:h.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[h.jsx("div",{className:Pe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:h.jsx(n,{size:48})}),h.jsxs("div",{className:"flex flex-col justify-center gap-2 py-2",children:[h.jsx("p",{className:"text-lg",children:e.title}),e.loading?h.jsx(Us,{className:"h-10"}):h.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},uz=({item:e,context:t,setter:n,get:r,refs:o})=>h.jsx(gr,{children:h.jsx(Yf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:h.jsxs(gn,{presenceAffectsLayout:!0,children:[e?h.jsx(He.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?h.jsx(pd,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:h.jsx(fo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:h.jsxs(He.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[h.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:h.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:h.jsx(jo,{})})}),h.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[h.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),h.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),dz=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Kn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),s=Ko(o),a=yr(o,{role:"dialog"}),l=Nr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Zn([s,a,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return h.jsxs(S.Fragment,{children:[h.jsx(uz,{refs:i,context:o,get:c,item:t,setter:u}),h.jsx("ul",{role:"list",children:d.map((f,p)=>{const g=f.props,y=`${r}-${p}`,m=()=>n({...g,id:y}),v=g.leading;return h.jsx(He.li,{layout:!0,layoutId:`item-${y}`,className:"border-b border-card-border py-2 last:border-transparent",children:h.jsx(He.div,{layoutId:`toast-${y}`,className:"relative",children:h.jsx("div",{className:"relative flex items-start space-x-3",children:h.jsxs(S.Fragment,{children:[g.avatar?h.jsx("div",{children:h.jsx("div",{className:"relative px-1",children:h.jsx("button",{onClick:m,className:"flex size-10 items-center justify-center ring-primary",children:g.avatar})})}):null,h.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:h.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[h.jsxs("button",{onClick:m,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[h.jsx("h3",{children:g.title}),h.jsx("p",{className:"text-sm leading-snug text-secondary",children:g.description})]}),v?h.jsx(v,{open:m}):null]})})]})})})},y)})})]})},fz=e=>h.jsx(S.Fragment,{children:e.children}),xS=()=>{const e=S.useContext(oo);return e?e.parser:Ta.hsla},Qp=.3,sc={duration:Qp,type:"tween",ease:"easeInOut"},wS=S.createContext(null),Jp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},Ai={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},pz=e=>h.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx(He.path,{className:"currentColor",initial:Ai.initial,animate:Ai.animate,transition:Jp,d:"M18 6 6 18"}),h.jsx(He.path,{className:"currentColor",initial:Ai.initial,animate:Ai.animate,transition:Jp,d:"m6 6 12 12"})]}),hz=e=>h.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:h.jsx(He.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:Ai.animate,initial:Ai.initial,transition:Jp})}),mz={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},gz={duration:.6,delay:.2,type:"tween",ease:"circOut"},yz=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",vz=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,SS=()=>S.useContext(wS),bz=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const s=xS(),a=SS(),[l,c]=S.useState(t);S.useEffect(()=>{if(!a){c(t);return}const d=vz(e,a.currentStep,a.previousStep,a.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,a,e]);const u=yz(e,l,n);return a?.steps&&100/a?.steps,h.jsxs(S.Fragment,{children:[h.jsx("div",{className:`hidden h-[2px] w-full bg-card-border first:hidden xl:block ${u==="active"||u==="complete"?"bg-success":""}`}),h.jsxs(He.button,{...i,type:"button","data-step":e,animate:u,className:"relative flex w-auto items-center justify-center text-center",children:[h.jsx(He.div,{variants:mz,transition:gz,className:`absolute inset-0 hidden rounded-full text-center xl:block ${u==="error"?"bg-danger":""}`}),h.jsx(He.div,{initial:!1,animate:u,transition:sc,className:"relative flex aspect-square size-10 items-center justify-center rounded-full font-semibold",variants:{error:{color:s("var(--danger-foreground)"),borderColor:s("var(--danger-hover)"),backgroundColor:s("var(--danger-DEFAULT)")},inactive:{transition:sc,color:s("var(--disabled)"),borderColor:s("var(--card-border)"),backgroundColor:s("var(--background)")},active:{transition:sc,color:s("var(--primary-foreground)"),borderColor:s("var(--primary-DEFAULT)"),backgroundColor:s("var(--primary-DEFAULT)")},complete:{transition:sc,color:s("var(--success-foreground)"),borderColor:s("var(--success-DEFAULT)"),backgroundColor:s("var(--success-DEFAULT)")}},children:h.jsx("div",{className:"flex items-center justify-center",children:u==="complete"?h.jsx(hz,{className:"size-6 text-primary-foreground"}):u==="error"?h.jsx(pz,{className:"size-6 text-danger-foreground"}):h.jsx(S.Fragment,{children:h.jsx("span",{children:e})})})}),h.jsx("header",{className:"flex flex-col items-start justify-start px-2",children:h.jsx("h3",{className:`flex h-full items-center whitespace-nowrap ${o}`,children:r})})]})]})},xz=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Qp*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Qp,steps:S.Children.count(e.children)};return h.jsx(wS.Provider,{value:o,children:h.jsx("div",{className:"relative flex w-full flex-col items-start justify-center gap-4 lg:flex-row lg:items-center lg:justify-between",children:e.children})})},TS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},ES={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},kS=S.createContext(""),wz=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",eh=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const s=e[i];if(!wz(s))return s}return n==="backward"?eh(e,e.length-1,"backward"):eh(e,-1,"forward")},CS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=eh(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},IS={[ES.ArrowLeft]:(e,t)=>CS(t,"backward"),[ES.ArrowRight]:(e,t)=>CS(t,"forward")},Sz=e=>{const[t,n]=TS(e.active),r=S.useRef(null),o=Lr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),s=l=>{const c=l.currentTarget;n(c.dataset.id||"")},a=l=>{if(r.current===null)return;const c=l.key;if(Re.keyof(IS,c)){const u=IS[c],d=u(l,r.current);if(d===null)return;n(d)}};return h.jsx(kS.Provider,{value:t,children:h.jsx(ic,{className:e.className,container:Pe("pt-0 max-w-full w-full min-w-0",e.container),header:h.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[h.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),h.jsx("nav",{className:"min-w-0",children:h.jsx("ul",{onKeyDown:a,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 h.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Pe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:h.jsx(un,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:s,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},Tz=()=>S.useContext(kS),Ez=e=>{const t=Tz();return h.jsx(S.Fragment,{children:e.id===t?e.children:null})},AS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},kz={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},PS=e=>h.jsx(He.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:AS,exit:AS.false,transition:kz,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Pe("aria-hidden:pointer-events-none",e.className),children:e.children}),Cz=_o("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),Iz=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const l=()=>o?.(!1);return h.jsx(gn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?h.jsx(He.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Pe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:h.jsx(PS,{"data-open":!!i,open:!!i,children:h.jsx(un,{...s,ref:a,role:"alert","data-theme":n,as:s.as??"div",className:Pe(Cz({theme:n}),t),children:h.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",children:[o!==void 0&&i?h.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:h.jsx(jo,{size:20})}):null,h.jsxs("div",{className:Pe("flex items-center gap-2",s.title?"":"w-fit"),children:[!r&&n==="success"?h.jsx(_u,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?h.jsx(Er,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?h.jsx($u,{"aria-hidden":"true",size:20}):null,r]}),s.title?h.jsx("h4",{className:"tracking-3 col-start-2 text-balance text-lg font-semibold",children:s.title}):null,h.jsx("div",{className:"col-start-2 w-full",children:s.children})]})})})}):null})}),Az=e=>h.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[h.jsxs("header",{className:"flex items-start gap-4 p-6",children:[h.jsx("div",{className:Pe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:h.jsx("div",{children:h.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("header",{children:h.jsx("h3",{className:"text-base leading-none",children:e.title})}),h.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?h.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Pz=Symbol.for("react.lazy");function OS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Oz(...e){return t=>{let n=!1;const r=e.map(o=>{const i=OS(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():OS(e[o],null)}}}}const ac=P[" use ".trim().toString()];function Dz(e){return typeof e=="object"&&e!==null&&"then"in e}function DS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Pz&&"_payload"in e&&Dz(e._payload)}function Nz(e){const t=Mz(e),n=P.forwardRef((r,o)=>{let{children:i,...s}=r;DS(i)&&typeof ac=="function"&&(i=ac(i._payload));const a=P.Children.toArray(i),l=a.find(Fz);if(l){const c=l.props.children,u=a.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return h.jsx(t,{...s,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return h.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const NS=Nz("Slot");function Mz(e){const t=P.forwardRef((n,r)=>{let{children:o,...i}=n;if(DS(o)&&typeof ac=="function"&&(o=ac(o._payload)),P.isValidElement(o)){const s=Vz(o),a=Lz(i,o.props);return o.type!==P.Fragment&&(a.ref=r?Oz(r,s):s),P.cloneElement(o,a)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const _z=Symbol("radix.slottable");function Fz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_z}function Lz(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]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Vz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const MS=(e="")=>Pe("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),th=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),_S=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:s="",label:a,...l},c)=>{const[u,d]=S.useState(r??!1),[f,p]=S.useState(!1),[g,y]=S.useState(null),m=S.useRef([]),v=S.useRef([]),b=S.useContext(th),x=Pr(),T=Or(),E=$P(),I=Zy(),w=x!==null,{floatingStyles:k,refs:A,context:O}=Kn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:lo,placement:w?"right":"bottom-start",middleware:[Go({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ga(),Ua()]}),_=yr(O,{role:"menu"}),N=Nr(O,{bubbles:!0}),$=sv(O,{move:!1,enabled:n,delay:{open:Ov},handleClose:Pv({blockPointerEvents:!0,requireIntent:!1})}),D=Ko(O,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),F=nl(O,{loop:!0,activeIndex:g,nested:w,listRef:m,onNavigate:y}),z=uO(O,{activeIndex:g,listRef:v,resetMs:fO,onMatch:u?y:void 0}),{getReferenceProps:M,getFloatingProps:C,getItemProps:V}=Zn([$,D,_,N,F,z]);S.useEffect(()=>{if(!T)return;const R=()=>d(!1),U=G=>{G.nodeId!==E&&G.parentId===x&&d(!1)};return T.events.on("click",R),T.events.on("menuopen",U),()=>{T.events.off("click",R),T.events.off("menuopen",U)}},[T,E,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:E})},[T,u,E,x]);const L=o?l.className:Pe(MS(l.className));return h.jsxs(zP,{id:E,children:[h.jsx(S.Fragment,{children:l.asChild?h.jsx(NS,{...M(b.getItemProps({...l,onFocus(R){l.onFocus?.(R),p(!1),b.setHasFocusInside(!0)}})),children:a,className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:fr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):h.jsxs("button",{type:"button",className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:fr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(R){l.onFocus?.(R),p(!1),b.setHasFocusInside(!0)}})),children:[a,w&&h.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[h.jsx("span",{className:"sr-only",children:"Next menu"}),h.jsx(wa,{size:14})]})]})}),h.jsx(th.Provider,{value:{activeIndex:g,setActiveIndex:y,getItemProps:V,setHasFocusInside:p,isOpen:u},children:h.jsx(NP,{elementsRef:m,labelsRef:v,children:u&&h.jsx(gr,{children:h.jsx(fo,{context:O,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:h.jsx(t,{...C(),ref:A.setFloating,style:{...l.style,...k},className:Pe("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",s),children:e})})})})})]})}),$z=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const s=S.useContext(th),a=Zy({label:n?null:e}),l=Or(),c=a.index===s.activeIndex;return h.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":s.isOpen,tabIndex:c?0:-1,ref:fr(a.ref,i),className:MS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...s.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),s.setHasFocusInside(!0)}}),children:[r,t?h.jsx(t,{size:16}):null]})}),zz=S.forwardRef((e,t)=>Pr()===null?h.jsx(jP,{children:h.jsx(_S,{...e,isParent:!0,ref:t})}):h.jsx(_S,{...e,isParent:!1,ref:t})),nh=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:s,container:a,...l},c)=>{const u=l.disabled||r;return h.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Pe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[h.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Pe("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,h.jsx("span",{"data-name":"checkbox-label",className:Pe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),jz=({children:e,className:t="",size:n,...r})=>h.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:[h.jsx("input",{...r,type:"radio",className:Pe("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]}),Bz=Lv("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
16
- `);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)}),Rz=(e,t)=>Mr()?t:window.matchMedia(e).matches,Hz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Rz(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},Wz=()=>S.useContext(oo).floatingRef??void 0,FS=S.createContext(async()=>!1),qz=()=>S.useContext(FS),Cn="500ms",Uz={exit:{x:["0%","-30%"],opacity:0,animationDuration:Cn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Cn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Cn}},Gz={enter:{x:"0%",opacity:1,animationDuration:Cn},exit:{x:["0%","30%"],opacity:0,animationDuration:Cn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Cn}},rh={drawer:e=>e==="left"?Uz:Gz,sheet:{enter:{opacity:1,y:"0%",animationDuration:Cn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Cn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Cn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Cn},enter:{opacity:1,scale:[1.05,1],animationDuration:Cn},initial:{opacity:.5,scale:.95,animationDuration:Cn,transition:{duration:.5,ease:"easeInOut"}}}},Yz=_o("z-floating border border-floating-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"}}),LS={top:0,left:0,right:0,bottom:0},VS=e=>e*.6,Kz=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=VS(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,s=e.position==="right"?-r.delta.x:r.delta.x,a=Math.abs(i+s);return e.value.set(a)}};return h.jsx(He.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:LS,whileDrag:{cursor:"grabbing"},className:Pe("absolute isolate z-calendar 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?h.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},lc={drawer:"right",sheet:"none",dialog:"none"},Zz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??lc.drawer:lc[o]:t?lc[o]:lc.sheet},Xz=[],Ys=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:s,ariaTitle:a,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:g=void 0,overlayClassName:y="",type:m="dialog",position:v,overlayClickClose:b=!1,closeOnFocusOut:x=!1,interactions:T=Xz,...E},I)=>{const w=Wz(),k=S.useRef(null),A=S.useRef(null),O=S.useId(),_=S.useId(),N=Hz("(min-width: 64rem)"),$=Zz(N,p,m,v),D=N||p?rh[m]:rh.sheet,F=typeof D=="function"?D($):D,z=N||p?m:"sheet",M=z!=="dialog",C=Kn({open:e,onOpenChange:s,strategy:"fixed"}),V=Ko(C.context,{}),L=yr(C.context,{role:"dialog"}),R=Nr(C.context,{bubbles:!0,escapeKey:!0,outsidePress:ce=>{const Q=ce.target;return b&&!!Q?.isConnected}}),U=Zn([V,R,L].concat(T)),G=o,H=wo(void 0),ee=wo(void 0),se=S.useRef(!1),te=S.useRef(0);S.useEffect(()=>{H.set(void 0),ee.set(void 0)},[z,H,ee]);const q=()=>s(!1);S.useImperativeHandle(I,()=>({context:C.context,floating:A.current}),[C.context,A]);const Z=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:LS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ce,Q)=>{const oe=C.refs.floating.current.getBoundingClientRect(),he=H.get()||oe.height,ie=Math.abs(he-Q.delta.y),le=window.outerHeight,be=VS(le);return ie>=be?H.set(ie):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>H.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},pe=wo(void 0),B=wo(void 0),ae=r?NS:He.button;return h.jsxs(S.Fragment,{children:[o?h.jsx(ae,{ref:C.refs.setReference,...U.getReferenceProps(),layoutId:g,type:"button",children:G}):null,h.jsx(Yf,{reducedMotion:d?"user":"always",children:h.jsx(gr,{preserveTabOrder:!0,root:w,children:h.jsx(gn,{mode:"wait",propagate:!0,children:e?h.jsx(pd,{lockScroll:!0,className:Pe("inset-0 isolate z-overlay flex h-[100dvh] !overflow-clip bg-floating-overlay/70",z==="drawer"?"":"items-start justify-center pt-10 lg:p-10",y),children:h.jsx(fo,{guards:!0,modal:!0,closeOnFocusOut:x,context:C.context,children:h.jsx(gn,{propagate:!0,children:h.jsxs(He.div,{...E,...t?{"aria-labelledby":O,"aria-describedby":_}:{"aria-label":a},...U.getFloatingProps({"aria-modal":e,ref:fr(C.refs.setFloating,A),className:Pe(Yz({position:$,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:g,variants:F,"data-component":"modal",style:z==="drawer"?{width:H}:{height:H,y:ee},children:[M&&u?h.jsx(Kz,{onChange:s,value:H,sheet:z==="sheet",position:$,parent:C.refs.floating}):null,t?h.jsx(He.header,{...Z,className:"relative isolate w-full",children:t?h.jsx("h2",{id:O,className:"block select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,h.jsx(He.section,{ref:k,"data-component":"modal-body",className:Pe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(B.set(void 0),pe.set(void 0),se.current){const ce=ee.get()||0,Q=window.innerHeight*.2;ce>Q?(await Hw(ee,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,s(!1)):Hw(ee,0,{type:"spring",bounce:0,duration:.3}),se.current=!1}},onTouchStart:ce=>{const Q=ce.changedTouches[0];pe.set(Q.pageY),B.set(Q.pageY),se.current=!1},onTouchMove:ce=>{const ue=ce.changedTouches[0].pageY,oe=B.get()||ue,he=k.current?.scrollTop||0;if(!se.current&&he<=0&&ue>oe&&z==="sheet"&&(se.current=!0,te.current=ue),se.current){const ie=ue-te.current;ie<0?ee.set(ie*.2):ee.set(ie)}B.set(ue)},children:i}),n?h.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,f?h.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:h.jsx("button",{type:"button",onClick:q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:h.jsx(jo,{})})}):null]})})})}):null})})})]})});let $S=async e=>(typeof window<"u"&&console.warn("ConfirmationProvider is not mounted"),!1);Ys.confirm=e=>$S(e);const zS=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState({}),[i,s]=S.useState(()=>{}),a=S.useCallback(u=>(o(u),n(!0),new Promise(d=>{s(()=>d)})),[]);S.useEffect(()=>{$S=a},[a]);const l=()=>{n(!1);const u=r.confirm?.value??!0;i(u??!0)},c=()=>{n(!1);const u=r.cancel?.value??!1;i(u??!1)};return h.jsxs(FS.Provider,{value:a,children:[e,h.jsx(Ys,{open:t,type:"dialog",closable:!1,onChange:n,overlayClickClose:!1,title:r.title||"Confirmation",className:"container max-w-dialog lg:max-w-96",footer:h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx(Jt,{theme:r.cancel?.theme||"ghost-muted",onClick:c,children:r.cancel?.text||"Cancel"}),h.jsx(Jt,{theme:r.confirm?.theme||"primary",onClick:l,children:r.confirm?.text||"Confirm"})]}),children:h.jsx("div",{className:"py-2 text-foreground",children:r.description})})]})},Qz=e=>{const[t,n]=QF();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:n_(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),h.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},Jz=e=>h.jsx("p",{...e,className:Pe("text-base leading-snug",e.className)}),ej=e=>h.jsx("p",{...e,className:Pe("mb-kilo text-sm text-secondary",e.className)}),tj=e=>h.jsx("div",{className:Pe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:h.jsxs(S.Fragment,{children:[h.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),h.jsx("span",{className:Pe(e.disabled?"text-disabled":"",e.row?"w-fit text-base":"w-full text-lg"),children:e.children})]})}),jS=e=>h.jsxs("div",{children:[h.jsx("h2",{className:"typography text-3xl font-bold tracking-wide",children:e.title}),h.jsx("p",{className:"typography text-secondary",children:e.children})]}),nj=e=>h.jsxs("header",{className:"gap-mega flex flex-row flex-wrap items-center justify-between",children:[h.jsx("div",{children:h.jsx(jS,{title:e.title,children:e.description})}),h.jsx("div",{className:"gap-kilo flex flex-wrap items-center",children:e.children})]}),BS=e=>h.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Pe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),rj=()=>h.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:h.jsx(BS,{})}),oj=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=S.useState(e.open??!1);S.useEffect(()=>{s(e.open??!1)},[e.open]);const{context:a,refs:l}=Kn({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=Ko(a,{enabled:e.disabled??!0}),u=yr(a,{role:"tooltip"}),d=Nr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Zn([c,u,d]);return h.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[h.jsx(Jt,{...p(e),as:He.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:h.jsx(He.span,{layoutId:o,children:e.trigger})}),h.jsx(gn,{children:i?h.jsx(gr,{root:t,children:h.jsx(fo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:h.jsx(He.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},ij=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},sj=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},aj=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),lj=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,cj=({steps:e,active:t=!1,onClose:n=Qo,onFinish:r=Qo,onChange:o=Qo,labels:i})=>{const s=Tt(),[a,l]=S.useState(0),c=e[a],[u,d]=S.useState(null),[f,p]=S.useState(aj()),[g,y]=S.useState(!1),m=S.useRef(null),{width:v,height:b}=sj(),x={next:i?.next??s.driverNext,previous:i?.previous??s.driverPrevious,finish:i?.finish??s.driverFinish,skip:i?.skip??s.driverSkip},{refs:T,floatingStyles:E,context:I}=Kn({open:t&&g,placement:c?.side||"bottom",whileElementsMounted:lo,middleware:[Go(10),Ga(),Ua(),id({element:m})]}),{getFloatingProps:w}=Zn([yr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{y(!1)},[a,t]),S.useEffect(()=>{if(!t||!c)return;const N=lj(c.element);N?(c.onEnter?.(),setTimeout(()=>{p(N.getBoundingClientRect()),T.setReference(N),d(N)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[a,t,c,T]),S.useLayoutEffect(()=>{if(!u)return;const N=()=>p(u.getBoundingClientRect());return N(),window.addEventListener("scroll",N,{capture:!0,passive:!0}),window.addEventListener("resize",N,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",N,{capture:!0}),window.removeEventListener("resize",N,{capture:!0})}},[u,v,b]),ij(u,N=>{p(N.target.getBoundingClientRect())});const k=()=>{c.onNext?.(),setTimeout(()=>{a<e.length-1?(l(N=>N+1),o(a+1)):(r(),n())},0)},A=()=>{c.onPrevious?.(),a>0&&(l(N=>N-1),o(a-1))};if(!t)return null;const O=a<e.length-1,_=a>0;return h.jsx(gr,{children:h.jsxs("div",{className:"pointer-events-none fixed inset-0 z-wizard",children:[h.jsxs("svg",{className:"absolute inset-0 h-full w-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("defs",{children:h.jsxs("mask",{id:"driver-mask",children:[h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),h.jsx(He.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>y(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),h.jsx(gn,{mode:"wait",children:c&&g&&h.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"pointer-events-auto outline-none",children:h.jsxs(He.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex w-80 max-w-sm flex-col gap-3 rounded-lg border border-floating-border bg-floating-background p-4 shadow-lg",children:[u&&h.jsx(sd,{ref:m,context:I,className:"fill-floating-background stroke-floating-border"}),c.title&&h.jsx("h3",{children:c.title}),c.description&&h.jsx(S.Fragment,{children:c.description}),h.jsxs("div",{className:"mt-2 flex items-center justify-between border-t border-floating-border pt-2",children:[h.jsx(Jt,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),h.jsxs("div",{className:"flex gap-2",children:[_&&h.jsx(Jt,{size:"small",theme:"ghost-muted",onClick:A,children:x.previous}),h.jsx(Jt,{size:"small",onClick:k,children:O?x.next:x.finish})]})]}),h.jsxs("div",{className:"absolute right-2 top-2 text-xs text-muted-foreground",children:[a+1," / ",e.length]})]})})})]})})},RS=6048e5,uj=864e5,dj=6e4,fj=36e5,pj=1e3,HS=Symbol.for("constructDateFrom");function dt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&HS in e?e[HS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return dt(t||e,e)}function qr(e,t,n){const r=Je(e,n?.in);return isNaN(t)?dt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function oh(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return dt(e,NaN);if(!t)return r;const o=r.getDate(),i=dt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Pi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n?.in),d=o||r?oh(u,o+r*12):u,f=s||i?qr(d,s+i*7):d,p=l+a*60,y=(c+p*60)*1e3;return dt(e,+f+y)}let hj={};function ko(){return hj}function In(e,t){const n=ko(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Oi(e,t){return In(e,{...t,weekStartsOn:1})}function WS(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=dt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Oi(o),s=dt(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=Oi(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function cc(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function uc(e,...t){const n=dt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Co(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function mj(e,t,n){const[r,o]=uc(n?.in,e,t),i=Co(r),s=Co(o),a=+i-cc(i),l=+s-cc(s);return Math.round((a-l)/uj)}function gj(e,t){const n=WS(e,t),r=dt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Oi(r)}function qS(e,t,n){return qr(e,t*7,n)}function yj(e){return dt(e,Date.now())}function vj(e,t,n){const[r,o]=uc(n?.in,e,t);return+Co(r)==+Co(o)}function bj(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dc(e){return!(!bj(e)&&typeof e!="number"||isNaN(+Je(e)))}function xj(e,t){const[n,r]=uc(e,t.start,t.end);return{start:n,end:r}}function US(e,t){const{start:n,end:r}=xj(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(dt(n,s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function ih(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function wj(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Sj(e,t){const n=ko(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const Tj={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ej=(e,t,n)=>{let r;const o=Tj[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function sh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const kj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Cj={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ij={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Aj={date:sh({formats:kj,defaultWidth:"full"}),time:sh({formats:Cj,defaultWidth:"full"}),dateTime:sh({formats:Ij,defaultWidth:"full"})},Pj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Oj=(e,t,n,r)=>Pj[e];function Ks(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Dj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Nj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Mj={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_j={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Fj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Lj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Vj={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ks({values:Dj,defaultWidth:"wide"}),quarter:Ks({values:Nj,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ks({values:Mj,defaultWidth:"wide"}),day:Ks({values:_j,defaultWidth:"wide"}),dayPeriod:Ks({values:Fj,defaultWidth:"wide",formattingValues:Lj,defaultFormattingWidth:"wide"})};function Zs(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?zj(a,d=>d.test(s)):$j(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function $j(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function zj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function jj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const Bj=/^(\d+)(th|st|nd|rd)?/i,Rj=/\d+/i,Hj={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Wj={any:[/^b/i,/^(a|c)/i]},qj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Uj={any:[/1/i,/2/i,/3/i,/4/i]},Gj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Yj={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Kj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Zj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Qj={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Jj={ordinalNumber:jj({matchPattern:Bj,parsePattern:Rj,valueCallback:e=>parseInt(e,10)}),era:Zs({matchPatterns:Hj,defaultMatchWidth:"wide",parsePatterns:Wj,defaultParseWidth:"any"}),quarter:Zs({matchPatterns:qj,defaultMatchWidth:"wide",parsePatterns:Uj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Zs({matchPatterns:Gj,defaultMatchWidth:"wide",parsePatterns:Yj,defaultParseWidth:"any"}),day:Zs({matchPatterns:Kj,defaultMatchWidth:"wide",parsePatterns:Zj,defaultParseWidth:"any"}),dayPeriod:Zs({matchPatterns:Xj,defaultMatchWidth:"any",parsePatterns:Qj,defaultParseWidth:"any"})},GS={code:"en-US",formatDistance:Ej,formatLong:Aj,formatRelative:Oj,localize:Vj,match:Jj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function eB(e,t){const n=Je(e,t?.in);return mj(n,wj(n))+1}function ah(e,t){const n=Je(e,t?.in),r=+Oi(n)-+gj(n);return Math.round(r/RS)+1}function lh(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=ko(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=dt(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=In(s,t),l=dt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=In(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function tB(e,t){const n=ko(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=lh(e,t),i=dt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),In(i,t)}function YS(e,t){const n=Je(e,t?.in),r=+In(n,t)-+tB(n,t);return Math.round(r/RS)+1}function ft(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ur={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ft(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ft(n+1,2)},d(e,t){return ft(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ft(e.getHours()%12||12,t.length)},H(e,t){return ft(e.getHours(),t.length)},m(e,t){return ft(e.getMinutes(),t.length)},s(e,t){return ft(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ft(o,t.length)}},Di={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},KS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ur.y(e,t)},Y:function(e,t,n,r){const o=lh(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return ft(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):ft(i,t.length)},R:function(e,t){const n=WS(e);return ft(n,t.length)},u:function(e,t){const n=e.getFullYear();return ft(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ft(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ft(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ur.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ft(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=YS(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ft(o,t.length)},I:function(e,t,n){const r=ah(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ft(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ur.d(e,t)},D:function(e,t,n){const r=eB(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ft(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ft(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ft(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ft(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Di.noon:r===0?o=Di.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Di.evening:r>=12?o=Di.afternoon:r>=4?o=Di.morning:o=Di.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ur.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ur.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ur.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ur.s(e,t)},S:function(e,t){return Ur.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return XS(r);case"XXXX":case"XX":return Io(r);default:return Io(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return XS(r);case"xxxx":case"xx":return Io(r);default:return Io(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ZS(r,":");default:return"GMT"+Io(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ZS(r,":");default:return"GMT"+Io(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ft(r,t.length)},T:function(e,t,n){return ft(+e,t.length)}};function ZS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ft(i,2)}function XS(e,t){return e%60===0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):Io(e,t)}function Io(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ft(Math.trunc(r/60),2),i=ft(r%60,2);return n+o+t+i}const QS=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},JS=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ch={p:JS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return QS(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",QS(r,t)).replace("{{time}}",JS(o,t))}},nB=/^D+$/,rB=/^Y+$/,oB=["D","DD","YY","YYYY"];function eT(e){return nB.test(e)}function tT(e){return rB.test(e)}function uh(e,t,n){const r=iB(e,t,n);if(console.warn(r),oB.includes(e))throw new RangeError(r)}function iB(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const sB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lB=/^'([^]*?)'?$/,cB=/''/g,uB=/[a-zA-Z]/;function dh(e,t,n){const r=ko(),o=r.locale??GS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Je(e,n?.in);if(!dc(a))throw new RangeError("Invalid time value");let l=t.match(aB).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=ch[d];return f(u,o.formatLong)}return u}).join("").match(sB).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:dB(u)};if(KS[d])return{isToken:!0,value:u};if(d.match(uB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(tT(d)||eT(d))&&uh(d,t,String(e));const f=KS[d[0]];return f(a,d,o.localize,c)}).join("")}function dB(e){const t=e.match(lB);return t?t[1].replace(cB,"'"):e}function fB(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=dt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function pB(){return Object.assign({},ko())}function hB(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function mB(e,t){return+Je(e)>+Je(t)}function gB(e,t){return+Je(e)<+Je(t)}function yB(e,t){const n=vB(t)?new t(0):dt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function vB(e){return typeof e=="function"&&e.prototype?.constructor===e}const bB=10;class nT{subPriority=0;validate(t,n){return!0}}class xB extends nT{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class wB extends nT{priority=bB;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>dt(n,r))}set(t,n){return n.timestampIsSet?t:dt(t,yB(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new xB(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class SB extends rt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Nt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},sr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Mt(e,t){return e&&{value:t(e.value),rest:e.rest}}function At(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ar(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*fj+i*dj+s*pj),rest:t.slice(n[0].length)}}function rT(e){return At(Nt.anyDigitsSigned,e)}function Ot(e,t){switch(e){case 1:return At(Nt.singleDigit,t);case 2:return At(Nt.twoDigits,t);case 3:return At(Nt.threeDigits,t);case 4:return At(Nt.fourDigits,t);default:return At(new RegExp("^\\d{1,"+e+"}"),t)}}function fc(e,t){switch(e){case 1:return At(Nt.singleDigitSigned,t);case 2:return At(Nt.twoDigitsSigned,t);case 3:return At(Nt.threeDigitsSigned,t);case 4:return At(Nt.fourDigitsSigned,t);default:return At(new RegExp("^-?\\d{1,"+e+"}"),t)}}function fh(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function oT(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function iT(e){return e%400===0||e%4===0&&e%100!==0}class TB extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Mt(Ot(4,t),o);case"yo":return Mt(r.ordinalNumber(t,{unit:"year"}),o);default:return Mt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const s=oT(r.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class EB extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Mt(Ot(4,t),o);case"Yo":return Mt(r.ordinalNumber(t,{unit:"year"}),o);default:return Mt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=lh(t,o);if(r.isTwoDigitYear){const a=oT(r.year,i);return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),In(t,o)}const s=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),In(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class kB extends rt{priority=130;parse(t,n){return fc(n==="R"?4:n.length,t)}set(t,n,r){const o=dt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Oi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class CB extends rt{priority=130;parse(t,n){return fc(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class IB extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Ot(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class AB extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Ot(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class PB extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Mt(At(Nt.month,t),o);case"MM":return Mt(Ot(2,t),o);case"Mo":return Mt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class OB extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Mt(At(Nt.month,t),o);case"LL":return Mt(Ot(2,t),o);case"Lo":return Mt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function DB(e,t,n){const r=Je(e,n?.in),o=YS(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class NB extends rt{priority=100;parse(t,n,r){switch(n){case"w":return At(Nt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return In(DB(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function MB(e,t,n){const r=Je(e,n?.in),o=ah(r,n)-t;return r.setDate(r.getDate()-o*7),r}class _B extends rt{priority=100;parse(t,n,r){switch(n){case"I":return At(Nt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Oi(MB(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const FB=[31,28,31,30,31,30,31,31,30,31,30,31],LB=[31,29,31,30,31,30,31,31,30,31,30,31];class VB extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return At(Nt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=iT(r),i=t.getMonth();return o?n>=1&&n<=LB[i]:n>=1&&n<=FB[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class $B extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return At(Nt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear();return iT(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function ph(e,t,n){const r=ko(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Je(e,n?.in),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return qr(i,u,n)}class zB extends rt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=ph(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class jB extends rt{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return Mt(Ot(n.length,t),i);case"eo":return Mt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=ph(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class BB extends rt{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return Mt(Ot(n.length,t),i);case"co":return Mt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=ph(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function RB(e,t,n){const r=Je(e,n?.in),o=hB(r,n),i=t-o;return qr(r,i,n)}class HB extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return Ot(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Mt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Mt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Mt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Mt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=RB(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class WB extends rt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(fh(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class qB extends rt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(fh(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class UB extends rt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(fh(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class GB extends rt{priority=70;parse(t,n,r){switch(n){case"h":return At(Nt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class YB extends rt{priority=70;parse(t,n,r){switch(n){case"H":return At(Nt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class KB extends rt{priority=70;parse(t,n,r){switch(n){case"K":return At(Nt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class ZB extends rt{priority=70;parse(t,n,r){switch(n){case"k":return At(Nt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class XB extends rt{priority=60;parse(t,n,r){switch(n){case"m":return At(Nt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class QB extends rt{priority=50;parse(t,n,r){switch(n){case"s":return At(Nt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class JB extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Mt(Ot(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class eR extends rt{priority=10;parse(t,n){switch(n){case"X":return ar(sr.basicOptionalMinutes,t);case"XX":return ar(sr.basic,t);case"XXXX":return ar(sr.basicOptionalSeconds,t);case"XXXXX":return ar(sr.extendedOptionalSeconds,t);default:return ar(sr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-cc(t)-r)}incompatibleTokens=["t","T","x"]}class tR extends rt{priority=10;parse(t,n){switch(n){case"x":return ar(sr.basicOptionalMinutes,t);case"xx":return ar(sr.basic,t);case"xxxx":return ar(sr.basicOptionalSeconds,t);case"xxxxx":return ar(sr.extendedOptionalSeconds,t);default:return ar(sr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-cc(t)-r)}incompatibleTokens=["t","T","X"]}class nR extends rt{priority=40;parse(t){return rT(t)}set(t,n,r){return[dt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class rR extends rt{priority=20;parse(t){return rT(t)}set(t,n,r){return[dt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const oR={G:new SB,y:new TB,Y:new EB,R:new kB,u:new CB,Q:new IB,q:new AB,M:new PB,L:new OB,w:new NB,I:new _B,d:new VB,D:new $B,E:new zB,e:new jB,c:new BB,i:new HB,a:new WB,b:new qB,B:new UB,h:new GB,H:new YB,K:new KB,k:new ZB,m:new XB,s:new QB,S:new JB,X:new eR,x:new tR,t:new nR,T:new rR},iR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,sR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aR=/^'([^]*?)'?$/,lR=/''/g,cR=/\S/,uR=/[a-zA-Z]/;function dR(e,t,n,r){const o=()=>dt(n,NaN),i=pB(),s=i.locale??GS,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Je(n,r?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},u=[new wB(r?.in,n)],d=t.match(sR).map(m=>{const v=m[0];if(v in ch){const b=ch[v];return b(m,s.formatLong)}return m}).join("").match(iR),f=[];for(let m of d){tT(m)&&uh(m,t,e),eT(m)&&uh(m,t,e);const v=m[0],b=oR[v];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const E=f.find(I=>x.includes(I.token)||I.token===v);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${m}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);f.push({token:v,fullToken:m});const T=b.run(e,m,s.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(uR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(m==="''"?m="'":v==="'"&&(m=fR(m)),e.indexOf(m)===0)e=e.slice(m.length);else return o()}}if(e.length>0&&cR.test(e))return o();const p=u.map(m=>m.priority).sort((m,v)=>v-m).filter((m,v,b)=>b.indexOf(m)===v).map(m=>u.filter(v=>v.priority===m).sort((v,b)=>b.subPriority-v.subPriority)).map(m=>m[0]);let g=Je(n,r?.in);if(isNaN(+g))return o();const y={};for(const m of p){if(!m.validate(g,c))return o();const v=m.set(g,y,c);Array.isArray(v)?(g=v[0],Object.assign(y,v[1])):g=v}return g}function fR(e){return e.match(aR)[1].replace(lR,"'")}function sT(e,t,n){const[r,o]=uc(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Xs(e,t){return vj(dt(e,e),yj(e))}function aT(e,t,n){return qr(e,-t,n)}function pR(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=dt(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=fB(s);return r.setMonth(t,Math.min(i,a)),r}function hR(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?dt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=pR(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function mR(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?dt(e,NaN):(r.setFullYear(t),r)}function lT(e,t,n){return oh(e,-t,n)}function Qs(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=lT(e,o+r*12,n),d=aT(u,s+i*7,n),f=l+a*60,g=(c+f*60)*1e3;return dt(e,+d-g)}function gR(e,t,n){return qS(e,-1,n)}const yR=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function vR(e,t){return S.useRef(yR(e,t)).current}function cT(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const a=i.changedTouches[0].clientX-n.current;Math.abs(a)>t&&e(i,a>0?"right":"left"),n.current=null}}}const bR=/^(?<hour>\d\d):(?<min>\d\d)$/,xR={type:"spring",bounce:.3,duration:.6},uT=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),dT={enter:uT(1),exit:uT(-1),middle:{x:"0%",opacity:1}},fT={exit:{visibility:"hidden"}},wR=e=>{const t=In(ih(e));return US({start:t,end:Pi(t,{days:41})})},pT=(e,t)=>e.toLocaleDateString(t,{month:"long"}),SR=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=ih(new Date(1970,o,1).setMonth(o)),s=pT(i,n);return h.jsx("option",{value:s,"data-index":o,children:s},`${e}-${s}`)}),hh={ArrowLeft:(e,t)=>t==="days"?Qs(e,{days:1}):Qs(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Pi(e,{days:1}):Pi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Qs(e,{weeks:1}):Qs(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Pi(e,{weeks:1}):Pi(e,{years:1})},hT=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const s=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>s?.focus({preventScroll:!0}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},Ao=e=>e.getFullYear().toString().padStart(4,"0"),TR=(e,t,n)=>e===void 0||n===void 0?!1:mB(t,e)&&gB(t,n),ER=e=>{const t=Tt();return h.jsx(He.tbody,{layout:!0,variants:dT,custom:e.direction,onKeyDown:e.onKeyDown,className:Pe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Re.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return h.jsx("tr",{className:o,children:n.map(i=>{const s=i.toISOString(),a=e.rangeMode?s===e.range?.to?.toISOString()||s===e.range?.from?.toISOString():s===(e.date?Co(e.date).toISOString():void 0),l=Xs(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=sT(i,e.stateDate),d=!u||c,f=e.rangeMode?TR(e.range?.from,i,e.range?.to):!1;return h.jsxs("td",{align:"center",className:Pe("relative p-1",Re.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[h.jsxs("button",{type:"button","data-date":s,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Pe(`relative flex size-9 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${a?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-9 border border-dashed border-card-border":"",Re.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[h.jsx("div",{}),i.getDate(),a&&e.stateRange.from?.toISOString()===s?h.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:h.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,a&&e.stateRange.to?.toISOString()===s?h.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:h.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?h.jsx(e.RenderOnDay,{date:i}):null]},s)})},`week-${n.length}-${r}`)})})},kR=()=>Co(new Date),mh=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:s,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...g})=>{const y=S.useRef(Xo()),m=Tt(),v=Fr(o),b=S.useRef(null),{date:x,range:T}=g,E=x||new Date,I=S.useRef(null),[w,k]=fp({date:E,isAnimating:!1,year:Ao(E),direction:void 0,range:{from:T?.from,to:T?.to},months:SR(y.current,E,v),selectMode:l?"from":void 0,week:US({start:In(E),end:Sj(E)})},M=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(hT(I.current||null,b,M.state().date,200),I.current=null,{isAnimating:!1}),date:C=>{const V=C(M.state().date);return{date:V,year:Ao(V)}},nextMonth:C=>{C&&(I.current=C.currentTarget);const V=M.state();if(V.isAnimating)return V;const L=Pi(V.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:Ao(L)}},previousMonth:C=>{C&&(I.current=C.currentTarget);const V=M.state();if(V.isAnimating)return V;const L=Qs(V.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:Ao(L)}},onSelectDate:C=>{const V=M.state(),L=C.currentTarget.dataset.range==="true",R=C.currentTarget.dataset.date||"",U=new Date(R);return{date:U,year:Ao(U),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:L?{from:V.selectMode==="from"?U:V.range.from,to:V.selectMode==="to"?U:V.range.to}:V.range}},onChangeMonth:C=>{const V=C.target.value,R=Array.from(C.target.options).find(G=>G.value===V),U=M.state();if(R){const G=R.dataset.index||"",H=new Date(M.state().date);return H.setMonth(+G),{...U,date:H,year:Ao(H)}}return U},onKeyDown:C=>{const V=C.key,L=M.state();if(V in hh){(V==="ArrowUp"||V==="ArrowDown")&&C.preventDefault();const R=M.state().date,U=Re.keyof(hh,V)?hh[V](R,C.shiftKey?"month":"days"):null;if(U!==null)return hT(C.target,b,U),{...L,date:U,year:Ao(U)}}return M.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(M,C,V)=>((V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&V.props.onChangeMonth?.(M.date),M),(M,C,V)=>(V.method==="onChangeYear"&&V.props.onChangeYear?.(M.date),M),(M,C,V)=>{const L=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&L&&t?(c?.(M.range),M):(L&&t&&c?.(M.date),M)}]}),A=wR(w.date),O=Mv(A,7),_=w.date.toISOString(),N=pT(w.date,v);S.useEffect(()=>{t||c?.(w.date)},[_,t]);const $=vR(M=>k.date(C=>mR(new Date(C),+M)),1200),D=M=>{const C=M.currentTarget.value;k.onChangeYear(C),a?.(new Date(C)),$(C)},F=cT((M,C)=>(M.preventDefault(),C==="right"?k.previousMonth():k.nextMonth()),10),z=()=>{const M=kR();k.date(()=>M),c?.(M)};return h.jsx(Yf,{transition:xR,children:h.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:F.onTouchEnd,onTouchStart:F.onTouchStart,className:Pe("relative overflow-hidden",Re.function(u?.calendar)?u?.calendar(A):u?.calendar),children:[h.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:h.jsx(gn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:k.onExitComplete,children:h.jsxs(He.div,{initial:"enter",animate:"middle",exit:"exit",children:[h.jsxs("header",{className:"relative flex justify-between",children:[h.jsx(He.button,{layout:!0,type:"button","data-focustrap":"prev",variants:fT,onClick:k.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:h.jsx(ey,{className:"h-4 w-4"})}),h.jsx(He.span,{layout:!0,variants:dT,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:h.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[h.jsx("select",{value:N,onChange:k.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${N.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),h.jsx(Kg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:D,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),h.jsx(He.button,{layout:!0,type:"button","data-focustrap":"next",variants:fT,onClick:k.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:h.jsx(wa,{className:"h-4 w-4"})})]}),h.jsxs(He.table,{className:"mt-2 table min-w-full table-auto border-0",children:[h.jsx("thead",{children:h.jsx("tr",{children:w.week.map(M=>h.jsx("th",{role:"columnheader",className:Pe("py-2 text-sm font-medium capitalize",Re.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(v,{weekday:"short"})},M.toString()))})}),h.jsx(ER,{zip:O,range:T,styles:u,date:x||null,dispatch:k,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:k.onKeyDown})]})]},N)})}),f==="datetime"?h.jsx("section",{className:"my-4 grid items-center",children:h.jsx(Jo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?dh(x,"HH:mm"):void 0,title:p||m.calendarDatetimeTitle,onChange:M=>{const C=M.target.value,V=bR.exec(C);if(!V)return;const L=V.groups.hour,R=V.groups.min,U=hR(w.date,{hours:Number(L),minutes:Number(R),seconds:0});k.date(()=>U),c?.(U)}})}):null,h.jsx("footer",{className:"mt-2 text-center text-primary",children:h.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},gh=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(gh.displayName="ProgressRootContext");function CR(){const e=P.useContext(gh);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Nn(51));return e}let yh=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const mT={status(e){return e==="progressing"?{[yh.progressing]:""}:e==="complete"?{[yh.complete]:""}:e==="indeterminate"?{[yh.indeterminate]:""}:null}};function IR(e,t){return t==null?"indeterminate progress":e||`${t}%`}const gT=P.forwardRef(function(t,n){const{format:r,getAriaValueText:o=IR,locale:i,max:s=100,min:a=0,value:l,render:c,className:u,...d}=t,[f,p]=P.useState(),g=wd(r);let y="indeterminate";Number.isFinite(l)&&(y=l===s?"complete":"progressing");const m=hD(l,i,g.current),v=P.useMemo(()=>({status:y}),[y]),b={"aria-labelledby":f,"aria-valuemax":s,"aria-valuemin":a,"aria-valuenow":l??void 0,"aria-valuetext":o(m,l),role:"progressbar"},x=P.useMemo(()=>({formattedValue:m,max:s,min:a,setLabelId:p,state:v,status:y,value:l}),[m,s,a,p,v,y,l]),T=ln("div",t,{state:v,ref:n,props:[b,d],stateAttributesMapping:mT});return h.jsx(gh.Provider,{value:x,children:T})});process.env.NODE_ENV!=="production"&&(gT.displayName="ProgressRoot");const yT=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:s,min:a,value:l,state:c}=CR(),u=Number.isFinite(l)&&l!==null?dl(l,a,s):null,d=P.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return ln("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:mT})});process.env.NODE_ENV!=="production"&&(yT.displayName="ProgressIndicator");const AR=e=>h.jsxs(gT,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Pe("relative h-6 w-full overflow-hidden rounded-full bg-background",e.container),children:[h.jsx(yT,{style:{transform:Re.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Pe("size-full bg-primary transition-transform duration-500 ease-in-out",e.className)}),Re.number(e.percent)?h.jsx("p",{className:Pe("absolute inset-0 flex w-full items-center justify-center font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),pc=e=>h.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[h.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),h.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});pc.Icon=function(t){return h.jsx("header",{...t,className:Pe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},pc.Body=function(t){return h.jsx(un,{...t,className:Pe("min-w-0 flex-1",t.className),children:t.children})},pc.Right=function(t){return h.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:h.jsx(un,{...t,type:"button"})})};const PR=e=>h.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),OR=e=>h.jsx(He.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),vT=new Date(1970,11,31),vh={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},bT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},DR={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},bh=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},NR={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},MR={day:"numeric",month:"numeric",year:"numeric"},_R=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:s=!0,type:a,...l},c)=>{const u=Fr(t),d=S.useId(),f=Tt(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,a==="datetime"?NR:MR),[u,a]),[g,y]=S.useState(e||void 0),[m,v]=S.useState(!1),b=bh(p,vT).flatMap(N=>Re.keyof(vh,N.type)?vh[N.type](N.value):[]),x=S.useMemo(()=>bh(p,vT).reduce((N,$)=>N+(Re.keyof(bT,$.type)?bT[$.type]($.value):""),""),[p]),T=e?.toISOString(),[E,I]=S.useState(g?bh(p,g).reduce((N,$)=>N+(Re.keyof(vh,$.type)?DR[$.type](g,$.value):""),""):""),w=N=>{const $=N.target.value;if(I($),b.length===$.length&&b.every((F,z)=>{const M=$.charAt(z);return typeof F=="string"?M===F:F.test(M)})){const F=dR($,x,new Date),z=a==="datetime"?F:Co(F);return y(z),r?.(z)}return y(void 0),r?.(void 0)};S.useEffect(()=>{dc(e)&&(y(e),I(dh(e,x)))},[T,x]);const k=N=>(y(N),r?.(N),i&&v(!1),I(N?dh(N,x):"")),A=dc(g),O=A?g.toISOString():void 0,_=h.jsx(mh,{...l,type:a,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:A?g:void 0});return h.jsx(S.Fragment,{children:h.jsx(Jo,{...l,mask:b,value:E,id:void 0,name:void 0,"data-value":O,formNoValidate:!m,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:m?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:s?h.jsxs(S.Fragment,{children:[h.jsx("input",{"data-origin":l.name,defaultValue:O,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),h.jsx(Ci,{open:m,onChange:v,buttonProps:{"aria-describedby":d},trigger:h.jsxs("span",{"aria-labelledby":d,children:[h.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),h.jsx(Jg,{})]}),children:_})]}):null})})}),FR=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],LR=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],VR=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],$R=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],xT=(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},wT=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},zR=e=>typeof e=="number"?Math.log(e):wT(e)*Math.log(10),jR=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},ST=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},BR=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function RR(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?$R:VR:t.binary?LR:FR,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return ST(c,t.fixedWidth)}const i=e<0,s=i?"-":t.signed?"+":"";i&&(e=-e);const a=BR(t);let l;if(e<1){const c=xT(e,t.locale,a);l=s+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?zR(e)/Math.log(1024):wT(e)/3),n.length-1);if(e=jR(e,(t.binary?1024:1e3)**c),!a){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=xT(Number(e),t.locale,a),d=n[c];l=s+u+r+d}return ST(l,t.fixedWidth)}var hc={exports:{}},mc={exports:{}},at={};var TT;function HR(){if(TT)return at;TT=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,s=e?Symbol.for("react.provider"):60109,a=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,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case a:case u:case g:case p:case s:return E;default:return I}}case n:return I}}}function T(E){return x(E)===c}return at.AsyncMode=l,at.ConcurrentMode=c,at.ContextConsumer=a,at.ContextProvider=s,at.Element=t,at.ForwardRef=u,at.Fragment=r,at.Lazy=g,at.Memo=p,at.Portal=n,at.Profiler=i,at.StrictMode=o,at.Suspense=d,at.isAsyncMode=function(E){return T(E)||x(E)===l},at.isConcurrentMode=T,at.isContextConsumer=function(E){return x(E)===a},at.isContextProvider=function(E){return x(E)===s},at.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},at.isForwardRef=function(E){return x(E)===u},at.isFragment=function(E){return x(E)===r},at.isLazy=function(E){return x(E)===g},at.isMemo=function(E){return x(E)===p},at.isPortal=function(E){return x(E)===n},at.isProfiler=function(E){return x(E)===i},at.isStrictMode=function(E){return x(E)===o},at.isSuspense=function(E){return x(E)===d},at.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===g||E.$$typeof===p||E.$$typeof===s||E.$$typeof===a||E.$$typeof===u||E.$$typeof===m||E.$$typeof===v||E.$$typeof===b||E.$$typeof===y)},at.typeOf=x,at}var lt={};var ET;function WR(){return ET||(ET=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,s=e?Symbol.for("react.provider"):60109,a=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,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===g||B.$$typeof===p||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===m||B.$$typeof===v||B.$$typeof===b||B.$$typeof===y)}function T(B){if(typeof B=="object"&&B!==null){var ae=B.$$typeof;switch(ae){case t:var ce=B.type;switch(ce){case l:case c:case r:case i:case o:case d:return ce;default:var Q=ce&&ce.$$typeof;switch(Q){case a:case u:case g:case p:case s:return Q;default:return ae}}case n:return ae}}}var E=l,I=c,w=a,k=s,A=t,O=u,_=r,N=g,$=p,D=n,F=i,z=o,M=d,C=!1;function V(B){return C||(C=!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.")),L(B)||T(B)===l}function L(B){return T(B)===c}function R(B){return T(B)===a}function U(B){return T(B)===s}function G(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function H(B){return T(B)===u}function ee(B){return T(B)===r}function se(B){return T(B)===g}function te(B){return T(B)===p}function q(B){return T(B)===n}function Y(B){return T(B)===i}function Z(B){return T(B)===o}function pe(B){return T(B)===d}lt.AsyncMode=E,lt.ConcurrentMode=I,lt.ContextConsumer=w,lt.ContextProvider=k,lt.Element=A,lt.ForwardRef=O,lt.Fragment=_,lt.Lazy=N,lt.Memo=$,lt.Portal=D,lt.Profiler=F,lt.StrictMode=z,lt.Suspense=M,lt.isAsyncMode=V,lt.isConcurrentMode=L,lt.isContextConsumer=R,lt.isContextProvider=U,lt.isElement=G,lt.isForwardRef=H,lt.isFragment=ee,lt.isLazy=se,lt.isMemo=te,lt.isPortal=q,lt.isProfiler=Y,lt.isStrictMode=Z,lt.isSuspense=pe,lt.isValidElementType=x,lt.typeOf=T})()),lt}var kT;function CT(){return kT||(kT=1,process.env.NODE_ENV==="production"?mc.exports=HR():mc.exports=WR()),mc.exports}var xh,IT;function qR(){if(IT)return xh;IT=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 s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[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 xh=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},xh}var wh,AT;function Sh(){if(AT)return wh;AT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return wh=e,wh}var Th,PT;function OT(){return PT||(PT=1,Th=Function.call.bind(Object.prototype.hasOwnProperty)),Th}var Eh,DT;function UR(){if(DT)return Eh;DT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Sh(),n={},r=OT();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,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 f=Error((l||"React class")+": "+a+" 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 f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+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 p=c?c():"";e("Failed "+a+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Eh=o,Eh}var kh,NT;function GR(){if(NT)return kh;NT=1;var e=CT(),t=qR(),n=Sh(),r=OT(),o=UR(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return kh=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(L){var R=L&&(c&&L[c]||L[u]);if(typeof R=="function")return R}var f="<<anonymous>>",p={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:T(),elementType:E(),instanceOf:I,node:O(),objectOf:k,oneOf:w,oneOfType:A,shape:N,exact:$};function g(L,R){return L===R?L!==0||1/L===1/R:L!==L&&R!==R}function y(L,R){this.message=L,this.data=R&&typeof R=="object"?R:{},this.stack=""}y.prototype=Error.prototype;function m(L){if(process.env.NODE_ENV!=="production")var R={},U=0;function G(ee,se,te,q,Y,Z,pe){if(q=q||f,Z=Z||te,pe!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=q+":"+te;!R[ae]&&U<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[ae]=!0,U++)}}return se[te]==null?ee?se[te]===null?new y("The "+Y+" `"+Z+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new y("The "+Y+" `"+Z+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:L(se,te,q,Y,Z)}var H=G.bind(null,!1);return H.isRequired=G.bind(null,!0),H}function v(L){function R(U,G,H,ee,se,te){var q=U[G],Y=z(q);if(Y!==L){var Z=M(q);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+Z+"` supplied to `"+H+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return m(R)}function b(){return m(s)}function x(L){function R(U,G,H,ee,se){if(typeof L!="function")return new y("Property `"+se+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var te=U[G];if(!Array.isArray(te)){var q=z(te);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an array."))}for(var Y=0;Y<te.length;Y++){var Z=L(te,Y,H,ee,se+"["+Y+"]",n);if(Z instanceof Error)return Z}return null}return m(R)}function T(){function L(R,U,G,H,ee){var se=R[U];if(!a(se)){var te=z(se);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return m(L)}function E(){function L(R,U,G,H,ee){var se=R[U];if(!e.isValidElementType(se)){var te=z(se);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return m(L)}function I(L){function R(U,G,H,ee,se){if(!(U[G]instanceof L)){var te=L.name||f,q=V(U[G]);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected ")+("instance of `"+te+"`."))}return null}return m(R)}function w(L){if(!Array.isArray(L))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.")),s;function R(U,G,H,ee,se){for(var te=U[G],q=0;q<L.length;q++)if(g(te,L[q]))return null;var Y=JSON.stringify(L,function(pe,B){var ae=M(B);return ae==="symbol"?String(B):B});return new y("Invalid "+ee+" `"+se+"` of value `"+String(te)+"` "+("supplied to `"+H+"`, expected one of "+Y+"."))}return m(R)}function k(L){function R(U,G,H,ee,se){if(typeof L!="function")return new y("Property `"+se+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an object."));for(var Y in te)if(r(te,Y)){var Z=L(te,Y,H,ee,se+"."+Y,n);if(Z instanceof Error)return Z}return null}return m(R)}function A(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var R=0;R<L.length;R++){var U=L[R];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(U)+" at index "+R+"."),s}function G(H,ee,se,te,q){for(var Y=[],Z=0;Z<L.length;Z++){var pe=L[Z],B=pe(H,ee,se,te,q,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&Y.push(B.data.expectedType)}var ae=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new y("Invalid "+te+" `"+q+"` supplied to "+("`"+se+"`"+ae+"."))}return m(G)}function O(){function L(R,U,G,H,ee){return D(R[U])?null:new y("Invalid "+H+" `"+ee+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return m(L)}function _(L,R,U,G,H){return new y((L||"React class")+": "+R+" type `"+U+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function N(L){function R(U,G,H,ee,se){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));for(var Y in L){var Z=L[Y];if(typeof Z!="function")return _(H,ee,se,Y,M(Z));var pe=Z(te,Y,H,ee,se+"."+Y,n);if(pe)return pe}return null}return m(R)}function $(L){function R(U,G,H,ee,se){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));var Y=t({},U[G],L);for(var Z in Y){var pe=L[Z];if(r(L,Z)&&typeof pe!="function")return _(H,ee,se,Z,M(pe));if(!pe)return new y("Invalid "+ee+" `"+se+"` key `"+Z+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(U[G],null," ")+`
17
- Valid keys: `+JSON.stringify(Object.keys(L),null," "));var B=pe(te,Z,H,ee,se+"."+Z,n);if(B)return B}return null}return m(R)}function D(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(D);if(L===null||a(L))return!0;var R=d(L);if(R){var U=R.call(L),G;if(R!==L.entries){for(;!(G=U.next()).done;)if(!D(G.value))return!1}else for(;!(G=U.next()).done;){var H=G.value;if(H&&!D(H[1]))return!1}}else return!1;return!0;default:return!1}}function F(L,R){return L==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function z(L){var R=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":F(R,L)?"symbol":R}function M(L){if(typeof L>"u"||L===null)return""+L;var R=z(L);if(R==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return R}function C(L){var R=M(L);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function V(L){return!L.constructor||!L.constructor.name?f:L.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},kh}var Ch,MT;function YR(){if(MT)return Ch;MT=1;var e=Sh();function t(){}function n(){}return n.resetWarningCache=t,Ch=function(){function r(s,a,l,c,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}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},Ch}var _T;function KR(){if(_T)return hc.exports;if(_T=1,process.env.NODE_ENV!=="production"){var e=CT(),t=!0;hc.exports=GR()(e.isElement,t)}else hc.exports=YR()();return hc.exports}var ZR=KR();const yt=xm(ZR);function Po(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const XR=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 Ni(e,t,n){const r=QR(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&FT(r,"path",i),FT(r,"relativePath",i),r}function QR(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=XR.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function FT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const JR=[".DS_Store","Thumbs.db"];function e4(e){return Po(this,void 0,void 0,function*(){return gc(e)&&t4(e.dataTransfer)?i4(e.dataTransfer,e.type):n4(e)?r4(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?o4(e):[]})}function t4(e){return gc(e)}function n4(e){return gc(e)&&gc(e.target)}function gc(e){return typeof e=="object"&&e!==null}function r4(e){return Ih(e.target.files).map(t=>Ni(t))}function o4(e){return Po(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Ni(n))})}function i4(e,t){return Po(this,void 0,void 0,function*(){if(e.items){const n=Ih(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(s4));return LT(VT(r))}return LT(Ih(e.files).map(n=>Ni(n)))})}function LT(e){return e.filter(t=>JR.indexOf(t.name)===-1)}function Ih(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 s4(e){if(typeof e.webkitGetAsEntry!="function")return $T(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?zT(t):$T(e,t)}function VT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?VT(n):[n]],[])}function $T(e,t){return Po(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 s=yield i.getFile();return s.handle=i,Ni(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Ni(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function a4(e){return Po(this,void 0,void 0,function*(){return e.isDirectory?zT(e):l4(e)})}function zT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(s=>Po(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(a4));o.push(a),i()}else try{const a=yield Promise.all(o);n(a)}catch(a){r(a)}}),s=>{r(s)})}i()})}function l4(e){return Po(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Ni(r,e.fullPath);t(o)},r=>{n(r)})})})}var yc={},jT;function c4(){return jT||(jT=1,yc.__esModule=!0,yc.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(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0}),yc}var u4=c4();const Ah=xm(u4);function BT(e){return p4(e)||f4(e)||qT(e)||d4()}function d4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p4(e){if(Array.isArray(e))return Ph(e)}function RT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function HT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RT(Object(n),!0).forEach(function(r){WT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e,t){return g4(e)||m4(e,t)||qT(e,t)||h4()}function h4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qT(e,t){if(e){if(typeof e=="string")return Ph(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 Ph(e,t)}}function Ph(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 m4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function g4(e){if(Array.isArray(e))return e}var y4=typeof Ah=="function"?Ah:Ah.default,v4="file-invalid-type",b4="file-too-large",x4="file-too-small",w4="too-many-files",S4=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:v4,message:"File type must be ".concat(r)}},UT=function(t){return{code:b4,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},GT=function(t){return{code:x4,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},T4={code:w4,message:"Too many files"};function E4(e){return e.type===""&&typeof e.getAsFile=="function"}function YT(e,t){var n=e.type==="application/x-moz-file"||y4(e,t)||E4(e);return[n,n?null:S4(t)]}function KT(e,t,n){if(Oo(e.size))if(Oo(t)&&Oo(n)){if(e.size>n)return[!1,UT(n)];if(e.size<t)return[!1,GT(t)]}else{if(Oo(t)&&e.size<t)return[!1,GT(t)];if(Oo(n)&&e.size>n)return[!1,UT(n)]}return[!0,null]}function Oo(e){return e!=null}function k4(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=YT(l,n),u=Js(c,1),d=u[0],f=KT(l,r,o),p=Js(f,1),g=p[0],y=a?a(l):null;return d&&g&&!y})}function vc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ea(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 ZT(e){e.preventDefault()}function C4(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function I4(e){return e.indexOf("Edge/")!==-1}function A4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return C4(e)||I4(e)}function lr(){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),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!vc(r)&&a&&a.apply(void 0,[r].concat(i)),vc(r)})}}function P4(){return"showOpenFilePicker"in window}function O4(e){if(Oo(e)){var t=Object.entries(e).filter(function(n){var r=Js(n,2),o=r[0],i=r[1],s=!0;return XT(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.')),s=!1),(!Array.isArray(i)||!i.every(QT))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Js(r,2),i=o[0],s=o[1];return HT(HT({},n),{},WT({},i,s))},{});return[{description:"Files",accept:t}]}return e}function D4(e){if(Oo(e))return Object.entries(e).reduce(function(t,n){var r=Js(n,2),o=r[0],i=r[1];return[].concat(BT(t),[o],BT(i))},[]).filter(function(t){return XT(t)||QT(t)}).join(",")}function N4(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function M4(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function XT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function QT(e){return/^.*\.[\w]+$/.test(e)}var _4=["children"],F4=["open"],L4=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],V4=["refKey","onChange","onClick"];function JT(e){return j4(e)||z4(e)||eE(e)||$4()}function $4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j4(e){if(Array.isArray(e))return Dh(e)}function Oh(e,t){return H4(e)||R4(e,t)||eE(e,t)||B4()}function B4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eE(e,t){if(e){if(typeof e=="string")return Dh(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 Dh(e,t)}}function Dh(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 R4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function H4(e){if(Array.isArray(e))return e}function tE(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 St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tE(Object(n),!0).forEach(function(r){Nh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bc(e,t){if(e==null)return{};var n=W4(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 W4(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 Mh=S.forwardRef(function(e,t){var n=e.children,r=bc(e,_4),o=rE(r),i=o.open,s=bc(o,F4);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(St(St({},s),{},{open:i})))});Mh.displayName="Dropzone";var nE={disabled:!1,getFilesFromEvent:e4,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};Mh.defaultProps=nE,Mh.propTypes={children:yt.func,accept:yt.objectOf(yt.arrayOf(yt.string)),multiple:yt.bool,preventDropOnDocument:yt.bool,noClick:yt.bool,noKeyboard:yt.bool,noDrag:yt.bool,noDragEventsBubbling:yt.bool,minSize:yt.number,maxSize:yt.number,maxFiles:yt.number,disabled:yt.bool,getFilesFromEvent:yt.func,onFileDialogCancel:yt.func,onFileDialogOpen:yt.func,useFsAccessApi:yt.bool,autoFocus:yt.bool,onDragEnter:yt.func,onDragLeave:yt.func,onDragOver:yt.func,onDrop:yt.func,onDropAccepted:yt.func,onDropRejected:yt.func,onError:yt.func,validator:yt.func};var _h={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function rE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=St(St({},nE),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,g=t.onDropRejected,y=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,k=t.onError,A=t.validator,O=S.useMemo(function(){return D4(n)},[n]),_=S.useMemo(function(){return O4(n)},[n]),N=S.useMemo(function(){return typeof m=="function"?m:oE},[m]),$=S.useMemo(function(){return typeof y=="function"?y:oE},[y]),D=S.useRef(null),F=S.useRef(null),z=S.useReducer(q4,_h),M=Oh(z,2),C=M[0],V=M[1],L=C.isFocused,R=C.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&P4()),G=function(){!U.current&&R&&setTimeout(function(){if(F.current){var X=F.current.files;X.length||(V({type:"closeDialog"}),$())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[F,R,$,U]);var H=S.useRef([]),ee=S.useRef([]),se=function(X){D.current&&D.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",ZT,!1),document.addEventListener("drop",se,!1)),function(){x&&(document.removeEventListener("dragover",ZT),document.removeEventListener("drop",se))}},[D,x]),S.useEffect(function(){var j=function(Me){ee.current=[].concat(JT(ee.current),[Me.target]),ea(Me)&&V({isDragGlobal:!0,type:"setDragGlobal"})},X=function(Me){ee.current=ee.current.filter(function(_e){return _e!==Me.target&&_e!==null}),!(ee.current.length>0)&&V({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})},ve=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",j,!1),document.addEventListener("dragleave",X,!1),document.addEventListener("dragend",me,!1),document.addEventListener("drop",ve,!1),function(){document.removeEventListener("dragenter",j),document.removeEventListener("dragleave",X),document.removeEventListener("dragend",me),document.removeEventListener("drop",ve)}},[D]),S.useEffect(function(){return!r&&b&&D.current&&D.current.focus(),function(){}},[D,b,r]);var te=S.useCallback(function(j){k?k(j):console.error(j)},[k]),q=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[].concat(JT(H.current),[j.target]),ea(j)&&Promise.resolve(o(j)).then(function(X){if(!(vc(j)&&!w)){var me=X.length,ve=me>0&&k4({files:X,accept:O,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:A}),ke=me>0&&!ve;V({isDragAccept:ve,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(X){return te(X)})},[o,c,te,w,O,s,i,a,l,A]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=ea(j);if(X&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d(j),!1},[d,w]),Z=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=H.current.filter(function(ve){return D.current&&D.current.contains(ve)}),me=X.indexOf(j.target);me!==-1&&X.splice(me,1),H.current=X,!(X.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ea(j)&&u&&u(j))},[D,u,w]),pe=S.useCallback(function(j,X){var me=[],ve=[];j.forEach(function(ke){var Me=YT(ke,O),_e=Oh(Me,2),ct=_e[0],_t=_e[1],Qt=KT(ke,s,i),Be=Oh(Qt,2),W=Be[0],K=Be[1],Oe=A?A(ke):null;if(ct&&W&&!Oe)me.push(ke);else{var Ue=[_t,K];Oe&&(Ue=Ue.concat(Oe)),ve.push({file:ke,errors:Ue.filter(function(Ye){return Ye})})}}),(!a&&me.length>1||a&&l>=1&&me.length>l)&&(me.forEach(function(ke){ve.push({file:ke,errors:[T4]})}),me.splice(0)),V({acceptedFiles:me,fileRejections:ve,type:"setFiles"}),f&&f(me,ve,X),ve.length>0&&g&&g(ve,X),me.length>0&&p&&p(me,X)},[V,a,O,s,i,l,f,p,g,A]),B=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[],ea(j)&&Promise.resolve(o(j)).then(function(X){vc(j)&&!w||pe(X,j)}).catch(function(X){return te(X)}),V({type:"reset"})},[o,pe,te,w]),ae=S.useCallback(function(){if(U.current){V({type:"openDialog"}),N();var j={multiple:a,types:_};window.showOpenFilePicker(j).then(function(X){return o(X)}).then(function(X){pe(X,null),V({type:"closeDialog"})}).catch(function(X){N4(X)?($(X),V({type:"closeDialog"})):M4(X)?(U.current=!1,F.current?(F.current.value=null,F.current.click()):te(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."))):te(X)});return}F.current&&(V({type:"openDialog"}),N(),F.current.value=null,F.current.click())},[V,N,$,v,pe,te,_,a]),ce=S.useCallback(function(j){!D.current||!D.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),ae())},[D,ae]),Q=S.useCallback(function(){V({type:"focus"})},[]),ue=S.useCallback(function(){V({type:"blur"})},[]),oe=S.useCallback(function(){T||(A4()?setTimeout(ae,0):ae())},[T,ae]),he=function(X){return r?null:X},ie=function(X){return E?null:he(X)},le=function(X){return I?null:he(X)},be=function(X){w&&X.stopPropagation()},de=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.role,ke=j.onKeyDown,Me=j.onFocus,_e=j.onBlur,ct=j.onClick,_t=j.onDragEnter,Qt=j.onDragOver,Be=j.onDragLeave,W=j.onDrop,K=bc(j,L4);return St(St(Nh({onKeyDown:ie(lr(ke,ce)),onFocus:ie(lr(Me,Q)),onBlur:ie(lr(_e,ue)),onClick:he(lr(ct,oe)),onDragEnter:le(lr(_t,q)),onDragOver:le(lr(Qt,Y)),onDragLeave:le(lr(Be,Z)),onDrop:le(lr(W,B)),role:typeof ve=="string"&&ve!==""?ve:"presentation"},me,D),!r&&!E?{tabIndex:0}:{}),K)}},[D,ce,Q,ue,oe,q,Y,Z,B,E,I,r]),ne=S.useCallback(function(j){j.stopPropagation()},[]),J=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.onChange,ke=j.onClick,Me=bc(j,V4),_e=Nh({accept:O,multiple:a,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:he(lr(ve,B)),onClick:he(lr(ke,ne)),tabIndex:-1},me,F);return St(St({},_e),Me)}},[F,n,a,B,r]);return St(St({},C),{},{isFocused:L&&!r,getRootProps:de,getInputProps:J,rootRef:D,inputRef:F,open:he(ae)})}function q4(e,t){switch(t.type){case"focus":return St(St({},e),{},{isFocused:!0});case"blur":return St(St({},e),{},{isFocused:!1});case"openDialog":return St(St({},_h),{},{isFileDialogActive:!0});case"closeDialog":return St(St({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return St(St({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return St(St({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return St(St({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return St({},_h);default:return e}}function oE(){}const iE=S.createContext([null,()=>{}]),U4=()=>S.useContext(iE),G4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,Y4={csv:Vu,xls:Vu,mov:ny,mp4:ny,xlsx:Vu,pdf:ty,txt:ty,json:LI,mp3:NI},K4=e=>{const[,t]=U4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:G4(l),size:RR(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=Y4[e.file.name.split(".").at(-1)]??ry,a=n.type==="img"?h.jsx("img",{src:n.url,className:"w-full object-contain",alt:e.file.name}):h.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return h.jsxs("li",{className:"flex w-full flex-row justify-between gap-4 border-b border-card-border last:border-b-transparent",children:[h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"flex flex-row items-center gap-4",children:[h.jsx("button",{type:"button",onClick:o,className:"m-2 flex size-16 max-w-16 items-center justify-center overflow-hidden",children:a}),h.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[h.jsx("span",{children:e.file.name}),h.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?h.jsx("div",{className:"min-w-full flex-1",children:h.jsx(e.File,{file:e.file})}):null]}),h.jsx("div",{className:"align-start flex justify-start py-4 transition-colors duration-300 ease-linear hover:text-danger-hover",children:h.jsx("button",{onClick:i,type:"button",className:"flex size-6 items-center justify-center",children:h.jsx(jo,{size:16})})})]})},Z4=e=>h.jsx("ul",{className:"w-full space-y-8",children:e.files.map(t=>h.jsx(K4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),sE=e=>{const t=Tt(),n=e.dragging?VI:$I;return h.jsxs("div",{className:"flex flex-col items-center justify-center",children:[h.jsx("div",{className:"flex flex-col items-center justify-center gap-2",children:h.jsx(n,{className:"text-primary",size:80})}),h.jsxs("div",{className:"my-4 flex flex-col items-center gap-1",children:[h.jsx("p",{children:t.uploadIdle}),h.jsx("button",{className:"text-primary underline",type:"button",children:t.uploadIdleButton})]})]})},X4=e=>e.isDragActive?h.jsx(sE,{files:e.files,dragging:!0}):e.files.length>0?h.jsx(Z4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):h.jsx(S.Fragment,{children:e.idle}),Q4=h.jsx(sE,{dragging:!1}),J4=e=>{const t=e.item.file,n=e.item.type;return h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),h.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?h.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?h.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?h.jsx("figure",{children:h.jsx("audio",{controls:!0,src:e.item.url})}):null]})},e3=({idle:e=Q4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Tt(),s=S.useState(null),[a,l]=S.useState([]),c=o.files??a,u=()=>s[1](null),d=y=>{r?.(y),l(m=>m.concat(y))},{getRootProps:f,getInputProps:p,isDragActive:g}=rE({onDrop:d});return h.jsxs(iE.Provider,{value:s,children:[h.jsx(Ys,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?h.jsx(J4,{item:s[0]}):null}),h.jsxs("div",{...f(),"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:[h.jsx("input",{...p(o),name:o.name,id:o.name}),h.jsx(X4,{File:n,onDeleteFile:t,isDragActive:g,idle:e,files:c})]})]})},aE=()=>window.matchMedia("@media (pointer: coarse)"),t3=()=>{const e=S.useRef(Mr()?null:aE()),[t,n]=S.useState(Mr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?aE():e.current).addEventListener("change",o=>n(o.matches))},[]),t},lE=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=t3(),o=S.useRef(Mr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||_v())return;document.documentElement.style.padding=Lg(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(hC(c.style.height)):null,f=Re.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},n3=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},cE=(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},uE={basic:/[,[\]]+?/,extend:/[,[\].]+?/},dE=(e,t)=>{const n=cE(t,uE.basic,e);return n!==void 0&&n!==e?n:cE(t,uE.extend,e)},fE=e=>e.replace(/[^0-9]/g,""),xc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),pE=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?fE(e).includes(fE(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?n3(e,t)!==null:!1,r3=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>pE(e,o,n,r)):pE(e,t,n,r),Fh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Re.array(i.value)?i.value.map(xc):xc(`${i.value}`)}));return e.forEach(i=>{const s=dE(i,t);o.forEach(a=>{const l=dE(i,a.key);if(!l)return;const c=xc(`${a.value}`.toLocaleLowerCase()).trim(),u=xc(`${l}`.toLocaleLowerCase()).trim();if(r3(u,c,a.score,a.match))return void r.set(s,i);Re.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},o3=e=>h.jsx(S.Fragment,{children:e.children}),i3={duration:200,open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0},initial:{transform:"scaleY(0)",opacity:.2}},s3=[],a3=S.forwardRef(function(t,n){return h.jsx(He.ul,{...t,ref:n,className:"max-h-96 w-full overscroll-contain rounded-lg",children:h.jsx(gn,{children:t.children})})}),l3=S.forwardRef(function({item:t,context:n,...r},o){return h.jsx(He.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),c3={List:a3,Item:l3},Mi=40,u3=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:g=!1,...y},m)=>{const v=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=y.value??y.defaultValue??"",E=Tt(),[I,w]=S.useState(()=>Math.min(320,Mi*o.length)),[k,A]=S.useState(!1),[O,_]=S.useState(""),[N,$]=S.useState(T),[D,F]=S.useState(()=>o.find(j=>j.value===T)?.label??T),[z,M]=S.useState(null),C=S.useRef(s3),V=lE(k,"block-only"),L=g&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...o]:o,R=()=>qi.flushSync(()=>A(!0)),U=O?Fh(L,"value",[{key:"value",value:O},{key:"label",value:O}]):L,G=()=>{A(!1),w(0)},H=U.filter(j=>j.hidden!==!0),ee=g?void 0:`^(${o.map(j=>`${vd(j.value)}${j.label?"|"+vd(j.label):""}`).join("|")})$`,{x:se,y:te,strategy:q,refs:Y,context:Z,placement:pe}=Kn({open:k,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:lo,middleware:[Go(4),Yy({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),Gy({padding:10,elementContext:"reference",apply(j){const me=j.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ve=Yi(Y.reference.current,window.innerHeight),ke=Math.min(me<Mi?ve:me,ve,j.availableHeight),Me=H.length===0?Mi:Math.min(ke,ve,me),_e=`${b.current?.getBoundingClientRect().width||ve}px`;Object.assign(j.elements.floating.style,{width:_e,maxWidth:_e,height:Me})}})]}),B=Cv(Z,i3),{getReferenceProps:ae,getFloatingProps:ce,getItemProps:Q}=Zn([yr(Z,{role:"listbox"}),Nr(Z),nl(Z,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(y.value){const j=o.find(X=>X.value===y.value);j&&(F(j.label??j.value),$(y.value))}},[y.value,o.length]),S.useEffect(()=>{if(!k)return w(0);const j=Y.reference;if(j.current===null)return;const X=Yi(j.current,window.innerHeight);setTimeout(()=>w(Math.min(X,H.length*Mi)),100)},[O,k,Y.reference,H.length]),S.useEffect(()=>{const j=Y.reference.current;if(j)return Gi(j)},[]);const ue=(j,X)=>{$(j.value);const me=Y.reference.current;if(!me)return;me?.setAttribute("data-value",j.value),me.value=j.value;const ve=new Event("change",{bubbles:!1,cancelable:!0});me.dispatchEvent(ve),y.onChange&&y.onChange(ve),F(j.label??""),G(),_(""),M(X)},oe=j=>{const X=j.target.value;return _(X),!k&&X===""?A(!0):(j.target.name=y.name||"",X?A(!0):y.onChange?.(j))},he=()=>{R(),_(""),Y.reference.current?.focus()},ie=()=>{M(j=>j===null?0:j),R(),_("")},le=()=>{Y.reference.current?.setAttribute("data-value",""),_(""),$(""),F(""),Fg(Y.reference.current),G()},be=y.id||y.name,de=`${be}-shadow`,ne=H.length===0,J=pe==="top"||pe==="top-start";return h.jsxs(as,{...y,left:e,error:t,ref:b,form:y.form,loading:r,name:y.name,feedback:k&&J?y.title:d,hideLeft:f,required:p,title:y.title,container:i,rightLabel:s,interactive:a,id:de,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:y.placeholder,right:h.jsxs("span",{className:"flex items-center gap-0.5",children:[n,h.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:he,children:[h.jsx(Mu,{size:20}),h.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),N?h.jsx("button",{type:"button",onClick:le,className:"p-2 transition-colors link:text-danger md:p-1",children:h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.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:[h.jsx("input",{"data-shadow":"true",...ae({...y,onFocus:ie,pattern:ee,onChange:oe,id:de,name:de,ref:Y.setReference,onClick:j=>j.currentTarget.focus(),onKeyDown(j){if(j.key==="Escape")return j.currentTarget.blur(),G();if(k){if(j.key==="ArrowDown"){let X=Re.number(z)?z+1:0;return X>H.length-1&&(X=0),x.current?.scrollIntoView({index:X}),M(X)}if(j.key==="ArrowUp"){let X=Re.number(z)?z-1:H.length-1;return X<0&&(X=H.length-1),x.current?.scrollIntoView({index:X}),M(X)}if(j.key==="Enter"){if(z!==null&&H[z])return j.preventDefault(),ue(H[z],z);if(H.length===1)return j.preventDefault(),ue(H[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":be,"data-target":be,required:p,value:k?O:o.length===0?"":D||N,"aria-autocomplete":"list",autoComplete:"off",className:Pe("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",y.className)}),h.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:m,required:p,defaultValue:y.value||N||void 0}),h.jsx(gr,{preserveTabOrder:!0,children:k?h.jsx(fo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:h.jsxs(He.div,{...ce({ref:fr(V,Y.setFloating),style:{...B.styles,left:se,top:te??0,position:q,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:ne?"auto":I},className:Pe("shadow-floating 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 ease-in-out",J?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!k)return w(0);const X=Y.floating.current.querySelectorAll("li").item(0),me=(X?X.getBoundingClientRect().height:Mi)*H.length;return qi.flushSync(()=>w(me+2))},children:[ne?h.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:h.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||E.autocompleteEmpty})}):null,h.jsx(Bp,{overscan:40,ref:x,hidden:ne,data:H,style:{height:I},defaultItemHeight:Mi,components:c3,scrollerRef:j=>{v.current=j},className:"border-floating max-h-full overscroll-contain rounded-lg bg-floating-background p-0 text-foreground",itemContent:(j,X)=>{const me=X.Render??o3,ve=N===X.value||N===X.label,ke=z===j,Me=X.label??X.value;return h.jsx("button",{"data-value":X.value,...Q({ref:_e=>{C.current[j]=_e},role:"option",type:"button","aria-checked":ve,"aria-current":ve,"aria-selected":ve,"aria-busy":X.disabled,onClick:()=>ue(X,j),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ve?"bg-primary-hover text-primary-foreground":""} ${ke?"bg-floating-hover text-floating-foreground":""}`}),children:h.jsx(me,{...y,label:X.label,value:X.value,children:Me})})}})]})}):null})]})});class Bn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Bn&&(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 Bn(this);return t?t(n):n}static from(t,n){return new Bn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Bn.from(t,n).values())}toArray(){return Array.from(this.values())}}const hE=40,d3=e=>h.jsx(S.Fragment,{children:e.children}),f3={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},mE=[],p3=S.forwardRef(function(t,n){return h.jsx(He.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:h.jsx(gn,{children:t.children})})}),h3=S.forwardRef(function({item:t,context:n,...r},o){return h.jsx(He.li,{...r,ref:o,className:"last:rounded-t-lg"})}),m3={List:p3,Item:h3},g3=e=>{const t=Tt(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const s=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>s.width)return i(!0)},[r]),h.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?h.jsxs(zo,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},y3=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:g=!1,onChangeOptions:y,...m},v)=>{const b=S.useMemo(()=>new Bn(r.map(ne=>[ne.value,ne])),[r]),x=S.useRef(null),T=S.useRef(null),E=m.value??m.defaultValue??mE,I=Tt(),[w,k]=S.useState(0),[A,O]=S.useState(!1),[_,N]=S.useState(""),[$,D]=S.useState(()=>{const ne=new Bn;return E.forEach(J=>{const j=b.get(J);return j?ne.set(J,j):void 0}),ne}),F=S.useMemo(()=>Array.from($.keys()),[$]),[z,M]=S.useState(()=>{const ne=new Set(E);return r.reduce((J,j)=>ne.has(j.value)?[...J,j.label??j.value]:J,[])??E}),[C,V]=S.useState(null),L=S.useRef(mE),R=g&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...r]:r,U=_.length===0?R:Fh(R,"value",[{key:"value",value:_},{key:"label",value:_}]),G=lE(A,"block-only"),H=U.filter(ne=>ne.hidden!==!0),ee=H.length===0,{x:se,y:te,strategy:q,refs:Y,context:Z}=Kn({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:lo,middleware:[Go(4),Gy({padding:10,elementContext:"reference",apply(ne){const j=ne.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,X=Yi(Y.reference.current,window.innerHeight),me=Math.min(j<hE?X:j,X,ne.availableHeight),ve=H.length===0?hE:Math.min(me,X,j),ke=`${x.current.getBoundingClientRect().width}px`;Object.assign(ne.elements.floating.style,{width:ke,maxWidth:ke,height:ve})}})]}),pe=Cv(Z,f3),{getReferenceProps:B,getFloatingProps:ae,getItemProps:ce}=Zn([yr(Z,{role:"listbox"}),Nr(Z),nl(Z,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ne=>V(J=>ne??J)})]);S.useEffect(()=>{if(!A)return k(0);const ne=Y.reference;if(ne.current===null)return;const J=Yi(ne.current,window.innerHeight);setTimeout(()=>k(Math.min(J,H.length*40)),100)},[_,A,Y.reference]),S.useEffect(()=>{m.value&&D(new Bn(m.value.map(ne=>[ne,b.get(ne)])))},[m.value,b]),S.useEffect(()=>{const ne=Y.reference.current;if(ne)return Gi(ne)},[]);const Q=(ne,J)=>{const j=$.clone(ve=>ve.has(ne.value)?ve.remove(ne.value):ve.set(ne.value,ne));D(j);const X=Y.reference.current;if(!X)return;const me=j.map(ve=>ve.value);X?.setAttribute("data-value",JSON.stringify(me)),y&&y(me),M(ve=>ve.concat(ne.label??"")),N(""),V(J)},ue=ne=>{const J=ne.target.value;return N(J),!A&&J===""?O(!0):(ne.target.name=m.name||"",J?O(!0):void 0)},oe=()=>{O(!0),N(""),Y.reference.current?.focus()},he=()=>{O(!0),N("")},ie=()=>{Y.reference.current?.setAttribute("data-value","[]"),N(""),O(!1),D(new Bn),y?.([])},le=m.id||m.name,be=$.map((ne,J)=>h.jsx(zo,{size:"small",icon:h.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:j=>{j.preventDefault(),j.stopPropagation(),Q(ne,J)},children:h.jsx(jo,{size:14})}),children:ne.label??ne.value},`MultiSelect-${ne.value}-x`)),de={height:ee?"0":$.size===0?w-49:w-86};return h.jsxs(as,{...m,left:e,error:t,ref:x,form:m.form,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:o,rightLabel:i,interactive:s,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:h.jsxs("span",{className:"flex items-center gap-0.5",children:[n,h.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:oe,children:[h.jsx(Mu,{size:20}),h.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),$?h.jsx("button",{type:"button",onClick:ie,className:"transition-colors link:text-danger",children:h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.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:[h.jsxs("ul",{...B({...m,onFocus:he,id:`${le}-shadow`,name:`${le}-shadow`,ref:Y.setReference}),tabIndex:0,role:"button","data-name":le,"data-target":le,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":F.join(","),className:Pe("input placeholder-input-mask group h-input-height w-full text-base","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[F.length>0?null:h.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),h.jsx(g3,{label:c,children:be})]}),h.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:v,required:p,defaultValue:m.value||F||void 0}),h.jsx(gr,{preserveTabOrder:!0,children:A?h.jsx(pd,{lockScroll:!0,children:h.jsx(fo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:h.jsxs("div",{...ae({ref:Y.setFloating,style:{...pe.styles,top:te??0,position:q,left:se,height:w-(F.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:[h.jsx("input",{autoFocus:!0,value:_,onChange:ue,title:m.title,placeholder:I.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:ne=>{if(ne.key==="ArrowDown"){let J=C+1;return J>H.length-1&&(J=0),T.current?.scrollIntoView({index:J}),V(J)}if(ne.key==="ArrowUp"){let J=C-1;return J<0&&(J=H.length-1),T.current?.scrollIntoView({index:J}),V(J)}if(ne.key==="Escape")return ne.currentTarget.blur(),O(!1);if(ne.key==="Enter"){if(C!==null&&H[C])return ne.preventDefault(),Q(H[C],C);if(H.length===1)return ne.preventDefault(),Q(H[0],0)}}}),ee?h.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:h.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||I.autocompleteEmpty})}):null,ee?null:h.jsx(He.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:ee?"auto":w},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!A)return k(0);const J=Y.floating.current.querySelectorAll("li").item(0),j=(J?J.getBoundingClientRect().height:40)*H.length;return qi.flushSync(()=>k(j+2))},children:h.jsx(Bp,{ref:T,hidden:ee,data:H,components:m3,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ne,J)=>{const j=J.Render??d3,X=$.has(J.value)||$.has(J.label??""),me=C===ne,ve=J.label??J.value;return h.jsxs("button",{"data-value":J.value,...ce({ref:ke=>{L.current[ne]=ke},role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":J.disabled,onClick:()=>Q(J,ne)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||me?"bg-floating-hover text-floating-foreground":""}`,children:[h.jsx(nh,{onChange:Qo,checked:X,"aria-checked":X,onClick:ke=>{ke.stopPropagation(),Q(J,ne)}}),h.jsx(j,{...m,label:J.label,value:J.value,children:ve})]})}})}),h.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?h.jsx(zo,{theme:"muted",size:"small",children:I.autocompleteEmpty}):be})]})})}):null})]})}),v3=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},b3={Item:S.forwardRef(function(t,n){return h.jsx("li",{...t,ref:n,className:"flex items-center justify-between gap-1"})}),List:S.forwardRef(function(t,n){return h.jsx("ul",{...t,ref:n,className:"space-y-3"})})},x3=e=>{const t=S.useRef(null),n=v3(t);return h.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[h.jsxs("div",{className:"flex w-fit min-w-64 flex-col space-y-4 whitespace-nowrap rounded-lg border border-card-border py-8",children:[h.jsx("header",{className:"border-b border-card-border pb-2"}),h.jsxs("div",{className:"space-y-2 px-8",children:[h.jsx(Jo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),h.jsx(Bp,{height:n,useWindowScroll:!0,data:e.source,components:b3,itemContent:(r,o)=>h.jsx(S.Fragment,{children:h.jsx(nh,{children:h.jsx(e.Item,{data:o})})})})]})]}),h.jsx("div",{children:h.jsx(Jt,{children:h.jsx(wa,{})})}),h.jsx("div",{})]})};function w3(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 S3=({children:e,...t})=>{const n=Lr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:w3(r.current));return S.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),h.jsx("div",{...t,ref:r,children:o?e:null})},wc=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(wc.displayName="ToastContext");function Lh(){const e=P.useContext(wc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Nn(73));return e}var T3=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
15
+ `),()=>{E.contains(T)&&E.removeChild(T)}},[t]),p.jsx(v2,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:P.cloneElement(e,{ref:d})})}const x2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,anchorY:l,root:c})=>{const u=Qn(w2),d=S.useId();let f=!0,h=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:m=>{u.set(m,!0);for(const y of u.values())if(!y)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,r]);return i&&f&&(h={...h}),S.useMemo(()=>{u.forEach((m,y)=>u.set(y,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=p.jsx(b2,{pop:s==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),p.jsx(wl.Provider,{value:h,children:e})};function w2(){return new Map}function lw(e=!0){const t=S.useContext(wl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const s=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const Bl=e=>e.key||"";function cw(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const gn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=lw(s),f=S.useMemo(()=>cw(e),[e]),h=s&&!u?[]:f.map(Bl),m=S.useRef(!0),y=S.useRef(f),g=Qn(()=>new Map),v=S.useRef(new Set),[b,x]=S.useState(f),[T,E]=S.useState(f);xl(()=>{m.current=!1,y.current=f;for(let C=0;C<T.length;C++){const A=Bl(T[C]);h.includes(A)?(g.delete(A),v.current.delete(A)):g.get(A)!==!0&&g.set(A,!1)}},[T,h.length,h.join("-")]);const I=[];if(f!==b){let C=[...f];for(let A=0;A<T.length;A++){const O=T[A],_=Bl(O);h.includes(_)||(C.splice(A,0,O),I.push(O))}return i==="wait"&&I.length&&(C=I),E(cw(C)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(fs);return p.jsx(p.Fragment,{children:T.map(C=>{const A=Bl(C),O=s&&!u?!1:f===T||h.includes(A),_=()=>{if(v.current.has(A))return;if(v.current.add(A),g.has(A))g.set(A,!0);else return;let N=!0;g.forEach($=>{$||(N=!1)}),N&&(w?.(),E(y.current),s&&d?.(),r&&r())};return p.jsx(x2,{isPresent:O,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:O?void 0:_,anchorX:a,anchorY:l,children:C},A)})})},S2=S.createContext(null);function T2(){const e=S.useRef(!1);return xl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function E2(){const e=T2(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ht.postRender(r),[r]),t]}const uw=e=>e===!0,C2=e=>uw(e===!0)||e==="id",k2=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(fs),o=S.useContext(S2),[i,s]=E2(),a=S.useRef(null),l=r.id||o;a.current===null&&(C2(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:uw(n)&&r.group||iw()});const c=S.useMemo(()=>({...a.current,forceRender:i}),[s]);return p.jsx(fs.Provider,{value:c,children:e})},dw=S.createContext({strict:!1}),fw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let pw=!1;function I2(){if(pw)return;const e={};for(const t in fw)e[t]={isEnabled:n=>fw[t].some(r=>!!n[r])};t0(e),pw=!0}function hw(){return I2(),c_()}function A2(e){const t=hw();for(const n in e)t[n]={...t[n],...e[n]};t0(t)}const P2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Rl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||P2.has(e)}let mw=e=>!Rl(e);function gw(e){typeof e=="function"&&(mw=t=>t.startsWith("on")?!Rl(t):e(t))}try{gw(require("@emotion/is-prop-valid").default)}catch{}function O2(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(mw(o)||n===!0&&Rl(o)||!t&&!Rl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Xf({children:e,isValidProp:t,...n}){t&&gw(t);const r=S.useContext(xo);n={...r,...n},n.transition=Sf(n.transition,r.transition),n.isStatic=Qn(()=>n.isStatic);const o=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return p.jsx(xo.Provider,{value:o,children:e})}const Hl=S.createContext({});function D2(e,t){if(_l(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ts(n)?n:void 0,animate:Ts(r)?r:void 0}}return e.inherit!==!1?t:{}}function N2(e){const{initial:t,animate:n}=D2(e,S.useContext(Hl));return S.useMemo(()=>({initial:t,animate:n}),[yw(t),yw(n)])}function yw(e){return Array.isArray(e)?e.join(" "):e}const Qf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vw(e,t,n){for(const r in t)!zt(t[r])&&!m0(r,n)&&(e[r]=t[r])}function M2({transformTemplate:e},t){return S.useMemo(()=>{const n=Qf();return qf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function _2(e,t){const n=e.style||{},r={};return vw(r,n,e),Object.assign(r,M2(e,t)),r}function F2(e,t){const n={},r=_2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const bw=()=>({...Qf(),attrs:{}});function L2(e,t,n,r){const o=S.useMemo(()=>{const i=bw();return y0(i,t,b0(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};vw(i,e.style,e),o.style={...i,...o.style}}return o}const V2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Jf(e){return typeof e!="string"||e.includes("-")?!1:!!(V2.indexOf(e)>-1||/[A-Z]/u.test(e))}function $2(e,t,n,{latestValues:r},o,i=!1,s){const l=(s??Jf(e)?L2:F2)(t,r,o,e),c=O2(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>zt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function z2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:j2(n,r,o,e),renderState:t()}}function j2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=zl(i[f]);let{initial:s,animate:a}=e;const l=_l(e),c=Qx(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!Ml(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Cf(e,f[h]);if(m){const{transitionEnd:y,transition:g,...v}=m;for(const b in v){let x=v[b];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[b]=x)}for(const b in y)o[b]=y[b]}}}return o}const xw=e=>(t,n)=>{const r=S.useContext(Hl),o=S.useContext(wl),i=()=>z2(e,t,r,o);return n?i():Qn(i)},B2=xw({scrapeMotionValuesFromProps:Gf,createRenderState:Qf}),R2=xw({scrapeMotionValuesFromProps:x0,createRenderState:bw}),H2=Symbol.for("motionComponentSymbol");function W2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=r.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(o.current=a)}else o.current?(o.current(),o.current=null):s(i);else s&&(s.current=i)},[t])}const ww=S.createContext({});function gi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function q2(e,t,n,r,o,i){const{visualElement:s}=S.useContext(Hl),a=S.useContext(dw),l=S.useContext(wl),c=S.useContext(xo),u=c.reducedMotion,d=c.skipAnimations,f=S.useRef(null),h=S.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,y=S.useContext(ww);m&&!m.projection&&o&&(m.type==="html"||m.type==="svg")&&U2(f.current,n,o,y);const g=S.useRef(!1);S.useInsertionEffect(()=>{m&&g.current&&m.update(n,l)});const v=n[Nx],b=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return xl(()=>{h.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),S.useEffect(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),b.current=!1),m.enteringChildren=void 0)}),m}function U2(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Sw(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&gi(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Sw(e){if(e)return e.options.allowProjection!==!1?e.projection:Sw(e.parent)}function ep(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&A2(r);const i=n?n==="svg":Jf(e),s=i?R2:B2;function a(c,u){let d;const f={...S.useContext(xo),...c,layoutId:G2(c)},{isStatic:h}=f,m=N2(c),y=s(c,h);if(!h&&Eb){Y2(f,r);const g=K2(f);d=g.MeasureLayout,m.visualElement=q2(e,y,f,o,g.ProjectionNode,i)}return p.jsxs(Hl.Provider,{value:m,children:[d&&m.visualElement?p.jsx(d,{visualElement:m.visualElement,...f}):null,$2(e,c,W2(y,m.visualElement,u),y,h,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(a);return l[H2]=e,l}function G2({layoutId:e}){const t=S.useContext(fs).id;return t&&e!==void 0?t+"-"+e:e}function Y2(e,t){const n=S.useContext(dw).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?oi(!1,r,"lazy-strict-mode"):hn(!1,r,"lazy-strict-mode")}}function K2(e){const t=hw(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Z2(e,t){if(typeof Proxy>"u")return ep;const n=new Map,r=(i,s)=>ep(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&Sl(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,ep(s,void 0,e,t)),n.get(s))})}const X2=(e,t)=>t.isSVG??Jf(e)?new w0(t):new g0(t,{allowProjection:e!==S.Fragment});class Q2 extends jr{constructor(t){super(t),t.animationState||(t.animationState=O_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ml(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let J2=0;class eF extends jr{constructor(){super(...arguments),this.id=J2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tF={animation:{Feature:Q2},exit:{Feature:eF}};function Is(e){return{point:{x:e.pageX,y:e.pageY}}}const nF=e=>t=>Vf(t)&&e(t,Is(t));function As(e,t,n,r){return ks(e,t,nF(n),r)}const Tw=({current:e})=>e?e.ownerDocument.defaultView:null,Ew=(e,t)=>Math.abs(e-t);function rF(e,t){const n=Ew(e.x,t.x),r=Ew(e.y,t.y);return Math.sqrt(n**2+r**2)}const Cw=new Set(["auto","scroll"]);class kw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=np(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=rF(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:g}=h,{timestamp:v}=Yt;this.history.push({...g,timestamp:v});const{onStart:b,onMove:x}=this.handlers;m||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=tp(m,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:y,onSessionEnd:g,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=np(h.type==="pointercancel"?this.lastMoveEventInfo:tp(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(h,b),g&&g(h,b)},!Vf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const l=Is(t),c=tp(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,np(c,this.history)),this.removeListeners=ps(As(this.contextWindow,"pointermove",this.handlePointerMove),As(this.contextWindow,"pointerup",this.handlePointerUp),As(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Cw.has(r.overflowX)||Cw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),br(this.updatePoint)}}function tp(e,t){return t?{point:t(e.point)}:e}function Iw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function np({point:e},t){return{point:e,delta:Iw(e,Aw(t)),offset:Iw(e,oF(t)),velocity:iF(t,.1)}}function oF(e){return e[0]}function Aw(e){return e[e.length-1]}function iF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Aw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>mn(t)*2&&(r=e[1]);const i=Tn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function sF(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?bt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?bt(n,e,r.max):Math.min(e,n)),e}function Pw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function aF(e,{top:t,left:n,bottom:r,right:o}){return{x:Pw(e.x,n,o),y:Pw(e.y,t,r)}}function Ow(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lF(e,t){return{x:Ow(e.x,t.x),y:Ow(e.y,t.y)}}function cF(e,t){let n=.5;const r=tn(e),o=tn(t);return o>r?n=ii(t.min,t.max-r,e.min):r>o&&(n=ii(e.min,e.max-o,t.min)),Jn(0,1,n)}function uF(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const rp=.35;function dF(e=rp){return e===!1?e=0:e===!0&&(e=rp),{x:Dw(e,"left","right"),y:Dw(e,"top","bottom")}}function Dw(e,t,n){return{min:Nw(e,t),max:Nw(e,n)}}function Nw(e,t){return typeof e=="number"?e:e[t]||0}const fF=new WeakMap;class pF{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Is(d).point),this.stopAnimation()},s=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:y}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zM(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tr(v=>{let b=this.getAxisMotionValue(v).get()||0;if(er.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[v];T&&(b=tn(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),y&&ht.update(()=>y(d,f),!1,!0),If(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:y,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=mF(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&ht.update(()=>g(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new kw(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Tw(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&ht.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Wl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=sF(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&gi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aF(r.layoutBox,t):this.constraints=!1,this.elastic=dF(n),o!==this.constraints&&!gi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&tr(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=uF(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gi(t))return!1;const r=t.current;hn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=p_(r,o.root,this.visualElement.getTransformPagePoint());let s=lF(o.layout.layoutBox,i);if(n){const a=n(u_(s));this.hasMutatedConstraints=!!a,a&&(s=o0(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=tr(u=>{if(!Wl(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return If(this.visualElement,t),r.start(Ef(t,r,0,n,this.visualElement,!1))}stopAnimation(){tr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){tr(n=>{const{drag:r}=this.getProps();if(!Wl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-bt(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gi(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};tr(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=cF({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),tr(s=>{if(!Wl(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(bt(l,c,o[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;fF.set(this.visualElement,this);const t=this.visualElement.current,n=As(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,h=f!==t&&qM(f);u&&d&&!h&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();gi(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=hF(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ht.read(o);const a=ks(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(tr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=rp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Mw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function hF(e,t,n){const r=Yx(e,Mw(n)),o=Yx(t,Mw(n));return()=>{r(),o()}}function Wl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mF(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gF extends jr{constructor(t){super(t),this.removeGroupControls=Sn,this.removeListeners=Sn,this.controls=new pF(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Sn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const op=e=>(t,n)=>{e&&ht.update(()=>e(t,n),!1,!0)};class yF extends jr{constructor(){super(...arguments),this.removePointerDownListener=Sn}onPointerDown(t){this.session=new kw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tw(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:op(t),onStart:op(n),onMove:op(r),onEnd:(i,s)=>{delete this.session,o&&ht.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=As(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ip=!1;class vF extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),ip&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),ip=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||ht.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;ip=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _w(e){const[t,n]=lw(),r=S.useContext(fs);return p.jsx(vF,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(ww),isPresent:t,safeToRemove:n})}const bF={pan:{Feature:yF},drag:{Feature:gF,ProjectionNode:sw,MeasureLayout:_w}};function Fw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&ht.postRender(()=>i(t,Is(t)))}class xF extends jr{mount(){const{current:t}=this.node;t&&(this.unmount=BM(t,(n,r)=>(Fw(this.node,r,"Start"),o=>Fw(this.node,o,"End"))))}unmount(){}}class wF extends jr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ps(ks(this.node.current,"focus",()=>this.onFocus()),ks(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Lw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&ht.postRender(()=>i(t,Is(t)))}class SF extends jr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=GM(t,(o,i)=>(Lw(this.node,i,"Start"),(s,{success:a})=>Lw(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const sp=new WeakMap,ap=new WeakMap,TF=e=>{const t=sp.get(e.target);t&&t(e)},EF=e=>{e.forEach(TF)};function CF({root:e,...t}){const n=e||document;ap.has(n)||ap.set(n,{});const r=ap.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(EF,{root:e,...t})),r[o]}function kF(e,t,n){const r=CF(t);return sp.set(e,n),r.observe(e),()=>{sp.delete(e),r.unobserve(e)}}const IF={some:0,all:1};class AF extends jr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:IF[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return kF(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(PF(t,n))&&this.startObserver()}unmount(){}}function PF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const OF={...tF,...{inView:{Feature:AF},tap:{Feature:SF},focus:{Feature:wF},hover:{Feature:xF}},...bF,...{layout:{ProjectionNode:sw,MeasureLayout:_w}}},He=Z2(OF,X2);function DF(e){return S.useEffect(()=>()=>e(),[])}function wo(e){const t=Qn(()=>zr(e)),{isStatic:n}=S.useContext(xo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Vw(e,t){const n=wo(t()),r=()=>n.set(t());return r(),xl(()=>{const o=()=>ht.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),br(r)}}),n}function NF(e){ws.current=[],e();const t=Vw(ws.current,e);return ws.current=void 0,t}function MF(e,t,n,r){if(typeof e=="function")return NF(e);const i=typeof t=="function"?t:o_(t,n,r),s=Array.isArray(e)?$w(e,i):$w([e],([l])=>i(l)),a=Array.isArray(e)?void 0:e.accelerate;return a&&!a.isTransformed&&typeof t!="function"&&Array.isArray(n)&&r?.clamp!==!1&&(s.accelerate={...a,times:t,keyframes:n,isTransformed:!0}),s}function $w(e,t){const n=Qn(()=>[]);return Vw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function _F(){!Bf.current&&Jx();const[e]=S.useState(Fl.current);return process.env.NODE_ENV!=="production"&&Sl(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),e}function FF(){const e=_F(),{reducedMotion:t}=S.useContext(xo);return t==="never"?!1:t==="always"?!0:e}function lp(e){return typeof e=="object"&&!Array.isArray(e)}function zw(e,t,n,r){return e==null?[]:typeof e=="string"&&lp(t)?_f(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function LF(e,t,n){return e*(t+1)}function jw(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function VF(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ri(e,o),r--)}}function $F(e,t,n,r,o,i){VF(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:bt(o,i,r[s]),easing:Bb(n,s)})}function zF(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function jF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const BF="easeInOut",RF=20;function HF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,s=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const m=e[h];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,jw(d,m.at,u,c));continue}let[y,g,v={}]=m;v.at!==void 0&&(d=jw(d,v.at,u,c));let b=0;const x=(T,E,I,w=0,C=0)=>{const A=WF(T),{delay:O=0,times:_=dx(A),type:N=t.type||"keyframes",repeat:$,repeatType:D,repeatDelay:F=0,...z}=E;let{ease:M=t.ease||"easeOut",duration:k}=E;const V=typeof O=="function"?O(w,C):O,L=A.length,R=bf(N)?N:o?.[N||"keyframes"];if(L<=2&&R){let ee=100;if(L===2&&GF(A)){const q=A[1]-A[0];ee=Math.abs(q)}const se={...t,...z};k!==void 0&&(se.duration=mn(k));const te=sx(se,ee,R);M=te.ease,k=te.duration}k??(k=i);const U=d+V;_.length===1&&_[0]===0&&(_[1]=1);const G=_.length-A.length;if(G>0&&ux(_,G),A.length===1&&A.unshift(null),$){hn($<RF,"Repeat count too high, must be less than 20","repeat-count-high"),k=LF(k,$);const ee=[...A],se=[..._];M=Array.isArray(M)?[...M]:[M];const te=[...M];for(let q=0;q<$;q++){A.push(...ee);for(let Y=0;Y<ee.length;Y++)_.push(se[Y]+(q+1)),M.push(Y===0?"linear":Bb(te,Y-1))}zF(_,$)}const H=U+k;$F(I,A,M,_,U,H),b=Math.max(V+k,b),f=Math.max(H,f)};if(zt(y)){const T=Bw(y,a);x(g,v,Rw("default",T))}else{const T=zw(y,g,r,l),E=T.length;for(let I=0;I<E;I++){g=g,v=v;const w=T[I],C=Bw(w,a);for(const A in g)x(g[A],qF(v,A),Rw(A,C),I,E)}}u=d,d+=b}return a.forEach((h,m)=>{for(const y in h){const g=h[y];g.sort(jF);const v=[],b=[],x=[];for(let w=0;w<g.length;w++){const{at:C,value:A,easing:O}=g[w];v.push(A),b.push(ii(0,f,C)),x.push(O||"easeOut")}b[0]!==0&&(b.unshift(0),v.unshift(v[0]),x.unshift(BF)),b[b.length-1]!==1&&(b.push(1),v.push(null)),s.has(m)||s.set(m,{keyframes:{},transition:{}});const T=s.get(m);T.keyframes[y]=v;const{type:E,...I}=t;T.transition[y]={...I,duration:f,ease:x,times:b,...n}}}),s}function Bw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Rw(e,t){return t[e]||(t[e]=[]),t[e]}function WF(e){return Array.isArray(e)?e:[e]}function qF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const UF=e=>typeof e=="number",GF=e=>e.every(UF);function YF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Pl(e)&&!Kx(e)?new w0(t):new g0(t);n.mount(e),Ss.set(e,n)}function KF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new x_(t);n.mount(e),Ss.set(e,n)}function ZF(e,t){return zt(e)||typeof e=="number"||typeof e=="string"&&!lp(t)}function Hw(e,t,n,r){const o=[];if(ZF(e,t))o.push(G0(e,lp(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=zw(e,t,r),s=i.length;hn(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=i[a],c=l instanceof Element?YF:KF;Ss.has(l)||c(l);const u=Ss.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),o.push(...Pf(u,{...t,transition:d},{}))}}return o}function XF(e,t,n){const r=[],o=e.map(s=>{if(Array.isArray(s)&&typeof s[0]=="function"){const a=s[0],l=zr(0);return l.on("change",a),s.length===1?[l,[0,1]]:s.length===2?[l,[0,1],s[1]]:[l,s[1],s[2]]}return s});return HF(o,t,n,{spring:bs}).forEach(({keyframes:s,transition:a},l)=>{r.push(...Hw(l,s,a))}),r}function QF(e){return Array.isArray(e)&&e.some(Array.isArray)}function Ww(e={}){const{scope:t,reduceMotion:n}=e;function r(o,i,s){let a=[],l;if(QF(o))a=XF(o,n!==void 0?{reduceMotion:n,...i}:i,t);else{const{onComplete:u,...d}=s||{};typeof u=="function"&&(l=u),a=Hw(o,i,n!==void 0?{reduceMotion:n,...d}:d,t)}const c=new aM(a);return l&&c.finished.then(l),t&&(t.animations.push(c),c.finished.then(()=>{ri(t.animations,c)})),c}return r}const qw=Ww();function JF(){const e=Qn(()=>({current:null,animations:[]})),t=FF()??void 0,n=S.useMemo(()=>Ww({scope:e,reduceMotion:t}),[e,t]);return DF(()=>{e.animations.forEach(r=>r.stop()),e.animations.length=0}),[e,n]}class eL{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const tL=()=>new eL;function nL(){return Qn(tL)}const Uw=S.createContext(null);function rL(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=bt(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?jD(e,o,o+i):e}function oL({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Qn(()=>He[t]),l=[],c=S.useRef(!1),u=S.useRef(null);hn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(m,y)=>{const g=l.findIndex(v=>m===v.value);g!==-1?l[g].layout=y[n]:l.push({value:m,layout:y[n]}),l.sort(sL)},updateOrder:(m,y,g)=>{if(c.current)return;const v=rL(l,m,y,g);l!==v&&(c.current=!0,r(v.map(iL).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=m=>{u.current=m,typeof s=="function"?s(m):s&&(s.current=m)},h={overflowAnchor:"none",...i.style};return p.jsx(a,{...i,style:h,ref:f,ignoreStrict:!0,children:p.jsx(Uw.Provider,{value:d,children:e})})}const Gw=S.forwardRef(oL);function iL(e){return e.value}function sL(e,t){return e.layout.min-t.layout.min}const ql=50,Yw=25,aL=new Set(["auto","scroll"]),Ps=new WeakMap,Os=new WeakMap;let Ds=null;function lL(){if(Ds){const e=cp(Ds,"y");e&&(Os.delete(e),Ps.delete(e));const t=cp(Ds,"x");t&&t!==e&&(Os.delete(t),Ps.delete(t)),Ds=null}}function cL(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY,o=e===document.body||e===document.documentElement;return aL.has(r)||o}function cp(e,t){let n=e?.parentElement;for(;n;){if(cL(n,t))return n;n=n.parentElement}return null}function uL(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?Math.max(0,r.left):Math.max(0,r.top),i=n==="x"?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),s=e-o,a=i-e;if(s<ql){const l=1-s/ql;return{amount:-Yw*l*l,edge:"start"}}else if(a<ql){const l=1-a/ql;return{amount:Yw*l*l,edge:"end"}}return{amount:0,edge:null}}function dL(e,t,n,r){if(!e)return;Ds=e;const o=cp(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=uL(i,o,n);if(a===null){Os.delete(o),Ps.delete(o);return}const l=Os.get(o),c=o===document.body||o===document.documentElement;if(l!==a){if(!(a==="start"&&r<0||a==="end"&&r>0))return;Os.set(o,a);const d=n==="x"?o.scrollWidth-(c?window.innerWidth:o.clientWidth):o.scrollHeight-(c?window.innerHeight:o.clientHeight);Ps.set(o,d)}if(s>0){const u=Ps.get(o);if((n==="x"?c?window.scrollX:o.scrollLeft:c?window.scrollY:o.scrollTop)>=u)return}n==="x"?c?window.scrollBy({left:s}):o.scrollLeft+=s:c?window.scrollBy({top:s}):o.scrollTop+=s}function Kw(e,t=0){return zt(e)?e:wo(t)}function fL({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:s=!0,...a},l){const c=Qn(()=>He[r]),u=S.useContext(Uw),d={x:Kw(t.x),y:Kw(t.y)},f=MF([d.x,d.y],([v,b])=>v||b?1:"unset");hn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:h,registerItem:m,updateOrder:y,groupRef:g}=u;return p.jsx(c,{drag:h,...a,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:s,onDrag:(v,b)=>{const{velocity:x,point:T}=b,E=d[h].get();y(n,E,x[h]),dL(g.current,T[h],h,x[h]),o&&o(v,b)},onDragEnd:(v,b)=>{lL(),i&&i(v,b)},onLayoutMeasure:v=>{m(n,v)},ref:l,ignoreStrict:!0,children:e})}const Zw=S.forwardRef(fL);var Ul={exports:{}},up={},Gl={exports:{}},dp={};var Xw;function pL(){if(Xw)return dp;Xw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var h=f(),m=r({inst:{value:h,getSnapshot:f}}),y=m[0].inst,g=m[1];return i(function(){y.value=h,y.getSnapshot=f,l(y)&&g({inst:y})},[d,h,f]),o(function(){return l(y)&&g({inst:y}),d(function(){l(y)&&g({inst:y})})},[d]),s(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return dp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,dp}var fp={};var Qw;function hL(){return Qw||(Qw=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}function t(h,m){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=m();if(!d){var g=m();i(y,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=s({inst:{value:y,getSnapshot:m}});var v=g[0].inst,b=g[1];return l(function(){v.value=y,v.getSnapshot=m,n(v)&&b({inst:v})},[h,y,m]),a(function(){return n(v)&&b({inst:v}),h(function(){n(v)&&b({inst:v})})},[h]),c(y),y}function n(h){var m=h.getSnapshot;h=h.value;try{var y=m();return!i(h,y)}catch{return!0}}function r(h,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;fp.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),fp}var Jw;function pp(){return Jw||(Jw=1,process.env.NODE_ENV==="production"?Gl.exports=pL():Gl.exports=hL()),Gl.exports}var e1;function mL(){if(e1)return up;e1=1;var e=S,t=pp();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return up.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var m=i(null);if(m.current===null){var y={hasValue:!1,value:null};m.current=y}else y=m.current;m=a(function(){function v(I){if(!b){if(b=!0,x=I,I=f(I),h!==void 0&&y.hasValue){var w=y.value;if(h(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var C=f(I);return h!==void 0&&h(w,C)?(x=I,w):(x=I,T=C)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,h]);var g=o(c,m[0],m[1]);return s(function(){y.hasValue=!0,y.value=g},[g]),l(g),g},up}var hp={};var t1;function gL(){return t1||(t1=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=pp(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;hp.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var m=i(null);if(m.current===null){var y={hasValue:!1,value:null};m.current=y}else y=m.current;m=a(function(){function v(I){if(!b){if(b=!0,x=I,I=f(I),h!==void 0&&y.hasValue){var w=y.value;if(h(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var C=f(I);return h!==void 0&&h(w,C)?(x=I,w):(x=I,T=C)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,h]);var g=o(c,m[0],m[1]);return s(function(){y.hasValue=!0,y.value=g},[g]),l(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),hp}var n1;function yL(){return n1||(n1=1,process.env.NODE_ENV==="production"?Ul.exports=mL():Ul.exports=gL()),Ul.exports}var vL=yL(),bL=pp(),yi=function(){return yi=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},yi.apply(this,arguments)};function Ns(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function r1(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 vi=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},xL=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},wL=function(e){return Object.entries(e)},o1=function(e){return e instanceof Promise},i1=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)},yi(yi({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},SL=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=performance.now(),c=t.apply(void 0,r1([],Ns(s),!1)),u=function(d,f){return n(function(h){return i1(d,h,i,f)})};return o1(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))}},TL=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,r1([],Ns(s),!1)),c=function(u){return n(function(d){return i1(u,d,i,o.current)})};return o1(l)?l.then(function(u){return c(u)}):c(l)}},mp=function(e,t,n){var r,o,i,s=Ns(S.useState(function(){return e}),2),a=s[0],l=s[1],c=vi(a),u=vi((r=n?.props)!==null&&r!==void 0?r:{}),d=vi(t),f=vi((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),h=vi((i=n?.interceptor)!==null&&i!==void 0?i:[]),m=S.useRef(e),y=xL(a),g=vi(y),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;f.current.forEach(function(E){E(a,y,T)})}},[a,f,y]);var b=Ns(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:m.current,previousState:function(){return g.current}});return wL(E).reduce(function(I,w){var C,A=Ns(w,2),O=A[0],_=A[1];return yi(yi({},I),(C={},C[O]=n?.debug?SL(O,_,l,T,v,h.current):TL(O,_,l,T,v,h.current),C))},{})}),1),x=b[0];return[a,x,u.current]},EL=Object.defineProperty,s1=Object.getOwnPropertySymbols,CL=Object.prototype.hasOwnProperty,kL=Object.prototype.propertyIsEnumerable,a1=(e,t,n)=>t in e?EL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IL=(e,t)=>{for(var n in t||(t={}))CL.call(t,n)&&a1(e,n,t[n]);if(s1)for(var n of s1(t))kL.call(t,n)&&a1(e,n,t[n]);return e},gp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},AL=(e,t,n,r)=>Kl(gp,e,t,n,r),bi=e=>typeof e=="object",Br=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!bi(e)&&!bi(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=>Br(e[r],t[r]))},PL=(e,t)=>(bi(e)||Array.isArray(e))&&t?e[t]:e,OL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Yl=e=>/[0-9.]+/.test(e),l1=e=>["string","number"].includes(typeof e),c1=e=>e==null||e?.length===0||e==="",u1={eq:Br,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:c1,notEmpty:e=>!c1(e),in:(e,t)=>gp(t,n=>Br(e,n)),notIn:(e,t)=>d1(t,n=>!Br(e,n))},DL=e=>{if(e in u1)return u1[e];throw new Error("Linq - Symbol not found")},xi=(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},Kl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=DL(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},NL=(e,t,n,r)=>Kl(xi,e,t,n,r),d1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},ML=(e,t,n,r)=>Kl(d1,e,t,n,r),f1=e=>{if(e===null)return null;const t=IL({},e);return Object.keys(t).forEach(n=>t[n]=bi(e[n])?f1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},p1=(e,t)=>{if(bi(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Br(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Br(t,r))return!0}return!1},_L=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},FL=e=>xi(e,(t,n,r)=>bi(t)?n===r.findIndex(o=>Br(o,t)):n===r.indexOf(t)),LL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},h1=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},VL=(e,t)=>h1(e,n=>n[t]),m1=(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},$L=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},zL=(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 Yl(e)&&Yl(t)?r.map(s=>Number.parseInt(s)):r},yp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Yl(e)&&Yl(t)){const o=[],[i,s]=$L(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return zL(e,t,r)},jL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?yp(r,o,1):yp(r,i,Number.parseInt(o,10))}return l1(e)&&l1(t)?yp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},vp=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},g1=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},BL=(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)},RL=(e,t,n,r)=>Kl(BL,e,t,n,r),y1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(OL(t))},v1=(e=>(e.Asc="asc",e.Desc="desc",e))(v1||{}),HL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),WL=(e,t)=>e.sort(HL(t)),qL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:xi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},UL=class mm{constructor(t=[]){this.array=t}static Range(...t){return jL(...t)}static New(t){return new mm(t)}Where(t,n,r){return this.array=NL(this.array,t,n,r),this}Some(t,n,r){return AL(this.array,t,n,r)}All(t,n,r){return ML(this.array,t,n,r)}Reverse(){return this.array=g1(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=RL(this.array,t,n,r),this}Distinct(){return this.array=FL(this.array),this}First(t){return t===void 0?this.array[0]:LL(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?vp((n,r)=>n+r,0,this.array):vp((n,r)=>n+PL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return VL(this.array,t)}GroupWith(t){return h1(this.array,t)}Except(t){return xi(this.array,n=>!p1(t,n))}Intersect(t){return xi(this.array,n=>p1(t,n))}OrderBy(t,n){let r;return r=t?y1(this.array,t):this.array.toSorted(),this.array=n==="desc"?g1(r):r,this}Includes(t){return gp(this.array,n=>Br(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 vp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(m1(this.array,n=>[t,n]))}Zip(t,n){return m1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:xi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new mm(f1(this.array))}ToObject(t){return _L(this.array,t)}Sort(t){return Array.isArray(t)?WL(this.array,t):y1(this.array,t)}Unique(t){return qL(this.array,t)}},b1=UL;const Zl=0,Rr=1,wi=2,x1=4;function w1(e){return()=>e}function GL(e){e()}function Ms(e,t){return n=>e(t(n))}function S1(e,t){return()=>e(t)}function YL(e,t){return n=>e(t,n)}function bp(e){return e!==void 0}function KL(...e){return()=>{e.map(GL)}}function Si(){}function Xl(e,t){return t(e),e}function ZL(e,t){return t(e)}function xt(...e){return e}function st(e,t){return e(Rr,t)}function ze(e,t){e(Zl,t)}function xp(e){e(wi)}function Et(e){return e(x1)}function Ae(e,t){return st(e,YL(t,Zl))}function Vn(e,t){const n=e(Rr,r=>{n(),t(r)});return n}function T1(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function E1(e,t){return e===t}function wt(e=E1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function De(e){return t=>n=>{e(n)&&t(n)}}function we(e){return t=>Ms(t,e)}function nr(e){return t=>()=>{t(e)}}function fe(e,...t){const n=XL(...t);return((r,o)=>{switch(r){case wi:xp(e);return;case Rr:return st(e,n(o))}})}function rr(e,t){return n=>r=>{n(t=e(t,r))}}function So(e){return t=>n=>{e>0?e--:t(n)}}function xr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function We(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);st(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>{i([s].concat(t))};n===o?a():r=a}}function XL(...e){return t=>e.reduceRight(ZL,t)}function QL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Rr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),Si);case wi:r(),n=null;return}}}function ge(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Zl:t=o;break;case Rr:{o(t);break}case x1:return t}return n(r,o)})}function Xt(e,t){return Xl(ge(t),n=>Ae(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Zl:e.slice().forEach(r=>{r(n)});return;case wi:e.splice(0,e.length);return;case Rr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function yn(e){return Xl(Ke(),t=>Ae(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:JL(),singleton:n}}const JL=()=>Symbol();function eV(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const a=r(o.map(l=>n(l)));return s&&t.set(i,a),a};return n(e)}function Vt(...e){const t=Ke(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);st(i,l=>{n[s]=l,r=r|a,r===o&&ze(t,n)})}),function(i,s){switch(i){case wi:{xp(t);return}case Rr:return r===o&&s(n),st(t,s)}}}function Ne(e,t=E1){return fe(e,wt(t))}function wp(...e){return function(t,n){switch(t){case wi:return;case Rr:return KL(...e.map(r=>st(r,n)))}}}var cn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(cn||{});const tV={0:"debug",3:"error",1:"log",2:"warn"},nV=()=>typeof globalThis>"u"?window:globalThis,Hr=Qe(()=>{const e=ge(3);return{log:ge((t,n,r=1)=>{var o;const i=(o=nV().VIRTUOSO_LOG_LEVEL)!=null?o:Et(e);r>=i&&console[tV[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function or(e,t,n){return Sp(e,t,n).callbackRef}function Sp(e,t,n){const r=S.useRef(null);let o=s=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return o=s=>{s&&t?(i?.observe(s),r.current=s):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function C1(e,t,n,r,o,i,s,a,l){const c=S.useCallback(u=>{const d=rV(u.children,t,a?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window";let m;h&&(m=f.ownerDocument.defaultView);const y=s?a?s.scrollLeft:s.scrollTop:h?a?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:a?f.scrollLeft:f.scrollTop,g=s?a?s.scrollWidth:s.scrollHeight:h?a?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:a?f.scrollWidth:f.scrollHeight,v=s?a?s.offsetWidth:s.offsetHeight:h?a?m.innerWidth:m.innerHeight:a?f.offsetWidth:f.offsetHeight;r({scrollHeight:g,scrollTop:Math.max(y,0),viewportHeight:v}),i?.(a?k1("column-gap",getComputedStyle(u).columnGap,o):k1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,s,r,a]);return Sp(c,n,l)}function rV(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},cn.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 k1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,cn.WARN),t==="normal"?0:parseInt(t??"0",10)}function Tp(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const h=t.getBoundingClientRect(),m=c.top-h.top;f=h.height-Math.max(0,m),d=m+t.scrollTop}else{const h=s.current.ownerDocument.defaultView;f=h.innerHeight-Math.max(0,c.top),d=c.top+h.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:s}=Sp(o,!0,n),a=S.useCallback(()=>{o(s.current)},[o,s]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",a);const c=new ResizeObserver(()=>{requestAnimationFrame(a)});return c.observe(t),()=>{t.removeEventListener("scroll",a),c.unobserve(t)}}else{const c=(l=s.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",a),c?.addEventListener("resize",a),()=>{c?.removeEventListener("scroll",a),c?.removeEventListener("resize",a)}}},[a,t,s]),i}const nn=Qe(()=>{const e=Ke(),t=Ke(),n=ge(0),r=Ke(),o=ge(0),i=Ke(),s=Ke(),a=ge(0),l=ge(0),c=ge(0),u=ge(0),d=Ke(),f=Ke(),h=ge(!1),m=ge(!1),y=ge(!1);return Ae(fe(e,we(({scrollTop:g})=>g)),t),Ae(fe(e,we(({scrollHeight:g})=>g)),s),Ae(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:a,horizontalDirection:m,scrollBy:f,scrollContainerState:e,scrollHeight:s,scrollingInProgress:h,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:y,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),_s={lvl:0};function I1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({end:a-1,start:r,value:o}),r=a,o=l}return i.push({end:1/0,start:r,value:o}),i}function mt(e){return e===_s}function Fs(e,t){if(!mt(e))return t===e.k?e.v:t<e.k?Fs(e.l,t):Fs(e.r,t)}function $n(e,t,n="k"){if(mt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=$n(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return $n(e.l,t,n)}function vn(e,t,n){return mt(e)?O1(t,n,1):t===e.k?jt(e,{k:t,v:n}):t<e.k?D1(jt(e,{l:vn(e.l,t,n)})):D1(jt(e,{r:vn(e.r,t,n)}))}function Ti(){return _s}function Ei(e,t,n){if(mt(e))return[];const r=$n(e,t)[0];return oV(Cp(e,r,n))}function Ep(e,t){if(mt(e))return _s;const{k:n,l:r,r:o}=e;if(t===n){if(mt(r))return o;if(mt(o))return r;{const[i,s]=P1(r);return Ql(jt(e,{k:i,l:A1(r),v:s}))}}else return t<n?Ql(jt(e,{l:Ep(r,t)})):Ql(jt(e,{r:Ep(o,t)}))}function To(e){return mt(e)?[]:[...To(e.l),{k:e.k,v:e.v},...To(e.r)]}function Cp(e,t,n){if(mt(e))return[];const{k:r,l:o,r:i,v:s}=e;let a=[];return r>t&&(a=a.concat(Cp(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(Cp(i,t,n))),a}function Ql(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(kp(t))return N1(jt(e,{lvl:n-1}));if(!mt(t)&&!mt(t.r))return jt(t.r,{l:jt(t,{r:t.r.l}),lvl:n,r:jt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(kp(e))return Ip(jt(e,{lvl:n-1}));if(!mt(r)&&!mt(r.l)){const o=r.l,i=kp(o)?r.lvl-1:r.lvl;return jt(o,{l:jt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Ip(jt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function jt(e,t){return O1(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 A1(e){return mt(e.r)?e.l:Ql(jt(e,{r:A1(e.r)}))}function kp(e){return mt(e)||e.lvl>e.r.lvl}function P1(e){return mt(e.r)?[e.k,e.v]:P1(e.r)}function O1(e,t,n,r=_s,o=_s){return{k:e,l:r,lvl:n,r:o,v:t}}function D1(e){return Ip(N1(e))}function N1(e){const{l:t}=e;return!mt(t)&&t.lvl===e.lvl?jt(t,{r:jt(e,{l:t.r})}):e}function Ip(e){const{lvl:t,r:n}=e;return!mt(n)&&!mt(n.r)&&n.lvl===t&&n.r.lvl===t?jt(n,{l:jt(e,{r:n.l}),lvl:t+1}):e}function oV(e){return I1(e,({k:t,v:n})=>({index:t,value:n}))}function M1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Ls(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Ap=Qe(()=>({recalcInProgress:ge(!1)}),[],{singleton:!0});function _1(e,t,n){return e[Jl(e,t,n)]}function Jl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-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 iV(e,t,n,r){const o=Jl(e,t,r),i=Jl(e,n,r,o);return e.slice(o,i+1)}function zn(e,t){return Math.round(e.getBoundingClientRect()[t])}function ec(e){return!mt(e.groupOffsetTree)}function Pp({index:e},t){return t===e?0:t<e?-1:1}function sV(){return{groupIndices:[],groupOffsetTree:Ti(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Ti()}}function aV(e,t){let n=mt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:s}=r;if(n=Math.min(n,s),mt(e)){e=vn(e,0,i);continue}const a=Ei(e,s-1,o+1);if(a.some(hV(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of a)l?(o>=d||i===f)&&(e=Ep(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=vn(e,o+1,f));c&&(e=vn(e,s,i))}return[e,n]}function lV(e){return typeof e.groupIndex<"u"}function cV({offset:e},t){return t===e?0:t<e?-1:1}function Vs(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=_1(t,e,Pp),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function F1(e,t){if(!ec(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function L1(e,t,n){if(lV(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=F1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function uV(e,t,n,r=0){return r>0&&(t=Math.max(t,_1(e,r,Pp).offset)),I1(iV(e,t,n,cV),pV)}function dV(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,cn.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&mt(i)&&t.length===2){const f=t[0].size,h=t[1].size;s=n.reduce((m,y)=>vn(vn(m,y,f),y+1,h),s)}else[s,a]=aV(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Op(e.offsetTree,a,s,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,h)=>vn(f,h,Vs(h,d,o)),Ti()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:s}}function fV(e){return To(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function V1(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 Op(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Jl(o,t-1,Pp),a=o[l].offset;const c=$n(n,t-1);i=c[0],s=c[1],o.length&&o[l].size===$n(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ei(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({index:c,offset:f,size:u}),i=c,a=f,s=u}return{lastIndex:i,lastOffset:a,lastSize:s,offsetTree:o}}function pV(e){return{index:e.index,value:e}}function hV(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 mV={offsetHeight:"height",offsetWidth:"width"},ir=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Xt(r,0),i=Ke(),s=Ke(),a=ge(0),l=ge([]),c=ge(void 0),u=ge(void 0),d=ge(void 0),f=ge(void 0),h=ge((w,C)=>zn(w,mV[C])),m=ge(void 0),y=ge(0),g=sV(),v=Xt(fe(n,We(l,e,y),rr(dV,g),wt()),g),b=Xt(fe(l,wt(),rr((w,C)=>({current:C,prev:w.current}),{current:[],prev:[]}),we(({prev:w})=>w)),[]);Ae(fe(l,De(w=>w.length>0),We(v,y),we(([w,C,A])=>{const O=w.reduce((_,N,$)=>vn(_,N,Vs(N,C.offsetTree,A)||$),Ti());return{...C,groupIndices:w,groupOffsetTree:O}})),v),Ae(fe(r,We(v),De(([w,{lastIndex:C}])=>w<C),we(([w,{lastIndex:C,lastSize:A}])=>[{endIndex:C,size:A,startIndex:w}])),n),Ae(c,u);const x=Xt(fe(c,we(w=>w===void 0)),!0);Ae(fe(u,De(w=>w!==void 0&&mt(Et(v).sizeTree)),we(w=>{const C=Et(d),A=Et(l).length>0;return C?A?[{endIndex:0,size:C,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ae(fe(f,De(w=>w!==void 0&&w.length>0&&mt(Et(v).sizeTree)),we(w=>{const C=[];let A=w[0],O=0;for(let _=1;_<w.length;_++){const N=w[_];N!==A&&(C.push({endIndex:_-1,size:A,startIndex:O}),A=N,O=_)}return C.push({endIndex:w.length-1,size:A,startIndex:O}),C})),n),Ae(fe(l,We(d,u),De(([,w,C])=>w!==void 0&&C!==void 0),we(([w,C,A])=>{const O=[];for(let _=0;_<w.length;_++){const N=w[_],$=w[_+1];O.push({startIndex:N,endIndex:N,size:C}),$!==void 0&&O.push({startIndex:N+1,endIndex:$-1,size:A})}return O})),n);const T=yn(fe(n,We(v),rr(({sizes:w},[C,A])=>({changed:A!==w,sizes:A}),{changed:!1,sizes:g}),we(w=>w.changed)));st(fe(a,rr((w,C)=>({diff:w.prev-C,prev:C}),{diff:0,prev:0}),we(w=>w.diff)),w=>{const{groupIndices:C}=Et(v);if(w>0)ze(t,!0),ze(i,w+V1(w,C));else if(w<0){const A=Et(b);A.length>0&&(w-=V1(-w,A)),ze(s,w)}}),st(fe(a,We(e)),([w,C])=>{w<0&&C("`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:a},cn.ERROR)});const E=yn(i);Ae(fe(i,We(v),we(([w,C])=>{const A=C.groupIndices.length>0,O=[],_=C.lastSize;if(A){const N=Fs(C.sizeTree,0);let $=0,D=0;for(;$<w;){const z=C.groupIndices[D],M=C.groupIndices.length===D+1?1/0:C.groupIndices[D+1]-z-1;O.push({endIndex:z,size:N,startIndex:z}),O.push({endIndex:z+1+M-1,size:_,startIndex:z+1}),D++,$+=M+1}const F=To(C.sizeTree);return $!==w&&F.shift(),F.reduce((z,{k:M,v:k})=>{let V=z.ranges;return z.prevSize!==0&&(V=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:k,ranges:V}},{prevIndex:w,prevSize:0,ranges:O}).ranges}return To(C.sizeTree).reduce((N,{k:$,v:D})=>({prevIndex:$+w,prevSize:D,ranges:[...N.ranges,{endIndex:$+w-1,size:N.prevSize,startIndex:N.prevIndex}]}),{prevIndex:0,prevSize:_,ranges:[]}).ranges})),n);const I=yn(fe(s,We(v,y),we(([w,{offsetTree:C},A])=>{const O=-w;return Vs(O,C,A)})));return Ae(fe(s,We(v,y),we(([w,C,A])=>{if(C.groupIndices.length>0){if(mt(C.sizeTree))return C;let O=Ti();const _=Et(b);let N=0,$=0,D=0;for(;N<-w;){D=_[$];const F=_[$+1]-D-1;$++,N+=F+1}if(O=To(C.sizeTree).reduce((F,{k:z,v:M})=>vn(F,Math.max(0,z+w),M),O),N!==-w){const F=Fs(C.sizeTree,D);O=vn(O,0,F);const z=$n(C.sizeTree,-w+1)[1];O=vn(O,1,z)}return{...C,sizeTree:O,...Op(C.offsetTree,0,O,A)}}else{const O=To(C.sizeTree).reduce((_,{k:N,v:$})=>vn(_,Math.max(0,N+w),$),Ti());return{...C,sizeTree:O,...Op(C.offsetTree,0,O,A)}}})),v),{beforeUnshiftWith:E,data:m,defaultItemSize:u,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:d,gap:y,groupIndices:l,heightEstimates:f,itemSize:h,listRefresh:T,shiftWith:s,shiftWithOffset:I,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},xt(Hr,Ap),{singleton:!0});function gV(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const $1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),s=Ke(),a=yn(fe(i,we(gV)));return Ae(fe(a,we(l=>l.totalCount)),n),Ae(fe(a,we(l=>l.groupIndices)),e),Ae(fe(Vt(o,t,r),De(([l,c])=>ec(c)),we(([l,c,u])=>$n(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),wt(),we(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},xt(ir,nn)),Wr=Qe(([{log:e}])=>{const t=ge(!1),n=yn(fe(t,De(r=>r),wt()));return st(t,r=>{r&&Et(e)("props updated",{},cn.DEBUG)}),{didMount:n,propsReady:t}},xt(Hr),{singleton:!0}),yV=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function z1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!yV)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const $s=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const h=Ke(),m=Ke(),y=ge(0);let g=null,v=null,b=null;function x(){g&&(g(),g=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),ze(l,!1)}return Ae(fe(h,We(n,d,r,y,a,s,f),We(e,i,o),we(([[T,E,I,w,C,A,O,_],N,$,D])=>{const F=z1(T),{align:z,behavior:M,offset:k}=F,V=w-1,L=L1(F,E,V);let R=Vs(L,E.offsetTree,N)+A;z==="end"?(R+=$+$n(E.sizeTree,L)[1]-I+D,L===V&&(R+=O)):z==="center"?R+=($+$n(E.sizeTree,L)[1]-I+D)/2:R-=C,k&&(R+=k);const U=G=>{x(),G?(_("retrying to scroll to",{location:T},cn.DEBUG),ze(h,T)):(ze(m,!0),_("list did not change, scroll successful",{},cn.DEBUG))};if(x(),M==="smooth"){let G=!1;b=st(t,H=>{G=G||H}),g=Vn(u,()=>{U(G)})}else g=Vn(fe(t,vV(150)),U);return v=setTimeout(()=>{x()},1200),ze(l,!0),_("scrolling from index to",{behavior:M,index:L,top:R},cn.DEBUG),{behavior:M,top:R}})),c),{scrollTargetReached:m,scrollToIndex:h,topListHeight:y}},xt(ir,nn,Hr),{singleton:!0});function vV(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Dp(e,t){e==0?t():requestAnimationFrame(()=>{Dp(e-1,t)})}function Np(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const zs=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:s}])=>{const a=ge(!0),l=ge(0),c=ge(!0);return Ae(fe(s,We(l),De(([u,d])=>!!d),nr(!1)),a),Ae(fe(s,We(l),De(([u,d])=>!!d),nr(!1)),c),st(fe(Vt(t,s),We(a,n,e,c),De(([[,u],d,{sizeTree:f},h,m])=>u&&(!mt(f)||bp(h))&&!d&&!m),We(l)),([,u])=>{Vn(o,()=>{ze(c,!0)}),Dp(4,()=>{Vn(r,()=>{ze(a,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},xt(ir,nn,$s,Wr),{singleton:!0});function j1(e,t){return Math.abs(e-t)<1.01}const js="up",Bs="down",bV="none",xV={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},wV=0,Rs=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const s=ge(!1),a=ge(!0),l=Ke(),c=Ke(),u=ge(4),d=ge(wV),f=Xt(fe(wp(fe(Ne(o),So(1),nr(!0)),fe(Ne(o),So(1),nr(!1),T1(100))),wt()),!1),h=Xt(fe(wp(fe(n,nr(!0)),fe(n,nr(!1),T1(200))),wt()),!1);Ae(fe(Vt(Ne(o),Ne(d)),we(([b,x])=>b<=x),wt()),a),Ae(fe(a,xr(50)),c);const m=yn(fe(Vt(r,Ne(i),Ne(t),Ne(e),Ne(u)),rr((b,[{scrollHeight:x,scrollTop:T},E,I,w,C])=>{const A=T+E-x>-C,O={scrollHeight:x,scrollTop:T,viewportHeight:E};if(A){let N,$;return T>b.state.scrollTop?(N="SCROLLED_DOWN",$=b.state.scrollTop-T):(N="SIZE_DECREASED",$=b.state.scrollTop-T||b.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:$,state:O}}let _;return O.scrollHeight>b.state.scrollHeight?_="SIZE_INCREASED":E<b.state.viewportHeight?_="VIEWPORT_HEIGHT_DECREASING":T<b.state.scrollTop?_="SCROLLING_UPWARDS":_="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:_,state:O}},xV),wt((b,x)=>b&&b.atBottom===x.atBottom))),y=Xt(fe(r,rr((b,{scrollHeight:x,scrollTop:T,viewportHeight:E})=>{if(j1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const I=x-(T+E)<1;return b.scrollTop!==T&&I?{changed:!0,jump:b.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),De(b=>b.changed),we(b=>b.jump)),0);Ae(fe(m,we(b=>b.atBottom)),s),Ae(fe(s,xr(50)),l);const g=ge(Bs);Ae(fe(r,we(({scrollTop:b})=>b),wt(),rr((b,x)=>Et(h)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?js:Bs,prevScrollTop:x},{direction:Bs,prevScrollTop:0}),we(b=>b.direction)),g),Ae(fe(r,xr(50),nr(bV)),g);const v=ge(0);return Ae(fe(f,De(b=>!b),nr(0)),v),Ae(fe(o,xr(100),We(f),De(([b,x])=>x),rr(([b,x],[T])=>[x,T],[0,0]),we(([b,x])=>x-b)),v),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:s,isAtTop:a,isScrolling:f,lastJumpDueToItemResize:y,scrollDirection:g,scrollVelocity:v}},xt(nn)),Hs="top",Ws="bottom",B1="none";function R1(e,t,n){return typeof e=="number"?n===js&&t===Hs||n===Bs&&t===Ws?e:0:n===js?t===Hs?e.main:e.reverse:t===Ws?e.main:e.reverse}function H1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Mp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),s=ge(0),a=ge(0),l=ge(0),c=Xt(fe(Vt(Ne(r),Ne(o),Ne(n),Ne(i,Ls),Ne(l),Ne(s),Ne(t),Ne(e),Ne(a)),we(([u,d,f,[h,m],y,g,v,b,x])=>{const T=u-b,E=g+v,I=Math.max(f-T,0);let w=B1;const C=H1(x,Hs),A=H1(x,Ws);return h-=b,h+=f+v,m+=f+v,m-=b,h>u+E-C&&(w=js),m<u-I+d+A&&(w=Bs),w!==B1?[Math.max(T-f-R1(y,Hs,w)-C,0),T-I-v+d+R1(y,Ws,w)+A]:null}),De(u=>u!=null),wt(Ls)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},xt(nn),{singleton:!0});function SV(e,t,n){if(ec(t)){const r=F1(e,t);return[{index:$n(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const _p={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function tc(e,t,n,r,o,i){const{lastIndex:s,lastOffset:a,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const y=e[e.length-1];u=y.offset+y.size}const d=n-s,f=a+d*l+(d-1)*r,h=c,m=f-u;return{bottom:u,firstItemIndex:i,items:q1(e,o,i),offsetBottom:m,offsetTop:c,top:h,topItems:q1(t,o,i),topListHeight:t.reduce((y,g)=>g.size+y,0),totalCount:n}}function W1(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=Np(t,a),c=Array.from({length:a}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return tc(c,[],a,o,n,r)}function q1(e,t,n){if(e.length===0)return[];if(!ec(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=[],s=Ei(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.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}function U1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const Eo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:m}])=>{const y=ge([]),g=ge(0),v=Ke(),b=ge(0);Ae(i.topItemsIndexes,y);const x=Xt(fe(Vt(h,m,Ne(l,Ls),Ne(o),Ne(r),Ne(c),u,Ne(y),Ne(t),Ne(n),Ne(b),e),De(([w,C,,A,,,,,,,,O])=>{const _=O&&O.length!==A;return w&&!C&&!_}),we(([,,[w,C],A,O,_,N,$,D,F,z,M])=>{var k,V,L,R;const U=O,{offsetTree:G,sizeTree:H}=U,ee=Et(g);if(A===0)return{..._p,totalCount:A};if(w===0&&C===0)return ee===0?{..._p,totalCount:A}:W1(ee,_,O,D,F,M||[]);if(mt(H))return ee>0?null:tc(SV(Np(_,A),U,M),[],A,F,U,D);const se=[];if($.length>0){const ae=$[0],ce=$[$.length-1];let Q=0;for(const ue of Ei(H,ae,ce)){const oe=ue.value,he=Math.max(ue.start,ae),ie=Math.min(ue.end,ce);for(let le=he;le<=ie;le++)se.push({data:M?.[le],index:le,offset:Q,size:oe}),Q+=oe}}if(!N)return tc([],se,A,F,U,D);const te=$.length>0?$[$.length-1]+1:0,q=uV(G,w,C,te);if(q.length===0)return null;const Y=A-1,Z=Xl([],ae=>{for(const ce of q){const Q=ce.value;let ue=Q.offset,oe=ce.start;const he=Q.size;if(Q.offset<w){oe+=Math.floor((w-Q.offset+F)/(he+F));const le=oe-ce.start;ue+=le*he+le*F}oe<te&&(ue+=(te-oe)*he,oe=te);const ie=Math.min(ce.end,Y);for(let le=oe;le<=ie&&!(ue>=C);le++)ae.push({data:M?.[le],index:le,offset:ue,size:he}),ue+=he+F}}),pe=U1(z,Hs),B=U1(z,Ws);if(Z.length>0&&(pe>0||B>0)){const ae=Z[0],ce=Z[Z.length-1];if(pe>0&&ae.index>te){const Q=Math.min(pe,ae.index-te),ue=[];let oe=ae.offset;for(let he=ae.index-1;he>=ae.index-Q;he--){const ie=(V=(k=Ei(H,he,he)[0])==null?void 0:k.value)!=null?V:ae.size;oe-=ie+F,ue.unshift({data:M?.[he],index:he,offset:oe,size:ie})}Z.unshift(...ue)}if(B>0&&ce.index<Y){const Q=Math.min(B,Y-ce.index);let ue=ce.offset+ce.size+F;for(let oe=ce.index+1;oe<=ce.index+Q;oe++){const he=(R=(L=Ei(H,oe,oe)[0])==null?void 0:L.value)!=null?R:ce.size;Z.push({data:M?.[oe],index:oe,offset:ue,size:he}),ue+=he+F}}}return tc(Z,se,A,F,U,D)}),De(w=>w!==null),wt()),_p);Ae(fe(e,De(bp),we(w=>w?.length)),o),Ae(fe(x,we(w=>w.topListHeight)),d),Ae(d,a),Ae(fe(x,we(w=>[w.top,w.bottom])),s),Ae(fe(x,we(w=>w.items)),v);const T=yn(fe(x,De(({items:w})=>w.length>0),We(o,e),De(([{items:w},C])=>w[w.length-1].originalIndex===C-1),we(([,w,C])=>[w-1,C]),wt(Ls),we(([w])=>w))),E=yn(fe(x,xr(200),De(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),we(({items:w})=>w[0].index),wt())),I=yn(fe(x,De(({items:w})=>w.length>0),we(({items:w})=>{let C=0,A=w.length-1;for(;w[C].type==="group"&&C<A;)C++;for(;w[A].type==="group"&&A>C;)A--;return{endIndex:w[A].index,startIndex:w[C].index}}),wt(M1)));return{endReached:T,initialItemCount:g,itemsRendered:v,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:E,topItemsIndexes:y,...f}},xt(ir,$1,Mp,zs,$s,Rs,Wr,Ap),{singleton:!0}),G1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),s=Xt(fe(Vt(n,e,r,t,o),we(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return Ae(Ne(s),i),{totalListHeight:s,totalListHeightChanged:i}},xt(nn,Eo),{singleton:!0}),TV=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ge(!1),r=Xt(fe(Vt(n,e,t),De(([o])=>o),we(([,o,i])=>Math.max(0,o-i)),xr(0),wt()),0);return{alignToBottom:n,paddingTopAddition:r}},xt(nn,G1),{singleton:!0}),Y1=Qe(()=>({context:ge(null)})),EV=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:s})=>t<s?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,K1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ae(fe(u,We(t,l,n,i,o,r,a),We(e),we(([[d,f,h,m,y,g,v,b],x])=>{const{align:T,behavior:E,calculateViewLocation:I=EV,done:w,...C}=d,A=L1(d,f,m-1),O=Vs(A,f.offsetTree,x)+y+g,_=O+$n(f.sizeTree,A)[1],N=b+g,$=b+h-v,D=I({itemBottom:_,itemTop:O,locationParams:{align:T,behavior:E,...C},viewportBottom:$,viewportTop:N});return D?w&&Vn(fe(s,De(F=>!F),So(Et(s)?1:2)),w):w?.(),D}),De(d=>d!==null)),c),{scrollIntoView:u}},xt(ir,nn,$s,Eo,Hr),{singleton:!0});function Z1(e){return e?e==="smooth"?"smooth":"auto":!1}const CV=(e,t)=>typeof e=="function"?Z1(e(t)):t&&Z1(e),kV=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:h}])=>{const m=ge(!1),y=Ke();let g=null;function v(E){ze(s,{align:"end",behavior:E,index:"LAST"})}st(fe(Vt(fe(Ne(t),So(1)),l),We(Ne(m),i,a,d),we(([[E,I],w,C,A,O])=>{let _=I&&A,N="auto";return _&&(N=CV(w,C||O),_=_&&!!N),{followOutputBehavior:N,shouldFollow:_,totalCount:E}}),De(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{g&&(g(),g=null),Et(n)?requestAnimationFrame(()=>{Et(u)("following output to ",{totalCount:I},cn.DEBUG),v(E)}):g=Vn(e,()=>{Et(u)("following output to ",{totalCount:I},cn.DEBUG),v(E),g=null})});function b(E){const I=Vn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!g&&(Et(u)("scrolling to bottom due to increased size",{},cn.DEBUG),v("auto"))});setTimeout(I,100)}st(fe(Vt(Ne(m),t,c),De(([E,,I])=>E&&I),rr(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),De(({refreshed:E})=>E),We(m,t)),([,E])=>{Et(a)&&b(E!==!1)}),st(y,()=>{b(Et(m)!==!1)}),st(Vt(Ne(m),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ge(null),T=Ke();return Ae(wp(fe(Ne(r),we(E=>{var I;return(I=E?.length)!=null?I:0})),fe(Ne(t))),T),st(fe(Vt(fe(T,So(1)),l),We(Ne(x),a,d,f),we(([[E,I],w,C,A,O])=>I&&C&&w?.({context:O,totalCount:E,scrollingInProgress:A})),De(E=>!!E),xr(0)),E=>{g&&(g(),g=null),Et(n)?requestAnimationFrame(()=>{Et(u)("scrolling into view",{}),ze(h,E)}):g=Vn(e,()=>{Et(u)("scrolling into view",{}),ze(h,E),g=null})}),{autoscrollToBottom:y,followOutput:m,scrollIntoViewOnChange:x}},xt(ir,Rs,$s,zs,Wr,Hr,nn,Y1,K1)),IV=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(Ae(fe(a,We(i),De(([,l])=>l!==0),We(o,r,t,n,e),we(([[,l],c,u,d,f,h=[]])=>W1(l,c,u,d,f,h))),s),{}),xt(ir,zs,Eo,Wr),{singleton:!0}),AV=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ge(0);return st(fe(e,We(r),De(([,o])=>o!==0),we(([,o])=>({top:o}))),o=>{Vn(fe(n,So(1),De(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},xt(Wr,nn,Eo),{singleton:!0}),X1=Qe(([{scrollVelocity:e}])=>{const t=ge(!1),n=Ke(),r=ge(!1);return Ae(fe(e,We(r,t,n),De(([o,i])=>!!i),we(([o,i,s,a])=>{const{enter:l,exit:c}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),wt()),t),st(fe(Vt(t,e,n),We(r)),([[o,i,s],a])=>{o&&a&&a.change&&a.change(i,s)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},xt(Rs),{singleton:!0}),Fp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=ge(!1),s=ge(void 0);return Ae(fe(Vt(n,r),we(([{scrollHeight:a,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:a,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ae(fe(t,We(r),we(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{customScrollParent:s,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},xt(nn)),PV=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ke(),u=ge(void 0),d=ge(null),f=ge(null);return Ae(a,d),Ae(l,f),st(fe(c,We(t,r,s,d,f,n)),([h,m,y,g,v,b,x])=>{const T=fV(m.sizeTree);g&&v!==null&&b!==null&&(y=v.scrollTop-b.offsetTop),y-=x,h({ranges:T,scrollTop:y})}),Ae(fe(u,De(bp),we(OV)),o),Ae(fe(i,We(u),De(([,h])=>h!==void 0),wt(),we(([,h])=>h.ranges)),e),{getState:c,restoreStateFrom:u}},xt(ir,nn,zs,Wr,Fp));function OV(e){return{align:"start",index:0,offset:e.scrollTop}}const DV=Qe(([{topItemsIndexes:e}])=>{const t=ge(0);return Ae(fe(t,De(n=>n>=0),we(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},xt(Eo));function Q1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const NV=Q1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),MV=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:h},{recalcInProgress:m}])=>{const y=yn(fe(l,We(s),rr(([,v,b,x],[{bottom:T,items:E,offsetBottom:I,totalCount:w},C])=>{const A=T+I;let O=0;return b===w&&v.length>0&&E.length>0&&(E[0].originalIndex===0&&v[0].originalIndex===0||(O=A-x,O!==0&&(O+=C))),[O,E,w,A]},[0,[],0,0]),De(([v])=>v!==0),We(r,a,n,o,h,m),De(([,v,b,x,,,T])=>!T&&!x&&v!==0&&b===js),we(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},cn.DEBUG),v))));function g(v){v>0?(ze(t,{behavior:"auto",top:-v}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-v}))}return st(fe(y,We(e,i)),([v,b,x])=>{x&&NV()?ze(e,b-v):g(-v)}),st(fe(Vt(Xt(i,!1),e,m),De(([v,b,x])=>!v&&!x&&b!==0),we(([v,b])=>b),xr(1)),g),Ae(fe(d,we(v=>({top:-v}))),t),st(fe(c,We(f,u),we(([v,{groupIndices:b,lastSize:x,sizeTree:T},E])=>{function I(w){return w*(x+E)}if(b.length===0)return I(v);{let w=0;const C=Fs(T,0);let A=0,O=0;for(;A<v;){A++,w+=C;let _=b.length===O+1?1/0:b[O+1]-b[O]-1;A+_>v&&(w-=C,_=v-A+1),A+=_,w+=I(_),O++}return w}})),v=>{ze(e,v),requestAnimationFrame(()=>{ze(t,{top:v}),requestAnimationFrame(()=>{ze(e,0),ze(m,!1)})})}),{deviation:e}},xt(nn,Rs,Eo,ir,Hr,Ap)),_V=Qe(([e,t,n,r,o,i,s,a,l,c,u])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c,...u}),xt(Mp,IV,Wr,X1,G1,AV,TV,Fp,K1,Hr,Y1)),J1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:h},{initialItemFinalLocationReached:m,initialTopMostItemIndex:y,scrolledToInitialItem:g},v,b,x,T,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:C},A])=>{const{listState:O,minOverscanItemCount:_,topItemsIndexes:N,rangeChanged:$,...D}=T;return Ae($,A.scrollSeekRangeChanged),Ae(fe(A.windowViewportRect,we(F=>F.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:C,heightEstimates:a,initialItemFinalLocationReached:m,initialTopMostItemIndex:y,scrolledToInitialItem:g,sizeRanges:c,topItemCount:w,topItemsIndexes:N,totalCount:f,...x,groupIndices:s,itemSize:l,listState:O,minOverscanItemCount:_,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:h,rangeChanged:$,...D,...A,...v,sizes:u,...b}},xt(ir,zs,nn,PV,kV,Eo,$s,MV,DV,$1,_V));function FV(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)Object.hasOwn(r,s)||(n[s]=t[s]);return n}const nc=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Lp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=S.createContext({});function l(g,v){g.propsReady&&ze(g.propsReady,!1);for(const b of r){const x=g[t.required[b]];ze(x,v[b])}for(const b of o)if(b in v){const x=g[t.optional[b]];ze(x,v[b])}g.propsReady&&ze(g.propsReady,!0)}function c(g){return i.reduce((v,b)=>(v[b]=x=>{const T=g[t.methods[b]];ze(T,x)},v),{})}function u(g){return s.reduce((v,b)=>(v[b]=QL(g[t.events[b]]),v),{})}const d=S.forwardRef((g,v)=>{const{children:b,...x}=g,[T]=S.useState(()=>Xl(eV(e),w=>{l(w,x)})),[E]=S.useState(S1(u,T));nc(()=>{for(const w of s)w in x&&st(E[w],x[w]);return()=>{Object.values(E).map(xp)}},[x,E,T]),nc(()=>{l(T,x)}),S.useImperativeHandle(v,w1(c(T)));const I=n;return p.jsx(a.Provider,{value:T,children:n?p.jsx(I,{...FV([...r,...o,...s],x),children:b}):b})}),f=g=>{const v=S.useContext(a);return S.useCallback(b=>{ze(v[g],b)},[v,g])},h=g=>{const v=S.useContext(a)[g],b=S.useCallback(x=>st(v,x),[v]);return S.useSyncExternalStore(b,()=>Et(v),()=>Et(v))},m=g=>{const v=S.useContext(a)[g],[b,x]=S.useState(S1(Et,v));return nc(()=>st(v,T=>{T!==b&&x(w1(T))}),[v,b]),b},y=S.version.startsWith("18")?h:m;return{Component:d,useEmitter:(g,v)=>{const b=S.useContext(a)[g];nc(()=>st(b,v),[v,b])},useEmitterValue:y,usePublisher:f}}const rc=S.createContext(void 0),eS=S.createContext(void 0),tS=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Vp(e){return"self"in e}function LV(e){return"body"in e}function nS(e,t,n,r=Si,o,i){const s=S.useRef(null),a=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let h,m,y;const g=f.target;if(LV(g)||Vp(g)){const b=Vp(g)?g:g.defaultView;y=i?b.scrollX:b.scrollY,h=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,m=i?b.innerWidth:b.innerHeight}else y=i?g.scrollLeft:g.scrollTop,h=i?g.scrollWidth:g.scrollHeight,m=i?g.offsetWidth:g.offsetHeight;const v=()=>{e({scrollHeight:h,scrollTop:Math.max(y,0),viewportHeight:m})};f.suppressFlushSync?v():qi.flushSync(v),a.current!==null&&(y===a.current||y<=0||y===h-m)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||s.current;return r(o||s.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[s,c,n,r,o]);function u(f){const h=s.current;if(!h||(i?"offsetWidth"in h&&h.offsetWidth===0:"offsetHeight"in h&&h.offsetHeight===0))return;const m=f.behavior==="smooth";let y,g,v;Vp(h)?(g=Math.max(zn(h.document.documentElement,i?"width":"height"),i?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight),y=i?h.innerWidth:h.innerHeight,v=i?window.scrollX:window.scrollY):(g=h[i?"scrollWidth":"scrollHeight"],y=zn(h,i?"width":"height"),v=h[i?"scrollLeft":"scrollTop"]);const b=g-y;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),j1(y,g)||f.top===v){e({scrollHeight:g,scrollTop:v,viewportHeight:y}),m&&t(!0);return}m?(a.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,i&&(f={behavior:f.behavior,left:f.top}),h.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),s.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:s,scrollToCallback:u}}const $p="-webkit-sticky",rS="sticky",zp=Q1(()=>{if(typeof document>"u")return rS;const e=document.createElement("div");return e.style.position=$p,e.style.position===$p?$p:rS});function jp(e){return e}const VV=Qe(()=>{const e=ge(a=>`Item ${a}`),t=ge(a=>`Group ${a}`),n=ge({}),r=ge(jp),o=ge("div"),i=ge(Si),s=(a,l=null)=>Xt(fe(n,we(c=>c[a]),wt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),$V=Qe(([e,t])=>({...e,...t}),xt(J1,VV)),zV=({height:e})=>p.jsx("div",{style:{height:e}}),jV={overflowAnchor:"none",position:zp(),zIndex:1},oS={overflowAnchor:"none"},BV={...oS,display:"inline-block",height:"100%"},iS=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=En("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=En("windowScrollContainerState"),s=En("scrollContainerState"),a=o||r?i:s,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),h=Fe("log"),m=En("gap"),y=Fe("horizontalDirection"),{callbackRef:g}=C1(n,f,d,e?Si:a,h,m,o,y,Fe("skipAnimationFrameInResizeObserver")),[v,b]=S.useState(0);Hp("deviation",D=>{v!==D&&b(D)});const x=Fe("EmptyPlaceholder"),T=Fe("ScrollSeekPlaceholder")||zV,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),C=Fe("computeItemKey"),A=Fe("isSeeking"),O=Fe("groupIndices").length>0,_=Fe("alignToBottom"),N=Fe("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:_?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:_?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?p.jsx(x,{...St(x,c)}):p.jsx(E,{...St(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:$,children:(e?t.topItems:t.items).map(D=>{const F=D.originalIndex,z=C(F+t.firstItemIndex,D.data,c);return A?S.createElement(T,{...St(T,c),height:D.size,index:D.index,key:z,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?S.createElement(w,{...St(w,c),"data-index":F,"data-item-index":D.index,"data-known-size":D.size,key:z,style:jV},u(D.index,c)):S.createElement(I,{...St(I,c),...sS(I,D.data),"data-index":F,"data-item-group-index":D.groupIndex,"data-item-index":D.index,"data-known-size":D.size,key:z,style:y?BV:oS},O?l(D.index,D.groupIndex,D.data,c):l(D.index,D.data,c))})})}),RV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},HV={outline:"none",overflowX:"auto",position:"relative"},Ci=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),WV={position:zp(),top:0,width:"100%",zIndex:1};function St(e,t){if(typeof e!="string")return{context:t}}function sS(e,t){return{item:typeof e=="string"?void 0:t}}const qV=S.memo(function(){const e=Fe("HeaderComponent"),t=En("headerHeight"),n=Fe("HeaderFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...St(e,o)})}):null}),UV=S.memo(function(){const e=Fe("FooterComponent"),t=En("footerHeight"),n=Fe("HeaderFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...St(e,o)})}):null});function Bp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:h,scrollToCallback:m}=nS(a,c,l,u,void 0,d);return e("scrollTo",m),e("scrollBy",f),p.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:h,style:{...d?HV:RV,...o},tabIndex:0,...s,...St(l,i),children:r})})}function Rp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),h=S.useRef(null),m=t("scrollerRef"),{scrollByCallback:y,scrollerRef:g,scrollToCallback:v}=nS(a,c,l,m,f);return tS(()=>{var b;return g.current=f||((b=h.current)==null?void 0:b.ownerDocument.defaultView),()=>{g.current=null}},[g,f]),e("windowScrollTo",v),e("scrollBy",y),p.jsx(l,{ref:h,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...s,...St(l,i),children:r})})}const GV=({children:e})=>{const t=S.useContext(rc),n=En("viewportHeight"),r=En("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),s=S.useMemo(()=>Ms(n,l=>zn(l,i?"width":"height")),[n,i]),a=or(s,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),p.jsx("div",{"data-viewport-type":"element",ref:a,style:Ci(o),children:e})},YV=({children:e})=>{const t=S.useContext(rc),n=En("windowViewportRect"),r=En("fixedItemHeight"),o=Fe("customScrollParent"),i=Tp(n,o,Fe("skipAnimationFrameInResizeObserver")),s=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),p.jsx("div",{"data-viewport-type":"window",ref:i,style:Ci(s),children:e})},KV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...WV,marginTop:`${n}px`},o=Fe("context");return p.jsx(t,{style:r,...St(t,o),children:e})},ZV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return p.jsxs(r||t?JV:QV,{...e,context:o,children:[n&&p.jsx(KV,{children:p.jsx(iS,{showTopList:!0})}),p.jsxs(r||t?YV:GV,{children:[p.jsx(qV,{}),p.jsx(iS,{}),p.jsx(UV,{})]})]})}),{Component:XV,useEmitter:Hp,useEmitterValue:Fe,usePublisher:En}=Lp($V,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},ZV),QV=Bp({useEmitter:Hp,useEmitterValue:Fe,usePublisher:En}),JV=Rp({useEmitter:Hp,useEmitterValue:Fe,usePublisher:En}),Wp=XV,e$=Qe(()=>{const e=ge(c=>p.jsxs("td",{children:["Item $",c]})),t=ge(null),n=ge(c=>p.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ge(null),o=ge(null),i=ge({}),s=ge(jp),a=ge(Si),l=(c,u=null)=>Xt(fe(i,we(d=>d[c]),wt()),u);return{components:i,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),t$=Qe(([e,t])=>({...e,...t}),xt(J1,e$)),n$=({height:e})=>p.jsx("tr",{children:p.jsx("td",{style:{height:e}})}),r$=({height:e})=>p.jsx("tr",{children:p.jsx("td",{style:{border:0,height:e,padding:0}})}),o$={overflowAnchor:"none"},aS={position:zp(),zIndex:2,overflowAnchor:"none"},lS=S.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),s=je("fixedHeaderHeight"),a=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||n$,d=je("GroupComponent"),f=je("TableRowComponent"),h=(e?t.topItems:[]).reduce((y,g,v)=>(v===0?y.push(g.size):y.push(y[v-1]+g.size),y),[]),m=(e?t.topItems:t.items).map(y=>{const g=y.originalIndex,v=n(g+r,y.data,o),b=e?g===0?0:h[g-1]:0;return i?S.createElement(u,{...St(u,o),height:y.size,index:y.index,key:v,type:y.type||"item"}):y.type==="group"?S.createElement(d,{...St(d,o),"data-index":g,"data-item-index":y.index,"data-known-size":y.size,key:v,style:{...aS,top:s}},c(y.index,o)):S.createElement(f,{...St(f,o),...sS(f,y.data),"data-index":g,"data-item-index":y.index,"data-known-size":y.size,"data-item-group-index":y.groupIndex,key:v,style:e?{...aS,top:s+b}:o$},a?l(y.index,y.groupIndex,y.data,o):l(y.index,y.data,o))});return p.jsx(p.Fragment,{children:m})}),i$=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=jn("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=jn("windowScrollContainerState"),s=jn("scrollContainerState"),a=o||r?i:s,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=C1(n,c,l,a,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[h,m]=S.useState(0);qp("deviation",O=>{h!==O&&(f.current.style.marginTop=`${O}px`,m(O))});const y=je("EmptyPlaceholder"),g=je("FillerRow")||r$,v=je("TableBodyComponent"),b=je("paddingTopAddition"),x=je("statefulTotalCount"),T=je("context");if(x===0&&y)return p.jsx(y,{...St(y,T)});const E=(t?e.topItems:[]).reduce((O,_)=>O+_.size,0),I=e.offsetTop+b+h-E,w=e.offsetBottom,C=I>0?p.jsx(g,{context:T,height:I},"padding-top"):null,A=w>0?p.jsx(g,{context:T,height:w},"padding-bottom"):null;return p.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...St(v,T),children:[C,t&&p.jsx(lS,{showTopList:!0}),p.jsx(lS,{}),A]})}),s$=({children:e})=>{const t=S.useContext(rc),n=jn("viewportHeight"),r=jn("fixedItemHeight"),o=or(S.useMemo(()=>Ms(n,i=>zn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),p.jsx("div",{"data-viewport-type":"element",ref:o,style:Ci(!1),children:e})},a$=({children:e})=>{const t=S.useContext(rc),n=jn("windowViewportRect"),r=jn("fixedItemHeight"),o=je("customScrollParent"),i=Tp(n,o,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),p.jsx("div",{"data-viewport-type":"window",ref:i,style:Ci(!1),children:e})},l$=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=jn("fixedHeaderHeight"),o=jn("fixedFooterHeight"),i=je("fixedHeaderContent"),s=je("fixedFooterContent"),a=je("context"),l=or(S.useMemo(()=>Ms(r,v=>zn(v,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=or(S.useMemo(()=>Ms(o,v=>zn(v,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?d$:u$,d=n||t?a$:s$,f=je("TableComponent"),h=je("TableHeadComponent"),m=je("TableFooterComponent"),y=i?p.jsx(h,{ref:l,style:{position:"sticky",top:0,zIndex:2},...St(h,a),children:i()},"TableHead"):null,g=s?p.jsx(m,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...St(m,a),children:s()},"TableFoot"):null;return p.jsx(u,{...e,...St(u,a),children:p.jsx(d,{children:p.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...St(f,a),children:[y,p.jsx(i$,{},"TableBody"),g]})})})}),{Component:c$,useEmitter:qp,useEmitterValue:je,usePublisher:jn}=Lp(t$,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},l$),u$=Bp({useEmitter:qp,useEmitterValue:je,usePublisher:jn}),d$=Rp({useEmitter:qp,useEmitterValue:je,usePublisher:jn}),f$=c$,cS={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},p$={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:uS,floor:oc,max:qs,min:Up,round:dS}=Math;function fS(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function h$(e){return{...p$,items:e}}function ic(e,t){return e&&e.width===t.width&&e.height===t.height}function m$(e,t){return e&&e.column===t.column&&e.row===t.row}const g$=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,h,{didMount:m,propsReady:y},{customScrollParent:g,useWindowScroll:v,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T},E])=>{const I=ge(0),w=ge(0),C=ge(cS),A=ge({height:0,width:0}),O=ge({height:0,width:0}),_=Ke(),N=Ke(),$=ge(0),D=ge(null),F=ge({column:0,row:0}),z=Ke(),M=Ke(),k=ge(!1),V=ge(0),L=ge(!0),R=ge(!1),U=ge(!1);st(fe(m,We(V),De(([q,Y])=>!!Y)),()=>{ze(L,!1)}),st(fe(Vt(m,L,O,A,V,R),De(([q,Y,Z,pe,,B])=>q&&!Y&&Z.height!==0&&pe.height!==0&&!B)),([,,,,q])=>{ze(R,!0),Dp(1,()=>{ze(_,q)}),Vn(fe(c),()=>{ze(t,[0,0]),ze(L,!0)})}),Ae(fe(M,De(q=>q!=null&&q.scrollTop>0),nr(0)),w),st(fe(m,We(M),De(([,q])=>q!=null)),([,q])=>{q&&(ze(A,q.viewport),ze(O,q.item),ze(F,q.gap),q.scrollTop>0&&(ze(k,!0),Vn(fe(c,So(1)),Y=>{ze(k,!1)}),ze(l,{top:q.scrollTop})))}),Ae(fe(A,we(({height:q})=>q)),d),Ae(fe(Vt(Ne(A,ic),Ne(O,ic),Ne(F,(q,Y)=>q&&q.column===Y.column&&q.row===Y.row),Ne(c)),we(([q,Y,Z,pe])=>({gap:Z,item:Y,scrollTop:pe,viewport:q}))),z),Ae(fe(Vt(Ne(I),r,Ne(F,m$),Ne(O,ic),Ne(A,ic),Ne(D),Ne(w),Ne(k),Ne(L),Ne(V)),De(([,,,,,,,q])=>!q),we(([q,[Y,Z],pe,B,ae,ce,Q,,ue,oe])=>{const{column:he,row:ie}=pe,{height:le,width:be}=B,{width:de}=ae;if(Q===0&&(q===0||de===0))return cS;if(be===0){const _e=Np(oe,q),ct=_e+Math.max(Q-1,0);return h$(fS(_e,ct,ce))}const re=pS(de,be,he);let J,j;ue?Y===0&&Z===0&&Q>0?(J=0,j=Q-1):(J=re*oc((Y+ie)/(le+ie)),j=re*uS((Z+ie)/(le+ie))-1,j=Up(q-1,qs(j,re-1)),J=Up(j,qs(0,J))):(J=0,j=-1);const X=fS(J,j,ce),{bottom:me,top:ve}=hS(ae,pe,B,X),Ce=uS(q/re),Me=Ce*le+(Ce-1)*ie-me;return{bottom:me,itemHeight:le,items:X,itemWidth:be,offsetBottom:Me,offsetTop:ve,top:ve}})),C),Ae(fe(D,De(q=>q!==null),we(q=>q.length)),I),Ae(fe(Vt(A,O,C,F),De(([q,Y,{items:Z}])=>Z.length>0&&Y.height!==0&&q.height!==0),we(([q,Y,{items:Z},pe])=>{const{bottom:B,top:ae}=hS(q,pe,Y,Z);return[ae,B]}),wt(Ls)),t);const G=ge(!1);Ae(fe(c,We(G),we(([q,Y])=>Y||q!==0)),G);const H=yn(fe(Vt(C,I),De(([{items:q}])=>q.length>0),We(G),De(([[q,Y],Z])=>{const pe=q.items[q.items.length-1].index===Y-1;return(Z||q.bottom>0&&q.itemHeight>0&&q.offsetBottom===0&&q.items.length===Y)&&pe}),we(([[,q]])=>q-1),wt())),ee=yn(fe(Ne(C),De(({items:q})=>q.length>0&&q[0].index===0),nr(0),wt())),se=yn(fe(Ne(C),We(k),De(([{items:q},Y])=>q.length>0&&!Y),we(([{items:q}])=>({endIndex:q[q.length-1].index,startIndex:q[0].index})),wt(M1),xr(0)));Ae(se,h.scrollSeekRangeChanged),Ae(fe(_,We(A,O,I,F),we(([q,Y,Z,pe,B])=>{const ae=z1(q),{align:ce,behavior:Q,offset:ue}=ae;let oe=ae.index;oe==="LAST"&&(oe=pe-1),oe=qs(0,oe,Up(pe-1,oe));let he=Gp(Y,B,Z,oe);return ce==="end"?he=dS(he-Y.height+Z.height):ce==="center"&&(he=dS(he-Y.height/2+Z.height/2)),ue&&(he+=ue),{behavior:Q,top:he}})),l);const te=Xt(fe(C,we(q=>q.offsetBottom+q.bottom)),0);return Ae(fe(T,we(q=>({height:q.visibleHeight,width:q.visibleWidth}))),A),{customScrollParent:g,data:D,deviation:$,footerHeight:o,gap:F,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:O,overscan:n,restoreStateFrom:M,scrollBy:s,scrollContainerState:a,scrollHeight:N,scrollTo:l,scrollToIndex:_,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:v,viewportDimensions:A,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T,...h,gridState:C,horizontalDirection:U,initialTopMostItemIndex:V,totalListHeight:te,...f,endReached:H,propsReady:y,rangeChanged:se,startReached:ee,stateChanged:z,stateRestoreInProgress:k,...E}},xt(Mp,nn,Rs,X1,Wr,Fp,Hr));function pS(e,t,n){return qs(1,oc((e+n)/(oc(t)+n)))}function hS(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Gp(e,t,n,r[0].index);return{bottom:Gp(e,t,n,r[r.length-1].index)+o,top:i}}function Gp(e,t,n,r){const o=pS(e.width,n.width,t.column),i=oc(r/o),s=i*n.height+qs(0,i-1)*t.row;return s>0?s+t.row:s}const y$=Qe(()=>{const e=ge(d=>`Item ${d}`),t=ge({}),n=ge(null),r=ge("virtuoso-grid-item"),o=ge("virtuoso-grid-list"),i=ge(jp),s=ge("div"),a=ge(Si),l=(d,f=null)=>Xt(fe(t,we(h=>h[d]),wt()),f),c=ge(!1),u=ge(!1);return Ae(Ne(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),v$=Qe(([e,t])=>({...e,...t}),xt(g$,y$)),b$=S.memo(function(){const e=Ct("gridState"),t=Ct("listClassName"),n=Ct("itemClassName"),r=Ct("itemContent"),o=Ct("computeItemKey"),i=Ct("isSeeking"),s=Cn("scrollHeight"),a=Ct("ItemComponent"),l=Ct("ListComponent"),c=Ct("ScrollSeekPlaceholder"),u=Ct("context"),d=Cn("itemDimensions"),f=Cn("gap"),h=Ct("log"),m=Ct("stateRestoreInProgress"),y=Cn("reportReadyState"),g=or(S.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;s(b);const x=v.firstChild;if(x){const{height:T,width:E}=x.getBoundingClientRect();d({height:T,width:E})}f({column:gS("column-gap",getComputedStyle(v).columnGap,h),row:gS("row-gap",getComputedStyle(v).rowGap,h)})},[s,d,f,h]),!0,!1);return tS(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),m?null:p.jsx(l,{className:t,ref:g,...St(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const b=o(v.index,v.data,u);return i?p.jsx(c,{...St(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},b):S.createElement(a,{...St(a,u),className:n,"data-index":v.index,key:b},r(v.index,v.data,u))})})}),x$=S.memo(function(){const e=Ct("HeaderComponent"),t=Cn("headerHeight"),n=Ct("headerFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,!1),o=Ct("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...St(e,o)})}):null}),w$=S.memo(function(){const e=Ct("FooterComponent"),t=Cn("footerHeight"),n=Ct("headerFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,!1),o=Ct("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...St(e,o)})}):null}),S$=({children:e})=>{const t=S.useContext(eS),n=Cn("itemDimensions"),r=Cn("viewportDimensions"),o=or(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),p.jsx("div",{ref:o,style:Ci(!1),children:e})},T$=({children:e})=>{const t=S.useContext(eS),n=Cn("windowViewportRect"),r=Cn("itemDimensions"),o=Ct("customScrollParent"),i=Tp(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),p.jsx("div",{ref:i,style:Ci(!1),children:e})},E$=S.memo(function({...e}){const t=Ct("useWindowScroll"),n=Ct("customScrollParent"),r=n||t?k$:C$,o=n||t?T$:S$,i=Ct("context");return p.jsx(r,{...e,...St(r,i),children:p.jsxs(o,{children:[p.jsx(x$,{}),p.jsx(b$,{}),p.jsx(w$,{})]})})}),{useEmitter:mS,useEmitterValue:Ct,usePublisher:Cn}=Lp(v$,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},E$),C$=Bp({useEmitter:mS,useEmitterValue:Ct,usePublisher:Cn}),k$=Rp({useEmitter:mS,useEmitterValue:Ct,usePublisher:Cn});function gS(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,cn.WARN),t==="normal"?0:parseInt(t??"0",10)}const yS=e=>{const t=e.Icon??iy,n=vt();return p.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[p.jsx(t,{size:64,className:"text-disabled"}),p.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Yp=p.jsx("div",{className:"h-6 w-10/12 animate-pulse rounded bg-muted"}),Us=e=>p.jsx(un,{...e,as:e.as||"span",className:Pe("block h-8 w-32 animate-pulse rounded bg-muted",e.className)});function I$(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 a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const A$=e=>{const t=S.useId(),n=vt(),r=S.useMemo(()=>I$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return p.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 border-t-muted p-3 text-sm lg:flex-nowrap lg:justify-between",children:[p.jsx("p",{children:p.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?p.jsxs(S.Fragment,{children:[p.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),p.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>p.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),p.jsx("nav",{children:p.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?p.jsx("li",{children:p.jsx(un,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:p.jsx(S.Fragment,{children:typeof i=="string"?p.jsx("li",{children:"..."}):p.jsx("li",{children:p.jsx(un,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?p.jsx("li",{children:p.jsx(un,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},P$=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",s=()=>o("opacity-0"),a=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;a();const u=new IntersectionObserver(d=>d.forEach(a),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),p.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:s,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:p.jsx("div",{ref:n,className:"isolate block",children:e.children})})},O$=(e,t,n)=>{const r=n.cols,o=n.loading;return p.jsx(S.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=xd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=s===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`typography group-table-cell flex border-collapse flex-col whitespace-pre-wrap border border-y border-b border-table-border p-[var(--table-cell-padding)] md:table-cell md:border-b-0 md:border-r md:border-l-transparent md:last:border-r-transparent ${u}`},d?p.jsx(P$,{children:p.jsx(f,{col:i,row:t,rowIndex:e})}):null,p.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),p.jsx("span",{className:"relative",children:o?Yp:c?p.jsx(S.Fragment,{children:p.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l})}):p.jsx(S.Fragment,{children:Re.nil(l)?"":l})}))})})},ki=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[Go(10),Ka({fallbackAxisSideDirection:"end"}),Ya(),ld({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Kn({open:n,middleware:i,transform:!0,whileElementsMounted:lo,onOpenChange:(m,y)=>{const g=y?.relatedTarget;g&&g.dataset.floating==="true"&&!m||(r(m),e.onChange?.(m))}}),c=Ko(l),u=Nr(l),d=yr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:h}=Zn([c,u,d]);return p.jsxs(S.Fragment,{children:[p.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&p.jsx(gr,{preserveTabOrder:!0,id:`${t}-portal`,children:p.jsx(fo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:p.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:s.setFloating,"aria-labelledby":t,style:a,...h(),children:[p.jsx(cd,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),p.jsx("header",{className:"mb-2",children:p.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})};var Kp={},vS;function D$(){return vS||(vS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(b){window.console.log(b)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const b=v.getItem(g);try{return JSON.parse(b)}catch{return b??null}},i=g=>Object.keys(g).reduce((v,b)=>({...v,[b]:o(b,g)}),{}),s=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},d=[{name:"expires",parse:g=>`expires=${s(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${s(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],f={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=f.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((E,I)=>{const w=I.parse(b);return w===""?E:E.concat(w)},[`${encodeURIComponent(g)}=${x}`]).join(";");document.cookie=T,u()}},h=g=>{const v=new Set,b=x=>{g().removeItem(x);const T=i(g());v.forEach(E=>E(T))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(g()):g(),has:x=>{const T=g().getItem(x);return!n(T)},deleteAll:()=>{t(g(),b),v.forEach(x=>x(g()))},get:x=>o(x,g()),set:(x,T)=>{g().setItem(x,JSON.stringify(T)),v.forEach(E=>E(g()))}}},m=h(()=>window.sessionStorage),y=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=y,e.SessionStorage=m,e.createStorage=h})(Kp)),Kp}var Gs=D$();const Zp=e=>e.headerLabel??e.thead??e.id,Xp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ii=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ii||{});const Qp=e=>e.type==="number"?e.valueAsNumber:e.value,N$=e=>{let t=[];return e({add:(s,a,l)=>t.push({...l,id:s,thead:a}),remove:s=>t=t.filter(a=>a.id!==s),getAll:()=>Array.from(t),filter:s=>t=Array.from(t.filter(s))}),t},M$={},_$=(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 s=r.get(o.id);return s===void 0?e[i]:s})},F$=(e,t,n=M$)=>{const r=Mr()?null:Gs.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=mp({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:_$(t,r?.cols)},s=>{const a=l=>{const c=s.state(),u={...c,...l};return Mr()||Gs.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(s.state()),{set:l=>a(l)}});return{...o,...i,name:e}},L$=e=>{const t=Lr(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const s=n.current.querySelector(`th[data-tableheader="${i.id}"]`);s&&(s.style.width="auto")})},[t]);return[n,r]},V$=()=>Mr()?void 0:document.querySelector('[data-component="modal-body"]'),$$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),z$=(e,t)=>e.toSorted($$(t)),bS=(e,t,n)=>({label:t,id:Xo(),type:n,value:e.id}),j$=e=>{const t=vt(),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,bS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return p.jsx(S.Fragment,{children:p.jsx(ki,{title:t.tableSortDropdownTitle,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(ey,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:p.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>p.jsxs("li",{className:"flex flex-nowrap gap-3",children:[p.jsx(po,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),p.jsx(po,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),p.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:p.jsx(Ea,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-primary",children:[p.jsx(zu,{size:14})," ",t.tableSortAddButton]})})]})})})},B$=e=>{const t=vt(),[n,r]=S.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=bS(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Zp(e.col);return p.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[p.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?p.jsx(NI,{size:14}):null,n==="desc"?p.jsx(DI,{size:14}):null,n==="undefined"?p.jsx(ey,{size:14}):null]})},xS=S.createContext({}),R$=xS.Provider,H$=()=>S.useContext(xS),Jp=(e,t,n,r={})=>{const o=e.id,i=e.type??Ii.Text,s=t[i]??[],a=s.find(c=>c["data-default"])?.value??s[0]?.value,l=n[a];return{id:Xo(),operation:l,label:Zp(e),name:o,type:i,value:"",...r}},eh=()=>{const e=vt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[Ii.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ii.Boolean]:[t.is,t.isNot],[Ii.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},W$=e=>{const t=vt(),n=eh(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Jp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(m=>u===m.id);return Jp(h,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=Qp(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return p.jsx(S.Fragment,{children:p.jsx(ki,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(BI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:p.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return p.jsxs("li",{className:"flex flex-nowrap gap-3",children:[p.jsx(po,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),p.jsx(po,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),p.jsx(Jo,{optionalText:"","data-id":l.id,onChange:a,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),p.jsx("div",{className:"mt-5 flex items-center justify-center",children:p.jsx("button",{"data-id":l.id,type:"button",onClick:s,children:p.jsx(Ea,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[p.jsx(zu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},q$=({filter:e,onDelete:t,set:n})=>{const r=vt(),o=eh(),i=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},s=a=>{const l=a.target.dataset.id||"",c=Qp(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return p.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[p.jsx(po,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),p.jsx(Jo,{optionalText:" ","data-id":e.id,onChange:s,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),p.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:p.jsx(Ea,{className:"text-danger",size:14})})]})},U$={top:0,left:0,right:0,bottom:-1},G$=e=>{const t=Hu(),n=vt(),r=e.filters.filter(y=>y.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,s=e.header.allowFilter??t.table.filters??!0,a=eh(),l=o?WI:qI,c=S.useRef(null),u=y=>{const g=y.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==g))},d=S.useCallback(y=>{if(y===null)return;c.current=y;const g=new AbortController;return y.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),f=e.sorters.find(y=>e.header.id===y.value),h=f?.type?f.type===v1.Asc?"ascending":"descending":"none",m=Zp(e.header);return p.jsxs(Zw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":h,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`typography bg-table-header first:rounded-tl-lg last:rounded-tr-lg overflow-clip last:border-r-transparent border-table-border border-r-[1px] relative min-w-0 cursor-grab font-medium md:h-14 ${e.header.thProps?.className??""}`,children:[p.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:p.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?p.jsx(ki,{arrow:!0,trigger:p.jsxs("span",{children:[p.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",m]}),p.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:p.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",p.jsx("span",{className:"font-medium",children:m})]}),children:p.jsxs("ul",{className:"font-medium",children:[r.length===0?null:p.jsx(S.Fragment,{children:r.map(y=>p.jsx("li",{className:"my-1",children:p.jsx(q$,{onDelete:u,filter:y,set:e.setFilters})},`thead-filter-${y.id}`))}),p.jsx("li",{children:p.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(y=>y.concat(Jp(e.header,a.options,a.operations))),children:[p.jsx(zu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,p.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?p.jsx(B$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:p.jsx(He.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:U$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-transparent hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:y=>{y.currentTarget.focus()},onKeyDown:y=>{if(y.key==="ArrowLeft"||y.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const g=c.current.getBoundingClientRect().width,b=(y.shiftKey?50:10)*(y.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(g+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(y,g)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=g.delta.x;c.current.style.width=`${Math.abs(v+b)}px`}})]})},Y$=e=>{const[t,n]=L$(e.setCols);return p.jsx(Gw,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:p.jsx(gn,{children:e.headers.map((r,o)=>p.jsx(G$,{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}`))})})},K$=S.forwardRef(({context:e,className:t="",...n},r)=>p.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:p.jsx(gn,{children:n.children})})),Z$=S.forwardRef(({context:e,className:t="",...n},r)=>p.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-separate border-spacing-0 text-left ${t??""}`})),X$=S.forwardRef(({context:e,...t},n)=>{const r=H$(),o={...t?.style,top:Re.number(r.sticky)?`${r.sticky}px`:void 0};return p.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"group:sticky top-0 hidden bg-transparent md:table-header-group"})}),Q$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return p.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 pb-4 md:table-row ${[n?.className,o?.className].filter(Boolean).join(" ")}`})}),J$=S.forwardRef((e,t)=>e.context.loadingMore?p.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:p.jsx("tr",{role:"row",className:"bg-card-background",children:p.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:p.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),ez={TableRow:Q$,TableFoot:J$,TableHead:X$,Table:Z$,TableBody:K$},tz=[0,0,0,0,0,0,0,0,0,0],nz=e=>p.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?Yp:p.jsx(yS,{})}),rz=()=>p.jsx(S.Fragment,{}),oz=[],wS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:s,getScrollRef:a,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),h=Lr(s),m=Lr(u.loadingMore),y=S.useMemo(()=>{if(u.loading)return tz;if(c)return u.rows;const b=new b1(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():z$(b.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&m.current?(h.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[m,h]);const g=y.length===0,v={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return p.jsxs("div",{className:"group bg-table-background relative flex w-full flex-col whitespace-nowrap rounded-lg",children:[p.jsx(f$,{components:ez,context:v,totalCount:y.length,itemContent:g?rz:O$,data:g?oz:y,useWindowScroll:!a,customScrollParent:a?a():void 0,fixedHeaderContent:()=>p.jsx(Y$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),g?p.jsx(nz,{loading:u.loading}):null,p.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"}),l!==null?p.jsx(A$,{...l}):null]})},iz=({item:e,onPointerDown:t})=>{const n=wo(0);return p.jsxs(Zw,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[p.jsx("button",{type:"button",className:"cursor-grab",children:p.jsx(jI,{size:14})}),p.jsx("span",{children:e.groupName})]},e.groupId)},sz=e=>{const t=vt(),n=Xp(e.cols),r=nL(),[o,i]=S.useState(e.groups[0]?.thead||""),s=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const h=new b1(e.rows).GroupBy(u),m=e.cols.find(y=>y.id===u);e.setGroups(hk(h).map((y,g)=>{const v=h[y];return{...m,groupId:Xo(),groupKey:u,index:g,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return p.jsx(S.Fragment,{children:p.jsxs(ki,{arrow:!1,title:t.tableGroupLabel,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(UI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[p.jsxs("div",{className:"flex flex-nowrap items-center",children:[p.jsx(po,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),p.jsx(Jt,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:p.jsx(Ea,{size:16,className:"text-danger"})})]}),e.groups.length>0?p.jsxs("section",{className:"my-4",children:[p.jsx("header",{children:p.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),p.jsx(k2,{children:p.jsx(Gw,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>p.jsx(iz,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},az=e=>p.jsx("header",{className:"mb-1 min-w-full",children:p.jsxs("div",{className:"flex min-w-full flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[p.jsxs("div",{className:"items-centeend flex w-fit gap-4 whitespace-nowrap py-2",children:[p.jsx("span",{children:p.jsx(W$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),p.jsx("span",{children:p.jsx(j$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),p.jsx("span",{children:p.jsx(sz,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),p.jsx("ul",{className:"flex w-full flex-1 flex-grow flex-row flex-wrap items-center gap-4 md:justify-end",children:e.filters.map(t=>p.jsxs("li",{className:"flex items-center gap-1 rounded-xl border border-card-border px-4 py-0.5",children:[p.jsxs("span",{children:[p.jsx("span",{className:"mr-2 inline-block aspect-square size-3 rounded-full bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),p.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[p.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),p.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=Qp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),lz=(e,t)=>typeof t=="function"?t(e):t,sc=(e,t,n)=>e===t?void 0:n?.(t),cz=e=>{const t=Hu(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Xp(e.cols),[e.cols]),[i,s]=mp({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const l=c=>u=>{const d=a.state();return{...d,[c]:lz(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(a,l)=>(e.set?.(a),sc(l?.filters??[],a.filters??[],e.setFilters),sc(l?.sorters??[],a.sorters??[],e.setSorters),sc(l?.groups??[],a.groups??[],e.setGroups),sc(l?.cols??[],a.cols??[],e.setCols),a)]});return S.useEffect(()=>{s.cols(e.cols)},[e.cols]),p.jsx(R$,{value:n,children:p.jsxs(gn,{propagate:!0,initial:!1,children:[r?p.jsx(az,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?p.jsx(wS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):p.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((a,l)=>p.jsx("div",{className:"min-w-full",children:p.jsx(wS,{...e,group:a,index:l,cols:i.cols,pagination:null,rows:a.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},ac=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:s="",...a})=>p.jsxs(un,{...a,as:r||"div","data-component":"card",className:Pe("flex w-full flex-col gap-4 rounded-card border border-card-border bg-card-background py-3 shadow-shadow-card",i),children:[e?p.jsx("header",{"data-component":"card-title",className:Pe("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",s),children:e}):o,p.jsx("div",{"data-component":"card-body",className:Pe("min-w-full px-6",a.className),children:t?p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsx(Us,{className:"w-full"}),p.jsx(Us,{className:"w-8/12"}),p.jsx(Us,{className:"w-10/12"}),p.jsx(Us,{className:"w-1/2"})]}):n})]});ac.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",s=t||"h2",a=n||"nav";return p.jsxs(i,{...o,title:Re.string(o.title)?o.title:void 0,className:Pe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[p.jsx(s,{className:"font-semibold",children:o.title}),r?p.jsx(a,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const uz=e=>{const t=e.interactive??!0,n=e.Icon??Er;return p.jsx(ac,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex items-center gap-4 px-0",children:p.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[p.jsx("div",{className:Pe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:p.jsx(n,{size:48})}),p.jsxs("div",{className:"flex flex-col justify-center gap-2 py-2",children:[p.jsx("p",{className:"text-lg",children:e.title}),e.loading?p.jsx(Us,{className:"h-10"}):p.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},dz=({item:e,context:t,setter:n,get:r,refs:o})=>p.jsx(gr,{children:p.jsx(Xf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:p.jsxs(gn,{presenceAffectsLayout:!0,children:[e?p.jsx(He.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?p.jsx(gd,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:p.jsx(fo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:p.jsxs(He.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[p.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:p.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:p.jsx(jo,{})})}),p.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[p.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),p.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),fz=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Kn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),s=Ko(o),a=yr(o,{role:"dialog"}),l=Nr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Zn([s,a,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return p.jsxs(S.Fragment,{children:[p.jsx(dz,{refs:i,context:o,get:c,item:t,setter:u}),p.jsx("ul",{role:"list",children:d.map((f,h)=>{const m=f.props,y=`${r}-${h}`,g=()=>n({...m,id:y}),v=m.leading;return p.jsx(He.li,{layout:!0,layoutId:`item-${y}`,className:"border-b border-card-border py-2 last:border-transparent",children:p.jsx(He.div,{layoutId:`toast-${y}`,className:"relative",children:p.jsx("div",{className:"relative flex items-start space-x-3",children:p.jsxs(S.Fragment,{children:[m.avatar?p.jsx("div",{children:p.jsx("div",{className:"relative px-1",children:p.jsx("button",{onClick:g,className:"flex size-10 items-center justify-center ring-primary",children:m.avatar})})}):null,p.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:p.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[p.jsxs("button",{onClick:g,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[p.jsx("h3",{children:m.title}),p.jsx("p",{className:"text-sm leading-snug text-secondary",children:m.description})]}),v?p.jsx(v,{open:g}):null]})})]})})})},y)})})]})},pz=e=>p.jsx(S.Fragment,{children:e.children}),SS=()=>{const e=S.useContext(oo);return e?e.parser:Ca.hsla},th=.3,lc={duration:th,type:"tween",ease:"easeInOut"},TS=S.createContext(null),nh={delay:.2,duration:.3,type:"tween",ease:"easeOut"},Ai={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},hz=e=>p.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx(He.path,{className:"currentColor",initial:Ai.initial,animate:Ai.animate,transition:nh,d:"M18 6 6 18"}),p.jsx(He.path,{className:"currentColor",initial:Ai.initial,animate:Ai.animate,transition:nh,d:"m6 6 12 12"})]}),mz=e=>p.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:p.jsx(He.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:Ai.animate,initial:Ai.initial,transition:nh})}),gz={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},yz={duration:.6,delay:.2,type:"tween",ease:"circOut"},vz=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",bz=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,ES=()=>S.useContext(TS),xz=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const s=SS(),a=ES(),[l,c]=S.useState(t);S.useEffect(()=>{if(!a){c(t);return}const d=bz(e,a.currentStep,a.previousStep,a.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,a,e]);const u=vz(e,l,n);return a?.steps&&100/a?.steps,p.jsxs(S.Fragment,{children:[p.jsx("div",{className:`hidden h-[2px] w-full bg-card-border first:hidden xl:block ${u==="active"||u==="complete"?"bg-success":""}`}),p.jsxs(He.button,{...i,type:"button","data-step":e,animate:u,className:"relative flex w-auto items-center justify-center text-center",children:[p.jsx(He.div,{variants:gz,transition:yz,className:`absolute inset-0 hidden rounded-full text-center xl:block ${u==="error"?"bg-danger":""}`}),p.jsx(He.div,{initial:!1,animate:u,transition:lc,className:"relative flex aspect-square size-10 items-center justify-center rounded-full font-semibold",variants:{error:{color:s("var(--danger-foreground)"),borderColor:s("var(--danger-hover)"),backgroundColor:s("var(--danger-DEFAULT)")},inactive:{transition:lc,color:s("var(--disabled)"),borderColor:s("var(--card-border)"),backgroundColor:s("var(--background)")},active:{transition:lc,color:s("var(--primary-foreground)"),borderColor:s("var(--primary-DEFAULT)"),backgroundColor:s("var(--primary-DEFAULT)")},complete:{transition:lc,color:s("var(--success-foreground)"),borderColor:s("var(--success-DEFAULT)"),backgroundColor:s("var(--success-DEFAULT)")}},children:p.jsx("div",{className:"flex items-center justify-center",children:u==="complete"?p.jsx(mz,{className:"size-6 text-primary-foreground"}):u==="error"?p.jsx(hz,{className:"size-6 text-danger-foreground"}):p.jsx(S.Fragment,{children:p.jsx("span",{children:e})})})}),p.jsx("header",{className:"flex flex-col items-start justify-start px-2",children:p.jsx("h3",{className:`flex h-full items-center whitespace-nowrap ${o}`,children:r})})]})]})},wz=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},th*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:th,steps:S.Children.count(e.children)};return p.jsx(TS.Provider,{value:o,children:p.jsx("div",{className:"relative flex w-full flex-col items-start justify-center gap-4 lg:flex-row lg:items-center lg:justify-between",children:e.children})})},CS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},kS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},IS=S.createContext(""),Sz=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",rh=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const s=e[i];if(!Sz(s))return s}return n==="backward"?rh(e,e.length-1,"backward"):rh(e,-1,"forward")},AS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=rh(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},PS={[kS.ArrowLeft]:(e,t)=>AS(t,"backward"),[kS.ArrowRight]:(e,t)=>AS(t,"forward")},Tz=e=>{const[t,n]=CS(e.active),r=S.useRef(null),o=Lr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),s=l=>{const c=l.currentTarget;n(c.dataset.id||"")},a=l=>{if(r.current===null)return;const c=l.key;if(Re.keyof(PS,c)){const u=PS[c],d=u(l,r.current);if(d===null)return;n(d)}};return p.jsx(IS.Provider,{value:t,children:p.jsx(ac,{className:e.className,container:Pe("pt-0 max-w-full w-full min-w-0",e.container),header:p.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[p.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),p.jsx("nav",{className:"min-w-0",children:p.jsx("ul",{onKeyDown:a,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 p.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Pe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:p.jsx(un,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:s,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},Ez=()=>S.useContext(IS),Cz=e=>{const t=Ez();return p.jsx(S.Fragment,{children:e.id===t?e.children:null})},OS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},kz={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},DS=e=>p.jsx(He.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:OS,exit:OS.false,transition:kz,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Pe("aria-hidden:pointer-events-none",e.className),children:e.children}),Iz=_o("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),Az=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const l=()=>o?.(!1);return p.jsx(gn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?p.jsx(He.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Pe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:p.jsx(DS,{"data-open":!!i,open:!!i,children:p.jsx(un,{...s,ref:a,role:"alert","data-theme":n,as:s.as??"div",className:Pe(Iz({theme:n}),t),children:p.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",children:[o!==void 0&&i?p.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:p.jsx(jo,{size:20})}):null,p.jsxs("div",{className:Pe("flex items-center gap-2",s.title?"":"w-fit"),children:[!r&&n==="success"?p.jsx(Vu,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?p.jsx(Er,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?p.jsx(Bu,{"aria-hidden":"true",size:20}):null,r]}),s.title?p.jsx("h4",{className:"tracking-3 col-start-2 text-balance text-lg font-semibold",children:s.title}):null,p.jsx("div",{className:"col-start-2 w-full",children:s.children})]})})})}):null})}),Pz=e=>p.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[p.jsxs("header",{className:"flex items-start gap-4 p-6",children:[p.jsx("div",{className:Pe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:p.jsx("div",{children:p.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx("header",{children:p.jsx("h3",{className:"text-base leading-none",children:e.title})}),p.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?p.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Oz=Symbol.for("react.lazy");function NS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dz(...e){return t=>{let n=!1;const r=e.map(o=>{const i=NS(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():NS(e[o],null)}}}}const cc=P[" use ".trim().toString()];function Nz(e){return typeof e=="object"&&e!==null&&"then"in e}function MS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Oz&&"_payload"in e&&Nz(e._payload)}function Mz(e){const t=_z(e),n=P.forwardRef((r,o)=>{let{children:i,...s}=r;MS(i)&&typeof cc=="function"&&(i=cc(i._payload));const a=P.Children.toArray(i),l=a.find(Lz);if(l){const c=l.props.children,u=a.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...s,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const _S=Mz("Slot");function _z(e){const t=P.forwardRef((n,r)=>{let{children:o,...i}=n;if(MS(o)&&typeof cc=="function"&&(o=cc(o._payload)),P.isValidElement(o)){const s=$z(o),a=Vz(i,o.props);return o.type!==P.Fragment&&(a.ref=r?Dz(r,s):s),P.cloneElement(o,a)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const Fz=Symbol("radix.slottable");function Lz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fz}function Vz(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]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function $z(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const FS=(e="")=>Pe("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),oh=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),LS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:s="",label:a,...l},c)=>{const[u,d]=S.useState(r??!1),[f,h]=S.useState(!1),[m,y]=S.useState(null),g=S.useRef([]),v=S.useRef([]),b=S.useContext(oh),x=Pr(),T=Or(),E=zP(),I=Qy(),w=x!==null,{floatingStyles:C,refs:A,context:O}=Kn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:lo,placement:w?"right":"bottom-start",middleware:[Go({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ka(),Ya()]}),_=yr(O,{role:"menu"}),N=Nr(O,{bubbles:!0}),$=lv(O,{move:!1,enabled:n,delay:{open:Nv},handleClose:Dv({blockPointerEvents:!0,requireIntent:!1})}),D=Ko(O,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),F=ol(O,{loop:!0,activeIndex:m,nested:w,listRef:g,onNavigate:y}),z=dO(O,{activeIndex:m,listRef:v,resetMs:pO,onMatch:u?y:void 0}),{getReferenceProps:M,getFloatingProps:k,getItemProps:V}=Zn([$,D,_,N,F,z]);S.useEffect(()=>{if(!T)return;const R=()=>d(!1),U=G=>{G.nodeId!==E&&G.parentId===x&&d(!1)};return T.events.on("click",R),T.events.on("menuopen",U),()=>{T.events.off("click",R),T.events.off("menuopen",U)}},[T,E,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:E})},[T,u,E,x]);const L=o?l.className:Pe(FS(l.className));return p.jsxs(jP,{id:E,children:[p.jsx(S.Fragment,{children:l.asChild?p.jsx(_S,{...M(b.getItemProps({...l,onFocus(R){l.onFocus?.(R),h(!1),b.setHasFocusInside(!0)}})),children:a,className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:fr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):p.jsxs("button",{type:"button",className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:fr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(R){l.onFocus?.(R),h(!1),b.setHasFocusInside(!0)}})),children:[a,w&&p.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[p.jsx("span",{className:"sr-only",children:"Next menu"}),p.jsx(Ta,{size:14})]})]})}),p.jsx(oh.Provider,{value:{activeIndex:m,setActiveIndex:y,getItemProps:V,setHasFocusInside:h,isOpen:u},children:p.jsx(MP,{elementsRef:g,labelsRef:v,children:u&&p.jsx(gr,{children:p.jsx(fo,{context:O,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:p.jsx(t,{...k(),ref:A.setFloating,style:{...l.style,...C},className:Pe("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",s),children:e})})})})})]})}),zz=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const s=S.useContext(oh),a=Qy({label:n?null:e}),l=Or(),c=a.index===s.activeIndex;return p.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":s.isOpen,tabIndex:c?0:-1,ref:fr(a.ref,i),className:FS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...s.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),s.setHasFocusInside(!0)}}),children:[r,t?p.jsx(t,{size:16}):null]})}),jz=S.forwardRef((e,t)=>Pr()===null?p.jsx(BP,{children:p.jsx(LS,{...e,isParent:!0,ref:t})}):p.jsx(LS,{...e,isParent:!1,ref:t})),ih=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:s,container:a,...l},c)=>{const u=l.disabled||r;return p.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Pe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[p.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Pe("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,p.jsx("span",{"data-name":"checkbox-label",className:Pe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Bz=({children:e,className:t="",size:n,...r})=>p.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:[p.jsx("input",{...r,type:"radio",className:Pe("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]}),Rz=$v("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
16
+ `);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)}),Hz=(e,t)=>Mr()?t:window.matchMedia(e).matches,Wz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Hz(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},qz=()=>S.useContext(oo).floatingRef??void 0,VS=S.createContext(async()=>!1),Uz=()=>S.useContext(VS),kn="500ms",Gz={exit:{x:["0%","-30%"],opacity:0,animationDuration:kn},enter:{x:["-30%","0%"],opacity:1,animationDuration:kn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:kn}},Yz={enter:{x:"0%",opacity:1,animationDuration:kn},exit:{x:["0%","30%"],opacity:0,animationDuration:kn},initial:{x:["30%","0%"],opacity:.8,animationDuration:kn}},sh={drawer:e=>e==="left"?Gz:Yz,sheet:{enter:{opacity:1,y:"0%",animationDuration:kn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:kn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:kn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:kn},enter:{opacity:1,scale:[1.05,1],animationDuration:kn},initial:{opacity:.5,scale:.95,animationDuration:kn,transition:{duration:.5,ease:"easeInOut"}}}},Kz=_o("z-floating border border-floating-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"}}),$S={top:0,left:0,right:0,bottom:0},zS=e=>e*.6,Zz=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,h=zS(f);return d>=h?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,s=e.position==="right"?-r.delta.x:r.delta.x,a=Math.abs(i+s);return e.value.set(a)}};return p.jsx(He.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:$S,whileDrag:{cursor:"grabbing"},className:Pe("absolute isolate z-calendar 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?p.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},uc={drawer:"right",sheet:"none",dialog:"none"},Xz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??uc.drawer:uc[o]:t?uc[o]:uc.sheet},Qz=[],Ys=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:s,ariaTitle:a,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:h=!1,layoutId:m=void 0,overlayClassName:y="",type:g="dialog",position:v,overlayClickClose:b=!1,closeOnFocusOut:x=!1,interactions:T=Qz,...E},I)=>{const w=qz(),C=S.useRef(null),A=S.useRef(null),O=S.useId(),_=S.useId(),N=Wz("(min-width: 64rem)"),$=Xz(N,h,g,v),D=N||h?sh[g]:sh.sheet,F=typeof D=="function"?D($):D,z=N||h?g:"sheet",M=z!=="dialog",k=Kn({open:e,onOpenChange:s,strategy:"fixed"}),V=Ko(k.context,{}),L=yr(k.context,{role:"dialog"}),R=Nr(k.context,{bubbles:!0,escapeKey:!0,outsidePress:ce=>{const Q=ce.target;return b&&!!Q?.isConnected}}),U=Zn([V,R,L].concat(T)),G=o,H=wo(void 0),ee=wo(void 0),se=S.useRef(!1),te=S.useRef(0);S.useEffect(()=>{H.set(void 0),ee.set(void 0)},[z,H,ee]);const q=()=>s(!1);S.useImperativeHandle(I,()=>({context:k.context,floating:A.current}),[k.context,A]);const Z=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:$S,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ce,Q)=>{const oe=k.refs.floating.current.getBoundingClientRect(),he=H.get()||oe.height,ie=Math.abs(he-Q.delta.y),le=window.outerHeight,be=zS(le);return ie>=be?H.set(ie):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>H.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},pe=wo(void 0),B=wo(void 0),ae=r?_S:He.button;return p.jsxs(S.Fragment,{children:[o?p.jsx(ae,{ref:k.refs.setReference,...U.getReferenceProps(),layoutId:m,type:"button",children:G}):null,p.jsx(Xf,{reducedMotion:d?"user":"always",children:p.jsx(gr,{preserveTabOrder:!0,root:w,children:p.jsx(gn,{mode:"wait",propagate:!0,children:e?p.jsx(gd,{lockScroll:!0,className:Pe("inset-0 isolate z-overlay flex h-[100dvh] !overflow-clip bg-floating-overlay/80",z==="drawer"?"":"items-start justify-center pt-10 lg:p-10",y),children:p.jsx(fo,{guards:!0,modal:!0,closeOnFocusOut:x,context:k.context,children:p.jsx(gn,{propagate:!0,children:p.jsxs(He.div,{...E,...t?{"aria-labelledby":O,"aria-describedby":_}:{"aria-label":a},...U.getFloatingProps({"aria-modal":e,ref:fr(k.refs.setFloating,A),className:Pe(Kz({position:$,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:m,variants:F,"data-component":"modal",style:z==="drawer"?{width:H}:{height:H,y:ee},children:[M&&u?p.jsx(Zz,{onChange:s,value:H,sheet:z==="sheet",position:$,parent:k.refs.floating}):null,t?p.jsx(He.header,{...Z,className:"relative isolate w-full",children:t?p.jsx("h2",{id:O,className:"block select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,p.jsx(He.section,{ref:C,"data-component":"modal-body",className:Pe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(B.set(void 0),pe.set(void 0),se.current){const ce=ee.get()||0,Q=window.innerHeight*.2;ce>Q?(await qw(ee,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,s(!1)):qw(ee,0,{type:"spring",bounce:0,duration:.3}),se.current=!1}},onTouchStart:ce=>{const Q=ce.changedTouches[0];pe.set(Q.pageY),B.set(Q.pageY),se.current=!1},onTouchMove:ce=>{const ue=ce.changedTouches[0].pageY,oe=B.get()||ue,he=C.current?.scrollTop||0;if(!se.current&&he<=0&&ue>oe&&z==="sheet"&&(se.current=!0,te.current=ue),se.current){const ie=ue-te.current;ie<0?ee.set(ie*.2):ee.set(ie)}B.set(ue)},children:i}),n?p.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,f?p.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:p.jsx("button",{type:"button",onClick:q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:p.jsx(jo,{})})}):null]})})})}):null})})})]})});let jS=async e=>(typeof window<"u"&&console.warn("ConfirmationProvider is not mounted"),!1);Ys.confirm=e=>jS(e);const BS=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState({}),[i,s]=S.useState(()=>{}),a=S.useCallback(u=>(o(u),n(!0),new Promise(d=>{s(()=>d)})),[]);S.useEffect(()=>{jS=a},[a]);const l=()=>{n(!1);const u=r.confirm?.value??!0;i(u??!0)},c=()=>{n(!1);const u=r.cancel?.value??!1;i(u??!1)};return p.jsxs(VS.Provider,{value:a,children:[e,p.jsx(Ys,{open:t,type:"dialog",closable:!1,onChange:n,overlayClickClose:!1,title:r.title||"Confirmation",className:"container max-w-dialog lg:max-w-96",footer:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(Jt,{theme:r.cancel?.theme||"ghost-muted",onClick:c,children:r.cancel?.text||"Cancel"}),p.jsx(Jt,{theme:r.confirm?.theme||"primary",onClick:l,children:r.confirm?.text||"Confirm"})]}),children:p.jsx("div",{className:"py-2 text-foreground",children:r.description})})]})},Jz=e=>{const[t,n]=JF();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:r_(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),p.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},ej=e=>p.jsx("p",{...e,className:Pe("text-base leading-snug",e.className)}),tj=e=>p.jsx("p",{...e,className:Pe("mb-kilo text-sm text-secondary",e.className)}),nj=e=>p.jsx("div",{className:Pe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:p.jsxs(S.Fragment,{children:[p.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),p.jsx("span",{className:Pe(e.disabled?"text-disabled":"",e.row?"w-fit text-base":"w-full text-lg"),children:e.children})]})}),RS=e=>p.jsxs("div",{children:[p.jsx("h2",{className:"typography text-3xl font-bold tracking-wide",children:e.title}),p.jsx("p",{className:"typography text-secondary",children:e.children})]}),rj=e=>p.jsxs("header",{className:"gap-mega flex flex-row flex-wrap items-center justify-between",children:[p.jsx("div",{children:p.jsx(RS,{title:e.title,children:e.description})}),p.jsx("div",{className:"gap-kilo flex flex-wrap items-center",children:e.children})]}),HS=e=>p.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Pe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),oj=()=>p.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:p.jsx(HS,{})}),ij=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=S.useState(e.open??!1);S.useEffect(()=>{s(e.open??!1)},[e.open]);const{context:a,refs:l}=Kn({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=Ko(a,{enabled:e.disabled??!0}),u=yr(a,{role:"tooltip"}),d=Nr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Zn([c,u,d]);return p.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[p.jsx(Jt,{...h(e),as:He.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:p.jsx(He.span,{layoutId:o,children:e.trigger})}),p.jsx(gn,{children:i?p.jsx(gr,{root:t,children:p.jsx(fo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:p.jsx(He.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},sj=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},aj=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},lj=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),cj=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,uj=({steps:e,active:t=!1,onClose:n=Qo,onFinish:r=Qo,onChange:o=Qo,labels:i})=>{const s=vt(),[a,l]=S.useState(0),c=e[a],[u,d]=S.useState(null),[f,h]=S.useState(lj()),[m,y]=S.useState(!1),g=S.useRef(null),{width:v,height:b}=aj(),x={next:i?.next??s.driverNext,previous:i?.previous??s.driverPrevious,finish:i?.finish??s.driverFinish,skip:i?.skip??s.driverSkip},{refs:T,floatingStyles:E,context:I}=Kn({open:t&&m,placement:c?.side||"bottom",whileElementsMounted:lo,middleware:[Go(10),Ka(),Ya(),ld({element:g})]}),{getFloatingProps:w}=Zn([yr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{y(!1)},[a,t]),S.useEffect(()=>{if(!t||!c)return;const N=cj(c.element);N?(c.onEnter?.(),setTimeout(()=>{h(N.getBoundingClientRect()),T.setReference(N),d(N)},100)):(console.warn("Driver: Element not found:",c.element),d(null),h({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[a,t,c,T]),S.useLayoutEffect(()=>{if(!u)return;const N=()=>h(u.getBoundingClientRect());return N(),window.addEventListener("scroll",N,{capture:!0,passive:!0}),window.addEventListener("resize",N,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",N,{capture:!0}),window.removeEventListener("resize",N,{capture:!0})}},[u,v,b]),sj(u,N=>{h(N.target.getBoundingClientRect())});const C=()=>{c.onNext?.(),setTimeout(()=>{a<e.length-1?(l(N=>N+1),o(a+1)):(r(),n())},0)},A=()=>{c.onPrevious?.(),a>0&&(l(N=>N-1),o(a-1))};if(!t)return null;const O=a<e.length-1,_=a>0;return p.jsx(gr,{children:p.jsxs("div",{className:"pointer-events-none fixed inset-0 z-wizard",children:[p.jsxs("svg",{className:"absolute inset-0 h-full w-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("defs",{children:p.jsxs("mask",{id:"driver-mask",children:[p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),p.jsx(He.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>y(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),p.jsx(gn,{mode:"wait",children:c&&m&&p.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"pointer-events-auto outline-none",children:p.jsxs(He.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex w-80 max-w-sm flex-col gap-3 rounded-lg border border-floating-border bg-floating-background p-4 shadow-lg",children:[u&&p.jsx(cd,{ref:g,context:I,className:"fill-floating-background stroke-floating-border"}),c.title&&p.jsx("h3",{children:c.title}),c.description&&p.jsx(S.Fragment,{children:c.description}),p.jsxs("div",{className:"mt-2 flex items-center justify-between border-t border-floating-border pt-2",children:[p.jsx(Jt,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),p.jsxs("div",{className:"flex gap-2",children:[_&&p.jsx(Jt,{size:"small",theme:"ghost-muted",onClick:A,children:x.previous}),p.jsx(Jt,{size:"small",onClick:C,children:O?x.next:x.finish})]})]}),p.jsxs("div",{className:"absolute right-2 top-2 text-xs text-muted-foreground",children:[a+1," / ",e.length]})]})})})]})})},WS=6048e5,dj=864e5,fj=6e4,pj=36e5,hj=1e3,qS=Symbol.for("constructDateFrom");function dt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qS in e?e[qS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return dt(t||e,e)}function qr(e,t,n){const r=Je(e,n?.in);return isNaN(t)?dt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ah(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return dt(e,NaN);if(!t)return r;const o=r.getDate(),i=dt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Pi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n?.in),d=o||r?ah(u,o+r*12):u,f=s||i?qr(d,s+i*7):d,h=l+a*60,y=(c+h*60)*1e3;return dt(e,+f+y)}let mj={};function Co(){return mj}function In(e,t){const n=Co(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Oi(e,t){return In(e,{...t,weekStartsOn:1})}function US(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=dt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Oi(o),s=dt(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=Oi(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function dc(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fc(e,...t){const n=dt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ko(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function gj(e,t,n){const[r,o]=fc(n?.in,e,t),i=ko(r),s=ko(o),a=+i-dc(i),l=+s-dc(s);return Math.round((a-l)/dj)}function yj(e,t){const n=US(e,t),r=dt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Oi(r)}function GS(e,t,n){return qr(e,t*7,n)}function vj(e){return dt(e,Date.now())}function bj(e,t,n){const[r,o]=fc(n?.in,e,t);return+ko(r)==+ko(o)}function xj(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function pc(e){return!(!xj(e)&&typeof e!="number"||isNaN(+Je(e)))}function wj(e,t){const[n,r]=fc(e,t.start,t.end);return{start:n,end:r}}function YS(e,t){const{start:n,end:r}=wj(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(dt(n,s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function lh(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Sj(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Tj(e,t){const n=Co(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const Ej={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Cj=(e,t,n)=>{let r;const o=Ej[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ch(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const kj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ij={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Aj={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Pj={date:ch({formats:kj,defaultWidth:"full"}),time:ch({formats:Ij,defaultWidth:"full"}),dateTime:ch({formats:Aj,defaultWidth:"full"})},Oj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dj=(e,t,n,r)=>Oj[e];function Ks(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Nj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Mj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_j={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fj={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Lj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Vj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$j={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ks({values:Nj,defaultWidth:"wide"}),quarter:Ks({values:Mj,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ks({values:_j,defaultWidth:"wide"}),day:Ks({values:Fj,defaultWidth:"wide"}),dayPeriod:Ks({values:Lj,defaultWidth:"wide",formattingValues:Vj,defaultFormattingWidth:"wide"})};function Zs(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?jj(a,d=>d.test(s)):zj(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function zj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function jj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Bj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const Rj=/^(\d+)(th|st|nd|rd)?/i,Hj=/\d+/i,Wj={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qj={any:[/^b/i,/^(a|c)/i]},Uj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gj={any:[/1/i,/2/i,/3/i,/4/i]},Yj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Kj={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Zj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Xj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Jj={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},e4={ordinalNumber:Bj({matchPattern:Rj,parsePattern:Hj,valueCallback:e=>parseInt(e,10)}),era:Zs({matchPatterns:Wj,defaultMatchWidth:"wide",parsePatterns:qj,defaultParseWidth:"any"}),quarter:Zs({matchPatterns:Uj,defaultMatchWidth:"wide",parsePatterns:Gj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Zs({matchPatterns:Yj,defaultMatchWidth:"wide",parsePatterns:Kj,defaultParseWidth:"any"}),day:Zs({matchPatterns:Zj,defaultMatchWidth:"wide",parsePatterns:Xj,defaultParseWidth:"any"}),dayPeriod:Zs({matchPatterns:Qj,defaultMatchWidth:"any",parsePatterns:Jj,defaultParseWidth:"any"})},KS={code:"en-US",formatDistance:Cj,formatLong:Pj,formatRelative:Dj,localize:$j,match:e4,options:{weekStartsOn:0,firstWeekContainsDate:1}};function t4(e,t){const n=Je(e,t?.in);return gj(n,Sj(n))+1}function uh(e,t){const n=Je(e,t?.in),r=+Oi(n)-+yj(n);return Math.round(r/WS)+1}function dh(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=Co(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=dt(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=In(s,t),l=dt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=In(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function n4(e,t){const n=Co(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=dh(e,t),i=dt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),In(i,t)}function ZS(e,t){const n=Je(e,t?.in),r=+In(n,t)-+n4(n,t);return Math.round(r/WS)+1}function ft(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ur={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ft(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ft(n+1,2)},d(e,t){return ft(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ft(e.getHours()%12||12,t.length)},H(e,t){return ft(e.getHours(),t.length)},m(e,t){return ft(e.getMinutes(),t.length)},s(e,t){return ft(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ft(o,t.length)}},Di={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},XS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ur.y(e,t)},Y:function(e,t,n,r){const o=dh(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return ft(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):ft(i,t.length)},R:function(e,t){const n=US(e);return ft(n,t.length)},u:function(e,t){const n=e.getFullYear();return ft(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ft(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ft(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ur.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ft(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ZS(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ft(o,t.length)},I:function(e,t,n){const r=uh(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ft(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ur.d(e,t)},D:function(e,t,n){const r=t4(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ft(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ft(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ft(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ft(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Di.noon:r===0?o=Di.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Di.evening:r>=12?o=Di.afternoon:r>=4?o=Di.morning:o=Di.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ur.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ur.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ur.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ur.s(e,t)},S:function(e,t){return Ur.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return JS(r);case"XXXX":case"XX":return Io(r);default:return Io(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return JS(r);case"xxxx":case"xx":return Io(r);default:return Io(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+QS(r,":");default:return"GMT"+Io(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+QS(r,":");default:return"GMT"+Io(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ft(r,t.length)},T:function(e,t,n){return ft(+e,t.length)}};function QS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ft(i,2)}function JS(e,t){return e%60===0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):Io(e,t)}function Io(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ft(Math.trunc(r/60),2),i=ft(r%60,2);return n+o+t+i}const eT=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},tT=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},fh={p:tT,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return eT(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",eT(r,t)).replace("{{time}}",tT(o,t))}},r4=/^D+$/,o4=/^Y+$/,i4=["D","DD","YY","YYYY"];function nT(e){return r4.test(e)}function rT(e){return o4.test(e)}function ph(e,t,n){const r=s4(e,t,n);if(console.warn(r),i4.includes(e))throw new RangeError(r)}function s4(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const a4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,l4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,c4=/^'([^]*?)'?$/,u4=/''/g,d4=/[a-zA-Z]/;function hh(e,t,n){const r=Co(),o=r.locale??KS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Je(e,n?.in);if(!pc(a))throw new RangeError("Invalid time value");let l=t.match(l4).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=fh[d];return f(u,o.formatLong)}return u}).join("").match(a4).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:f4(u)};if(XS[d])return{isToken:!0,value:u};if(d.match(d4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(rT(d)||nT(d))&&ph(d,t,String(e));const f=XS[d[0]];return f(a,d,o.localize,c)}).join("")}function f4(e){const t=e.match(c4);return t?t[1].replace(u4,"'"):e}function p4(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=dt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function h4(){return Object.assign({},Co())}function m4(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function g4(e,t){return+Je(e)>+Je(t)}function y4(e,t){return+Je(e)<+Je(t)}function v4(e,t){const n=b4(t)?new t(0):dt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function b4(e){return typeof e=="function"&&e.prototype?.constructor===e}const x4=10;class oT{subPriority=0;validate(t,n){return!0}}class w4 extends oT{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class S4 extends oT{priority=x4;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>dt(n,r))}set(t,n){return n.timestampIsSet?t:dt(t,v4(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new w4(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class T4 extends rt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Nt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},sr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Mt(e,t){return e&&{value:t(e.value),rest:e.rest}}function At(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ar(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*pj+i*fj+s*hj),rest:t.slice(n[0].length)}}function iT(e){return At(Nt.anyDigitsSigned,e)}function Ot(e,t){switch(e){case 1:return At(Nt.singleDigit,t);case 2:return At(Nt.twoDigits,t);case 3:return At(Nt.threeDigits,t);case 4:return At(Nt.fourDigits,t);default:return At(new RegExp("^\\d{1,"+e+"}"),t)}}function hc(e,t){switch(e){case 1:return At(Nt.singleDigitSigned,t);case 2:return At(Nt.twoDigitsSigned,t);case 3:return At(Nt.threeDigitsSigned,t);case 4:return At(Nt.fourDigitsSigned,t);default:return At(new RegExp("^-?\\d{1,"+e+"}"),t)}}function mh(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function sT(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function aT(e){return e%400===0||e%4===0&&e%100!==0}class E4 extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Mt(Ot(4,t),o);case"yo":return Mt(r.ordinalNumber(t,{unit:"year"}),o);default:return Mt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const s=sT(r.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class C4 extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Mt(Ot(4,t),o);case"Yo":return Mt(r.ordinalNumber(t,{unit:"year"}),o);default:return Mt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=dh(t,o);if(r.isTwoDigitYear){const a=sT(r.year,i);return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),In(t,o)}const s=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),In(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class k4 extends rt{priority=130;parse(t,n){return hc(n==="R"?4:n.length,t)}set(t,n,r){const o=dt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Oi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class I4 extends rt{priority=130;parse(t,n){return hc(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class A4 extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Ot(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class P4 extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Ot(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class O4 extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Mt(At(Nt.month,t),o);case"MM":return Mt(Ot(2,t),o);case"Mo":return Mt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class D4 extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Mt(At(Nt.month,t),o);case"LL":return Mt(Ot(2,t),o);case"Lo":return Mt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function N4(e,t,n){const r=Je(e,n?.in),o=ZS(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class M4 extends rt{priority=100;parse(t,n,r){switch(n){case"w":return At(Nt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return In(N4(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function _4(e,t,n){const r=Je(e,n?.in),o=uh(r,n)-t;return r.setDate(r.getDate()-o*7),r}class F4 extends rt{priority=100;parse(t,n,r){switch(n){case"I":return At(Nt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Oi(_4(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const L4=[31,28,31,30,31,30,31,31,30,31,30,31],V4=[31,29,31,30,31,30,31,31,30,31,30,31];class $4 extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return At(Nt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=aT(r),i=t.getMonth();return o?n>=1&&n<=V4[i]:n>=1&&n<=L4[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class z4 extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return At(Nt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear();return aT(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function gh(e,t,n){const r=Co(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Je(e,n?.in),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return qr(i,u,n)}class j4 extends rt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=gh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class B4 extends rt{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return Mt(Ot(n.length,t),i);case"eo":return Mt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=gh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class R4 extends rt{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return Mt(Ot(n.length,t),i);case"co":return Mt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=gh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function H4(e,t,n){const r=Je(e,n?.in),o=m4(r,n),i=t-o;return qr(r,i,n)}class W4 extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return Ot(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Mt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Mt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Mt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Mt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=H4(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class q4 extends rt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(mh(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class U4 extends rt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(mh(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class G4 extends rt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(mh(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Y4 extends rt{priority=70;parse(t,n,r){switch(n){case"h":return At(Nt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class K4 extends rt{priority=70;parse(t,n,r){switch(n){case"H":return At(Nt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Z4 extends rt{priority=70;parse(t,n,r){switch(n){case"K":return At(Nt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class X4 extends rt{priority=70;parse(t,n,r){switch(n){case"k":return At(Nt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class Q4 extends rt{priority=60;parse(t,n,r){switch(n){case"m":return At(Nt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class J4 extends rt{priority=50;parse(t,n,r){switch(n){case"s":return At(Nt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class eB extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Mt(Ot(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class tB extends rt{priority=10;parse(t,n){switch(n){case"X":return ar(sr.basicOptionalMinutes,t);case"XX":return ar(sr.basic,t);case"XXXX":return ar(sr.basicOptionalSeconds,t);case"XXXXX":return ar(sr.extendedOptionalSeconds,t);default:return ar(sr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-dc(t)-r)}incompatibleTokens=["t","T","x"]}class nB extends rt{priority=10;parse(t,n){switch(n){case"x":return ar(sr.basicOptionalMinutes,t);case"xx":return ar(sr.basic,t);case"xxxx":return ar(sr.basicOptionalSeconds,t);case"xxxxx":return ar(sr.extendedOptionalSeconds,t);default:return ar(sr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-dc(t)-r)}incompatibleTokens=["t","T","X"]}class rB extends rt{priority=40;parse(t){return iT(t)}set(t,n,r){return[dt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class oB extends rt{priority=20;parse(t){return iT(t)}set(t,n,r){return[dt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const iB={G:new T4,y:new E4,Y:new C4,R:new k4,u:new I4,Q:new A4,q:new P4,M:new O4,L:new D4,w:new M4,I:new F4,d:new $4,D:new z4,E:new j4,e:new B4,c:new R4,i:new W4,a:new q4,b:new U4,B:new G4,h:new Y4,H:new K4,K:new Z4,k:new X4,m:new Q4,s:new J4,S:new eB,X:new tB,x:new nB,t:new rB,T:new oB},sB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lB=/^'([^]*?)'?$/,cB=/''/g,uB=/\S/,dB=/[a-zA-Z]/;function fB(e,t,n,r){const o=()=>dt(n,NaN),i=h4(),s=i.locale??KS,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Je(n,r?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},u=[new S4(r?.in,n)],d=t.match(aB).map(g=>{const v=g[0];if(v in fh){const b=fh[v];return b(g,s.formatLong)}return g}).join("").match(sB),f=[];for(let g of d){rT(g)&&ph(g,t,e),nT(g)&&ph(g,t,e);const v=g[0],b=iB[v];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const E=f.find(I=>x.includes(I.token)||I.token===v);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${g}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);f.push({token:v,fullToken:g});const T=b.run(e,g,s.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(dB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(g==="''"?g="'":v==="'"&&(g=pB(g)),e.indexOf(g)===0)e=e.slice(g.length);else return o()}}if(e.length>0&&uB.test(e))return o();const h=u.map(g=>g.priority).sort((g,v)=>v-g).filter((g,v,b)=>b.indexOf(g)===v).map(g=>u.filter(v=>v.priority===g).sort((v,b)=>b.subPriority-v.subPriority)).map(g=>g[0]);let m=Je(n,r?.in);if(isNaN(+m))return o();const y={};for(const g of h){if(!g.validate(m,c))return o();const v=g.set(m,y,c);Array.isArray(v)?(m=v[0],Object.assign(y,v[1])):m=v}return m}function pB(e){return e.match(lB)[1].replace(cB,"'")}function lT(e,t,n){const[r,o]=fc(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Xs(e,t){return bj(dt(e,e),vj(e))}function cT(e,t,n){return qr(e,-t,n)}function hB(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=dt(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=p4(s);return r.setMonth(t,Math.min(i,a)),r}function mB(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?dt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=hB(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function gB(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?dt(e,NaN):(r.setFullYear(t),r)}function uT(e,t,n){return ah(e,-t,n)}function Qs(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=uT(e,o+r*12,n),d=cT(u,s+i*7,n),f=l+a*60,m=(c+f*60)*1e3;return dt(e,+d-m)}function yB(e,t,n){return GS(e,-1,n)}const vB=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function bB(e,t){return S.useRef(vB(e,t)).current}function dT(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const a=i.changedTouches[0].clientX-n.current;Math.abs(a)>t&&e(i,a>0?"right":"left"),n.current=null}}}const xB=/^(?<hour>\d\d):(?<min>\d\d)$/,wB={type:"spring",bounce:.3,duration:.6},fT=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),pT={enter:fT(1),exit:fT(-1),middle:{x:"0%",opacity:1}},hT={exit:{visibility:"hidden"}},SB=e=>{const t=In(lh(e));return YS({start:t,end:Pi(t,{days:41})})},mT=(e,t)=>e.toLocaleDateString(t,{month:"long"}),TB=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=lh(new Date(1970,o,1).setMonth(o)),s=mT(i,n);return p.jsx("option",{value:s,"data-index":o,children:s},`${e}-${s}`)}),yh={ArrowLeft:(e,t)=>t==="days"?Qs(e,{days:1}):Qs(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Pi(e,{days:1}):Pi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Qs(e,{weeks:1}):Qs(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Pi(e,{weeks:1}):Pi(e,{years:1})},gT=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const s=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>s?.focus({preventScroll:!0}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},Ao=e=>e.getFullYear().toString().padStart(4,"0"),EB=(e,t,n)=>e===void 0||n===void 0?!1:g4(t,e)&&y4(t,n),CB=e=>{const t=vt();return p.jsx(He.tbody,{layout:!0,variants:pT,custom:e.direction,onKeyDown:e.onKeyDown,className:Pe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Re.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return p.jsx("tr",{className:o,children:n.map(i=>{const s=i.toISOString(),a=e.rangeMode?s===e.range?.to?.toISOString()||s===e.range?.from?.toISOString():s===(e.date?ko(e.date).toISOString():void 0),l=Xs(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=lT(i,e.stateDate),d=!u||c,f=e.rangeMode?EB(e.range?.from,i,e.range?.to):!1;return p.jsxs("td",{align:"center",className:Pe("relative p-1",Re.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[p.jsxs("button",{type:"button","data-date":s,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Pe(`relative flex size-9 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${a?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-9 border border-dashed border-card-border":"",Re.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[p.jsx("div",{}),i.getDate(),a&&e.stateRange.from?.toISOString()===s?p.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:p.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,a&&e.stateRange.to?.toISOString()===s?p.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:p.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?p.jsx(e.RenderOnDay,{date:i}):null]},s)})},`week-${n.length}-${r}`)})})},kB=()=>ko(new Date),vh=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:s,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:h,...m})=>{const y=S.useRef(Xo()),g=vt(),v=Fr(o),b=S.useRef(null),{date:x,range:T}=m,E=x||new Date,I=S.useRef(null),[w,C]=mp({date:E,isAnimating:!1,year:Ao(E),direction:void 0,range:{from:T?.from,to:T?.to},months:TB(y.current,E,v),selectMode:l?"from":void 0,week:YS({start:In(E),end:Tj(E)})},M=>({onChangeYear:k=>({year:k}),onExitComplete:()=>(gT(I.current||null,b,M.state().date,200),I.current=null,{isAnimating:!1}),date:k=>{const V=k(M.state().date);return{date:V,year:Ao(V)}},nextMonth:k=>{k&&(I.current=k.currentTarget);const V=M.state();if(V.isAnimating)return V;const L=Pi(V.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:Ao(L)}},previousMonth:k=>{k&&(I.current=k.currentTarget);const V=M.state();if(V.isAnimating)return V;const L=Qs(V.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:Ao(L)}},onSelectDate:k=>{const V=M.state(),L=k.currentTarget.dataset.range==="true",R=k.currentTarget.dataset.date||"",U=new Date(R);return{date:U,year:Ao(U),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:L?{from:V.selectMode==="from"?U:V.range.from,to:V.selectMode==="to"?U:V.range.to}:V.range}},onChangeMonth:k=>{const V=k.target.value,R=Array.from(k.target.options).find(G=>G.value===V),U=M.state();if(R){const G=R.dataset.index||"",H=new Date(M.state().date);return H.setMonth(+G),{...U,date:H,year:Ao(H)}}return U},onKeyDown:k=>{const V=k.key,L=M.state();if(V in yh){(V==="ArrowUp"||V==="ArrowDown")&&k.preventDefault();const R=M.state().date,U=Re.keyof(yh,V)?yh[V](R,k.shiftKey?"month":"days"):null;if(U!==null)return gT(k.target,b,U),{...L,date:U,year:Ao(U)}}return M.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(M,k,V)=>((V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&V.props.onChangeMonth?.(M.date),M),(M,k,V)=>(V.method==="onChangeYear"&&V.props.onChangeYear?.(M.date),M),(M,k,V)=>{const L=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&L&&t?(c?.(M.range),M):(L&&t&&c?.(M.date),M)}]}),A=SB(w.date),O=Fv(A,7),_=w.date.toISOString(),N=mT(w.date,v);S.useEffect(()=>{t||c?.(w.date)},[_,t]);const $=bB(M=>C.date(k=>gB(new Date(k),+M)),1200),D=M=>{const k=M.currentTarget.value;C.onChangeYear(k),a?.(new Date(k)),$(k)},F=dT((M,k)=>(M.preventDefault(),k==="right"?C.previousMonth():C.nextMonth()),10),z=()=>{const M=kB();C.date(()=>M),c?.(M)};return p.jsx(Xf,{transition:wB,children:p.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:F.onTouchEnd,onTouchStart:F.onTouchStart,className:Pe("relative overflow-hidden",Re.function(u?.calendar)?u?.calendar(A):u?.calendar),children:[p.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:p.jsx(gn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:C.onExitComplete,children:p.jsxs(He.div,{initial:"enter",animate:"middle",exit:"exit",children:[p.jsxs("header",{className:"relative flex justify-between",children:[p.jsx(He.button,{layout:!0,type:"button","data-focustrap":"prev",variants:hT,onClick:C.previousMonth,title:g.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:p.jsx(ny,{className:"h-4 w-4"})}),p.jsx(He.span,{layout:!0,variants:pT,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:p.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[p.jsx("select",{value:N,onChange:C.onChangeMonth,"aria-label":g.calendarMonthLabel,style:{width:`${N.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),p.jsx(Xg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:D,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),p.jsx(He.button,{layout:!0,type:"button","data-focustrap":"next",variants:hT,onClick:C.nextMonth,title:g.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:p.jsx(Ta,{className:"h-4 w-4"})})]}),p.jsxs(He.table,{className:"mt-2 table min-w-full table-auto border-0",children:[p.jsx("thead",{children:p.jsx("tr",{children:w.week.map(M=>p.jsx("th",{role:"columnheader",className:Pe("py-2 text-sm font-medium capitalize",Re.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(v,{weekday:"short"})},M.toString()))})}),p.jsx(CB,{zip:O,range:T,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},N)})}),f==="datetime"?p.jsx("section",{className:"my-4 grid items-center",children:p.jsx(Jo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?hh(x,"HH:mm"):void 0,title:h||g.calendarDatetimeTitle,onChange:M=>{const k=M.target.value,V=xB.exec(k);if(!V)return;const L=V.groups.hour,R=V.groups.min,U=mB(w.date,{hours:Number(L),minutes:Number(R),seconds:0});C.date(()=>U),c?.(U)}})}):null,p.jsx("footer",{className:"mt-2 text-center text-primary",children:p.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:g.calendarToday})})]})})},bh=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(bh.displayName="ProgressRootContext");function IB(){const e=P.useContext(bh);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Nn(51));return e}let xh=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const yT={status(e){return e==="progressing"?{[xh.progressing]:""}:e==="complete"?{[xh.complete]:""}:e==="indeterminate"?{[xh.indeterminate]:""}:null}};function AB(e,t){return t==null?"indeterminate progress":e||`${t}%`}const vT=P.forwardRef(function(t,n){const{format:r,getAriaValueText:o=AB,locale:i,max:s=100,min:a=0,value:l,render:c,className:u,...d}=t,[f,h]=P.useState(),m=Ed(r);let y="indeterminate";Number.isFinite(l)&&(y=l===s?"complete":"progressing");const g=mD(l,i,m.current),v=P.useMemo(()=>({status:y}),[y]),b={"aria-labelledby":f,"aria-valuemax":s,"aria-valuemin":a,"aria-valuenow":l??void 0,"aria-valuetext":o(g,l),role:"progressbar"},x=P.useMemo(()=>({formattedValue:g,max:s,min:a,setLabelId:h,state:v,status:y,value:l}),[g,s,a,h,v,y,l]),T=ln("div",t,{state:v,ref:n,props:[b,d],stateAttributesMapping:yT});return p.jsx(bh.Provider,{value:x,children:T})});process.env.NODE_ENV!=="production"&&(vT.displayName="ProgressRoot");const bT=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:s,min:a,value:l,state:c}=IB(),u=Number.isFinite(l)&&l!==null?pl(l,a,s):null,d=P.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return ln("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:yT})});process.env.NODE_ENV!=="production"&&(bT.displayName="ProgressIndicator");const PB=e=>p.jsxs(vT,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Pe("relative h-6 w-full overflow-hidden rounded-full bg-background",e.container),children:[p.jsx(bT,{style:{transform:Re.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Pe("size-full bg-primary transition-transform duration-500 ease-in-out",e.className)}),Re.number(e.percent)?p.jsx("p",{className:Pe("absolute inset-0 flex w-full items-center justify-center font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),mc=e=>p.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[p.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),p.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});mc.Icon=function(t){return p.jsx("header",{...t,className:Pe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-warn-foreground",t.className),children:t.children})},mc.Body=function(t){return p.jsx(un,{...t,className:Pe("min-w-0 flex-1",t.className),children:t.children})},mc.Right=function(t){return p.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:p.jsx(un,{...t,type:"button"})})};const OB=e=>p.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),DB=e=>p.jsx(He.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),xT=new Date(1970,11,31),wh={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},wT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},NB={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Sh=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},MB={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},_B={day:"numeric",month:"numeric",year:"numeric"},FB=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:s=!0,type:a,...l},c)=>{const u=Fr(t),d=S.useId(),f=vt(),h=S.useMemo(()=>new Intl.DateTimeFormat(u,a==="datetime"?MB:_B),[u,a]),[m,y]=S.useState(e||void 0),[g,v]=S.useState(!1),b=Sh(h,xT).flatMap(N=>Re.keyof(wh,N.type)?wh[N.type](N.value):[]),x=S.useMemo(()=>Sh(h,xT).reduce((N,$)=>N+(Re.keyof(wT,$.type)?wT[$.type]($.value):""),""),[h]),T=e?.toISOString(),[E,I]=S.useState(m?Sh(h,m).reduce((N,$)=>N+(Re.keyof(wh,$.type)?NB[$.type](m,$.value):""),""):""),w=N=>{const $=N.target.value;if(I($),b.length===$.length&&b.every((F,z)=>{const M=$.charAt(z);return typeof F=="string"?M===F:F.test(M)})){const F=fB($,x,new Date),z=a==="datetime"?F:ko(F);return y(z),r?.(z)}return y(void 0),r?.(void 0)};S.useEffect(()=>{pc(e)&&(y(e),I(hh(e,x)))},[T,x]);const C=N=>(y(N),r?.(N),i&&v(!1),I(N?hh(N,x):"")),A=pc(m),O=A?m.toISOString():void 0,_=p.jsx(vh,{...l,type:a,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:C,disabledDate:n,date:A?m:void 0});return p.jsx(S.Fragment,{children:p.jsx(Jo,{...l,mask:b,value:E,id:void 0,name:void 0,"data-value":O,formNoValidate:!g,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:g?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:s?p.jsxs(S.Fragment,{children:[p.jsx("input",{"data-origin":l.name,defaultValue:O,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),p.jsx(ki,{open:g,onChange:v,buttonProps:{"aria-describedby":d},trigger:p.jsxs("span",{"aria-labelledby":d,children:[p.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),p.jsx(ty,{})]}),children:_})]}):null})})}),LB=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],VB=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],$B=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],zB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ST=(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},TT=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},jB=e=>typeof e=="number"?Math.log(e):TT(e)*Math.log(10),BB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},ET=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},RB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function HB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?zB:$B:t.binary?VB:LB,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return ET(c,t.fixedWidth)}const i=e<0,s=i?"-":t.signed?"+":"";i&&(e=-e);const a=RB(t);let l;if(e<1){const c=ST(e,t.locale,a);l=s+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?jB(e)/Math.log(1024):TT(e)/3),n.length-1);if(e=BB(e,(t.binary?1024:1e3)**c),!a){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=ST(Number(e),t.locale,a),d=n[c];l=s+u+r+d}return ET(l,t.fixedWidth)}var gc={exports:{}},yc={exports:{}},at={};var CT;function WB(){if(CT)return at;CT=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,s=e?Symbol.for("react.provider"):60109,a=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,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case a:case u:case m:case h:case s:return E;default:return I}}case n:return I}}}function T(E){return x(E)===c}return at.AsyncMode=l,at.ConcurrentMode=c,at.ContextConsumer=a,at.ContextProvider=s,at.Element=t,at.ForwardRef=u,at.Fragment=r,at.Lazy=m,at.Memo=h,at.Portal=n,at.Profiler=i,at.StrictMode=o,at.Suspense=d,at.isAsyncMode=function(E){return T(E)||x(E)===l},at.isConcurrentMode=T,at.isContextConsumer=function(E){return x(E)===a},at.isContextProvider=function(E){return x(E)===s},at.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},at.isForwardRef=function(E){return x(E)===u},at.isFragment=function(E){return x(E)===r},at.isLazy=function(E){return x(E)===m},at.isMemo=function(E){return x(E)===h},at.isPortal=function(E){return x(E)===n},at.isProfiler=function(E){return x(E)===i},at.isStrictMode=function(E){return x(E)===o},at.isSuspense=function(E){return x(E)===d},at.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===h||E.$$typeof===s||E.$$typeof===a||E.$$typeof===u||E.$$typeof===g||E.$$typeof===v||E.$$typeof===b||E.$$typeof===y)},at.typeOf=x,at}var lt={};var kT;function qB(){return kT||(kT=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,s=e?Symbol.for("react.provider"):60109,a=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,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===m||B.$$typeof===h||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===g||B.$$typeof===v||B.$$typeof===b||B.$$typeof===y)}function T(B){if(typeof B=="object"&&B!==null){var ae=B.$$typeof;switch(ae){case t:var ce=B.type;switch(ce){case l:case c:case r:case i:case o:case d:return ce;default:var Q=ce&&ce.$$typeof;switch(Q){case a:case u:case m:case h:case s:return Q;default:return ae}}case n:return ae}}}var E=l,I=c,w=a,C=s,A=t,O=u,_=r,N=m,$=h,D=n,F=i,z=o,M=d,k=!1;function V(B){return k||(k=!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.")),L(B)||T(B)===l}function L(B){return T(B)===c}function R(B){return T(B)===a}function U(B){return T(B)===s}function G(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function H(B){return T(B)===u}function ee(B){return T(B)===r}function se(B){return T(B)===m}function te(B){return T(B)===h}function q(B){return T(B)===n}function Y(B){return T(B)===i}function Z(B){return T(B)===o}function pe(B){return T(B)===d}lt.AsyncMode=E,lt.ConcurrentMode=I,lt.ContextConsumer=w,lt.ContextProvider=C,lt.Element=A,lt.ForwardRef=O,lt.Fragment=_,lt.Lazy=N,lt.Memo=$,lt.Portal=D,lt.Profiler=F,lt.StrictMode=z,lt.Suspense=M,lt.isAsyncMode=V,lt.isConcurrentMode=L,lt.isContextConsumer=R,lt.isContextProvider=U,lt.isElement=G,lt.isForwardRef=H,lt.isFragment=ee,lt.isLazy=se,lt.isMemo=te,lt.isPortal=q,lt.isProfiler=Y,lt.isStrictMode=Z,lt.isSuspense=pe,lt.isValidElementType=x,lt.typeOf=T})()),lt}var IT;function AT(){return IT||(IT=1,process.env.NODE_ENV==="production"?yc.exports=WB():yc.exports=qB()),yc.exports}var Th,PT;function UB(){if(PT)return Th;PT=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 s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[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 Th=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Th}var Eh,OT;function Ch(){if(OT)return Eh;OT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Eh=e,Eh}var kh,DT;function NT(){return DT||(DT=1,kh=Function.call.bind(Object.prototype.hasOwnProperty)),kh}var Ih,MT;function GB(){if(MT)return Ih;MT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ch(),n={},r=NT();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,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 f=Error((l||"React class")+": "+a+" 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 f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+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 h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ih=o,Ih}var Ah,_T;function YB(){if(_T)return Ah;_T=1;var e=AT(),t=UB(),n=Ch(),r=NT(),o=GB(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Ah=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(L){var R=L&&(c&&L[c]||L[u]);if(typeof R=="function")return R}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:T(),elementType:E(),instanceOf:I,node:O(),objectOf:C,oneOf:w,oneOfType:A,shape:N,exact:$};function m(L,R){return L===R?L!==0||1/L===1/R:L!==L&&R!==R}function y(L,R){this.message=L,this.data=R&&typeof R=="object"?R:{},this.stack=""}y.prototype=Error.prototype;function g(L){if(process.env.NODE_ENV!=="production")var R={},U=0;function G(ee,se,te,q,Y,Z,pe){if(q=q||f,Z=Z||te,pe!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=q+":"+te;!R[ae]&&U<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[ae]=!0,U++)}}return se[te]==null?ee?se[te]===null?new y("The "+Y+" `"+Z+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new y("The "+Y+" `"+Z+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:L(se,te,q,Y,Z)}var H=G.bind(null,!1);return H.isRequired=G.bind(null,!0),H}function v(L){function R(U,G,H,ee,se,te){var q=U[G],Y=z(q);if(Y!==L){var Z=M(q);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+Z+"` supplied to `"+H+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return g(R)}function b(){return g(s)}function x(L){function R(U,G,H,ee,se){if(typeof L!="function")return new y("Property `"+se+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var te=U[G];if(!Array.isArray(te)){var q=z(te);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an array."))}for(var Y=0;Y<te.length;Y++){var Z=L(te,Y,H,ee,se+"["+Y+"]",n);if(Z instanceof Error)return Z}return null}return g(R)}function T(){function L(R,U,G,H,ee){var se=R[U];if(!a(se)){var te=z(se);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return g(L)}function E(){function L(R,U,G,H,ee){var se=R[U];if(!e.isValidElementType(se)){var te=z(se);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return g(L)}function I(L){function R(U,G,H,ee,se){if(!(U[G]instanceof L)){var te=L.name||f,q=V(U[G]);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected ")+("instance of `"+te+"`."))}return null}return g(R)}function w(L){if(!Array.isArray(L))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.")),s;function R(U,G,H,ee,se){for(var te=U[G],q=0;q<L.length;q++)if(m(te,L[q]))return null;var Y=JSON.stringify(L,function(pe,B){var ae=M(B);return ae==="symbol"?String(B):B});return new y("Invalid "+ee+" `"+se+"` of value `"+String(te)+"` "+("supplied to `"+H+"`, expected one of "+Y+"."))}return g(R)}function C(L){function R(U,G,H,ee,se){if(typeof L!="function")return new y("Property `"+se+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an object."));for(var Y in te)if(r(te,Y)){var Z=L(te,Y,H,ee,se+"."+Y,n);if(Z instanceof Error)return Z}return null}return g(R)}function A(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var R=0;R<L.length;R++){var U=L[R];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(U)+" at index "+R+"."),s}function G(H,ee,se,te,q){for(var Y=[],Z=0;Z<L.length;Z++){var pe=L[Z],B=pe(H,ee,se,te,q,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&Y.push(B.data.expectedType)}var ae=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new y("Invalid "+te+" `"+q+"` supplied to "+("`"+se+"`"+ae+"."))}return g(G)}function O(){function L(R,U,G,H,ee){return D(R[U])?null:new y("Invalid "+H+" `"+ee+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return g(L)}function _(L,R,U,G,H){return new y((L||"React class")+": "+R+" type `"+U+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function N(L){function R(U,G,H,ee,se){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));for(var Y in L){var Z=L[Y];if(typeof Z!="function")return _(H,ee,se,Y,M(Z));var pe=Z(te,Y,H,ee,se+"."+Y,n);if(pe)return pe}return null}return g(R)}function $(L){function R(U,G,H,ee,se){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));var Y=t({},U[G],L);for(var Z in Y){var pe=L[Z];if(r(L,Z)&&typeof pe!="function")return _(H,ee,se,Z,M(pe));if(!pe)return new y("Invalid "+ee+" `"+se+"` key `"+Z+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(U[G],null," ")+`
17
+ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var B=pe(te,Z,H,ee,se+"."+Z,n);if(B)return B}return null}return g(R)}function D(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(D);if(L===null||a(L))return!0;var R=d(L);if(R){var U=R.call(L),G;if(R!==L.entries){for(;!(G=U.next()).done;)if(!D(G.value))return!1}else for(;!(G=U.next()).done;){var H=G.value;if(H&&!D(H[1]))return!1}}else return!1;return!0;default:return!1}}function F(L,R){return L==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function z(L){var R=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":F(R,L)?"symbol":R}function M(L){if(typeof L>"u"||L===null)return""+L;var R=z(L);if(R==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return R}function k(L){var R=M(L);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function V(L){return!L.constructor||!L.constructor.name?f:L.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Ah}var Ph,FT;function KB(){if(FT)return Ph;FT=1;var e=Ch();function t(){}function n(){}return n.resetWarningCache=t,Ph=function(){function r(s,a,l,c,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}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},Ph}var LT;function ZB(){if(LT)return gc.exports;if(LT=1,process.env.NODE_ENV!=="production"){var e=AT(),t=!0;gc.exports=YB()(e.isElement,t)}else gc.exports=KB()();return gc.exports}var XB=ZB();const yt=Sm(XB);function Po(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const QB=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 Ni(e,t,n){const r=JB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&VT(r,"path",i),VT(r,"relativePath",i),r}function JB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=QB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function VT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const eR=[".DS_Store","Thumbs.db"];function tR(e){return Po(this,void 0,void 0,function*(){return vc(e)&&nR(e.dataTransfer)?sR(e.dataTransfer,e.type):rR(e)?oR(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?iR(e):[]})}function nR(e){return vc(e)}function rR(e){return vc(e)&&vc(e.target)}function vc(e){return typeof e=="object"&&e!==null}function oR(e){return Oh(e.target.files).map(t=>Ni(t))}function iR(e){return Po(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Ni(n))})}function sR(e,t){return Po(this,void 0,void 0,function*(){if(e.items){const n=Oh(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(aR));return $T(zT(r))}return $T(Oh(e.files).map(n=>Ni(n)))})}function $T(e){return e.filter(t=>eR.indexOf(t.name)===-1)}function Oh(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 aR(e){if(typeof e.webkitGetAsEntry!="function")return jT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?BT(t):jT(e,t)}function zT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?zT(n):[n]],[])}function jT(e,t){return Po(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 s=yield i.getFile();return s.handle=i,Ni(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Ni(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function lR(e){return Po(this,void 0,void 0,function*(){return e.isDirectory?BT(e):cR(e)})}function BT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(s=>Po(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(lR));o.push(a),i()}else try{const a=yield Promise.all(o);n(a)}catch(a){r(a)}}),s=>{r(s)})}i()})}function cR(e){return Po(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Ni(r,e.fullPath);t(o)},r=>{n(r)})})})}var bc={},RT;function uR(){return RT||(RT=1,bc.__esModule=!0,bc.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(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0}),bc}var dR=uR();const Dh=Sm(dR);function HT(e){return hR(e)||pR(e)||GT(e)||fR()}function fR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hR(e){if(Array.isArray(e))return Nh(e)}function WT(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 qT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(n),!0).forEach(function(r){UT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e,t){return yR(e)||gR(e,t)||GT(e,t)||mR()}function mR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GT(e,t){if(e){if(typeof e=="string")return Nh(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 Nh(e,t)}}function Nh(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 gR(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function yR(e){if(Array.isArray(e))return e}var vR=typeof Dh=="function"?Dh:Dh.default,bR="file-invalid-type",xR="file-too-large",wR="file-too-small",SR="too-many-files",TR=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:bR,message:"File type must be ".concat(r)}},YT=function(t){return{code:xR,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},KT=function(t){return{code:wR,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},ER={code:SR,message:"Too many files"};function CR(e){return e.type===""&&typeof e.getAsFile=="function"}function ZT(e,t){var n=e.type==="application/x-moz-file"||vR(e,t)||CR(e);return[n,n?null:TR(t)]}function XT(e,t,n){if(Oo(e.size))if(Oo(t)&&Oo(n)){if(e.size>n)return[!1,YT(n)];if(e.size<t)return[!1,KT(t)]}else{if(Oo(t)&&e.size<t)return[!1,KT(t)];if(Oo(n)&&e.size>n)return[!1,YT(n)]}return[!0,null]}function Oo(e){return e!=null}function kR(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=ZT(l,n),u=Js(c,1),d=u[0],f=XT(l,r,o),h=Js(f,1),m=h[0],y=a?a(l):null;return d&&m&&!y})}function xc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ea(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 QT(e){e.preventDefault()}function IR(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function AR(e){return e.indexOf("Edge/")!==-1}function PR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return IR(e)||AR(e)}function lr(){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),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!xc(r)&&a&&a.apply(void 0,[r].concat(i)),xc(r)})}}function OR(){return"showOpenFilePicker"in window}function DR(e){if(Oo(e)){var t=Object.entries(e).filter(function(n){var r=Js(n,2),o=r[0],i=r[1],s=!0;return JT(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.')),s=!1),(!Array.isArray(i)||!i.every(eE))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Js(r,2),i=o[0],s=o[1];return qT(qT({},n),{},UT({},i,s))},{});return[{description:"Files",accept:t}]}return e}function NR(e){if(Oo(e))return Object.entries(e).reduce(function(t,n){var r=Js(n,2),o=r[0],i=r[1];return[].concat(HT(t),[o],HT(i))},[]).filter(function(t){return JT(t)||eE(t)}).join(",")}function MR(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function _R(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function JT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function eE(e){return/^.*\.[\w]+$/.test(e)}var FR=["children"],LR=["open"],VR=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],$R=["refKey","onChange","onClick"];function tE(e){return BR(e)||jR(e)||nE(e)||zR()}function zR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BR(e){if(Array.isArray(e))return _h(e)}function Mh(e,t){return WR(e)||HR(e,t)||nE(e,t)||RR()}function RR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nE(e,t){if(e){if(typeof e=="string")return _h(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 _h(e,t)}}function _h(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 HR(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function WR(e){if(Array.isArray(e))return e}function rE(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 Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rE(Object(n),!0).forEach(function(r){Fh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wc(e,t){if(e==null)return{};var n=qR(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 qR(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 Lh=S.forwardRef(function(e,t){var n=e.children,r=wc(e,FR),o=iE(r),i=o.open,s=wc(o,LR);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(Tt(Tt({},s),{},{open:i})))});Lh.displayName="Dropzone";var oE={disabled:!1,getFilesFromEvent:tR,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};Lh.defaultProps=oE,Lh.propTypes={children:yt.func,accept:yt.objectOf(yt.arrayOf(yt.string)),multiple:yt.bool,preventDropOnDocument:yt.bool,noClick:yt.bool,noKeyboard:yt.bool,noDrag:yt.bool,noDragEventsBubbling:yt.bool,minSize:yt.number,maxSize:yt.number,maxFiles:yt.number,disabled:yt.bool,getFilesFromEvent:yt.func,onFileDialogCancel:yt.func,onFileDialogOpen:yt.func,useFsAccessApi:yt.bool,autoFocus:yt.bool,onDragEnter:yt.func,onDragLeave:yt.func,onDragOver:yt.func,onDrop:yt.func,onDropAccepted:yt.func,onDropRejected:yt.func,onError:yt.func,validator:yt.func};var Vh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function iE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Tt(Tt({},oE),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,m=t.onDropRejected,y=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,C=t.onError,A=t.validator,O=S.useMemo(function(){return NR(n)},[n]),_=S.useMemo(function(){return DR(n)},[n]),N=S.useMemo(function(){return typeof g=="function"?g:sE},[g]),$=S.useMemo(function(){return typeof y=="function"?y:sE},[y]),D=S.useRef(null),F=S.useRef(null),z=S.useReducer(UR,Vh),M=Mh(z,2),k=M[0],V=M[1],L=k.isFocused,R=k.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&OR()),G=function(){!U.current&&R&&setTimeout(function(){if(F.current){var X=F.current.files;X.length||(V({type:"closeDialog"}),$())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[F,R,$,U]);var H=S.useRef([]),ee=S.useRef([]),se=function(X){D.current&&D.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",QT,!1),document.addEventListener("drop",se,!1)),function(){x&&(document.removeEventListener("dragover",QT),document.removeEventListener("drop",se))}},[D,x]),S.useEffect(function(){var j=function(Me){ee.current=[].concat(tE(ee.current),[Me.target]),ea(Me)&&V({isDragGlobal:!0,type:"setDragGlobal"})},X=function(Me){ee.current=ee.current.filter(function(_e){return _e!==Me.target&&_e!==null}),!(ee.current.length>0)&&V({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})},ve=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",j,!1),document.addEventListener("dragleave",X,!1),document.addEventListener("dragend",me,!1),document.addEventListener("drop",ve,!1),function(){document.removeEventListener("dragenter",j),document.removeEventListener("dragleave",X),document.removeEventListener("dragend",me),document.removeEventListener("drop",ve)}},[D]),S.useEffect(function(){return!r&&b&&D.current&&D.current.focus(),function(){}},[D,b,r]);var te=S.useCallback(function(j){C?C(j):console.error(j)},[C]),q=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[].concat(tE(H.current),[j.target]),ea(j)&&Promise.resolve(o(j)).then(function(X){if(!(xc(j)&&!w)){var me=X.length,ve=me>0&&kR({files:X,accept:O,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:A}),Ce=me>0&&!ve;V({isDragAccept:ve,isDragReject:Ce,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(X){return te(X)})},[o,c,te,w,O,s,i,a,l,A]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=ea(j);if(X&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d(j),!1},[d,w]),Z=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=H.current.filter(function(ve){return D.current&&D.current.contains(ve)}),me=X.indexOf(j.target);me!==-1&&X.splice(me,1),H.current=X,!(X.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ea(j)&&u&&u(j))},[D,u,w]),pe=S.useCallback(function(j,X){var me=[],ve=[];j.forEach(function(Ce){var Me=ZT(Ce,O),_e=Mh(Me,2),ct=_e[0],_t=_e[1],Qt=XT(Ce,s,i),Be=Mh(Qt,2),W=Be[0],K=Be[1],Oe=A?A(Ce):null;if(ct&&W&&!Oe)me.push(Ce);else{var Ue=[_t,K];Oe&&(Ue=Ue.concat(Oe)),ve.push({file:Ce,errors:Ue.filter(function(Ye){return Ye})})}}),(!a&&me.length>1||a&&l>=1&&me.length>l)&&(me.forEach(function(Ce){ve.push({file:Ce,errors:[ER]})}),me.splice(0)),V({acceptedFiles:me,fileRejections:ve,type:"setFiles"}),f&&f(me,ve,X),ve.length>0&&m&&m(ve,X),me.length>0&&h&&h(me,X)},[V,a,O,s,i,l,f,h,m,A]),B=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[],ea(j)&&Promise.resolve(o(j)).then(function(X){xc(j)&&!w||pe(X,j)}).catch(function(X){return te(X)}),V({type:"reset"})},[o,pe,te,w]),ae=S.useCallback(function(){if(U.current){V({type:"openDialog"}),N();var j={multiple:a,types:_};window.showOpenFilePicker(j).then(function(X){return o(X)}).then(function(X){pe(X,null),V({type:"closeDialog"})}).catch(function(X){MR(X)?($(X),V({type:"closeDialog"})):_R(X)?(U.current=!1,F.current?(F.current.value=null,F.current.click()):te(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."))):te(X)});return}F.current&&(V({type:"openDialog"}),N(),F.current.value=null,F.current.click())},[V,N,$,v,pe,te,_,a]),ce=S.useCallback(function(j){!D.current||!D.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),ae())},[D,ae]),Q=S.useCallback(function(){V({type:"focus"})},[]),ue=S.useCallback(function(){V({type:"blur"})},[]),oe=S.useCallback(function(){T||(PR()?setTimeout(ae,0):ae())},[T,ae]),he=function(X){return r?null:X},ie=function(X){return E?null:he(X)},le=function(X){return I?null:he(X)},be=function(X){w&&X.stopPropagation()},de=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.role,Ce=j.onKeyDown,Me=j.onFocus,_e=j.onBlur,ct=j.onClick,_t=j.onDragEnter,Qt=j.onDragOver,Be=j.onDragLeave,W=j.onDrop,K=wc(j,VR);return Tt(Tt(Fh({onKeyDown:ie(lr(Ce,ce)),onFocus:ie(lr(Me,Q)),onBlur:ie(lr(_e,ue)),onClick:he(lr(ct,oe)),onDragEnter:le(lr(_t,q)),onDragOver:le(lr(Qt,Y)),onDragLeave:le(lr(Be,Z)),onDrop:le(lr(W,B)),role:typeof ve=="string"&&ve!==""?ve:"presentation"},me,D),!r&&!E?{tabIndex:0}:{}),K)}},[D,ce,Q,ue,oe,q,Y,Z,B,E,I,r]),re=S.useCallback(function(j){j.stopPropagation()},[]),J=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.onChange,Ce=j.onClick,Me=wc(j,$R),_e=Fh({accept:O,multiple:a,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:he(lr(ve,B)),onClick:he(lr(Ce,re)),tabIndex:-1},me,F);return Tt(Tt({},_e),Me)}},[F,n,a,B,r]);return Tt(Tt({},k),{},{isFocused:L&&!r,getRootProps:de,getInputProps:J,rootRef:D,inputRef:F,open:he(ae)})}function UR(e,t){switch(t.type){case"focus":return Tt(Tt({},e),{},{isFocused:!0});case"blur":return Tt(Tt({},e),{},{isFocused:!1});case"openDialog":return Tt(Tt({},Vh),{},{isFileDialogActive:!0});case"closeDialog":return Tt(Tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Tt(Tt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Tt(Tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return Tt(Tt({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return Tt({},Vh);default:return e}}function sE(){}const aE=S.createContext([null,()=>{}]),GR=()=>S.useContext(aE),YR=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,KR={csv:ju,xls:ju,mov:oy,mp4:oy,xlsx:ju,pdf:ry,txt:ry,json:VI,mp3:MI},ZR=e=>{const[,t]=GR(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:YR(l),size:HB(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=KR[e.file.name.split(".").at(-1)]??iy,a=n.type==="img"?p.jsx("img",{src:n.url,className:"w-full object-contain",alt:e.file.name}):p.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return p.jsxs("li",{className:"flex w-full flex-row justify-between gap-4 border-b border-card-border last:border-b-transparent",children:[p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex flex-row items-center gap-4",children:[p.jsx("button",{type:"button",onClick:o,className:"m-2 flex size-16 max-w-16 items-center justify-center overflow-hidden",children:a}),p.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[p.jsx("span",{children:e.file.name}),p.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?p.jsx("div",{className:"min-w-full flex-1",children:p.jsx(e.File,{file:e.file})}):null]}),p.jsx("div",{className:"align-start flex justify-start py-4 transition-colors duration-300 ease-linear hover:text-danger-hover",children:p.jsx("button",{onClick:i,type:"button",className:"flex size-6 items-center justify-center",children:p.jsx(jo,{size:16})})})]})},XR=e=>p.jsx("ul",{className:"w-full space-y-8",children:e.files.map(t=>p.jsx(ZR,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),lE=e=>{const t=vt(),n=e.dragging?$I:zI;return p.jsxs("div",{className:"flex flex-col items-center justify-center",children:[p.jsx("div",{className:"flex flex-col items-center justify-center gap-2",children:p.jsx(n,{className:"text-primary",size:80})}),p.jsxs("div",{className:"my-4 flex flex-col items-center gap-1",children:[p.jsx("p",{children:t.uploadIdle}),p.jsx("button",{className:"text-primary underline",type:"button",children:t.uploadIdleButton})]})]})},QR=e=>e.isDragActive?p.jsx(lE,{files:e.files,dragging:!0}):e.files.length>0?p.jsx(XR,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):p.jsx(S.Fragment,{children:e.idle}),JR=p.jsx(lE,{dragging:!1}),eH=e=>{const t=e.item.file,n=e.item.type;return p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),p.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?p.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?p.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?p.jsx("figure",{children:p.jsx("audio",{controls:!0,src:e.item.url})}):null]})},tH=({idle:e=JR,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=vt(),s=S.useState(null),[a,l]=S.useState([]),c=o.files??a,u=()=>s[1](null),d=y=>{r?.(y),l(g=>g.concat(y))},{getRootProps:f,getInputProps:h,isDragActive:m}=iE({onDrop:d});return p.jsxs(aE.Provider,{value:s,children:[p.jsx(Ys,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?p.jsx(eH,{item:s[0]}):null}),p.jsxs("div",{...f(),"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:[p.jsx("input",{...h(o),name:o.name,id:o.name}),p.jsx(QR,{File:n,onDeleteFile:t,isDragActive:m,idle:e,files:c})]})]})},cE=()=>window.matchMedia("@media (pointer: coarse)"),nH=()=>{const e=S.useRef(Mr()?null:cE()),[t,n]=S.useState(Mr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?cE():e.current).addEventListener("change",o=>n(o.matches))},[]),t},uE=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=nH(),o=S.useRef(Mr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||Lv())return;document.documentElement.style.padding=$g(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(mk(c.style.height)):null,f=Re.number(d)?d:u.height,h=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:h?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},rH=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},dE=(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},fE={basic:/[,[\]]+?/,extend:/[,[\].]+?/},pE=(e,t)=>{const n=dE(t,fE.basic,e);return n!==void 0&&n!==e?n:dE(t,fE.extend,e)},hE=e=>e.replace(/[^0-9]/g,""),Sc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),mE=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?hE(e).includes(hE(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?rH(e,t)!==null:!1,oH=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>mE(e,o,n,r)):mE(e,t,n,r),$h=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Re.array(i.value)?i.value.map(Sc):Sc(`${i.value}`)}));return e.forEach(i=>{const s=pE(i,t);o.forEach(a=>{const l=pE(i,a.key);if(!l)return;const c=Sc(`${a.value}`.toLocaleLowerCase()).trim(),u=Sc(`${l}`.toLocaleLowerCase()).trim();if(oH(u,c,a.score,a.match))return void r.set(s,i);Re.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},iH=e=>p.jsx(S.Fragment,{children:e.children}),sH={duration:200,open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0},initial:{transform:"scaleY(0)",opacity:.2}},aH=[],lH=S.forwardRef(function(t,n){return p.jsx(He.ul,{...t,ref:n,className:"max-h-96 w-full overscroll-contain rounded-lg",children:p.jsx(gn,{children:t.children})})}),cH=S.forwardRef(function({item:t,context:n,...r},o){return p.jsx(He.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),uH={List:lH,Item:cH},Mi=40,dH=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:h=!1,dynamicOption:m=!1,...y},g)=>{const v=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=y.value??y.defaultValue??"",E=vt(),[I,w]=S.useState(()=>Math.min(320,Mi*o.length)),[C,A]=S.useState(!1),[O,_]=S.useState(""),[N,$]=S.useState(T),[D,F]=S.useState(()=>o.find(j=>j.value===T)?.label??T),[z,M]=S.useState(null),k=S.useRef(aH),V=uE(C,"block-only"),L=m&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...o]:o,R=()=>qi.flushSync(()=>A(!0)),U=O?$h(L,"value",[{key:"value",value:O},{key:"label",value:O}]):L,G=()=>{A(!1),w(0)},H=U.filter(j=>j.hidden!==!0),ee=m?void 0:`^(${o.map(j=>`${wd(j.value)}${j.label?"|"+wd(j.label):""}`).join("|")})$`,{x:se,y:te,strategy:q,refs:Y,context:Z,placement:pe}=Kn({open:C,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:lo,middleware:[Go(4),Zy({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),Ky({padding:10,elementContext:"reference",apply(j){const me=j.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ve=Yi(Y.reference.current,window.innerHeight),Ce=Math.min(me<Mi?ve:me,ve,j.availableHeight),Me=H.length===0?Mi:Math.min(Ce,ve,me),_e=`${b.current?.getBoundingClientRect().width||ve}px`;Object.assign(j.elements.floating.style,{width:_e,maxWidth:_e,height:Me})}})]}),B=Av(Z,sH),{getReferenceProps:ae,getFloatingProps:ce,getItemProps:Q}=Zn([yr(Z,{role:"listbox"}),Nr(Z),ol(Z,{cols:0,listRef:k,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(y.value){const j=o.find(X=>X.value===y.value);j&&(F(j.label??j.value),$(y.value))}},[y.value,o.length]),S.useEffect(()=>{if(!C)return w(0);const j=Y.reference;if(j.current===null)return;const X=Yi(j.current,window.innerHeight);setTimeout(()=>w(Math.min(X,H.length*Mi)),100)},[O,C,Y.reference,H.length]),S.useEffect(()=>{const j=Y.reference.current;if(j)return Gi(j)},[]);const ue=(j,X)=>{$(j.value);const me=Y.reference.current;if(!me)return;me?.setAttribute("data-value",j.value),me.value=j.value;const ve=new Event("change",{bubbles:!1,cancelable:!0});me.dispatchEvent(ve),y.onChange&&y.onChange(ve),F(j.label??""),G(),_(""),M(X)},oe=j=>{const X=j.target.value;return _(X),!C&&X===""?A(!0):(j.target.name=y.name||"",X?A(!0):y.onChange?.(j))},he=()=>{R(),_(""),Y.reference.current?.focus()},ie=()=>{M(j=>j===null?0:j),R(),_("")},le=()=>{Y.reference.current?.setAttribute("data-value",""),_(""),$(""),F(""),Vg(Y.reference.current),G()},be=y.id||y.name,de=`${be}-shadow`,re=H.length===0,J=pe==="top"||pe==="top-start";return p.jsxs(as,{...y,left:e,error:t,ref:b,form:y.form,loading:r,name:y.name,feedback:C&&J?y.title:d,hideLeft:f,required:h,title:y.title,container:i,rightLabel:s,interactive:a,id:de,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:y.placeholder,right:p.jsxs("span",{className:"flex items-center gap-0.5",children:[n,p.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:he,children:[p.jsx(Lu,{size:20}),p.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),N?p.jsx("button",{type:"button",onClick:le,className:"p-2 transition-colors link:text-danger md:p-1",children:p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.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:[p.jsx("input",{"data-shadow":"true",...ae({...y,onFocus:ie,pattern:ee,onChange:oe,id:de,name:de,ref:Y.setReference,onClick:j=>j.currentTarget.focus(),onKeyDown(j){if(j.key==="Escape")return j.currentTarget.blur(),G();if(C){if(j.key==="ArrowDown"){let X=Re.number(z)?z+1:0;return X>H.length-1&&(X=0),x.current?.scrollIntoView({index:X}),M(X)}if(j.key==="ArrowUp"){let X=Re.number(z)?z-1:H.length-1;return X<0&&(X=H.length-1),x.current?.scrollIntoView({index:X}),M(X)}if(j.key==="Enter"){if(z!==null&&H[z])return j.preventDefault(),ue(H[z],z);if(H.length===1)return j.preventDefault(),ue(H[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":be,"data-target":be,required:h,value:C?O:o.length===0?"":D||N,"aria-autocomplete":"list",autoComplete:"off",className:Pe("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",y.className)}),p.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:g,required:h,defaultValue:y.value||N||void 0}),p.jsx(gr,{preserveTabOrder:!0,children:C?p.jsx(fo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:p.jsxs(He.div,{...ce({ref:fr(V,Y.setFloating),style:{...B.styles,left:se,top:te??0,position:q,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:re?"auto":I},className:Pe("shadow-floating 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 ease-in-out",J?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!C)return w(0);const X=Y.floating.current.querySelectorAll("li").item(0),me=(X?X.getBoundingClientRect().height:Mi)*H.length;return qi.flushSync(()=>w(me+2))},children:[re?p.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:p.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||E.autocompleteEmpty})}):null,p.jsx(Wp,{overscan:40,ref:x,hidden:re,data:H,style:{height:I},defaultItemHeight:Mi,components:uH,scrollerRef:j=>{v.current=j},className:"border-floating max-h-full overscroll-contain rounded-lg bg-floating-background p-0 text-foreground",itemContent:(j,X)=>{const me=X.Render??iH,ve=N===X.value||N===X.label,Ce=z===j,Me=X.label??X.value;return p.jsx("button",{"data-value":X.value,...Q({ref:_e=>{k.current[j]=_e},role:"option",type:"button","aria-checked":ve,"aria-current":ve,"aria-selected":ve,"aria-busy":X.disabled,onClick:()=>ue(X,j),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ve?"bg-primary-hover text-primary-foreground":""} ${Ce?"bg-floating-hover text-floating-foreground":""}`}),children:p.jsx(me,{...y,label:X.label,value:X.value,children:Me})})}})]})}):null})]})});class Bn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Bn&&(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 Bn(this);return t?t(n):n}static from(t,n){return new Bn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Bn.from(t,n).values())}toArray(){return Array.from(this.values())}}const gE=40,fH=e=>p.jsx(S.Fragment,{children:e.children}),pH={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},yE=[],hH=S.forwardRef(function(t,n){return p.jsx(He.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:p.jsx(gn,{children:t.children})})}),mH=S.forwardRef(function({item:t,context:n,...r},o){return p.jsx(He.li,{...r,ref:o,className:"last:rounded-t-lg"})}),gH={List:hH,Item:mH},yH=e=>{const t=vt(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const s=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>s.width)return i(!0)},[r]),p.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?p.jsxs(zo,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},vH=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:h=!1,dynamicOption:m=!1,onChangeOptions:y,...g},v)=>{const b=S.useMemo(()=>new Bn(r.map(re=>[re.value,re])),[r]),x=S.useRef(null),T=S.useRef(null),E=g.value??g.defaultValue??yE,I=vt(),[w,C]=S.useState(0),[A,O]=S.useState(!1),[_,N]=S.useState(""),[$,D]=S.useState(()=>{const re=new Bn;return E.forEach(J=>{const j=b.get(J);return j?re.set(J,j):void 0}),re}),F=S.useMemo(()=>Array.from($.keys()),[$]),[z,M]=S.useState(()=>{const re=new Set(E);return r.reduce((J,j)=>re.has(j.value)?[...J,j.label??j.value]:J,[])??E}),[k,V]=S.useState(null),L=S.useRef(yE),R=m&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...r]:r,U=_.length===0?R:$h(R,"value",[{key:"value",value:_},{key:"label",value:_}]),G=uE(A,"block-only"),H=U.filter(re=>re.hidden!==!0),ee=H.length===0,{x:se,y:te,strategy:q,refs:Y,context:Z}=Kn({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:lo,middleware:[Go(4),Ky({padding:10,elementContext:"reference",apply(re){const j=re.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,X=Yi(Y.reference.current,window.innerHeight),me=Math.min(j<gE?X:j,X,re.availableHeight),ve=H.length===0?gE:Math.min(me,X,j),Ce=`${x.current.getBoundingClientRect().width}px`;Object.assign(re.elements.floating.style,{width:Ce,maxWidth:Ce,height:ve})}})]}),pe=Av(Z,pH),{getReferenceProps:B,getFloatingProps:ae,getItemProps:ce}=Zn([yr(Z,{role:"listbox"}),Nr(Z),ol(Z,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:re=>V(J=>re??J)})]);S.useEffect(()=>{if(!A)return C(0);const re=Y.reference;if(re.current===null)return;const J=Yi(re.current,window.innerHeight);setTimeout(()=>C(Math.min(J,H.length*40)),100)},[_,A,Y.reference]),S.useEffect(()=>{g.value&&D(new Bn(g.value.map(re=>[re,b.get(re)])))},[g.value,b]),S.useEffect(()=>{const re=Y.reference.current;if(re)return Gi(re)},[]);const Q=(re,J)=>{const j=$.clone(ve=>ve.has(re.value)?ve.remove(re.value):ve.set(re.value,re));D(j);const X=Y.reference.current;if(!X)return;const me=j.map(ve=>ve.value);X?.setAttribute("data-value",JSON.stringify(me)),y&&y(me),M(ve=>ve.concat(re.label??"")),N(""),V(J)},ue=re=>{const J=re.target.value;return N(J),!A&&J===""?O(!0):(re.target.name=g.name||"",J?O(!0):void 0)},oe=()=>{O(!0),N(""),Y.reference.current?.focus()},he=()=>{O(!0),N("")},ie=()=>{Y.reference.current?.setAttribute("data-value","[]"),N(""),O(!1),D(new Bn),y?.([])},le=g.id||g.name,be=$.map((re,J)=>p.jsx(zo,{size:"small",icon:p.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:j=>{j.preventDefault(),j.stopPropagation(),Q(re,J)},children:p.jsx(jo,{size:14})}),children:re.label??re.value},`MultiSelect-${re.value}-x`)),de={height:ee?"0":$.size===0?w-49:w-86};return p.jsxs(as,{...g,left:e,error:t,ref:x,form:g.form,name:g.name,feedback:d,hideLeft:f,required:h,title:g.title,container:o,rightLabel:i,interactive:s,id:g.name||g.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:p.jsxs("span",{className:"flex items-center gap-0.5",children:[n,p.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:oe,children:[p.jsx(Lu,{size:20}),p.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),$?p.jsx("button",{type:"button",onClick:ie,className:"transition-colors link:text-danger",children:p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.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:[p.jsxs("ul",{...B({...g,onFocus:he,id:`${le}-shadow`,name:`${le}-shadow`,ref:Y.setReference}),tabIndex:0,role:"button","data-name":le,"data-target":le,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":F.join(","),className:Pe("input placeholder-input-mask group h-input-height w-full text-base","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",g.className),children:[F.length>0?null:p.jsx("li",{className:"text-input-placeholder",children:g.placeholder}),p.jsx(yH,{label:c,children:be})]}),p.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:v,required:h,defaultValue:g.value||F||void 0}),p.jsx(gr,{preserveTabOrder:!0,children:A?p.jsx(gd,{lockScroll:!0,children:p.jsx(fo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:p.jsxs("div",{...ae({ref:Y.setFloating,style:{...pe.styles,top:te??0,position:q,left:se,height:w-(F.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:[p.jsx("input",{autoFocus:!0,value:_,onChange:ue,title:g.title,placeholder:I.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:re=>{if(re.key==="ArrowDown"){let J=k+1;return J>H.length-1&&(J=0),T.current?.scrollIntoView({index:J}),V(J)}if(re.key==="ArrowUp"){let J=k-1;return J<0&&(J=H.length-1),T.current?.scrollIntoView({index:J}),V(J)}if(re.key==="Escape")return re.currentTarget.blur(),O(!1);if(re.key==="Enter"){if(k!==null&&H[k])return re.preventDefault(),Q(H[k],k);if(H.length===1)return re.preventDefault(),Q(H[0],0)}}}),ee?p.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:p.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||I.autocompleteEmpty})}):null,ee?null:p.jsx(He.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:ee?"auto":w},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!A)return C(0);const J=Y.floating.current.querySelectorAll("li").item(0),j=(J?J.getBoundingClientRect().height:40)*H.length;return qi.flushSync(()=>C(j+2))},children:p.jsx(Wp,{ref:T,hidden:ee,data:H,components:gH,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(re,J)=>{const j=J.Render??fH,X=$.has(J.value)||$.has(J.label??""),me=k===re,ve=J.label??J.value;return p.jsxs("button",{"data-value":J.value,...ce({ref:Ce=>{L.current[re]=Ce},role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":J.disabled,onClick:()=>Q(J,re)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||me?"bg-floating-hover text-floating-foreground":""}`,children:[p.jsx(ih,{onChange:Qo,checked:X,"aria-checked":X,onClick:Ce=>{Ce.stopPropagation(),Q(J,re)}}),p.jsx(j,{...g,label:J.label,value:J.value,children:ve})]})}})}),p.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?p.jsx(zo,{theme:"muted",size:"small",children:I.autocompleteEmpty}):be})]})})}):null})]})}),bH=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},xH={Item:S.forwardRef(function(t,n){return p.jsx("li",{...t,ref:n,className:"flex items-center justify-between gap-1"})}),List:S.forwardRef(function(t,n){return p.jsx("ul",{...t,ref:n,className:"space-y-3"})})},wH=e=>{const t=S.useRef(null),n=bH(t);return p.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[p.jsxs("div",{className:"flex w-fit min-w-64 flex-col space-y-4 whitespace-nowrap rounded-lg border border-card-border py-8",children:[p.jsx("header",{className:"border-b border-card-border pb-2"}),p.jsxs("div",{className:"space-y-2 px-8",children:[p.jsx(Jo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),p.jsx(Wp,{height:n,useWindowScroll:!0,data:e.source,components:xH,itemContent:(r,o)=>p.jsx(S.Fragment,{children:p.jsx(ih,{children:p.jsx(e.Item,{data:o})})})})]})]}),p.jsx("div",{children:p.jsx(Jt,{children:p.jsx(Ta,{})})}),p.jsx("div",{})]})};function SH(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 TH=({children:e,...t})=>{const n=Lr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:SH(r.current));return S.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),p.jsx("div",{...t,ref:r,children:o?e:null})},Tc=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Tc.displayName="ToastContext");function zh(){const e=P.useContext(Tc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Nn(73));return e}var EH=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
22
22
  \`createSelector([state => state.todos], todos => todos)\`
23
23
  This could lead to inefficient memoization and unnecessary re-renders.
24
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},E3=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
24
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},CH=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
25
25
  This means your output selector will likely run more frequently than intended.
26
26
  Avoid returning a new reference inside your input selector, e.g.
27
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:c})}},k3={inputStabilityCheck:"once",identityFunctionCheck:"once"},Sc=Symbol("NOT_FOUND");function C3(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function I3(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function A3(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var gE=e=>Array.isArray(e)?e:[e];function P3(e){const t=Array.isArray(e[0])?e[0]:e;return A3(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yE(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var O3=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...k3,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:T3},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:E3}}};function D3(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Sc},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function N3(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return Sc}function o(a,l){r(a)===Sc&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var M3=(e,t)=>e===t;function _3(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function F3(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=M3,maxSize:o=1,resultEqualityCheck:i}=n,s=_3(r);let a=0;const l=o<=1?D3(s):N3(o,s);function c(){let u=l.get(arguments);if(u===Sc){if(u=e.apply(null,arguments),a++,i){const f=l.getEntries().find(p=>i(p.value,u));f&&(u=f.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var L3=class{constructor(e){this.value=e}deref(){return this.value}},V3=typeof WeakRef<"u"?WeakRef:L3,$3=0,vE=1;function Tc(){return{s:$3,v:void 0,o:null,p:null}}function bE(e,t={}){let n=Tc();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const p=arguments[d];if(typeof p=="function"||typeof p=="object"&&p!==null){let g=a.o;g===null&&(a.o=g=new WeakMap);const y=g.get(p);y===void 0?(a=Tc(),g.set(p,a)):a=y}else{let g=a.p;g===null&&(a.p=g=new Map);const y=g.get(p);y===void 0?(a=Tc(),g.set(p,a)):a=y}}const c=a;let u;if(a.s===vE)u=a.v;else if(u=e.apply(null,arguments),i++,r){const d=o?.deref?.()??o;d!=null&&r(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new V3(u):u}return c.s=vE,c.v=u,u}return s.clearCache=()=>{n=Tc(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function xE(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),C3(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=bE,argsMemoizeOptions:g=[],devModeChecks:y={}}=u,m=gE(f),v=gE(g),b=P3(o),x=d(function(){return i++,c.apply(null,arguments)},...m);let T=!0;const E=p(function(){s++;const w=yE(b,arguments);if(a=x.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:A}=O3(T,y);if(k.shouldRun&&k.run(c,w,a),A.shouldRun){const O=yE(b,arguments);A.run({inputSelectorResults:w,inputSelectorResultsCopy:O},{memoize:d,memoizeOptions:m},arguments)}T&&(T=!1)}return a},...v);return Object.assign(E,{resultFunc:c,memoizedResultFunc:x,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var z3=xE(bE),j3=Object.assign((e,t=z3)=>{I3(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>j3});const B3=xE({memoize:F3,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Rn=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Nn(1));let a;if(e&&t)a=(l,c,u,d)=>{const f=e(l,c,u,d);return t(f,c,u,d)};else if(e)a=e;else throw new Error("Missing arguments");return a},R3=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],o=e.length-1||1,i=r.length-o;if(i>3)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":Nn(2));return(a,l,c,u)=>{let d=a.__cacheKey__;d||(d={id:n},a.__cacheKey__=d,n+=1);let f=t.get(d);if(!f){let p=e;const g=[void 0,void 0,void 0];switch(i){case 0:break;case 1:{p=[...e.slice(0,-1),()=>g[0],r];break}case 2:{p=[...e.slice(0,-1),()=>g[0],()=>g[1],r];break}case 3:{p=[...e.slice(0,-1),()=>g[0],()=>g[1],()=>g[2],r];break}default:throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":Nn(2))}f=B3(...p),f.selectorArgs=g,t.set(d,f)}switch(f.selectorArgs[0]=l,f.selectorArgs[1]=c,f.selectorArgs[2]=u,i){case 0:return f(a);case 1:return f(a,l);case 2:return f(a,l,c);case 3:return f(a,l,c,u);default:throw new Error("unreachable")}}},H3=kd(19)?q3:U3;function wE(e,t,n,r,o){return H3(e,t,n,r,o)}function W3(e,t,n,r,o){const i=P.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return vL.useSyncExternalStore(e.subscribe,i,i)}function q3(e,t,n,r,o){return W3(e,t,n,r,o)}function U3(e,t,n,r,o){return yL.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class G3{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return wE(this,t,n,r,o)}}class Y3 extends G3{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){P.useDebugValue(t),pt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;pt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){P.useDebugValue(t,s=>Object.keys(s));const o=P.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);pt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){P.useDebugValue(t);const r=n!==void 0;if(pt(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const i=o.get(t);i!==void 0&&i!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return P.useDebugValue(t),wE(this,this.selectors[t],n,r,o)}useContextCallback(t,n){P.useDebugValue(t);const r=ut(n??pn);this.context[t]=r}useStateSetter(t){const n=P.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const ta=0;class na{static create(){return new na}currentId=ta;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ta,n()},t)}isStarted(){return this.currentId!==ta}clear=()=>{this.currentId!==ta&&(clearTimeout(this.currentId),this.currentId=ta)};disposeEffect=()=>this.clear}function K3(){const e=Xn(na.create).current;return ds(e.disposeEffect),e}let SE=0;function Z3(e){return SE+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${SE}`}function Vh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const Ec=R3(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((o,i)=>{const s=o.transitionStatus==="ending";t.set(o.id,{value:o,domIndex:i,visibleIndex:s?-1:n,offsetY:r}),r+=o.height||0,s||(n+=1)}),t}),wr={toasts:Rn(e=>e.toasts),isEmpty:Rn(e=>e.toasts.length===0),toast:Rn(Ec,(e,t)=>e.get(t)?.value),toastIndex:Rn(Ec,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Rn(Ec,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Rn(Ec,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Rn(e=>e.hovering),focused:Rn(e=>e.focused),expanded:Rn(e=>e.hovering||e.focused),expandedOrOutOfFocus:Rn(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Rn(e=>e.prevFocusElement)};class X3 extends Y3{timers=new Map;areTimersPaused=!1;constructor(t){super(t,{},wr)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t){const n=wr.toastIndex(this.state,t);if(n===-1)return;this.state.toasts[n]?.onRemove?.();const o=[...this.state.toasts];o.splice(n,1),this.setToasts(o)}addToast=t=>{const{toasts:n,timeout:r,limit:o}=this.state,i=t.id||Z3("toast"),s={...t,id:i,transitionStatus:"starting"},a=[s,...n],l=a.filter(u=>u.transitionStatus!=="ending");if(l.length>o){const u=l.length-o,d=l.slice(-u),f=new Set(d.map(p=>p.id));this.setToasts(a.map(p=>{const g=f.has(p.id);return p.limited!==g?{...p,limited:g}:p}))}else this.setToasts(a.map(u=>u.limited?{...u,limited:!1}:u));const c=s.timeout??r;return s.type!=="loading"&&c>0&&this.scheduleTimer(i,c,()=>this.closeToast(i)),wr.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,n)=>{this.updateToastInternal(t,n)};updateToastInternal=(t,n)=>{const{timeout:r,toasts:o}=this.state,i=wr.toast(this.state,t)??null;if(!i||i.transitionStatus==="ending")return;const s={...i,...n};this.setToasts(o.map(g=>g.id===t?{...g,...n}:g));const a=s.timeout??r,l=i?.timeout??r,c=Object.hasOwn(n,"timeout"),u=s.transitionStatus!=="ending"&&s.type!=="loading"&&a>0,d=this.timers.has(t),f=l!==a,p=i?.type==="loading";if(!u&&d){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t);return}if(u&&(!d||f||c||p)){const g=this.timers.get(t);g&&(g.timeout?.clear(),this.timers.delete(t)),this.scheduleTimer(t,a,()=>this.closeToast(t)),wr.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=t=>{wr.toast(this.state,t)?.onClose?.();const{limit:r,toasts:o}=this.state;let i=0;const s=o.map(l=>{if(l.id===t)return{...l,transitionStatus:"ending",height:0};if(l.transitionStatus==="ending")return l;const c=i>=r;return i+=1,l.limited!==c?{...l,limited:c}:l}),a=this.timers.get(t);a&&a.timeout&&(a.timeout.clear(),this.timers.delete(t)),this.handleFocusManagement(t),this.setToasts(s)};promiseToast=(t,n)=>{const r=Vh(n.loading),o=this.addToast({...r,type:"loading"}),i=t.then(s=>{const a=Vh(n.success,s);return this.updateToast(o,{...a,type:"success",timeout:a.timeout}),s}).catch(s=>{const a=Vh(n.error,s);return this.updateToast(o,{...a,type:"error",timeout:a.timeout}),Promise.reject(s)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const n=Date.now()-t.start,r=t.delay-n;t.remaining=r>0?r:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,n)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=na.create(),t.timeout.start(t.remaining,()=>{this.timers.delete(n),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const n=Dd(t);_r(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,n,r){const o=Date.now(),i=!wr.expandedOrOutOfFocus(this.state),s=i?na.create():void 0;s?.start(n,()=>{this.timers.delete(t),r()}),this.timers.set(t,{timeout:s,start:i?o:0,delay:n,remaining:n,callback:r})}setToasts(t){const n={toasts:t};t.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(t){const n=ho(an(this.state.viewport));if(!this.state.viewport||!_r(this.state.viewport,n)||!Nd(n))return;const r=wr.toasts(this.state),o=wr.toastIndex(this.state,t);let i=null,s=o+1;for(;s<r.length;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s+=1}if(!i)for(s=o-1;s>=0;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s-=1}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}}const TE=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,s=Xn(()=>new X3({timeout:r,limit:o,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return ds(s.disposeEffect),P.useEffect(function(){return i?i[" subscribe"](({action:c,options:u})=>{const d=u.id;c==="promise"&&u.promise?s.promiseToast(u.promise,u):c==="update"&&d?s.updateToast(d,u):c==="close"&&d?s.closeToast(d):s.addToast(u)}):void 0},[s,r,i]),s.useSyncedValues({timeout:r,limit:o}),h.jsx(wc.Provider,{value:s,children:n})};process.env.NODE_ENV!=="production"&&(TE.displayName="ToastProvider");const _i=P.forwardRef(function(t,n){const[r,o]=P.useState();pt(()=>{GO&&o("button")},[]);const i={tabIndex:0,role:r};return h.jsx("span",{...t,ref:n,style:ul,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(_i.displayName="FocusGuard");let Q3=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const EE=P.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,a=Lh(),l=K3(),c=P.useRef(!1),u=P.useRef(!1),d=a.useState("isEmpty"),f=a.useState("toasts"),p=a.useState("focused"),g=a.useState("expanded"),y=a.useState("prevFocusElement"),m=f[0]?.height??0,v=P.useMemo(()=>f.some(N=>N.transitionStatus==="ending"),[f]);P.useEffect(()=>{const N=a.state.viewport;if(!N)return;function $(F){d||F.key==="F6"&&F.target!==N&&(F.preventDefault(),a.setPrevFocusElement(ho(an(N))),N?.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const D=Wt(N);return D.addEventListener("keydown",$),()=>{D.removeEventListener("keydown",$)}},[a,d]),P.useEffect(()=>{const N=a.state.viewport;if(!N||d)return;const $=Wt(N);function D(z){z.target===$&&(a.setIsWindowFocused(!1),a.pauseTimers())}function F(z){if(z.relatedTarget||z.target===$)return;const M=Dd(z),C=ho(an(N));(!_r(N,M)||!Nd(C))&&a.resumeTimers(),l.start(0,()=>a.setIsWindowFocused(!0))}return $.addEventListener("blur",D,!0),$.addEventListener("focus",F,!0),()=>{$.removeEventListener("blur",D,!0),$.removeEventListener("focus",F,!0)}},[a,l,d]),P.useEffect(()=>{const N=a.state.viewport;if(!N||d)return;const $=an(N);return $.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{$.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[d,a]);function b(N){const $=a.state.viewport;$&&(c.current=!0,N.relatedTarget===$?f[0]?.ref?.current?.focus():a.restoreFocusToPrevElement())}function x(N){N.key==="Tab"&&N.shiftKey&&N.target===a.state.viewport&&(N.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}P.useEffect(()=>{!a.state.isWindowFocused||v||!u.current||(a.resumeTimers(),a.setHovering(!1),u.current=!1)},[v,a]);function T(){a.pauseTimers(),a.setHovering(!0),u.current=!1}function E(){v?u.current=!0:(a.resumeTimers(),a.setHovering(!1))}function I(){if(c.current){c.current=!1;return}p||Nd(an(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function w(N){!p||_r(a.state.viewport,N.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const k={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:T,onMouseMove:T,onMouseLeave:E,onFocus:I,onBlur:w,onKeyDown:x,onClick:I},A={expanded:g},O=ln("div",t,{ref:[n,a.setViewport],state:A,props:[k,{style:{[Q3.frontmostHeight]:m?`${m}px`:void 0}},s,{children:h.jsxs(P.Fragment,{children:[!d&&y&&h.jsx(_i,{onFocus:b}),i,!d&&y&&h.jsx(_i,{onFocus:b})]})}]}),_=P.useMemo(()=>f.filter(N=>N.priority==="high"),[f]);return h.jsxs(P.Fragment,{children:[!d&&y&&h.jsx(_i,{onFocus:b}),O,!p&&_.length>0&&h.jsx("div",{style:ul,children:_.map(N=>h.jsxs("div",{role:"alert","aria-atomic":!0,children:[h.jsx("div",{children:N.title}),h.jsx("div",{children:N.description})]},N.id))})]})});process.env.NODE_ENV!=="production"&&(EE.displayName="ToastViewport");function J3(e){return kd(19)?e:e?"true":void 0}const $h=P.createContext(void 0);process.env.NODE_ENV!=="production"&&($h.displayName="ToastRootContext");function kc(){const e=P.useContext($h);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Nn(66));return e}let zh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const eH={[zh.startingStyle]:""},tH={[zh.endingStyle]:""},nH={transitionStatus(e){return e==="starting"?eH:e==="ending"?tH:null}};function rH(e){return e==null?e:"current"in e?e.current:e}function oH(e,t=!1,n=!0){const r=cb();return ut((o,i=null)=>{r.cancel();function s(){ur.flushSync(o)}const a=rH(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=zh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;s()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function iH(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=ut(o),s=oH(r,n,!1);P.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}let Do=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const sH={...nH,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},ra=40,aH=10,Gr=.5,lH=1;function kE(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function cH(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const s=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){const a=s[1].split(", ").map(parseFloat);a.length===6?(r=a[4],o=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(r=a[12],o=a[13],i=a[0])}}return{x:r,y:o,scale:i}}const CE=P.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:s=["down","right"],...a}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(s)?s:[s]);const u=c.length>0,d=Lh(),[f,p]=P.useState(void 0),[g,y]=P.useState(!1),[m,v]=P.useState(!1),[b,x]=P.useState(!1),[T,E]=P.useState({x:0,y:0}),[I,w]=P.useState({x:0,y:0,scale:1}),[k,A]=P.useState(),[O,_]=P.useState(),[N,$]=P.useState(null),D=P.useRef(null),F=P.useRef({x:0,y:0}),z=P.useRef({x:0,y:0,scale:1}),M=P.useRef(void 0),C=P.useRef(0),V=P.useRef(!1),L=P.useRef({x:0,y:0}),R=P.useRef(!1),U=d.useState("toastIndex",r.id),G=d.useState("toastVisibleIndex",r.id),H=d.useState("toastOffsetY",r.id),ee=d.useState("focused"),se=d.useState("expanded");iH({open:r.transitionStatus!=="ending",ref:D,onComplete(){r.transitionStatus==="ending"&&d.removeToast(r.id)}});const te=ut((ie=!1)=>{const le=D.current;if(!le)return;const be=le.style.height;le.style.height="auto";const de=le.offsetHeight;le.style.height=be;function ne(){d.updateToastInternal(r.id,{ref:D,height:de,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}ie?ur.flushSync(ne):ne()});pt(te,[te]);function q(ie,le){let be=ie,de=le;return!c.includes("left")&&!c.includes("right")?be=ie>0?ie**Gr:-(Math.abs(ie)**Gr):(!c.includes("right")&&ie>0&&(be=ie**Gr),!c.includes("left")&&ie<0&&(be=-(Math.abs(ie)**Gr))),!c.includes("up")&&!c.includes("down")?de=le>0?le**Gr:-(Math.abs(le)**Gr):(!c.includes("down")&&le>0&&(de=le**Gr),!c.includes("up")&&le<0&&(de=-(Math.abs(le)**Gr))),{x:be,y:de}}function Y(ie){if(ie.button!==0)return;ie.pointerType==="touch"&&d.pauseTimers();const le=Dd(ie.nativeEvent);if(!(le&&le.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(V.current=!1,M.current=void 0,C.current=0,F.current={x:ie.clientX,y:ie.clientY},L.current=F.current,D.current){const de=cH(D.current);z.current=de,w(de),E({x:de.x,y:de.y})}d.setHovering(!0),y(!0),v(!1),$(null),R.current=!0,D.current?.setPointerCapture(ie.pointerId)}}function Z(ie){if(!g)return;ie.preventDefault(),R.current&&(F.current={x:ie.clientX,y:ie.clientY},R.current=!1);const{clientY:le,clientX:be,movementX:de,movementY:ne}=ie;(ne<0&&le>L.current.y||ne>0&&le<L.current.y)&&(L.current={x:L.current.x,y:le}),(de<0&&be>L.current.x||de>0&&be<L.current.x)&&(L.current={x:be,y:L.current.y});const J=be-F.current.x,j=le-F.current.y,X=le-L.current.y,me=be-L.current.x;if(!m&&Math.sqrt(J*J+j*j)>=lH&&(v(!0),N===null)){const _t=c.includes("left")||c.includes("right"),Qt=c.includes("up")||c.includes("down");if(_t&&Qt){const Be=Math.abs(J),W=Math.abs(j);$(Be>W?"horizontal":"vertical")}}let ve;if(!M.current)N==="vertical"?j>0?ve="down":j<0&&(ve="up"):N==="horizontal"?J>0?ve="right":J<0&&(ve="left"):Math.abs(J)>=Math.abs(j)?ve=J>0?"right":"left":ve=j>0?"down":"up",ve&&c.includes(ve)&&(M.current=ve,C.current=kE(ve,J,j),p(ve));else{const ct=M.current,_t=kE(ct,me,X);_t>ra?(V.current=!1,p(ct)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&C.current-_t>=aH&&(V.current=!0)}const ke=q(J,j);let Me=z.current.x,_e=z.current.y;N==="horizontal"?(c.includes("left")||c.includes("right"))&&(Me+=ke.x):(N==="vertical"||(c.includes("left")||c.includes("right"))&&(Me+=ke.x),(c.includes("up")||c.includes("down"))&&(_e+=ke.y)),E({x:Me,y:_e})}function pe(ie){if(!g)return;if(y(!1),v(!1),$(null),D.current?.releasePointerCapture(ie.pointerId),V.current){E({x:I.x,y:I.y}),p(void 0);return}let le=!1;const be=T.x-I.x,de=T.y-I.y;let ne;for(const J of c){switch(J){case"right":be>ra&&(le=!0,ne="right");break;case"left":be<-ra&&(le=!0,ne="left");break;case"down":de>ra&&(le=!0,ne="down");break;case"up":de<-ra&&(le=!0,ne="up");break}if(le)break}le?(p(ne),x(!0),d.closeToast(r.id)):(E({x:I.x,y:I.y}),p(void 0))}function B(ie){if(ie.key==="Escape"){if(!D.current||!_r(D.current,ho(an(D.current))))return;d.closeToast(r.id)}}P.useEffect(()=>{if(!u)return;const ie=D.current;if(!ie)return;function le(be){_r(ie,be.target)&&be.preventDefault()}return ie.addEventListener("touchmove",le,{passive:!1}),()=>{ie.removeEventListener("touchmove",le)}},[u]);function ae(){if(!g&&T.x===I.x&&T.y===I.y&&!b)return{[Do.swipeMovementX]:"0px",[Do.swipeMovementY]:"0px"};const ie=T.x-I.x,le=T.y-I.y;return{transition:g?"none":void 0,transform:g?`translateX(${T.x}px) translateY(${T.y}px) scale(${I.scale})`:void 0,[Do.swipeMovementX]:`${ie}px`,[Do.swipeMovementY]:`${le}px`}}const ce=r.priority==="high",Q={role:ce?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":k,"aria-describedby":O,"aria-hidden":ce&&!ee?!0:void 0,onPointerDown:u?Y:void 0,onPointerMove:u?Z:void 0,onPointerUp:u?pe:void 0,onKeyDown:B,inert:J3(r.limited),style:{...ae(),[Do.index]:r.transitionStatus==="ending"?U:G,[Do.offsetY]:`${H}px`,[Do.height]:r.height?`${r.height}px`:void 0}},ue=P.useMemo(()=>({rootRef:D,toast:r,titleId:k,setTitleId:A,descriptionId:O,setDescriptionId:_,swiping:g,swipeDirection:f,recalculateHeight:te,index:U,visibleIndex:G,expanded:se}),[r,k,O,g,f,te,U,G,se]),oe={transitionStatus:r.transitionStatus,expanded:se,limited:r.limited||!1,type:r.type,swiping:ue.swiping,swipeDirection:ue.swipeDirection},he=ln("div",t,{ref:[n,ue.rootRef],state:oe,stateAttributesMapping:sH,props:[Q,a]});return h.jsx($h.Provider,{value:ue,children:he})});process.env.NODE_ENV!=="production"&&(CE.displayName="ToastRoot");const IE=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:s,expanded:a,recalculateHeight:l}=kc(),c=P.useRef(null);pt(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const g=new ResizeObserver(()=>l(!0)),y=new MutationObserver(()=>l(!0));return g.observe(p),y.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{g.disconnect(),y.disconnect()}},[l]);const u=s>0;return ln("div",t,{ref:[n,c],state:{expanded:a,behind:u},props:i})});process.env.NODE_ENV!=="production"&&(IE.displayName="ToastContent");const AE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setDescriptionId:c}=kc(),u=s??l.description,d=!!u,f=rl(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const p={type:l.type},g=ln("p",t,{ref:n,state:p,props:{...a,id:f,children:u}});return d?g:null});process.env.NODE_ENV!=="production"&&(AE.displayName="ToastDescription");const PE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setTitleId:c}=kc(),u=s??l.title,d=!!u,f=rl(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const p={type:l.type},g=ln("h2",t,{ref:n,state:p,props:{...a,id:f,children:u}});return d?g:null});process.env.NODE_ENV!=="production"&&(PE.displayName="ToastTitle");let jh;process.env.NODE_ENV!=="production"&&(jh=new Set);function OE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");jh.has(t)||(jh.add(t),console.error(`Base UI: ${t}`))}}const DE=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(DE.displayName="CompositeRootContext");function uH(e=!1){const t=P.useContext(DE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Nn(16));return t}function dH(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:P.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[r,n,t,s,a,i,o])}}function fH(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=P.useRef(null),s=uH(!0)!==void 0,a=ut(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=dH({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&P.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";if(o){if(!f){const p=Td.captureOwnerStack?.()||"";OE(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${p}`)}}else if(f){const p=Td.captureOwnerStack?.()||"";OE(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${p}`)}},[o]);const c=P.useCallback(()=>{const f=i.current;pH(f)&&s&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,s]);pt(c,[c]);const u=P.useCallback((f={})=>{const{onClick:p,onMouseDown:g,onKeyUp:y,onKeyDown:m,onPointerDown:v,...b}=f;return Id({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}p?.(T)},onMouseDown(T){t||g?.(T)},onKeyDown(T){if(t||(Pd(T),m?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!o&&!a()&&!t,I=T.key==="Enter",w=T.key===" ";E&&((w||I)&&T.preventDefault(),I&&p?.(T))},onKeyUp(T){t||(Pd(T),y?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!o&&!t&&T.key===" "&&p?.(T)},onPointerDown(T){if(t){T.preventDefault();return}v?.(T)}},o?void 0:{role:"button"},l,b)},[t,l,o,a]),d=ut(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function pH(e){return Pt(e)&&e.tagName==="BUTTON"}const NE=P.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:s=!0,...a}=t,l=Lh(),{toast:c}=kc(),u=l.useState("expanded"),[d,f]=P.useState(!1),{getButtonProps:p,buttonRef:g}=fH({disabled:i,native:s}),y={type:c.type};return ln("button",t,{ref:[n,g],state:y,props:[{"aria-hidden":!u&&!d,onClick(){l.closeToast(c.id)},onFocus(){f(!0)},onBlur(){f(!1)}},a,p]})});process.env.NODE_ENV!=="production"&&(NE.displayName="ToastClose");function hH(e){return`data-base-ui-${e}`}const Bh=P.createContext(null);process.env.NODE_ENV!=="production"&&(Bh.displayName="PortalContext");const mH=()=>P.useContext(Bh),gH=hH("portal");function ME(e={}){const{ref:t,container:n,componentProps:r=Dn,elementProps:o}=e,i=rl(),a=mH()?.portalNode,[l,c]=P.useState(null),[u,d]=P.useState(null),f=ut(m=>{m!==null&&d(m)}),p=P.useRef(null);pt(()=>{if(n===null){p.current&&(p.current=null,d(null),c(null));return}if(i==null)return;const m=(n&&(Aa(n)?n:n.current))??a??document.body;if(m==null){p.current&&(p.current=null,d(null),c(null));return}p.current!==m&&(p.current=m,d(null),c(m))},[n,a,i]);const g=ln("div",r,{ref:[t,f],props:[{id:i,[gH]:""},o]});return{portalNode:u,portalSubtree:l&&g?ur.createPortal(g,l):null}}const yH=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:u}=ME({container:o,ref:n,componentProps:t,elementProps:l}),d=P.useRef(null),f=P.useRef(null),p=P.useRef(null),g=P.useRef(null),[y,m]=P.useState(null),v=y?.modal,b=y?.open,x=typeof a=="boolean"?a:!!y&&!y.modal&&y.open&&!!c;P.useEffect(()=>{if(!c||v)return;function E(I){c&&I.relatedTarget&&Md(I)&&(I.type==="focusin"?Zv:eD)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,v]),P.useEffect(()=>{!c||b||Zv(c)},[b,c]);const T=P.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:g,portalNode:c,setFocusManagerState:m}),[c]);return h.jsxs(P.Fragment,{children:[u,h.jsxs(Bh.Provider,{value:T,children:[x&&c&&h.jsx(_i,{"data-type":"outside",ref:d,onFocus:E=>{if(Md(E,c))p.current?.focus();else{const I=y?y.domReference:null;JO(I)?.focus()}}}),x&&c&&h.jsx("span",{"aria-owns":c.id,style:wO}),c&&ur.createPortal(r,c),x&&c&&h.jsx(_i,{"data-type":"outside",ref:f,onFocus:E=>{if(Md(E,c))g.current?.focus();else{const I=y?y.domReference:null;QO(I)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,ei(EO,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(yH.displayName="FloatingPortal");const _E=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,...a}=t,{portalNode:l,portalSubtree:c}=ME({container:o,ref:n,componentProps:t,elementProps:a});return!c&&!l?null:h.jsxs(P.Fragment,{children:[c,l&&ur.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(_E.displayName="FloatingPortalLite");const vH=_E;function FE(){const e=P.useContext(wc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Nn(73));const t=e.useState("toasts");return P.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const bH=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},xH=_o("relative isolate z-tooltip flex w-full flex-col overflow-hidden rounded-xl border bg-card-background backdrop-blur-md text-sm shadow-notification transition-all duration-300",{variants:{theme:{default:"border-card-border text-foreground shadow-black/5",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),wH={default:Er,info:Er,warn:$u,muted:Er,danger:$u,success:_u,secondary:Er},LE=S.createContext(()=>{throw new Error("Not implemented")}),SH=()=>S.useContext(LE);function TH(e){const t=e.toast.data?.closable??!0,n=e.toast.data?.loading??!1,r=e.toast.data?.theme||"default",o=xH({theme:r}),i=n?BI:wH[r]||Er;return h.jsx(CE,{toast:e.toast,swipeDirection:"right",children:h.jsx(He.li,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9,y:-20,transition:{duration:.2}},transition:{type:"spring",damping:25,stiffness:300},className:"pointer-events-auto w-full list-none",children:h.jsx(IE,{className:Pe(o,"shadow-lg"),children:h.jsxs("div",{className:"flex items-start gap-3 p-4",children:[h.jsx("div",{className:Pe("mt-0.5 shrink-0 opacity-80",n&&"animate-spin"),children:h.jsx(i,{className:"size-4"})}),h.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-hidden",children:[e.toast.title?h.jsx(PE,{className:"select-text truncate font-semibold leading-tight tracking-tight"}):null,h.jsx(AE,{className:"line-clamp-2 select-text text-xs font-medium leading-relaxed opacity-90"})]}),t&&!n?h.jsx(NE,{className:"-mr-1 -mt-1 shrink-0 rounded-lg p-1.5 text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground",children:h.jsx(jo,{className:"size-3.5"})}):null]})})})})}function EH({max:e=5}){const t=S.useRef(null),n=bH(t),r=FE(),o=e?r.toasts.slice(0,e):r.toasts,i=n?o:o.slice(0,3),s=o.length-i.length;return h.jsxs(EE,{ref:t,className:"pointer-events-none fixed left-1/2 top-6 z-[100] flex w-full max-w-[380px] -translate-x-1/2 flex-col gap-3 overflow-visible outline-none",children:[h.jsx(gn,{mode:"popLayout",initial:!1,children:i.map(a=>h.jsx(TH,{toast:a},a.id))}),!n&&s>0&&h.jsxs(He.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"pointer-events-auto cursor-default self-center rounded-full border border-card-border bg-card-background/80 px-3 py-1 text-[10px] font-bold uppercase tracking-wider text-foreground/50 shadow-sm backdrop-blur transition-all hover:bg-card-background hover:text-foreground/80",children:["+",s," more"]})]})}function kH({children:e,max:t=5}){const n=FE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,s)=>{const a={theme:s?.theme,closable:s?.closable,loading:s?.loading};if(s?.id&&n.toasts.find(u=>u.id===s.id))return n.update(s.id,{description:i,title:s.title,timeout:s.timeout,data:a}),{close:()=>n.close(s.id),clear:r};const l=n.add({description:i,id:s?.id,title:s?.title,timeout:s?.timeout,data:a});return{close:()=>n.close(l),clear:r}},[n,r]);return h.jsxs(LE.Provider,{value:o,children:[e,h.jsx(vH,{children:h.jsx(EH,{max:t})})]})}function CH({children:e,max:t=5,timeout:n=5e3}){return h.jsx(TE,{limit:t,timeout:n,children:h.jsx(kH,{max:t,children:e})})}const IH=/Mac|iPod|iPhone|iPad/,Cc=()=>IH.test(navigator.userAgent),AH=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Cc()?"Meta":"Control":n==="Hyper"?Cc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),VE=e=>e.map(t=>t.trim()).join("+");class PH{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=VE(AH(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 a=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?a.toUpperCase():a.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const s=VE(Array.from(i));this.combinations.forEach(a=>{if(a.key===s)return r.preventDefault(),void a.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const OH=e=>(e=e.trim(),e==="Alt"?Cc()?h.jsx(RI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?Cc()?h.jsx(FI,{"aria-label":"Command",size:12}):"Ctrl":e),DH=e=>{const t=e.value.trim().split("+");return h.jsx("span",{className:"flex items-center gap-1 text-sm",children:t.map((n,r)=>{const o=t.length-1===r;return h.jsxs(S.Fragment,{children:[h.jsx("kbd",{"aria-label":n,children:OH(n)}),o?null:h.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},NH=e=>h.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Au(e.item.title)?h.jsx(e.item.title,{text:e.text}):e.item.title}),MH=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?h.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:h.jsx(NH,{text:e.text,item:o})}):o.type!=="shortcut"?h.jsx(S.Fragment,{}):h.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[h.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,h.jsx("span",{children:Au(o.title)?h.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?h.jsx(DH,{value:o.shortcut}):null]})}),_H=(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(a=>({...a,title:Re.function(a.title)?a.title({text:t}):a.title})),o=r.reduce((a,l)=>{const c=Re.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&a.push({...l,enabled:c}),a},[]),i=Fh(o,"title",n),s=r.filter(a=>Re.function(a.enabled)?a.enabled({text:t}):!1);return Bn.unique(i.concat(s),a=>a.title)},FH=[0,0,0,0,0],$E=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=$E(n.items);if(r)return r}return null},LH=e=>{const t=S.useId(),n=S.useRef(null),[r,o]=S.useState(""),i=S.useRef([]),s=Tt(),a=Lr(r),[l,c]=S.useState(null),u=e.bind??"Mod + k",d=Kn({open:e.open,strategy:"absolute",whileElementsMounted:lo,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(T=>T.type==="group"?[T,...T.items]:[T]),p=_H(f,r),g=nl(d.context,{listRef:i,loop:!0,activeIndex:l,virtual:!0,allowEscape:!0,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:l,disabledIndices:T=>{const E=p[T];return E?E.type==="group":!1},onNavigate:T=>{Re.number(T)&&(Vg(n.current,i.current[T])||i.current[T]?.scrollIntoView({block:"start",inline:"start"})),c(E=>Re.number(T)?T:e.open?E??0:null)}}),{getItemProps:y,getReferenceProps:m,getFloatingProps:v}=Zn([g]),b=r===""?f:[{type:"group",title:"Results",items:[]},...p.filter(T=>T.type!=="group")];S.useEffect(()=>{const T=new PH;return T.add(u,()=>e.onChangeVisibility?.(!0)),f.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&T.add(E.shortcut,I=>E.action({event:I,setText:o,text:a.current,setOpen:e.onChangeVisibility}))}),T.register()},[u,f,e,a]);const x=e.Icon??Fu;return h.jsx(S.Fragment,{children:h.jsxs(Ys,{...v(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative overflow-clip py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[h.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center overflow-clip border-b border-floating-border bg-floating-background",children:[h.jsx("div",{className:"flex size-10 items-center justify-center",children:e.Icon?h.jsx(x,{Default:Fu,text:r,size:16}):h.jsx(Fu,{size:16})}),h.jsx("input",{...m({ref:d.refs.setReference,onKeyDown:T=>{const E=Re.number(l)?b[l]:null;if(T.key==="Enter")if(E)E.type==="shortcut"&&E.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o});else{const w=$E(p);w?.type==="shortcut"&&w.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o})}}}),autoFocus:!0,value:r,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:T=>o(T.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none"})]}),e.loading?h.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:[h.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:s.commandPaletteLoading}),FH.map((T,E)=>h.jsx("li",{className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:qp},`${t}-${E}-skeleton-index`))]}):h.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[h.jsxs("ul",{role:"listbox",ref:n,"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:[b.map((T,E)=>S.createElement(MH,{...y({onMouseEnter:()=>c(E),ref(I){i.current[E]=I},onClick(I){I.preventDefault(),e.onChangeVisibility(!1),T.type==="shortcut"&&T.action({event:I,text:r,setOpen:e.onChangeVisibility,setText:o})}}),item:T,text:r,active:l===E,key:`${t}-${T.type}-${E}`})),b.length===1?h.jsx("div",{className:Pe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:s.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Re.number(l)?h.jsx(e.Preview,{command:b[l],text:r}):null]}),e.footer?h.jsx("footer",{className:"flex h-8 items-center rounded-b-lg border-t border-floating-border p-2",children:e.footer}):null]})})};function Yr(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function zE(e){const t=new Map;for(const n of e){const r=Yr(n.date),o=t.get(r);o?o.push(n):t.set(r,[n])}return t}function jE(e){const t=ih(e),n=In(t,{weekStartsOn:1}),r=[];for(let o=0;o<42;o++)r.push(qr(n,o));return r}function Rh(e){const t=In(e,{weekStartsOn:1}),n=[];for(let r=0;r<7;r++)n.push(qr(t,r));return n}function Hh(){return Array.from({length:24},(e,t)=>t)}function BE(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(e))}function oa(e,t){return new Intl.DateTimeFormat(t,{day:"numeric"}).format(e)}function VH(e,t){return new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)}function RE(e,t){return new Intl.DateTimeFormat(t,{weekday:"long"}).format(e)}function HE(e,t){return new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)}function Wh(e,t){return new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}).format(e)}function WE(e,t){return new Intl.DateTimeFormat(t,{month:"short"}).format(e)}function qh(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(0,0,0,e))}function qE(e,t){return new Intl.DateTimeFormat(t,{weekday:"long",month:"short",day:"numeric",year:"numeric"}).format(e)}function UE(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(e)}function GE(e){return ah(e)}function $H({currentDate:e,currentView:t,filters:n,filterArea:r,setCurrentDate:o,setCurrentView:i,onToggleFilter:s,onAddEvent:a}){const l=Fr(),c=Tt(),u=Xs(e),d=S.useMemo(()=>[{value:"month",label:c.pageCalendarMonthView},{value:"week",label:c.pageCalendarWeekView},{value:"day",label:c.pageCalendarDayView}],[c]),f=()=>{o(y=>t==="month"?lT(y,1):t==="week"?gR(y):aT(y,1))},p=()=>{o(y=>t==="month"?oh(y,1):t==="week"?qS(y,1):qr(y,1))},g=GE(e);return h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("div",{className:`flex size-12 flex-col items-center justify-center overflow-hidden rounded-lg text-xs ${u?"bg-primary text-primary-foreground":"bg-card text-foreground"}`,children:[h.jsx("span",{className:"font-light uppercase leading-none",children:WE(e,l)}),h.jsx("span",{className:"text-xl font-medium leading-none",children:oa(e,l)})]}),h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-bold leading-tight",children:Wh(e,l)}),h.jsx("span",{className:"text-xs text-muted-foreground",children:c.pageCalendarWeekLabel(g)})]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Jt,{size:"small",title:c.pageCalendarPrevious,theme:"ghost-muted",onClick:f,children:h.jsx(ey,{size:16})}),h.jsx("button",{onClick:()=>o(new Date),className:"rounded-md px-3 py-1.5 text-sm transition-colors hover:bg-muted/50",children:c.pageCalendarToday}),h.jsx(Jt,{size:"small",title:c.pageCalendarNext,theme:"ghost-muted",onClick:p,children:h.jsx(wa,{size:16})})]}),h.jsx("div",{className:"flex rounded-md",children:d.map(y=>h.jsx(Jt,{size:"small",onClick:()=>i(y.value),theme:t===y.value?"primary":"muted",className:"rounded-none first:rounded-l-button last:rounded-r-button",children:y.label},y.value))}),a&&h.jsxs(Jt,{theme:"primary",size:"small",onClick:a,children:[h.jsx(MI,{size:14}),c.pageCalendarAddEvent]})]})]}),r??(n.length>0&&h.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[h.jsx(Jg,{size:14,className:"text-muted-foreground"}),h.jsx("span",{className:"mr-1 text-xs text-muted-foreground",children:c.pageCalendarFilter}),n.map(y=>h.jsx(zo,{as:"button",size:"small",type:"button",theme:y.theme,indicator:y.enabled?y.theme:void 0,onClick:()=>s(y.id),children:y.label},y.id))]}))]})}function Uh({event:e,onClick:t,compact:n=!1}){const r={style:{border:"0",padding:"0 0.5rem",height:"1.25rem",borderRadius:"0.25rem"},className:Pe("w-full border-0 justify-start rounded text-xs truncate text-ellipsis overflow-hidden border leading-tight",e.className)};return n?h.jsx(Jt,{...r,size:"small",onClick:t,title:e.title,theme:e.className?"raw":"primary",children:e.title}):h.jsxs(Jt,{...r,size:"small",onClick:t,title:e.title,theme:e.className?"raw":"primary",children:[h.jsx("div",{className:"truncate font-medium",children:e.title}),h.jsx("div",{className:"text-xs opacity-60",children:BE(e.date)})]})}function zH({days:e,eventsByDate:t,currentDate:n,onEventClick:r,onDayClick:o}){const i=Fr(),s=Tt(),a=S.useMemo(()=>Rh(new Date),[]);return h.jsxs("div",{className:"flex h-full flex-1 flex-col",children:[h.jsx("ul",{className:"grid grid-cols-7 border-b border-border",children:a.map(l=>{const c=VH(l,i);return h.jsx("li",{className:"py-2 text-center text-xs font-medium text-muted-foreground",children:c},c)})}),h.jsx("div",{className:"grid flex-1 auto-rows-fr grid-cols-7",children:e.map((l,c)=>{const u=Yr(l),d=t.get(u)||[],f=sT(l,n),p=Xs(l),g=d.slice(0,2),y=d.length-2;return h.jsxs("button",{type:"button",onClick:()=>o(l),className:`group flex min-h-32 cursor-pointer flex-col gap-1 border-b border-r border-border p-2 transition-colors hover:bg-muted hover:bg-opacity-20 ${f?"":"opacity-50"}`,children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:`flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium ${p?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(l,i)}),h.jsx("span",{className:"text-lg leading-none text-muted-foreground opacity-0 transition-opacity group-hover:opacity-40",children:"+"})]}),h.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.map(m=>h.jsx("div",{onClick:v=>v.stopPropagation(),children:h.jsx(Uh,{compact:!0,event:m,onClick:()=>r(m)})},m.id)),y>0&&h.jsx("span",{className:"pl-1 text-xs text-muted-foreground",children:s.pageCalendarMoreEvents(y)})]})]},c)})})]})}const ia=48;function jH(e){const t=e.date.getHours(),n=e.date.getMinutes();return t*ia+n/60*ia}function BH({days:e,eventsByDate:t,onEventClick:n,onSlotClick:r}){const o=Fr(),i=S.useRef(null),s=S.useRef(null),a=Hh();return S.useEffect(()=>{if(s.current&&i.current){const l=i.current.offsetTop;s.current.scrollTop=l-s.current.clientHeight/2}},[]),h.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[h.jsxs("div",{className:"flex flex-shrink-0 border-b border-border",children:[h.jsx("div",{className:"w-[60px] flex-shrink-0"}),e.map((l,c)=>{const u=Xs(l);return h.jsxs("div",{className:"flex-1 py-2 text-center text-xs font-medium text-muted-foreground",children:[h.jsx("span",{className:"block",children:HE(l,o)}),h.jsx("span",{className:`inline-flex h-6 w-6 items-center justify-center rounded-full text-sm font-bold ${u?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(l,o)})]},c)})]}),h.jsxs("div",{ref:s,className:"flex flex-1 items-start overflow-y-auto",children:[h.jsx("div",{className:"w-[60px] flex-shrink-0",children:a.map(l=>h.jsxs("div",{className:"relative",style:{height:ia},children:[h.jsx("span",{className:"absolute -top-2.5 right-2 text-[10px] text-muted-foreground",children:l===0?"":qh(l,o)}),l===new Date().getHours()&&h.jsx("div",{ref:i})]},l))}),e.map((l,c)=>{const u=Yr(l),d=t.get(u)||[];return h.jsxs("div",{className:"relative flex-1 border-l border-card-border",children:[a.map(f=>{const p=new Date(l);return p.setHours(f,0,0,0),h.jsx("div",{className:"cursor-pointer border-b border-border/50 hover:bg-muted/20",style:{height:ia},onClick:()=>r?.(p)},f)}),d.map(f=>h.jsx("div",{className:"absolute left-0.5 right-0.5",style:{top:jH(f),height:ia},onClick:p=>p.stopPropagation(),children:h.jsx(Uh,{event:f,onClick:()=>n(f)})},f.id))]},c)})]})]})}const sa=48;function RH(e){const t=e.date.getHours(),n=e.date.getMinutes();return t*sa+n/60*sa}function HH({currentDate:e,onSlotClick:t,renderEvent:n,eventsByDate:r,onDateChange:o,onEventClick:i}){const s=Fr(),a=S.useRef(null),l=S.useRef(null),c=Hh(),[u,d]=S.useState(null);S.useEffect(()=>{if(l.current&&a.current){const m=a.current.offsetTop;l.current.scrollTop=m-l.current.clientHeight/2}},[]);const f=Yr(e),p=r.get(f)||[],g=({date:m})=>{const v=Yr(m),b=(r.get(v)||[]).length>0,x=Yr(m)===Yr(e);return!b||x?null:h.jsx("span",{className:"absolute bottom-0.5 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full bg-primary"})},y=m=>{d(m),i(m)};return h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[h.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3 border-b border-border px-4 py-2",children:[h.jsx("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-full font-bold ${Xs(e)?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(e,s)}),h.jsxs("div",{children:[h.jsx("div",{className:"font-semibold",children:RE(e,s)}),h.jsx("div",{className:"text-xs text-muted-foreground",children:Wh(e,s)})]})]}),h.jsxs("div",{ref:l,className:"flex flex-1 items-start overflow-y-auto",children:[h.jsx("div",{className:"w-[60px] flex-shrink-0",children:c.map(m=>h.jsxs("div",{className:"relative",style:{height:sa},children:[h.jsx("span",{className:"absolute -top-2.5 right-2 text-[10px] text-muted-foreground",children:m===0?"":qh(m,s)}),m===new Date().getHours()&&h.jsx("div",{ref:a})]},m))}),h.jsxs("div",{className:"relative flex-1 border-l border-card-border",children:[c.map(m=>{const v=new Date(e);return v.setHours(m,0,0,0),h.jsx("div",{className:"cursor-pointer border-b border-border/50 hover:bg-muted/20",style:{height:sa},onClick:()=>t?.(v)},m)}),p.map(m=>h.jsx("div",{className:"absolute left-1 right-1",style:{top:RH(m),height:sa},onClick:v=>v.stopPropagation(),children:h.jsx(Uh,{event:m,onClick:()=>y(m)})},m.id))]})]})]}),h.jsxs("div",{className:"flex flex-col overflow-y-auto border-l border-card-border px-4",children:[h.jsx(mh,{date:e,markToday:!0,changeOnlyOnClick:!0,RenderOnDay:g,onChange:m=>m&&o(m)}),u&&h.jsx("div",{className:"flex flex-col gap-2 border-t p-3",children:n?n(u):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"truncate text-sm font-semibold",children:u.title}),h.jsx("div",{className:"text-xs text-muted-foreground",children:qE(u.date,s)}),h.jsx("div",{className:"text-xs text-muted-foreground",children:UE(u.date,s)}),h.jsx(zo,{theme:u.className?"custom":"primary",size:"small",className:`self-start${u.className?` ${u.className}`:""}`})]})})]})]})}const WH=[];function qH({events:e,filterArea:t,onAddEvent:n,defaultDate:r,onSlotClick:o,getFilterId:i,renderEvent:s,onEventClick:a,filters:l=WH,defaultView:c="month",onChangeFilters:u}){const[d,f]=S.useState(c),[p,g]=S.useState(()=>r??new Date),[y,m]=S.useState(l),v=k=>{m(A=>{const O=A.map(_=>_.id===k?{..._,enabled:!_.enabled}:_);return u?.(O),O})},b=S.useMemo(()=>{if(l.length===0)return e;const k=i??(A=>A?.filterId);return e.filter(A=>y.find(O=>O.id===k(A))?.enabled??!0)},[e,y,l]),x=S.useMemo(()=>zE(b),[b]),T=S.useMemo(()=>jE(p),[p]),E=S.useMemo(()=>Rh(p),[p]),I=k=>a?.(k),w=k=>{g(k),f("day")};return h.jsxs("div",{className:"flex h-full flex-grow flex-col gap-4",children:[h.jsx($H,{filters:y,filterArea:t,onAddEvent:n,currentDate:p,currentView:d,setCurrentDate:g,setCurrentView:f,onToggleFilter:v}),d==="month"&&h.jsx(zH,{days:T,currentDate:p,eventsByDate:x,onDayClick:w,onEventClick:I}),d==="week"&&h.jsx(BH,{days:E,currentDate:p,onSlotClick:o,eventsByDate:x,onEventClick:I}),d==="day"&&h.jsx(HH,{currentDate:p,onSlotClick:o,renderEvent:s,eventsByDate:x,onDateChange:g,onEventClick:I})]})}const UH=["INPUT","SELECT"],YE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{UH.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Gh,KE;function Yh(){if(KE)return Gh;KE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Gh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Gh}var Kh,ZE;function XE(){if(ZE)return Kh;ZE=1;var e=Yh(),t=mg(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,k){return o.set(w,k),w},s=function(w){return o.has(w)},a=function(w){return o.get(w)},l=function(w,k){o.set(w,k)},c=(function(){for(var I=[],w=0;w<256;++w)I[I.length]="%"+((w<16?"0":"")+w.toString(16)).toUpperCase();return I})(),u=function(w){for(;w.length>1;){var k=w.pop(),A=k.obj[k.prop];if(r(A)){for(var O=[],_=0;_<A.length;++_)typeof A[_]<"u"&&(O[O.length]=A[_]);k.obj[k.prop]=O}}},d=function(w,k){for(var A=k&&k.plainObjects?{__proto__:null}:{},O=0;O<w.length;++O)typeof w[O]<"u"&&(A[O]=w[O]);return A},f=function I(w,k,A){if(!k)return w;if(typeof k!="object"&&typeof k!="function"){if(r(w)){var O=w.length;if(A&&typeof A.arrayLimit=="number"&&O>A.arrayLimit)return i(d(w.concat(k),A),O);w[O]=k}else if(w&&typeof w=="object")if(s(w)){var _=a(w)+1;w[_]=k,l(w,_)}else{if(A&&A.strictMerge)return[w,k];(A&&(A.plainObjects||A.allowPrototypes)||!n.call(Object.prototype,k))&&(w[k]=!0)}else return[w,k];return w}if(!w||typeof w!="object"){if(s(k)){for(var N=Object.keys(k),$=A&&A.plainObjects?{__proto__:null,0:w}:{0:w},D=0;D<N.length;D++){var F=parseInt(N[D],10);$[F+1]=k[N[D]]}return i($,a(k)+1)}var z=[w].concat(k);return A&&typeof A.arrayLimit=="number"&&z.length>A.arrayLimit?i(d(z,A),z.length-1):z}var M=w;return r(w)&&!r(k)&&(M=d(w,A)),r(w)&&r(k)?(k.forEach(function(C,V){if(n.call(w,V)){var L=w[V];L&&typeof L=="object"&&C&&typeof C=="object"?w[V]=I(L,C,A):w[w.length]=C}else w[V]=C}),w):Object.keys(k).reduce(function(C,V){var L=k[V];if(n.call(C,V)?C[V]=I(C[V],L,A):C[V]=L,s(k)&&!s(C)&&i(C,a(k)),s(C)){var R=parseInt(V,10);String(R)===V&&R>=0&&R>a(C)&&l(C,R)}return C},M)},p=function(w,k){return Object.keys(k).reduce(function(A,O){return A[O]=k[O],A},w)},g=function(I,w,k){var A=I.replace(/\+/g," ");if(k==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch{return A}},y=1024,m=function(w,k,A,O,_){if(w.length===0)return w;var N=w;if(typeof w=="symbol"?N=Symbol.prototype.toString.call(w):typeof w!="string"&&(N=String(w)),A==="iso-8859-1")return escape(N).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var $="",D=0;D<N.length;D+=y){for(var F=N.length>=y?N.slice(D,D+y):N,z=[],M=0;M<F.length;++M){var C=F.charCodeAt(M);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||_===e.RFC1738&&(C===40||C===41)){z[z.length]=F.charAt(M);continue}if(C<128){z[z.length]=c[C];continue}if(C<2048){z[z.length]=c[192|C>>6]+c[128|C&63];continue}if(C<55296||C>=57344){z[z.length]=c[224|C>>12]+c[128|C>>6&63]+c[128|C&63];continue}M+=1,C=65536+((C&1023)<<10|F.charCodeAt(M)&1023),z[z.length]=c[240|C>>18]+c[128|C>>12&63]+c[128|C>>6&63]+c[128|C&63]}$+=z.join("")}return $},v=function(w){for(var k=[{obj:{o:w},prop:"o"}],A=[],O=0;O<k.length;++O)for(var _=k[O],N=_.obj[_.prop],$=Object.keys(N),D=0;D<$.length;++D){var F=$[D],z=N[F];typeof z=="object"&&z!==null&&A.indexOf(z)===-1&&(k[k.length]={obj:N,prop:F},A[A.length]=z)}return u(k),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},T=function(w,k,A,O){if(s(w)){var _=a(w)+1;return w[_]=k,l(w,_),w}var N=[].concat(w,k);return N.length>A?i(d(N,{plainObjects:O}),N.length-1):N},E=function(w,k){if(r(w)){for(var A=[],O=0;O<w.length;O+=1)A[A.length]=k(w[O]);return A}return k(w)};return Kh={arrayToObject:d,assign:p,combine:T,compact:v,decode:g,encode:m,isBuffer:x,isOverflow:s,isRegExp:b,markOverflow:i,maybeMap:E,merge:f},Kh}var Zh,QE;function GH(){if(QE)return Zh;QE=1;var e=mg(),t=XE(),n=Yh(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,v){return m+"["+v+"]"},repeat:function(m){return m}},i=Array.isArray,s=Array.prototype.push,a=function(y,m){s.apply(y,i(m)?m:[m])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},f={},p=function y(m,v,b,x,T,E,I,w,k,A,O,_,N,$,D,F,z,M){for(var C=m,V=M,L=0,R=!1;(V=V.get(f))!==void 0&&!R;){var U=V.get(m);if(L+=1,typeof U<"u"){if(U===L)throw new RangeError("Cyclic object value");R=!0}typeof V.get(f)>"u"&&(L=0)}if(typeof A=="function"?C=A(v,C):C instanceof Date?C=N(C):b==="comma"&&i(C)&&(C=t.maybeMap(C,function(Q){return Q instanceof Date?N(Q):Q})),C===null){if(E)return k&&!F?k(v,u.encoder,z,"key",$):v;C=""}if(d(C)||t.isBuffer(C)){if(k){var G=F?v:k(v,u.encoder,z,"key",$);return[D(G)+"="+D(k(C,u.encoder,z,"value",$))]}return[D(v)+"="+D(String(C))]}var H=[];if(typeof C>"u")return H;var ee;if(b==="comma"&&i(C))F&&k&&(C=t.maybeMap(C,k)),ee=[{value:C.length>0?C.join(",")||null:void 0}];else if(i(A))ee=A;else{var se=Object.keys(C);ee=O?se.sort(O):se}var te=w?String(v).replace(/\./g,"%2E"):String(v),q=x&&i(C)&&C.length===1?te+"[]":te;if(T&&i(C)&&C.length===0)return q+"[]";for(var Y=0;Y<ee.length;++Y){var Z=ee[Y],pe=typeof Z=="object"&&Z&&typeof Z.value<"u"?Z.value:C[Z];if(!(I&&pe===null)){var B=_&&w?String(Z).replace(/\./g,"%2E"):String(Z),ae=i(C)?typeof b=="function"?b(q,B):q:q+(_?"."+B:"["+B+"]");M.set(m,L);var ce=e();ce.set(f,M),a(H,y(pe,ae,b,x,T,E,I,w,b==="comma"&&F&&i(C)?null:k,A,O,_,N,$,D,F,z,ce))}}return H},g=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");b=m.format}var x=n.formatters[b],T=u.filter;(typeof m.filter=="function"||i(m.filter))&&(T=m.filter);var E;if(m.arrayFormat in o?E=m.arrayFormat:"indices"in m?E=m.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:v,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:b,formatter:x,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Zh=function(y,m){var v=y,b=g(m),x,T;typeof b.filter=="function"?(T=b.filter,v=T("",v)):i(b.filter)&&(T=b.filter,x=T);var E=[];if(typeof v!="object"||v===null)return"";var I=o[b.arrayFormat],w=I==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var k=e(),A=0;A<x.length;++A){var O=x[A],_=v[O];b.skipNulls&&_===null||a(E,p(_,O,I,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,k))}var N=E.join(b.delimiter),$=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},Zh}var Xh,JE;function YH(){if(JE)return Xh;JE=1;var e=XE(),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,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(g,y){return String.fromCharCode(parseInt(y,10))})},i=function(p,g,y){if(p&&typeof p=="string"&&g.comma&&p.indexOf(",")>-1)return p.split(",");if(g.throwOnLimitExceeded&&y>=g.arrayLimit)throw new RangeError("Array limit exceeded. Only "+g.arrayLimit+" element"+(g.arrayLimit===1?"":"s")+" allowed in an array.");return p},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(g,y){var m={__proto__:null},v=y.ignoreQueryPrefix?g.replace(/^\?/,""):g;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=y.parameterLimit===1/0?void 0:y.parameterLimit,x=v.split(y.delimiter,y.throwOnLimitExceeded?b+1:b);if(y.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var T=-1,E,I=y.charset;if(y.charsetSentinel)for(E=0;E<x.length;++E)x[E].indexOf("utf8=")===0&&(x[E]===a?I="utf-8":x[E]===s&&(I="iso-8859-1"),T=E,E=x.length);for(E=0;E<x.length;++E)if(E!==T){var w=x[E],k=w.indexOf("]="),A=k===-1?w.indexOf("="):k+1,O,_;if(A===-1?(O=y.decoder(w,r.decoder,I,"key"),_=y.strictNullHandling?null:""):(O=y.decoder(w.slice(0,A),r.decoder,I,"key"),O!==null&&(_=e.maybeMap(i(w.slice(A+1),y,n(m[O])?m[O].length:0),function($){return y.decoder($,r.decoder,I,"value")}))),_&&y.interpretNumericEntities&&I==="iso-8859-1"&&(_=o(String(_))),w.indexOf("[]=")>-1&&(_=n(_)?[_]:_),y.comma&&n(_)&&_.length>y.arrayLimit){if(y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");_=e.combine([],_,y.arrayLimit,y.plainObjects)}if(O!==null){var N=t.call(m,O);N&&(y.duplicates==="combine"||w.indexOf("[]=")>-1)?m[O]=e.combine(m[O],_,y.arrayLimit,y.plainObjects):(!N||y.duplicates==="last")&&(m[O]=_)}}return m},c=function(p,g,y,m){var v=0;if(p.length>0&&p[p.length-1]==="[]"){var b=p.slice(0,-1).join("");v=Array.isArray(g)&&g[b]?g[b].length:0}for(var x=m?g:i(g,y,v),T=p.length-1;T>=0;--T){var E,I=p[T];if(I==="[]"&&y.parseArrays)e.isOverflow(x)?E=x:E=y.allowEmptyArrays&&(x===""||y.strictNullHandling&&x===null)?[]:e.combine([],x,y.arrayLimit,y.plainObjects);else{E=y.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,k=y.decodeDotInKeys?w.replace(/%2E/g,"."):w,A=parseInt(k,10),O=!isNaN(A)&&I!==k&&String(A)===k&&A>=0&&y.parseArrays;if(!y.parseArrays&&k==="")E={0:x};else if(O&&A<y.arrayLimit)E=[],E[A]=x;else{if(O&&y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");O?(E[A]=x,e.markOverflow(E,A)):k!=="__proto__"&&(E[k]=x)}}x=E}return x},u=function(g,y){var m=y.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g;if(y.depth<=0)return!y.plainObjects&&t.call(Object.prototype,m)&&!y.allowPrototypes?void 0:[m];var v=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=v.exec(m),T=x?m.slice(0,x.index):m,E=[];if(T){if(!y.plainObjects&&t.call(Object.prototype,T)&&!y.allowPrototypes)return;E[E.length]=T}for(var I=0;(x=b.exec(m))!==null&&I<y.depth;){I+=1;var w=x[1].slice(1,-1);if(!y.plainObjects&&t.call(Object.prototype,w)&&!y.allowPrototypes)return;E[E.length]=x[1]}if(x){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");E[E.length]="["+m.slice(x.index)+"]"}return E},d=function(g,y,m,v){if(g){var b=u(g,m);if(b)return c(b,y,m,v)}},f=function(g){if(!g)return r;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.decodeDotInKeys<"u"&&typeof g.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(g.decoder!==null&&typeof g.decoder<"u"&&typeof g.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof g.throwOnLimitExceeded<"u"&&typeof g.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof g.charset>"u"?r.charset:g.charset,m=typeof g.duplicates>"u"?r.duplicates:g.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:r.allowDots:!!g.allowDots;return{allowDots:v,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof g.allowPrototypes=="boolean"?g.allowPrototypes:r.allowPrototypes,allowSparse:typeof g.allowSparse=="boolean"?g.allowSparse:r.allowSparse,arrayLimit:typeof g.arrayLimit=="number"?g.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:r.charsetSentinel,comma:typeof g.comma=="boolean"?g.comma:r.comma,decodeDotInKeys:typeof g.decodeDotInKeys=="boolean"?g.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof g.decoder=="function"?g.decoder:r.decoder,delimiter:typeof g.delimiter=="string"||e.isRegExp(g.delimiter)?g.delimiter:r.delimiter,depth:typeof g.depth=="number"||g.depth===!1?+g.depth:r.depth,duplicates:m,ignoreQueryPrefix:g.ignoreQueryPrefix===!0,interpretNumericEntities:typeof g.interpretNumericEntities=="boolean"?g.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof g.parameterLimit=="number"?g.parameterLimit:r.parameterLimit,parseArrays:g.parseArrays!==!1,plainObjects:typeof g.plainObjects=="boolean"?g.plainObjects:r.plainObjects,strictDepth:typeof g.strictDepth=="boolean"?!!g.strictDepth:r.strictDepth,strictMerge:typeof g.strictMerge=="boolean"?!!g.strictMerge:r.strictMerge,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof g.throwOnLimitExceeded=="boolean"?g.throwOnLimitExceeded:!1}};return Xh=function(p,g){var y=f(g);if(p===""||p===null||typeof p>"u")return y.plainObjects?{__proto__:null}:{};for(var m=typeof p=="string"?l(p,y):p,v=y.plainObjects?{__proto__:null}:{},b=Object.keys(m),x=0;x<b.length;++x){var T=b[x],E=d(T,m[T],y,typeof p=="string");v=e.merge(v,E,y)}return y.allowSparse===!0?v:e.compact(v)},Xh}var Qh,ek;function KH(){if(ek)return Qh;ek=1;var e=GH(),t=YH(),n=Yh();return Qh={formats:n,parse:t,stringify:e},Qh}var ZH=KH(),et;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},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 s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(et||(et={}));var tk;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(tk||(tk={}));const Ce=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kr=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ye=et.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 Sr 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 s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof Sr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.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()}}Sr.create=e=>new Sr(e);const Jh=(e,t)=>{let n;switch(e.code){case ye.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ye.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ye.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ye.invalid_union:n="Invalid input";break;case ye.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ye.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ye.invalid_arguments:n="Invalid function arguments";break;case ye.invalid_return_type:n="Invalid function return type";break;case ye.invalid_date:n="Invalid date";break;case ye.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}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ye.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 ye.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 ye.custom:n="Invalid input";break;case ye.invalid_intersection_types:n="Intersection results could not be merged";break;case ye.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ye.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let XH=Jh;function QH(){return XH}const JH=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function xe(e,t){const n=QH(),r=JH({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Jh?void 0:Jh].filter(o=>!!o)});e.common.issues.push(r)}class bn{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 Le;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,s=await o.value;r.push({key:i,value:s})}return bn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),aa=e=>({status:"dirty",value:e}),An=e=>({status:"valid",value:e}),nk=e=>e.status==="aborted",rk=e=>e.status==="dirty",Fi=e=>e.status==="valid",Ic=e=>typeof Promise<"u"&&e instanceof Promise;var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ie||(Ie={}));class Zr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ok=(e,t)=>{if(Fi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Sr(e.common.issues);return this._error=n,this._error}}};function Ge(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:(s,a)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}class Ze{get description(){return this._def.description}_getType(t){return Kr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new bn,ctx:{common:t.parent.common,data:t.data,parsedType:Kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ic(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return ok(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Fi(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Fi(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Ic(o)?o:Promise.resolve(o));return ok(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 s=t(o),a=()=>i.addIssue({code:ye.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!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 zi({schema:this,typeName:Ve.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 Qr.create(this,this._def)}nullable(){return ji.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cr.create(this)}promise(){return Dc.create(this,this._def)}or(t){return Pc.create([this,t],this._def)}and(t){return Oc.create(this,t,this._def)}transform(t){return new zi({...Ge(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new nm({...Ge(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new SW({typeName:Ve.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new rm({...Ge(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return om.create(this,t)}readonly(){return im.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const eW=/^c[^\s-]{8,}$/i,tW=/^[0-9a-z]+$/,nW=/^[0-9A-HJKMNP-TV-Z]{26}$/i,rW=/^[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,oW=/^[a-z0-9_-]{21}$/i,iW=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,sW=/^[-+]?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)?)??$/,aW=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lW="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let em;const cW=/^(?:(?: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])$/,uW=/^(?:(?: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])$/,dW=/^(([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]))$/,fW=/^(([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])$/,pW=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hW=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ik="((\\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])))",mW=new RegExp(`^${ik}$`);function sk(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 gW(e){return new RegExp(`^${sk(e)}$`)}function yW(e){let t=`${ik}T${sk(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 vW(e,t){return!!((t==="v4"||!t)&&cW.test(e)||(t==="v6"||!t)&&dW.test(e))}function bW(e,t){if(!iW.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function xW(e,t){return!!((t==="v4"||!t)&&uW.test(e)||(t==="v6"||!t)&&fW.test(e))}class No extends Ze{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:Ce.string,received:i.parsedType}),Le}const r=new bn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.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),xe(o,{code:ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?xe(o,{code:ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&xe(o,{code:ye.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")aW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")em||(em=new RegExp(lW,"u")),em.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")rW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")oW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")eW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")tW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")nW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:ye.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),xe(o,{validation:"regex",code:ye.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),xe(o,{code:ye.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),xe(o,{code:ye.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?yW(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?mW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?gW(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?sW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?vW(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?bW(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?xW(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?pW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?hW.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:ye.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ye.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new No({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ie.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ie.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ie.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ie.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new No({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new No({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new No({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}No.create=e=>new No({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ge(e)});function wW(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}class Li extends Ze{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)!==Ce.number){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:Ce.number,received:i.parsedType}),Le}let r;const o=new bn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.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),xe(r,{code:ye.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),xe(r,{code:ye.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?wW(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,o){return new Li({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new Li({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.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"&&et.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)}}Li.create=e=>new Li({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ge(e)});class la extends Ze{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)!==Ce.bigint)return this._getInvalidInput(t);let r;const o=new bn;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),xe(r,{code:ye.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),xe(r,{code:ye.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),xe(r,{code:ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:Ce.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,o){return new la({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new la({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.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}}la.create=e=>new la({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ge(e)});class ak extends Ze{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.boolean,received:r.parsedType}),Le}return An(t.data)}}ak.create=e=>new ak({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ge(e)});class Ac extends Ze{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:Ce.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_date}),Le}const r=new bn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.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),xe(o,{code:ye.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ac({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.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}}Ac.create=e=>new Ac({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ge(e)});class lk extends Ze{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.symbol,received:r.parsedType}),Le}return An(t.data)}}lk.create=e=>new lk({typeName:Ve.ZodSymbol,...Ge(e)});class ck extends Ze{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.undefined,received:r.parsedType}),Le}return An(t.data)}}ck.create=e=>new ck({typeName:Ve.ZodUndefined,...Ge(e)});class uk extends Ze{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.null,received:r.parsedType}),Le}return An(t.data)}}uk.create=e=>new uk({typeName:Ve.ZodNull,...Ge(e)});class dk extends Ze{constructor(){super(...arguments),this._any=!0}_parse(t){return An(t.data)}}dk.create=e=>new dk({typeName:Ve.ZodAny,...Ge(e)});class fk extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return An(t.data)}}fk.create=e=>new fk({typeName:Ve.ZodUnknown,...Ge(e)});class Xr extends Ze{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:Ce.never,received:n.parsedType}),Le}}Xr.create=e=>new Xr({typeName:Ve.ZodNever,...Ge(e)});class pk extends Ze{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.void,received:r.parsedType}),Le}return An(t.data)}}pk.create=e=>new pk({typeName:Ve.ZodVoid,...Ge(e)});class cr extends Ze{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ce.array)return xe(n,{code:ye.invalid_type,expected:Ce.array,received:n.parsedType}),Le;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(xe(n,{code:s?ye.too_big:ye.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?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&&(xe(n,{code:ye.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&&(xe(n,{code:ye.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((s,a)=>o.type._parseAsync(new Zr(n,s,n.path,a)))).then(s=>bn.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Zr(n,s,n.path,a)));return bn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cr({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new cr({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new cr({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}cr.create=(e,t)=>new cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ge(t)});function Vi(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Qr.create(Vi(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof cr?new cr({...e._def,type:Vi(e.element)}):e instanceof Qr?Qr.create(Vi(e.unwrap())):e instanceof ji?ji.create(Vi(e.unwrap())):e instanceof Mo?Mo.create(e.items.map(t=>Vi(t))):e}class Bt extends Ze{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=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ce.object){const c=this._getOrReturnCtx(t);return xe(c,{code:ye.invalid_type,expected:Ce.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Zr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Xr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(xe(o,{code:ye.unrecognized_keys,keys:a}),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 a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Zr(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,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>bn.mergeObjectSync(r,c)):bn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ie.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Vi(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Qr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return yk(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)});class Pc extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new Sr(a.ctx.common.issues));return xe(n,{code:ye.invalid_union,unionErrors:s}),Le}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];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&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new Sr(l));return xe(n,{code:ye.invalid_union,unionErrors:a}),Le}}get options(){return this._def.options}}Pc.create=(e,t)=>new Pc({options:e,typeName:Ve.ZodUnion,...Ge(t)});function tm(e,t){const n=Kr(e),r=Kr(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=tm(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=tm(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Oc extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(nk(i)||nk(s))return Le;const a=tm(i.value,s.value);return a.valid?((rk(i)||rk(s))&&n.dirty(),{status:n.value,value:a.data}):(xe(r,{code:ye.invalid_intersection_types}),Le)};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,s])=>o(i,s)):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}))}}Oc.create=(e,t,n)=>new Oc({left:e,right:t,typeName:Ve.ZodIntersection,...Ge(n)});class Mo extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return xe(r,{code:ye.invalid_type,expected:Ce.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return xe(r,{code:ye.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ye.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Zr(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>bn.mergeArray(n,s)):bn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Mo({...this._def,rest:t})}}Mo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Mo({items:e,typeName:Ve.ZodTuple,rest:null,...Ge(t)})};class hk extends Ze{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!==Ce.map)return xe(r,{code:ye.invalid_type,expected:Ce.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Zr(r,a,r.path,[c,"key"])),value:i._parse(new Zr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}hk.create=(e,t,n)=>new hk({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ge(n)});class ca extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return xe(r,{code:ye.invalid_type,expected:Ce.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(xe(r,{code:ye.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&&(xe(r,{code:ye.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Zr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new ca({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new ca({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ca.create=(e,t)=>new ca({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ge(t)});class mk extends Ze{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})}}mk.create=(e,t)=>new mk({getter:e,typeName:Ve.ZodLazy,...Ge(t)});class gk extends Ze{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:ye.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}gk.create=(e,t)=>new gk({value:e,typeName:Ve.ZodLiteral,...Ge(t)});function yk(e,t){return new $i({values:e,typeName:Ve.ZodEnum,...Ge(t)})}class $i extends Ze{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:et.joinValues(r),received:n.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:ye.invalid_enum_value,options:r}),Le}return An(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 $i.create(t,{...this._def,...n})}exclude(t,n=this._def){return $i.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}$i.create=yk;class vk extends Ze{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const o=et.objectValues(n);return xe(r,{expected:et.joinValues(o),received:r.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return xe(r,{received:r.data,code:ye.invalid_enum_value,options:o}),Le}return An(t.data)}get enum(){return this._def.values}}vk.create=(e,t)=>new vk({values:e,typeName:Ve.ZodNativeEnum,...Ge(t)});class Dc extends Ze{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return xe(n,{code:ye.invalid_type,expected:Ce.promise,received:n.parsedType}),Le;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return An(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Dc.create=(e,t)=>new Dc({type:e,typeName:Ve.ZodPromise,...Ge(t)});class zi extends Ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.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:s=>{xe(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?aa(l.value):l});{if(n.value==="aborted")return Le;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"||n.value==="dirty"?aa(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,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 a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Le:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Fi(s))return Le;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Fi(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):Le);et.assertNever(o)}}zi.create=(e,t,n)=>new zi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ge(n)}),zi.createWithPreprocess=(e,t,n)=>new zi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ge(n)});class Qr extends Ze{_parse(t){return this._getType(t)===Ce.undefined?An(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qr.create=(e,t)=>new Qr({innerType:e,typeName:Ve.ZodOptional,...Ge(t)});class ji extends Ze{_parse(t){return this._getType(t)===Ce.null?An(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ji.create=(e,t)=>new ji({innerType:e,typeName:Ve.ZodNullable,...Ge(t)});class nm extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}nm.create=(e,t)=>new nm({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class rm extends Ze{_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 Ic(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}rm.create=(e,t)=>new rm({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class bk extends Ze{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:Ce.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}bk.create=e=>new bk({typeName:Ve.ZodNaN,...Ge(e)});class SW extends Ze{_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 om extends Ze{_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"?Le:i.status==="dirty"?(n.dirty(),aa(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"?Le: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 om({in:t,out:n,typeName:Ve.ZodPipeline})}}class im extends Ze{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Fi(o)&&(o.value=Object.freeze(o.value)),o);return Ic(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}im.create=(e,t)=>new im({innerType:e,typeName:Ve.ZodReadonly,...Ge(t)});var Ve;(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"})(Ve||(Ve={})),Xr.create,cr.create,Pc.create,Oc.create,Mo.create,$i.create,Dc.create,Qr.create,ji.create;const TW=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},EW=(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 s=t[o+1];e[i]=isNaN(Number(s))?{}:[]}e=e[i]}}},xk=e=>e.replace(/\[(\d+)]/g,".$1").split("."),xn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):xk(t),o=structuredClone(e);return EW(o,r,n),o},kW=(e,t)=>e.localeCompare(t),Bi={},wk=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return Sk(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=wk(e._def.innerType);return t==="ZodArray"?n??[]:n}},Sk=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,wk(n)])),Tk=(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]=Tk(i,o):n[r]=o||i)}return n},CW={sort:kW,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},Ek=e=>{const t=new FormData(e),n=new URLSearchParams(t);return ZH.parse(n.toString(),CW)},Jr=(e,t)=>xk(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),eo=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),sm=e=>{const t=e.dataset.target;if(!t)return eo(e);const n=document.querySelector(`[data-origin="${t}"]`);return eo(n||e)},IW={state:{},loading:!1,useOnChange:!1},kk=e=>e.dataset.target||e.name,AW=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Gs.LocalStorage.get(t);return TW(n)?n:{}},clear:()=>{Gs.LocalStorage.delete(t)},set:n=>Gs.LocalStorage.set(t,n)}},PW=(e,t,n=IW)=>{const[r,o]=S.useState(null),i=S.useRef({}),[s,a]=S.useState(()=>Re.function(n?.state)?n.state():n?.state??Sk(e)??{}),l=S.useCallback(x=>{const T=x.target,E=x.currentTarget;if(T.dataset.optional==="true")return;const w=kk(T),k=sm(T)||(E?eo(E):""),A=Jr(w,e);if(T.setAttribute("data-initialized","true"),A){const O=A.safeParse(k),_=O.success?void 0:O.error.issues[0]?.message??"";o(N=>xn(N??{},w,_))}},[e]),c=S.useCallback(x=>T=>{const E=T.currentTarget,I=Object.values(i.current).reduce((k,A)=>{const O=A.element,_=A.schema.safeParse(eo(O));if(O.dataset.ignore==="ignore"||_.success)return k;const N=_.error.issues[0]?.message;O.setAttribute("data-initialized","true");const $=O.dataset.name||O.name||"";return xn(k,$,N)},{}),w=Re.empty(I)?null:I;o(w),console.error(w),x?.({form:E,errors:w||{}})},[]),u=(x,T=Bi)=>{const E=Jr(x,e),I=w=>{if(!dc(w))return;a(A=>xn(A,x,w.toISOString())),o(A=>xn(A,x,void 0));const k=i.current[x].element;if(k){const A=k.getAttribute("data-origin"),O=document.querySelector(`input[data-target="${A}"]`);O&&O.setCustomValidity("")}T?.onChange?.(w)};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,date:Re.string(s[x])?new Date(s[x]):s[x],required:T.required??!E.isOptional(),error:Hn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:E})}}},d=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChange:w=>{const k=w.target.value;a(A=>xn(A,x,k)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),value:Hn(s,x,void 0)??"",required:T.required??!E.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:E}:void 0}},f=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChange:w=>{const k=w.target.checked;a(A=>xn(A??{},x,k)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:E}):void 0}},p=(x,T=Bi)=>{const E=Jr(x,e),I=w=>{w.persist?.();const k=w.target.value;T?.onChange?.(w),a(A=>xn(A,x,k))};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),value:Hn(s,x,void 0)||T?.value||"",type:Re.instance(E,Li)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:E}}},g=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChangeOptions:w=>{a(k=>xn(k,x,w))},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),value:Hn(s,x,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:E})}},y=(x,T=Bi)=>{const E=Jr(x,e),I=E._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:k=>{k.persist?.();const A=I?k.target.valueAsNumber:k.target.value;T?.onChange?.(k),a(O=>xn(O,x,A))},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),type:I?"number":T?.type??"text",value:Hn(s,x,void 0)||T?.value||"",ref:k=>k===null?void 0:void(i.current[x]={element:k,schema:E})}};S.useEffect(()=>{const x=Object.values(i.current).map(E=>{const I=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(eo(I)),k=N=>{const $=kk(N.target);if(!$)return!1;const D=N.target,F=sm(N.target)||(N.relatedTarget?eo(N.relatedTarget):""),z=E.schema.safeParse(F);if(D.setAttribute("value",F),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(Re.null(M))return null;const C=xn(M,$,void 0);return Re.empty(M)||Re.nil(M)||Re.empty(C)?null:C}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(C=>{if(Re.null(C))return null;const V=xn(C,$,M||void 0);return Re.empty(V)?null:V})}return!1},A=new AbortController,O=I.getAttribute("data-trigger")||"blur";I.addEventListener(O,k,{signal:A.signal});const _=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:_,unsubscribe:()=>A.abort()}});return x.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>x.forEach(E=>E.unsubscribe())});const m=x=>T=>{T.preventDefault();const E=T.currentTarget;let I=Ek(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(_=>{if(_.tagName==="SELECT"){const N=_;I=xn(I,N.name,N.value)}if(_.tagName==="INPUT"){const N=_,$=sm(N)||(N?eo(N):"");I=xn(I,N.dataset.target||N.name,$)}});const k=Tk(I,s),A=e.safeParse(k),O=()=>{YE(E),n.interceptor?.clear()};if(A.success){const _=JSON.stringify(A.data);return E.setAttribute("data-json",_),n.interceptor?.clear(),x?.(T,{form:E,event:T,reset:O,setErrors:o,errors:[],success:!0,data:A.data,json:A.data})}return console.group("useForm error"),console.info(A),console.info(A.error.issues),console.error(A.error),console.groupEnd(),E.reportValidity(),x?.(T,{form:E,json:I,event:T,reset:O,setErrors:o,data:I,success:!1,errors:A.error.issues.map(_=>({message:_.message,path:_.path.map(N=>String(N))}))})},v=x=>yd(s,x)||"",b=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(s)},[s]),{get:v,input:y,state:s,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:p,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:g,disabled:r!==null}},OW=e=>e?JSON.parse(e.getAttribute("data-json")):{},DW=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},Ck={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},Ik={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem",dialog:"20rem","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"},Ak={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},NW={name:"dark",zIndex:Ak,rounded:Ck,spacing:Ik,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 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)","shadow-table":"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%)",disabled:"hsla(240, 4%, 33%)",muted:{DEFAULT:"hsla(210, 10%, 28%)",foreground:"hsla(210, 12%, 46%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},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(160,90%,5%)"},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(219, 15%, 12%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 17%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",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,40%,10%)"},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%)"}}}},MW={rounded:Ck,spacing:Ik,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 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:Ak,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:{DEFAULT:"hsla(210, 30%, 86%)",foreground:"hsla(210, 15%, 20%)",subtle:"hsla(210, 10%, 40%)",hover:"hsla(210, 10%, 40%)"},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(210, 20%, 98%)",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%)"}}}},_W=NW,FW=MW,LW=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...Ca,...e.tweaks},parser:e.parser||Ta.hsla,map:{...ka,...e.map}}),[e]);return h.jsx(oo.Provider,{value:t,children:h.jsx(zS,{children:e.children})})};re.Alert=Iz,re.AnimatedList=dz,re.AnimatedListItem=fz,re.Autocomplete=u3,re.Button=Jt,re.Calendar=mh,re.Card=ic,re.Checkbox=nh,re.ColType=Ii,re.Collapse=PS,re.CommandPalette=LH,re.ComponentsProvider=LW,re.Context=oo,re.DatePicker=_R,re.Description=ej,re.Dict=Bn,re.Dropdown=Ci,re.Empty=mS,re.Expand=oj,re.FileUpload=e3,re.Form=aI,re.Info=tj,re.Input=Jo,re.InputFeedback=Fv,re.InputField=as,re.Loading=rj,re.Menu=zz,re.MenuItem=$z,re.Modal=Ys,re.ModalConfirmProvider=zS,re.MultiSelect=y3,re.Notifications=CH,re.PageCalendar=qH,re.PageHeader=nj,re.PageTitle=jS,re.Paragraph=Jz,re.Polymorph=un,re.Progress=AR,re.Radiobox=jz,re.RenderOnView=S3,re.Select=po,re.Slider=VD,re.Spinner=BS,re.Stats=Az,re.StatsCard=cz,re.Step=bz,re.Steps=xz,re.Switch=$D,re.Tab=Ez,re.Table=lz,re.Tabs=Sz,re.Tag=zo,re.TaskList=Qz,re.Textarea=Bz,re.Timeline=PR,re.TimelineItem=pc,re.Toolbar=OR,re.Tooltip=bd,re.TransferList=x3,re.Wizard=cj,re.createColumns=D$,re.createCssProperties=KI,re.createDesignTokens=oy,re.createFormStorage=AW,re.createOptionCols=Yp,re.createStyles=UI,re.createTheme=YI,re.createTokenStyles=ZI,re.css=Pe,re.defaultDarkTheme=_W,re.defaultLightTheme=FW,re.defaultTranslations=ka,re.defaultTweaks=Ca,re.dispatchInput=Fg,re.formReset=YE,re.formToJson=Ek,re.formatDay=oa,re.formatEventTime=BE,re.formatFullDate=qE,re.formatHourLabel=qh,re.formatMonthShort=WE,re.formatMonthYear=Wh,re.formatTime=UE,re.formatWeekdayLong=RE,re.formatWeekdayShort=HE,re.getCoords=rI,re.getHourSlots=Hh,re.getJsonForm=OW,re.getModalScrollerRef=L$,re.getMonthDays=jE,re.getRemainingSize=Yi,re.getSchemaShape=Jr,re.getWeekDays=Rh,re.getWeekNumber=GE,re.groupEventsByDate=zE,re.hasVerticalScroll=Lg,re.initializeInputDataset=Gi,re.isChildVisible=Vg,re.isMobile=_v,re.isReactComponent=nI,re.isReactFC=Au,re.isSsr=Mr,re.mergeRefs=fr,re.negate=pO,re.noop=Qo,re.parsers=Ta,re.path=yd,re.reduceTokens=kr,re.safeRegex=vd,re.splitInto=Mv,re.toDateKey=Yr,re.useColorParser=xS,re.useConfirm=qz,re.useForm=PW,re.useLocale=Fr,re.useNotification=SH,re.usePrevious=DW,re.useReactive=TS,re.useStableRef=Lr,re.useStepContext=SS,re.useSwipe=cT,re.useTablePreferences=_$,re.useTranslations=Tt,re.uuid=Xo,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})}));
27
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:c})}},kH={inputStabilityCheck:"once",identityFunctionCheck:"once"},Ec=Symbol("NOT_FOUND");function IH(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function AH(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function PH(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var vE=e=>Array.isArray(e)?e:[e];function OH(e){const t=Array.isArray(e[0])?e[0]:e;return PH(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function bE(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var DH=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...kH,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:EH},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:CH}}};function NH(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Ec},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function MH(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return Ec}function o(a,l){r(a)===Ec&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var _H=(e,t)=>e===t;function FH(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function LH(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=_H,maxSize:o=1,resultEqualityCheck:i}=n,s=FH(r);let a=0;const l=o<=1?NH(s):MH(o,s);function c(){let u=l.get(arguments);if(u===Ec){if(u=e.apply(null,arguments),a++,i){const f=l.getEntries().find(h=>i(h.value,u));f&&(u=f.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var VH=class{constructor(e){this.value=e}deref(){return this.value}},$H=typeof WeakRef<"u"?WeakRef:VH,zH=0,xE=1;function Cc(){return{s:zH,v:void 0,o:null,p:null}}function wE(e,t={}){let n=Cc();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const h=arguments[d];if(typeof h=="function"||typeof h=="object"&&h!==null){let m=a.o;m===null&&(a.o=m=new WeakMap);const y=m.get(h);y===void 0?(a=Cc(),m.set(h,a)):a=y}else{let m=a.p;m===null&&(a.p=m=new Map);const y=m.get(h);y===void 0?(a=Cc(),m.set(h,a)):a=y}}const c=a;let u;if(a.s===xE)u=a.v;else if(u=e.apply(null,arguments),i++,r){const d=o?.deref?.()??o;d!=null&&r(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new $H(u):u}return c.s=xE,c.v=u,u}return s.clearCache=()=>{n=Cc(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function SE(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),IH(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=wE,argsMemoizeOptions:m=[],devModeChecks:y={}}=u,g=vE(f),v=vE(m),b=OH(o),x=d(function(){return i++,c.apply(null,arguments)},...g);let T=!0;const E=h(function(){s++;const w=bE(b,arguments);if(a=x.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:C,inputStabilityCheck:A}=DH(T,y);if(C.shouldRun&&C.run(c,w,a),A.shouldRun){const O=bE(b,arguments);A.run({inputSelectorResults:w,inputSelectorResultsCopy:O},{memoize:d,memoizeOptions:g},arguments)}T&&(T=!1)}return a},...v);return Object.assign(E,{resultFunc:c,memoizedResultFunc:x,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var jH=SE(wE),BH=Object.assign((e,t=jH)=>{AH(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>BH});const RH=SE({memoize:LH,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Rn=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Nn(1));let a;if(e&&t)a=(l,c,u,d)=>{const f=e(l,c,u,d);return t(f,c,u,d)};else if(e)a=e;else throw new Error("Missing arguments");return a},HH=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],o=e.length-1||1,i=r.length-o;if(i>3)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":Nn(2));return(a,l,c,u)=>{let d=a.__cacheKey__;d||(d={id:n},a.__cacheKey__=d,n+=1);let f=t.get(d);if(!f){let h=e;const m=[void 0,void 0,void 0];switch(i){case 0:break;case 1:{h=[...e.slice(0,-1),()=>m[0],r];break}case 2:{h=[...e.slice(0,-1),()=>m[0],()=>m[1],r];break}case 3:{h=[...e.slice(0,-1),()=>m[0],()=>m[1],()=>m[2],r];break}default:throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":Nn(2))}f=RH(...h),f.selectorArgs=m,t.set(d,f)}switch(f.selectorArgs[0]=l,f.selectorArgs[1]=c,f.selectorArgs[2]=u,i){case 0:return f(a);case 1:return f(a,l);case 2:return f(a,l,c);case 3:return f(a,l,c,u);default:throw new Error("unreachable")}}},WH=Ad(19)?UH:GH;function TE(e,t,n,r,o){return WH(e,t,n,r,o)}function qH(e,t,n,r,o){const i=P.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return bL.useSyncExternalStore(e.subscribe,i,i)}function UH(e,t,n,r,o){return qH(e,t,n,r,o)}function GH(e,t,n,r,o){return vL.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class YH{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return TE(this,t,n,r,o)}}class KH extends YH{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){P.useDebugValue(t),pt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;pt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){P.useDebugValue(t,s=>Object.keys(s));const o=P.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);pt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){P.useDebugValue(t);const r=n!==void 0;if(pt(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const i=o.get(t);i!==void 0&&i!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return P.useDebugValue(t),TE(this,this.selectors[t],n,r,o)}useContextCallback(t,n){P.useDebugValue(t);const r=ut(n??pn);this.context[t]=r}useStateSetter(t){const n=P.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const ta=0;class na{static create(){return new na}currentId=ta;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ta,n()},t)}isStarted(){return this.currentId!==ta}clear=()=>{this.currentId!==ta&&(clearTimeout(this.currentId),this.currentId=ta)};disposeEffect=()=>this.clear}function ZH(){const e=Xn(na.create).current;return ds(e.disposeEffect),e}let EE=0;function XH(e){return EE+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${EE}`}function jh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const kc=HH(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((o,i)=>{const s=o.transitionStatus==="ending";t.set(o.id,{value:o,domIndex:i,visibleIndex:s?-1:n,offsetY:r}),r+=o.height||0,s||(n+=1)}),t}),wr={toasts:Rn(e=>e.toasts),isEmpty:Rn(e=>e.toasts.length===0),toast:Rn(kc,(e,t)=>e.get(t)?.value),toastIndex:Rn(kc,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Rn(kc,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Rn(kc,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Rn(e=>e.hovering),focused:Rn(e=>e.focused),expanded:Rn(e=>e.hovering||e.focused),expandedOrOutOfFocus:Rn(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Rn(e=>e.prevFocusElement)};class QH extends KH{timers=new Map;areTimersPaused=!1;constructor(t){super(t,{},wr)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t){const n=wr.toastIndex(this.state,t);if(n===-1)return;this.state.toasts[n]?.onRemove?.();const o=[...this.state.toasts];o.splice(n,1),this.setToasts(o)}addToast=t=>{const{toasts:n,timeout:r,limit:o}=this.state,i=t.id||XH("toast"),s={...t,id:i,transitionStatus:"starting"},a=[s,...n],l=a.filter(u=>u.transitionStatus!=="ending");if(l.length>o){const u=l.length-o,d=l.slice(-u),f=new Set(d.map(h=>h.id));this.setToasts(a.map(h=>{const m=f.has(h.id);return h.limited!==m?{...h,limited:m}:h}))}else this.setToasts(a.map(u=>u.limited?{...u,limited:!1}:u));const c=s.timeout??r;return s.type!=="loading"&&c>0&&this.scheduleTimer(i,c,()=>this.closeToast(i)),wr.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,n)=>{this.updateToastInternal(t,n)};updateToastInternal=(t,n)=>{const{timeout:r,toasts:o}=this.state,i=wr.toast(this.state,t)??null;if(!i||i.transitionStatus==="ending")return;const s={...i,...n};this.setToasts(o.map(m=>m.id===t?{...m,...n}:m));const a=s.timeout??r,l=i?.timeout??r,c=Object.hasOwn(n,"timeout"),u=s.transitionStatus!=="ending"&&s.type!=="loading"&&a>0,d=this.timers.has(t),f=l!==a,h=i?.type==="loading";if(!u&&d){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t);return}if(u&&(!d||f||c||h)){const m=this.timers.get(t);m&&(m.timeout?.clear(),this.timers.delete(t)),this.scheduleTimer(t,a,()=>this.closeToast(t)),wr.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=t=>{wr.toast(this.state,t)?.onClose?.();const{limit:r,toasts:o}=this.state;let i=0;const s=o.map(l=>{if(l.id===t)return{...l,transitionStatus:"ending",height:0};if(l.transitionStatus==="ending")return l;const c=i>=r;return i+=1,l.limited!==c?{...l,limited:c}:l}),a=this.timers.get(t);a&&a.timeout&&(a.timeout.clear(),this.timers.delete(t)),this.handleFocusManagement(t),this.setToasts(s)};promiseToast=(t,n)=>{const r=jh(n.loading),o=this.addToast({...r,type:"loading"}),i=t.then(s=>{const a=jh(n.success,s);return this.updateToast(o,{...a,type:"success",timeout:a.timeout}),s}).catch(s=>{const a=jh(n.error,s);return this.updateToast(o,{...a,type:"error",timeout:a.timeout}),Promise.reject(s)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const n=Date.now()-t.start,r=t.delay-n;t.remaining=r>0?r:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,n)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=na.create(),t.timeout.start(t.remaining,()=>{this.timers.delete(n),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const n=_d(t);_r(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,n,r){const o=Date.now(),i=!wr.expandedOrOutOfFocus(this.state),s=i?na.create():void 0;s?.start(n,()=>{this.timers.delete(t),r()}),this.timers.set(t,{timeout:s,start:i?o:0,delay:n,remaining:n,callback:r})}setToasts(t){const n={toasts:t};t.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(t){const n=ho(an(this.state.viewport));if(!this.state.viewport||!_r(this.state.viewport,n)||!Fd(n))return;const r=wr.toasts(this.state),o=wr.toastIndex(this.state,t);let i=null,s=o+1;for(;s<r.length;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s+=1}if(!i)for(s=o-1;s>=0;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s-=1}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}}const CE=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,s=Xn(()=>new QH({timeout:r,limit:o,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return ds(s.disposeEffect),P.useEffect(function(){return i?i[" subscribe"](({action:c,options:u})=>{const d=u.id;c==="promise"&&u.promise?s.promiseToast(u.promise,u):c==="update"&&d?s.updateToast(d,u):c==="close"&&d?s.closeToast(d):s.addToast(u)}):void 0},[s,r,i]),s.useSyncedValues({timeout:r,limit:o}),p.jsx(Tc.Provider,{value:s,children:n})};process.env.NODE_ENV!=="production"&&(CE.displayName="ToastProvider");const _i=P.forwardRef(function(t,n){const[r,o]=P.useState();pt(()=>{YO&&o("button")},[]);const i={tabIndex:0,role:r};return p.jsx("span",{...t,ref:n,style:fl,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(_i.displayName="FocusGuard");let JH=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const kE=P.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,a=zh(),l=ZH(),c=P.useRef(!1),u=P.useRef(!1),d=a.useState("isEmpty"),f=a.useState("toasts"),h=a.useState("focused"),m=a.useState("expanded"),y=a.useState("prevFocusElement"),g=f[0]?.height??0,v=P.useMemo(()=>f.some(N=>N.transitionStatus==="ending"),[f]);P.useEffect(()=>{const N=a.state.viewport;if(!N)return;function $(F){d||F.key==="F6"&&F.target!==N&&(F.preventDefault(),a.setPrevFocusElement(ho(an(N))),N?.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const D=Wt(N);return D.addEventListener("keydown",$),()=>{D.removeEventListener("keydown",$)}},[a,d]),P.useEffect(()=>{const N=a.state.viewport;if(!N||d)return;const $=Wt(N);function D(z){z.target===$&&(a.setIsWindowFocused(!1),a.pauseTimers())}function F(z){if(z.relatedTarget||z.target===$)return;const M=_d(z),k=ho(an(N));(!_r(N,M)||!Fd(k))&&a.resumeTimers(),l.start(0,()=>a.setIsWindowFocused(!0))}return $.addEventListener("blur",D,!0),$.addEventListener("focus",F,!0),()=>{$.removeEventListener("blur",D,!0),$.removeEventListener("focus",F,!0)}},[a,l,d]),P.useEffect(()=>{const N=a.state.viewport;if(!N||d)return;const $=an(N);return $.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{$.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[d,a]);function b(N){const $=a.state.viewport;$&&(c.current=!0,N.relatedTarget===$?f[0]?.ref?.current?.focus():a.restoreFocusToPrevElement())}function x(N){N.key==="Tab"&&N.shiftKey&&N.target===a.state.viewport&&(N.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}P.useEffect(()=>{!a.state.isWindowFocused||v||!u.current||(a.resumeTimers(),a.setHovering(!1),u.current=!1)},[v,a]);function T(){a.pauseTimers(),a.setHovering(!0),u.current=!1}function E(){v?u.current=!0:(a.resumeTimers(),a.setHovering(!1))}function I(){if(c.current){c.current=!1;return}h||Fd(an(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function w(N){!h||_r(a.state.viewport,N.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const C={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:T,onMouseMove:T,onMouseLeave:E,onFocus:I,onBlur:w,onKeyDown:x,onClick:I},A={expanded:m},O=ln("div",t,{ref:[n,a.setViewport],state:A,props:[C,{style:{[JH.frontmostHeight]:g?`${g}px`:void 0}},s,{children:p.jsxs(P.Fragment,{children:[!d&&y&&p.jsx(_i,{onFocus:b}),i,!d&&y&&p.jsx(_i,{onFocus:b})]})}]}),_=P.useMemo(()=>f.filter(N=>N.priority==="high"),[f]);return p.jsxs(P.Fragment,{children:[!d&&y&&p.jsx(_i,{onFocus:b}),O,!h&&_.length>0&&p.jsx("div",{style:fl,children:_.map(N=>p.jsxs("div",{role:"alert","aria-atomic":!0,children:[p.jsx("div",{children:N.title}),p.jsx("div",{children:N.description})]},N.id))})]})});process.env.NODE_ENV!=="production"&&(kE.displayName="ToastViewport");function eW(e){return Ad(19)?e:e?"true":void 0}const Bh=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Bh.displayName="ToastRootContext");function Ic(){const e=P.useContext(Bh);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Nn(66));return e}let Rh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const tW={[Rh.startingStyle]:""},nW={[Rh.endingStyle]:""},rW={transitionStatus(e){return e==="starting"?tW:e==="ending"?nW:null}};function oW(e){return e==null?e:"current"in e?e.current:e}function iW(e,t=!1,n=!0){const r=db();return ut((o,i=null)=>{r.cancel();function s(){ur.flushSync(o)}const a=oW(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=Rh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;s()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function sW(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=ut(o),s=iW(r,n,!1);P.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}let Do=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const aW={...rW,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},ra=40,lW=10,Gr=.5,cW=1;function IE(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function uW(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const s=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){const a=s[1].split(", ").map(parseFloat);a.length===6?(r=a[4],o=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(r=a[12],o=a[13],i=a[0])}}return{x:r,y:o,scale:i}}const AE=P.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:s=["down","right"],...a}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(s)?s:[s]);const u=c.length>0,d=zh(),[f,h]=P.useState(void 0),[m,y]=P.useState(!1),[g,v]=P.useState(!1),[b,x]=P.useState(!1),[T,E]=P.useState({x:0,y:0}),[I,w]=P.useState({x:0,y:0,scale:1}),[C,A]=P.useState(),[O,_]=P.useState(),[N,$]=P.useState(null),D=P.useRef(null),F=P.useRef({x:0,y:0}),z=P.useRef({x:0,y:0,scale:1}),M=P.useRef(void 0),k=P.useRef(0),V=P.useRef(!1),L=P.useRef({x:0,y:0}),R=P.useRef(!1),U=d.useState("toastIndex",r.id),G=d.useState("toastVisibleIndex",r.id),H=d.useState("toastOffsetY",r.id),ee=d.useState("focused"),se=d.useState("expanded");sW({open:r.transitionStatus!=="ending",ref:D,onComplete(){r.transitionStatus==="ending"&&d.removeToast(r.id)}});const te=ut((ie=!1)=>{const le=D.current;if(!le)return;const be=le.style.height;le.style.height="auto";const de=le.offsetHeight;le.style.height=be;function re(){d.updateToastInternal(r.id,{ref:D,height:de,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}ie?ur.flushSync(re):re()});pt(te,[te]);function q(ie,le){let be=ie,de=le;return!c.includes("left")&&!c.includes("right")?be=ie>0?ie**Gr:-(Math.abs(ie)**Gr):(!c.includes("right")&&ie>0&&(be=ie**Gr),!c.includes("left")&&ie<0&&(be=-(Math.abs(ie)**Gr))),!c.includes("up")&&!c.includes("down")?de=le>0?le**Gr:-(Math.abs(le)**Gr):(!c.includes("down")&&le>0&&(de=le**Gr),!c.includes("up")&&le<0&&(de=-(Math.abs(le)**Gr))),{x:be,y:de}}function Y(ie){if(ie.button!==0)return;ie.pointerType==="touch"&&d.pauseTimers();const le=_d(ie.nativeEvent);if(!(le&&le.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(V.current=!1,M.current=void 0,k.current=0,F.current={x:ie.clientX,y:ie.clientY},L.current=F.current,D.current){const de=uW(D.current);z.current=de,w(de),E({x:de.x,y:de.y})}d.setHovering(!0),y(!0),v(!1),$(null),R.current=!0,D.current?.setPointerCapture(ie.pointerId)}}function Z(ie){if(!m)return;ie.preventDefault(),R.current&&(F.current={x:ie.clientX,y:ie.clientY},R.current=!1);const{clientY:le,clientX:be,movementX:de,movementY:re}=ie;(re<0&&le>L.current.y||re>0&&le<L.current.y)&&(L.current={x:L.current.x,y:le}),(de<0&&be>L.current.x||de>0&&be<L.current.x)&&(L.current={x:be,y:L.current.y});const J=be-F.current.x,j=le-F.current.y,X=le-L.current.y,me=be-L.current.x;if(!g&&Math.sqrt(J*J+j*j)>=cW&&(v(!0),N===null)){const _t=c.includes("left")||c.includes("right"),Qt=c.includes("up")||c.includes("down");if(_t&&Qt){const Be=Math.abs(J),W=Math.abs(j);$(Be>W?"horizontal":"vertical")}}let ve;if(!M.current)N==="vertical"?j>0?ve="down":j<0&&(ve="up"):N==="horizontal"?J>0?ve="right":J<0&&(ve="left"):Math.abs(J)>=Math.abs(j)?ve=J>0?"right":"left":ve=j>0?"down":"up",ve&&c.includes(ve)&&(M.current=ve,k.current=IE(ve,J,j),h(ve));else{const ct=M.current,_t=IE(ct,me,X);_t>ra?(V.current=!1,h(ct)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&k.current-_t>=lW&&(V.current=!0)}const Ce=q(J,j);let Me=z.current.x,_e=z.current.y;N==="horizontal"?(c.includes("left")||c.includes("right"))&&(Me+=Ce.x):(N==="vertical"||(c.includes("left")||c.includes("right"))&&(Me+=Ce.x),(c.includes("up")||c.includes("down"))&&(_e+=Ce.y)),E({x:Me,y:_e})}function pe(ie){if(!m)return;if(y(!1),v(!1),$(null),D.current?.releasePointerCapture(ie.pointerId),V.current){E({x:I.x,y:I.y}),h(void 0);return}let le=!1;const be=T.x-I.x,de=T.y-I.y;let re;for(const J of c){switch(J){case"right":be>ra&&(le=!0,re="right");break;case"left":be<-ra&&(le=!0,re="left");break;case"down":de>ra&&(le=!0,re="down");break;case"up":de<-ra&&(le=!0,re="up");break}if(le)break}le?(h(re),x(!0),d.closeToast(r.id)):(E({x:I.x,y:I.y}),h(void 0))}function B(ie){if(ie.key==="Escape"){if(!D.current||!_r(D.current,ho(an(D.current))))return;d.closeToast(r.id)}}P.useEffect(()=>{if(!u)return;const ie=D.current;if(!ie)return;function le(be){_r(ie,be.target)&&be.preventDefault()}return ie.addEventListener("touchmove",le,{passive:!1}),()=>{ie.removeEventListener("touchmove",le)}},[u]);function ae(){if(!m&&T.x===I.x&&T.y===I.y&&!b)return{[Do.swipeMovementX]:"0px",[Do.swipeMovementY]:"0px"};const ie=T.x-I.x,le=T.y-I.y;return{transition:m?"none":void 0,transform:m?`translateX(${T.x}px) translateY(${T.y}px) scale(${I.scale})`:void 0,[Do.swipeMovementX]:`${ie}px`,[Do.swipeMovementY]:`${le}px`}}const ce=r.priority==="high",Q={role:ce?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":C,"aria-describedby":O,"aria-hidden":ce&&!ee?!0:void 0,onPointerDown:u?Y:void 0,onPointerMove:u?Z:void 0,onPointerUp:u?pe:void 0,onKeyDown:B,inert:eW(r.limited),style:{...ae(),[Do.index]:r.transitionStatus==="ending"?U:G,[Do.offsetY]:`${H}px`,[Do.height]:r.height?`${r.height}px`:void 0}},ue=P.useMemo(()=>({rootRef:D,toast:r,titleId:C,setTitleId:A,descriptionId:O,setDescriptionId:_,swiping:m,swipeDirection:f,recalculateHeight:te,index:U,visibleIndex:G,expanded:se}),[r,C,O,m,f,te,U,G,se]),oe={transitionStatus:r.transitionStatus,expanded:se,limited:r.limited||!1,type:r.type,swiping:ue.swiping,swipeDirection:ue.swipeDirection},he=ln("div",t,{ref:[n,ue.rootRef],state:oe,stateAttributesMapping:aW,props:[Q,a]});return p.jsx(Bh.Provider,{value:ue,children:he})});process.env.NODE_ENV!=="production"&&(AE.displayName="ToastRoot");const PE=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:s,expanded:a,recalculateHeight:l}=Ic(),c=P.useRef(null);pt(()=>{const h=c.current;if(!h||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const m=new ResizeObserver(()=>l(!0)),y=new MutationObserver(()=>l(!0));return m.observe(h),y.observe(h,{childList:!0,subtree:!0,characterData:!0}),()=>{m.disconnect(),y.disconnect()}},[l]);const u=s>0;return ln("div",t,{ref:[n,c],state:{expanded:a,behind:u},props:i})});process.env.NODE_ENV!=="production"&&(PE.displayName="ToastContent");const OE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setDescriptionId:c}=Ic(),u=s??l.description,d=!!u,f=il(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const h={type:l.type},m=ln("p",t,{ref:n,state:h,props:{...a,id:f,children:u}});return d?m:null});process.env.NODE_ENV!=="production"&&(OE.displayName="ToastDescription");const DE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setTitleId:c}=Ic(),u=s??l.title,d=!!u,f=il(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const h={type:l.type},m=ln("h2",t,{ref:n,state:h,props:{...a,id:f,children:u}});return d?m:null});process.env.NODE_ENV!=="production"&&(DE.displayName="ToastTitle");let Hh;process.env.NODE_ENV!=="production"&&(Hh=new Set);function NE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Hh.has(t)||(Hh.add(t),console.error(`Base UI: ${t}`))}}const ME=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(ME.displayName="CompositeRootContext");function dW(e=!1){const t=P.useContext(ME);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Nn(16));return t}function fW(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:P.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[r,n,t,s,a,i,o])}}function pW(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=P.useRef(null),s=dW(!0)!==void 0,a=ut(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=fW({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&P.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";if(o){if(!f){const h=kd.captureOwnerStack?.()||"";NE(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${h}`)}}else if(f){const h=kd.captureOwnerStack?.()||"";NE(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${h}`)}},[o]);const c=P.useCallback(()=>{const f=i.current;hW(f)&&s&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,s]);pt(c,[c]);const u=P.useCallback((f={})=>{const{onClick:h,onMouseDown:m,onKeyUp:y,onKeyDown:g,onPointerDown:v,...b}=f;return Od({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}h?.(T)},onMouseDown(T){t||m?.(T)},onKeyDown(T){if(t||(Nd(T),g?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!o&&!a()&&!t,I=T.key==="Enter",w=T.key===" ";E&&((w||I)&&T.preventDefault(),I&&h?.(T))},onKeyUp(T){t||(Nd(T),y?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!o&&!t&&T.key===" "&&h?.(T)},onPointerDown(T){if(t){T.preventDefault();return}v?.(T)}},o?void 0:{role:"button"},l,b)},[t,l,o,a]),d=ut(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function hW(e){return Pt(e)&&e.tagName==="BUTTON"}const _E=P.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:s=!0,...a}=t,l=zh(),{toast:c}=Ic(),u=l.useState("expanded"),[d,f]=P.useState(!1),{getButtonProps:h,buttonRef:m}=pW({disabled:i,native:s}),y={type:c.type};return ln("button",t,{ref:[n,m],state:y,props:[{"aria-hidden":!u&&!d,onClick(){l.closeToast(c.id)},onFocus(){f(!0)},onBlur(){f(!1)}},a,h]})});process.env.NODE_ENV!=="production"&&(_E.displayName="ToastClose");function mW(e){return`data-base-ui-${e}`}const Wh=P.createContext(null);process.env.NODE_ENV!=="production"&&(Wh.displayName="PortalContext");const gW=()=>P.useContext(Wh),yW=mW("portal");function FE(e={}){const{ref:t,container:n,componentProps:r=Dn,elementProps:o}=e,i=il(),a=gW()?.portalNode,[l,c]=P.useState(null),[u,d]=P.useState(null),f=ut(g=>{g!==null&&d(g)}),h=P.useRef(null);pt(()=>{if(n===null){h.current&&(h.current=null,d(null),c(null));return}if(i==null)return;const g=(n&&(Oa(n)?n:n.current))??a??document.body;if(g==null){h.current&&(h.current=null,d(null),c(null));return}h.current!==g&&(h.current=g,d(null),c(g))},[n,a,i]);const m=ln("div",r,{ref:[t,f],props:[{id:i,[yW]:""},o]});return{portalNode:u,portalSubtree:l&&m?ur.createPortal(m,l):null}}const vW=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:u}=FE({container:o,ref:n,componentProps:t,elementProps:l}),d=P.useRef(null),f=P.useRef(null),h=P.useRef(null),m=P.useRef(null),[y,g]=P.useState(null),v=y?.modal,b=y?.open,x=typeof a=="boolean"?a:!!y&&!y.modal&&y.open&&!!c;P.useEffect(()=>{if(!c||v)return;function E(I){c&&I.relatedTarget&&Ld(I)&&(I.type==="focusin"?Qv:tD)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,v]),P.useEffect(()=>{!c||b||Qv(c)},[b,c]);const T=P.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:m,portalNode:c,setFocusManagerState:g}),[c]);return p.jsxs(P.Fragment,{children:[u,p.jsxs(Wh.Provider,{value:T,children:[x&&c&&p.jsx(_i,{"data-type":"outside",ref:d,onFocus:E=>{if(Ld(E,c))h.current?.focus();else{const I=y?y.domReference:null;eD(I)?.focus()}}}),x&&c&&p.jsx("span",{"aria-owns":c.id,style:SO}),c&&ur.createPortal(r,c),x&&c&&p.jsx(_i,{"data-type":"outside",ref:f,onFocus:E=>{if(Ld(E,c))m.current?.focus();else{const I=y?y.domReference:null;JO(I)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,ei(CO,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(vW.displayName="FloatingPortal");const LE=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,...a}=t,{portalNode:l,portalSubtree:c}=FE({container:o,ref:n,componentProps:t,elementProps:a});return!c&&!l?null:p.jsxs(P.Fragment,{children:[c,l&&ur.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(LE.displayName="FloatingPortalLite");const bW=LE;function VE(){const e=P.useContext(Tc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Nn(73));const t=e.useState("toasts");return P.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const xW=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},wW=_o("relative isolate z-tooltip flex w-full flex-col overflow-hidden rounded-xl border bg-card-background backdrop-blur-md text-sm shadow-notification transition-all duration-300",{variants:{theme:{default:"border-card-border text-foreground shadow-black/5",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),SW={default:Er,info:Er,warn:Bu,muted:Er,danger:Bu,success:Vu,secondary:Er},$E=S.createContext(()=>{throw new Error("Not implemented")}),TW=()=>S.useContext($E);function EW(e){const t=e.toast.data?.closable??!0,n=e.toast.data?.loading??!1,r=e.toast.data?.theme||"default",o=wW({theme:r}),i=n?RI:SW[r]||Er;return p.jsx(AE,{toast:e.toast,swipeDirection:"right",children:p.jsx(He.li,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9,y:-20,transition:{duration:.2}},transition:{type:"spring",damping:25,stiffness:300},className:"pointer-events-auto w-full list-none",children:p.jsx(PE,{className:Pe(o,"shadow-lg"),children:p.jsxs("div",{className:"flex items-start gap-3 p-4",children:[p.jsx("div",{className:Pe("mt-0.5 shrink-0 opacity-80",n&&"animate-spin"),children:p.jsx(i,{className:"size-4"})}),p.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-hidden",children:[e.toast.title?p.jsx(DE,{className:"select-text truncate font-semibold leading-tight tracking-tight"}):null,p.jsx(OE,{className:"line-clamp-2 select-text text-xs font-medium leading-relaxed opacity-90"})]}),t&&!n?p.jsx(_E,{className:"-mr-1 -mt-1 shrink-0 rounded-lg p-1.5 text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground",children:p.jsx(jo,{className:"size-3.5"})}):null]})})})})}function CW({max:e=5}){const t=S.useRef(null),n=xW(t),r=VE(),o=e?r.toasts.slice(0,e):r.toasts,i=n?o:o.slice(0,3),s=o.length-i.length;return p.jsxs(kE,{ref:t,className:"pointer-events-none fixed left-1/2 top-6 z-[100] flex w-full max-w-[380px] -translate-x-1/2 flex-col gap-3 overflow-visible outline-none",children:[p.jsx(gn,{mode:"popLayout",initial:!1,children:i.map(a=>p.jsx(EW,{toast:a},a.id))}),!n&&s>0&&p.jsxs(He.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"pointer-events-auto cursor-default self-center rounded-full border border-card-border bg-card-background/80 px-3 py-1 text-[10px] font-bold uppercase tracking-wider text-foreground/50 shadow-sm backdrop-blur transition-all hover:bg-card-background hover:text-foreground/80",children:["+",s," more"]})]})}function kW({children:e,max:t=5}){const n=VE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,s)=>{const a={theme:s?.theme,closable:s?.closable,loading:s?.loading};if(s?.id&&n.toasts.find(u=>u.id===s.id))return n.update(s.id,{description:i,title:s.title,timeout:s.timeout,data:a}),{close:()=>n.close(s.id),clear:r};const l=n.add({description:i,id:s?.id,title:s?.title,timeout:s?.timeout,data:a});return{close:()=>n.close(l),clear:r}},[n,r]);return p.jsxs($E.Provider,{value:o,children:[e,p.jsx(bW,{children:p.jsx(CW,{max:t})})]})}function IW({children:e,max:t=5,timeout:n=5e3}){return p.jsx(CE,{limit:t,timeout:n,children:p.jsx(kW,{max:t,children:e})})}const AW=/Mac|iPod|iPhone|iPad/,Ac=()=>AW.test(navigator.userAgent),PW=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Ac()?"Meta":"Control":n==="Hyper"?Ac()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),zE=e=>e.map(t=>t.trim()).join("+");class OW{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=zE(PW(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 a=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?a.toUpperCase():a.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const s=zE(Array.from(i));this.combinations.forEach(a=>{if(a.key===s)return r.preventDefault(),void a.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const DW=e=>(e=e.trim(),e==="Alt"?Ac()?p.jsx(HI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?Ac()?p.jsx(LI,{"aria-label":"Command",size:12}):"Ctrl":e),NW=e=>{const t=e.value.trim().split("+");return p.jsx("span",{className:"flex items-center gap-1 text-sm",children:t.map((n,r)=>{const o=t.length-1===r;return p.jsxs(S.Fragment,{children:[p.jsx("kbd",{"aria-label":n,children:DW(n)}),o?null:p.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},MW=e=>p.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Du(e.item.title)?p.jsx(e.item.title,{text:e.text}):e.item.title}),_W=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?p.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:p.jsx(MW,{text:e.text,item:o})}):o.type!=="shortcut"?p.jsx(S.Fragment,{}):p.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[p.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,p.jsx("span",{children:Du(o.title)?p.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?p.jsx(NW,{value:o.shortcut}):null]})}),FW=(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(a=>({...a,title:Re.function(a.title)?a.title({text:t}):a.title})),o=r.reduce((a,l)=>{const c=Re.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&a.push({...l,enabled:c}),a},[]),i=$h(o,"title",n),s=r.filter(a=>Re.function(a.enabled)?a.enabled({text:t}):!1);return Bn.unique(i.concat(s),a=>a.title)},LW=[0,0,0,0,0],jE=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=jE(n.items);if(r)return r}return null},BE=e=>{const t=S.useId(),n=S.useRef(null),[r,o]=S.useState(""),i=S.useRef([]),s=vt(),a=Lr(r),[l,c]=S.useState(null),u=e.bind??"Mod + k",d=Kn({open:e.open,strategy:"absolute",whileElementsMounted:lo,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(T=>T.type==="group"?[T,...T.items]:[T]),h=FW(f,r),m=r===""?f:[{type:"group",title:"Results",items:[]},...h.filter(T=>T.type!=="group")],y=ol(d.context,{listRef:i,loop:!0,activeIndex:l,virtual:!0,allowEscape:!1,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:l,disabledIndices:T=>{const E=m[T];return E?E.type==="group":!1},onNavigate:T=>{Re.number(T)&&(zg(n.current,i.current[T])||i.current[T]?.scrollIntoView({block:"start",inline:"start"})),c(E=>Re.number(T)?T:e.open?E??0:null)}}),{getItemProps:g,getReferenceProps:v,getFloatingProps:b}=Zn([y]);S.useEffect(()=>{const T=new OW;return T.add(u,()=>e.onChangeVisibility?.(!0)),f.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&T.add(E.shortcut,I=>E.action({event:I,setText:o,text:a.current,setOpen:e.onChangeVisibility}))}),T.register()},[u,f,e,a]);const x=e.Icon??$u;return p.jsx(S.Fragment,{children:p.jsxs(Ys,{...b(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative overflow-clip py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[p.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center overflow-clip border-b border-floating-border bg-floating-background",children:[p.jsx("div",{className:"flex size-10 items-center justify-center",children:e.Icon?p.jsx(x,{Default:$u,text:r,size:16}):p.jsx($u,{size:16})}),p.jsx("input",{...v({ref:d.refs.setReference,onKeyDown:T=>{const E=Re.number(l)?m[l]:null;if(T.key==="Enter")if(E)E.type==="shortcut"&&E.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o});else{const w=jE(h);w?.type==="shortcut"&&w.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o})}}}),autoFocus:!0,value:r,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:T=>o(T.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none"})]}),e.loading?p.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:[p.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:s.commandPaletteLoading}),LW.map((T,E)=>p.jsx("li",{className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Yp},`${t}-${E}-skeleton-index`))]}):p.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[p.jsxs("ul",{role:"listbox",ref:n,"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:[m.map((T,E)=>S.createElement(_W,{...g({onMouseEnter:()=>c(E),ref(I){i.current[E]=I},onClick(I){I.preventDefault(),e.onChangeVisibility(!1),T.type==="shortcut"&&T.action({event:I,text:r,setOpen:e.onChangeVisibility,setText:o})}}),item:T,text:r,active:l===E,key:`${t}-${T.type}-${E}`})),m.length===1?p.jsx("div",{className:Pe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:s.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Re.number(l)?p.jsx(e.Preview,{command:m[l],text:r}):null]}),e.footer?p.jsx("footer",{className:"flex h-8 items-center rounded-b-lg border-t border-floating-border p-2",children:e.footer}):null]})})};function Yr(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function RE(e){const t=new Map;for(const n of e){const r=Yr(n.date),o=t.get(r);o?o.push(n):t.set(r,[n])}return t}function HE(e){const t=lh(e),n=In(t,{weekStartsOn:1}),r=[];for(let o=0;o<42;o++)r.push(qr(n,o));return r}function qh(e){const t=In(e,{weekStartsOn:1}),n=[];for(let r=0;r<7;r++)n.push(qr(t,r));return n}function Uh(){return Array.from({length:24},(e,t)=>t)}function Pc(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(e))}function oa(e,t){return new Intl.DateTimeFormat(t,{day:"numeric"}).format(e)}function VW(e,t){return new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)}function WE(e,t){return new Intl.DateTimeFormat(t,{weekday:"long"}).format(e)}function qE(e,t){return new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)}function Gh(e,t){return new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}).format(e)}function UE(e,t){return new Intl.DateTimeFormat(t,{month:"short"}).format(e)}function ia(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(0,0,0,e))}function sa(e,t){return new Intl.DateTimeFormat(t,{weekday:"long",month:"short",day:"numeric",year:"numeric"}).format(e)}function GE(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(e)}function YE(e){return uh(e)}function $W({currentDate:e,currentView:t,filters:n,filterArea:r,setCurrentDate:o,setCurrentView:i,onToggleFilter:s,onAddEvent:a}){const l=Fr(),c=vt(),u=Xs(e),d=S.useMemo(()=>[{value:"month",label:c.pageCalendarMonthView},{value:"week",label:c.pageCalendarWeekView},{value:"day",label:c.pageCalendarDayView}],[c]),f=()=>{o(y=>t==="month"?uT(y,1):t==="week"?yB(y):cT(y,1))},h=()=>{o(y=>t==="month"?ah(y,1):t==="week"?GS(y,1):qr(y,1))},m=YE(e);return p.jsxs("header",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex items-center justify-between gap-4",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{"aria-hidden":"true",className:`flex size-12 flex-col items-center justify-center overflow-hidden rounded-lg text-xs ${u?"bg-primary text-primary-foreground":"bg-card text-foreground"}`,children:[p.jsx("span",{className:"font-light uppercase leading-none",children:UE(e,l)}),p.jsx("span",{className:"text-xl font-medium leading-none",children:oa(e,l)})]}),p.jsxs("div",{children:[p.jsx("h1",{"aria-live":"polite","aria-atomic":"true",className:"text-xl font-bold leading-tight",children:Gh(e,l)}),p.jsx("span",{className:"text-xs text-muted-foreground",children:c.pageCalendarWeekLabel(m)})]})]}),p.jsxs("nav",{"aria-label":c.pageCalendarNavigation,className:"flex items-center gap-2",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(Jt,{size:"small",title:c.pageCalendarPrevious,"aria-label":c.pageCalendarPrevious,theme:"ghost-muted",onClick:f,children:p.jsx(ny,{size:16})}),p.jsx("button",{type:"button","aria-label":c.pageCalendarToday,onClick:()=>o(new Date),className:"rounded-md px-3 py-1.5 text-sm transition-colors hover:bg-muted/50",children:c.pageCalendarToday}),p.jsx(Jt,{size:"small",title:c.pageCalendarNext,"aria-label":c.pageCalendarNext,theme:"ghost-muted",onClick:h,children:p.jsx(Ta,{size:16})})]}),p.jsx("div",{className:"flex rounded-md",children:d.map(y=>p.jsx(Jt,{size:"small",onClick:()=>i(y.value),theme:t===y.value?"primary":"muted","aria-pressed":t===y.value,className:"rounded-none first:rounded-l-button last:rounded-r-button",children:y.label},y.value))}),a&&p.jsxs(Jt,{theme:"primary",size:"small",onClick:a,children:[p.jsx(_I,{size:14}),c.pageCalendarAddEvent]})]})]}),r??(n.length>0&&p.jsxs("div",{role:"group","aria-label":c.pageCalendarFilter,className:"flex flex-wrap items-center gap-1.5",children:[p.jsx(ty,{size:14,className:"text-muted-foreground","aria-hidden":"true"}),p.jsx("span",{className:"mr-1 text-xs text-muted-foreground",children:c.pageCalendarFilter}),n.map(y=>p.jsx(zo,{as:"button",size:"small",type:"button",theme:y.theme,indicator:y.enabled?y.theme:void 0,"aria-pressed":y.enabled,"aria-label":`${y.label}, ${y.enabled?c.pageCalendarFilterEnabled:c.pageCalendarFilterDisabled}`,onClick:()=>s(y.id),children:y.label},y.id))]}))]})}function Yh({event:e,onClick:t,compact:n=!1}){const r=vt(),o={style:{border:"0",padding:"0 0.5rem",height:"1.25rem",borderRadius:"0.25rem"},className:Pe("w-full border-0 justify-start rounded text-xs truncate text-ellipsis overflow-hidden border leading-tight",e.className)};return n?p.jsx(Jt,{...o,size:"small",onClick:t,title:e.title,"aria-label":r.pageCalendarEventAt(e.title,Pc(e.date)),theme:e.className?"raw":"primary",children:e.title}):p.jsxs(Jt,{...o,size:"small",onClick:t,title:e.title,"aria-label":r.pageCalendarEventAt(e.title,Pc(e.date)),theme:e.className?"raw":"primary",children:[p.jsx("div",{className:"truncate font-medium",children:e.title}),p.jsx("div",{className:"text-xs opacity-60",children:Pc(e.date)})]})}function zW({days:e,eventsByDate:t,currentDate:n,onEventClick:r,onDayClick:o}){const i=Fr(),s=vt(),a=S.useMemo(()=>qh(new Date),[]);return p.jsxs("div",{className:"flex h-full flex-1 flex-col",children:[p.jsx("ul",{role:"row","aria-hidden":"true",className:"grid grid-cols-7 border-b border-border",children:a.map(l=>{const c=VW(l,i);return p.jsx("li",{className:"py-2 text-center text-xs font-medium text-muted-foreground",children:c},c)})}),p.jsx("div",{role:"grid","aria-label":s.pageCalendarMonthGrid,className:"grid flex-1 auto-rows-fr grid-cols-7",children:e.map((l,c)=>{const u=Yr(l),d=t.get(u)||[],f=lT(l,n),h=Xs(l),m=d.slice(0,2),y=d.length-2;return p.jsxs("button",{type:"button",onClick:()=>o(l),"aria-label":`${sa(l,i)}${d.length>0?`, ${s.pageCalendarEventCount(d.length)}`:""}`,className:`group flex min-h-32 cursor-pointer flex-col gap-1 border-b border-r border-border p-2 transition-colors hover:bg-muted hover:bg-opacity-20 ${f?"":"opacity-50"}`,children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:`flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium ${h?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(l,i)}),p.jsx("span",{"aria-hidden":"true",className:"text-lg leading-none text-muted-foreground opacity-0 transition-opacity group-hover:opacity-40",children:"+"})]}),p.jsxs("div",{className:"flex flex-col gap-0.5",children:[m.map(g=>p.jsx("div",{onClick:v=>v.stopPropagation(),children:p.jsx(Yh,{compact:!0,event:g,onClick:()=>r(g)})},g.id)),y>0&&p.jsx("span",{className:"pl-1 text-xs text-muted-foreground",children:s.pageCalendarMoreEvents(y)})]})]},c)})})]})}const aa=48;function jW(e){const t=e.date.getHours(),n=e.date.getMinutes();return t*aa+n/60*aa}function BW({days:e,eventsByDate:t,onEventClick:n,onSlotClick:r}){const o=Fr(),i=S.useRef(null),s=S.useRef(null),a=Uh();return S.useEffect(()=>{if(s.current&&i.current){const l=i.current.offsetTop;s.current.scrollTop=l-s.current.clientHeight/2}},[]),p.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[p.jsxs("div",{className:"flex flex-shrink-0 border-b border-border",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0"}),e.map((l,c)=>{const u=Xs(l);return p.jsxs("div",{"aria-label":sa(l,o),className:"flex-1 py-2 text-center text-xs font-medium text-muted-foreground",children:[p.jsx("span",{className:"block",children:qE(l,o)}),p.jsx("span",{className:`inline-flex h-6 w-6 items-center justify-center rounded-full text-sm font-bold ${u?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(l,o)})]},c)})]}),p.jsxs("div",{ref:s,className:"flex flex-1 items-start overflow-y-auto",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0",children:a.map(l=>p.jsxs("div",{className:"relative",style:{height:aa},children:[p.jsx("span",{className:"absolute -top-2.5 right-2 text-[10px] text-muted-foreground",children:l===0?"":ia(l,o)}),l===new Date().getHours()&&p.jsx("div",{ref:i})]},l))}),e.map((l,c)=>{const u=Yr(l),d=t.get(u)||[];return p.jsxs("div",{className:"relative flex-1 border-l border-card-border",children:[a.map(f=>{const h=new Date(l);return h.setHours(f,0,0,0),p.jsx("div",{role:"button",tabIndex:0,"aria-label":ia(f,o),className:"cursor-pointer border-b border-border/50 hover:bg-muted/20",style:{height:aa},onClick:()=>r?.(h),onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),r?.(h))}},f)}),d.map(f=>p.jsx("div",{className:"absolute left-0.5 right-0.5",style:{top:jW(f),height:aa},onClick:h=>h.stopPropagation(),children:p.jsx(Yh,{event:f,onClick:()=>n(f)})},f.id))]},c)})]})]})}const la=48;function RW(e){const t=e.date.getHours(),n=e.date.getMinutes();return t*la+n/60*la}function HW({currentDate:e,onSlotClick:t,renderEvent:n,eventsByDate:r,onDateChange:o,onEventClick:i}){const s=Fr(),a=S.useRef(null),l=S.useRef(null),c=Uh(),[u,d]=S.useState(null);S.useEffect(()=>{if(l.current&&a.current){const g=a.current.offsetTop;l.current.scrollTop=g-l.current.clientHeight/2}},[]);const f=Yr(e),h=r.get(f)||[],m=({date:g})=>{const v=Yr(g),b=(r.get(v)||[]).length>0,x=Yr(g)===Yr(e);return!b||x?null:p.jsx("span",{className:"absolute bottom-0.5 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full bg-primary"})},y=g=>{d(g),i(g)};return p.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[p.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[p.jsxs("div",{"aria-label":sa(e,s),className:"flex flex-shrink-0 items-center gap-3 border-b border-border px-4 py-2",children:[p.jsx("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-full font-bold ${Xs(e)?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(e,s)}),p.jsxs("div",{children:[p.jsx("div",{className:"font-semibold",children:WE(e,s)}),p.jsx("div",{className:"text-xs text-muted-foreground",children:Gh(e,s)})]})]}),p.jsxs("div",{ref:l,className:"flex flex-1 items-start overflow-y-auto",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0",children:c.map(g=>p.jsxs("div",{className:"relative",style:{height:la},children:[p.jsx("span",{className:"absolute -top-2.5 right-2 text-[10px] text-muted-foreground",children:g===0?"":ia(g,s)}),g===new Date().getHours()&&p.jsx("div",{ref:a})]},g))}),p.jsxs("div",{className:"relative flex-1 border-l border-card-border",children:[c.map(g=>{const v=new Date(e);return v.setHours(g,0,0,0),p.jsx("div",{role:"button",tabIndex:0,"aria-label":ia(g,s),className:"cursor-pointer border-b border-border/50 hover:bg-muted/20",style:{height:la},onClick:()=>t?.(v),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),t?.(v))}},g)}),h.map(g=>p.jsx("div",{className:"absolute left-1 right-1",style:{top:RW(g),height:la},onClick:v=>v.stopPropagation(),children:p.jsx(Yh,{event:g,onClick:()=>y(g)})},g.id))]})]})]}),p.jsxs("div",{className:"flex flex-col overflow-y-auto border-l border-card-border px-4",children:[p.jsx(vh,{date:e,markToday:!0,changeOnlyOnClick:!0,RenderOnDay:m,onChange:g=>g&&o(g)}),u&&p.jsx("div",{className:"flex flex-col gap-2 border-t p-3",children:n?n(u):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"truncate text-sm font-semibold",children:u.title}),p.jsx("div",{className:"text-xs text-muted-foreground",children:sa(u.date,s)}),p.jsx("div",{className:"text-xs text-muted-foreground",children:GE(u.date,s)}),p.jsx(zo,{theme:u.className?"custom":"primary",size:"small",className:`self-start${u.className?` ${u.className}`:""}`})]})})]})]})}const WW=[];function qW({events:e,filterArea:t,onAddEvent:n,defaultDate:r,onSlotClick:o,getFilterId:i,renderEvent:s,onEventClick:a,filters:l=WW,defaultView:c="month",onChangeFilters:u}){const d=vt(),[f,h]=S.useState(c),[m,y]=S.useState(()=>r??new Date),[g,v]=S.useState(l),b=A=>{v(O=>{const _=O.map(N=>N.id===A?{...N,enabled:!N.enabled}:N);return u?.(_),_})},x=S.useMemo(()=>{if(l.length===0)return e;const A=i??(O=>O?.filterId);return e.filter(O=>g.find(_=>_.id===A(O))?.enabled??!0)},[e,g,l]),T=S.useMemo(()=>RE(x),[x]),E=S.useMemo(()=>HE(m),[m]),I=S.useMemo(()=>qh(m),[m]),w=A=>a?.(A),C=A=>{y(A),h("day")};return p.jsxs("div",{role:"application","aria-label":d.pageCalendarLabel,className:"flex h-full flex-grow flex-col gap-4",children:[p.jsx($W,{filters:g,filterArea:t,onAddEvent:n,currentDate:m,currentView:f,setCurrentDate:y,setCurrentView:h,onToggleFilter:b}),f==="month"&&p.jsx(zW,{days:E,currentDate:m,eventsByDate:T,onDayClick:C,onEventClick:w}),f==="week"&&p.jsx(BW,{days:I,currentDate:m,onSlotClick:o,eventsByDate:T,onEventClick:w}),f==="day"&&p.jsx(HW,{currentDate:m,onSlotClick:o,renderEvent:s,eventsByDate:T,onDateChange:y,onEventClick:w})]})}const UW=["INPUT","SELECT"],KE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{UW.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Kh,ZE;function Zh(){if(ZE)return Kh;ZE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Kh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Kh}var Xh,XE;function QE(){if(XE)return Xh;XE=1;var e=Zh(),t=yg(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,C){return o.set(w,C),w},s=function(w){return o.has(w)},a=function(w){return o.get(w)},l=function(w,C){o.set(w,C)},c=(function(){for(var I=[],w=0;w<256;++w)I[I.length]="%"+((w<16?"0":"")+w.toString(16)).toUpperCase();return I})(),u=function(w){for(;w.length>1;){var C=w.pop(),A=C.obj[C.prop];if(r(A)){for(var O=[],_=0;_<A.length;++_)typeof A[_]<"u"&&(O[O.length]=A[_]);C.obj[C.prop]=O}}},d=function(w,C){for(var A=C&&C.plainObjects?{__proto__:null}:{},O=0;O<w.length;++O)typeof w[O]<"u"&&(A[O]=w[O]);return A},f=function I(w,C,A){if(!C)return w;if(typeof C!="object"&&typeof C!="function"){if(r(w)){var O=w.length;if(A&&typeof A.arrayLimit=="number"&&O>A.arrayLimit)return i(d(w.concat(C),A),O);w[O]=C}else if(w&&typeof w=="object")if(s(w)){var _=a(w)+1;w[_]=C,l(w,_)}else{if(A&&A.strictMerge)return[w,C];(A&&(A.plainObjects||A.allowPrototypes)||!n.call(Object.prototype,C))&&(w[C]=!0)}else return[w,C];return w}if(!w||typeof w!="object"){if(s(C)){for(var N=Object.keys(C),$=A&&A.plainObjects?{__proto__:null,0:w}:{0:w},D=0;D<N.length;D++){var F=parseInt(N[D],10);$[F+1]=C[N[D]]}return i($,a(C)+1)}var z=[w].concat(C);return A&&typeof A.arrayLimit=="number"&&z.length>A.arrayLimit?i(d(z,A),z.length-1):z}var M=w;return r(w)&&!r(C)&&(M=d(w,A)),r(w)&&r(C)?(C.forEach(function(k,V){if(n.call(w,V)){var L=w[V];L&&typeof L=="object"&&k&&typeof k=="object"?w[V]=I(L,k,A):w[w.length]=k}else w[V]=k}),w):Object.keys(C).reduce(function(k,V){var L=C[V];if(n.call(k,V)?k[V]=I(k[V],L,A):k[V]=L,s(C)&&!s(k)&&i(k,a(C)),s(k)){var R=parseInt(V,10);String(R)===V&&R>=0&&R>a(k)&&l(k,R)}return k},M)},h=function(w,C){return Object.keys(C).reduce(function(A,O){return A[O]=C[O],A},w)},m=function(I,w,C){var A=I.replace(/\+/g," ");if(C==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch{return A}},y=1024,g=function(w,C,A,O,_){if(w.length===0)return w;var N=w;if(typeof w=="symbol"?N=Symbol.prototype.toString.call(w):typeof w!="string"&&(N=String(w)),A==="iso-8859-1")return escape(N).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var $="",D=0;D<N.length;D+=y){for(var F=N.length>=y?N.slice(D,D+y):N,z=[],M=0;M<F.length;++M){var k=F.charCodeAt(M);if(k===45||k===46||k===95||k===126||k>=48&&k<=57||k>=65&&k<=90||k>=97&&k<=122||_===e.RFC1738&&(k===40||k===41)){z[z.length]=F.charAt(M);continue}if(k<128){z[z.length]=c[k];continue}if(k<2048){z[z.length]=c[192|k>>6]+c[128|k&63];continue}if(k<55296||k>=57344){z[z.length]=c[224|k>>12]+c[128|k>>6&63]+c[128|k&63];continue}M+=1,k=65536+((k&1023)<<10|F.charCodeAt(M)&1023),z[z.length]=c[240|k>>18]+c[128|k>>12&63]+c[128|k>>6&63]+c[128|k&63]}$+=z.join("")}return $},v=function(w){for(var C=[{obj:{o:w},prop:"o"}],A=[],O=0;O<C.length;++O)for(var _=C[O],N=_.obj[_.prop],$=Object.keys(N),D=0;D<$.length;++D){var F=$[D],z=N[F];typeof z=="object"&&z!==null&&A.indexOf(z)===-1&&(C[C.length]={obj:N,prop:F},A[A.length]=z)}return u(C),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},T=function(w,C,A,O){if(s(w)){var _=a(w)+1;return w[_]=C,l(w,_),w}var N=[].concat(w,C);return N.length>A?i(d(N,{plainObjects:O}),N.length-1):N},E=function(w,C){if(r(w)){for(var A=[],O=0;O<w.length;O+=1)A[A.length]=C(w[O]);return A}return C(w)};return Xh={arrayToObject:d,assign:h,combine:T,compact:v,decode:m,encode:g,isBuffer:x,isOverflow:s,isRegExp:b,markOverflow:i,maybeMap:E,merge:f},Xh}var Qh,JE;function GW(){if(JE)return Qh;JE=1;var e=yg(),t=QE(),n=Zh(),r=Object.prototype.hasOwnProperty,o={brackets:function(g){return g+"[]"},comma:"comma",indices:function(g,v){return g+"["+v+"]"},repeat:function(g){return g}},i=Array.isArray,s=Array.prototype.push,a=function(y,g){s.apply(y,i(g)?g:[g])},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(g){return l.call(g)},skipNulls:!1,strictNullHandling:!1},d=function(g){return typeof g=="string"||typeof g=="number"||typeof g=="boolean"||typeof g=="symbol"||typeof g=="bigint"},f={},h=function y(g,v,b,x,T,E,I,w,C,A,O,_,N,$,D,F,z,M){for(var k=g,V=M,L=0,R=!1;(V=V.get(f))!==void 0&&!R;){var U=V.get(g);if(L+=1,typeof U<"u"){if(U===L)throw new RangeError("Cyclic object value");R=!0}typeof V.get(f)>"u"&&(L=0)}if(typeof A=="function"?k=A(v,k):k instanceof Date?k=N(k):b==="comma"&&i(k)&&(k=t.maybeMap(k,function(Q){return Q instanceof Date?N(Q):Q})),k===null){if(E)return C&&!F?C(v,u.encoder,z,"key",$):v;k=""}if(d(k)||t.isBuffer(k)){if(C){var G=F?v:C(v,u.encoder,z,"key",$);return[D(G)+"="+D(C(k,u.encoder,z,"value",$))]}return[D(v)+"="+D(String(k))]}var H=[];if(typeof k>"u")return H;var ee;if(b==="comma"&&i(k))F&&C&&(k=t.maybeMap(k,C)),ee=[{value:k.length>0?k.join(",")||null:void 0}];else if(i(A))ee=A;else{var se=Object.keys(k);ee=O?se.sort(O):se}var te=w?String(v).replace(/\./g,"%2E"):String(v),q=x&&i(k)&&k.length===1?te+"[]":te;if(T&&i(k)&&k.length===0)return q+"[]";for(var Y=0;Y<ee.length;++Y){var Z=ee[Y],pe=typeof Z=="object"&&Z&&typeof Z.value<"u"?Z.value:k[Z];if(!(I&&pe===null)){var B=_&&w?String(Z).replace(/\./g,"%2E"):String(Z),ae=i(k)?typeof b=="function"?b(q,B):q:q+(_?"."+B:"["+B+"]");M.set(g,L);var ce=e();ce.set(f,M),a(H,y(pe,ae,b,x,T,E,I,w,b==="comma"&&F&&i(k)?null:C,A,O,_,N,$,D,F,z,ce))}}return H},m=function(g){if(!g)return u;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.encodeDotInKeys<"u"&&typeof g.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(g.encoder!==null&&typeof g.encoder<"u"&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=g.charset||u.charset;if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof g.format<"u"){if(!r.call(n.formatters,g.format))throw new TypeError("Unknown format option provided.");b=g.format}var x=n.formatters[b],T=u.filter;(typeof g.filter=="function"||i(g.filter))&&(T=g.filter);var E;if(g.arrayFormat in o?E=g.arrayFormat:"indices"in g?E=g.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in g&&typeof g.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof g.allowDots>"u"?g.encodeDotInKeys===!0?!0:u.allowDots:!!g.allowDots;return{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:v,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!g.commaRoundTrip,delimiter:typeof g.delimiter>"u"?u.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:u.encode,encodeDotInKeys:typeof g.encodeDotInKeys=="boolean"?g.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof g.encoder=="function"?g.encoder:u.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:b,formatter:x,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:u.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:u.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:u.strictNullHandling}};return Qh=function(y,g){var v=y,b=m(g),x,T;typeof b.filter=="function"?(T=b.filter,v=T("",v)):i(b.filter)&&(T=b.filter,x=T);var E=[];if(typeof v!="object"||v===null)return"";var I=o[b.arrayFormat],w=I==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var C=e(),A=0;A<x.length;++A){var O=x[A],_=v[O];b.skipNulls&&_===null||a(E,h(_,O,I,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,C))}var N=E.join(b.delimiter),$=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},Qh}var Jh,eC;function YW(){if(eC)return Jh;eC=1;var e=QE(),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,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(h){return h.replace(/&#(\d+);/g,function(m,y){return String.fromCharCode(parseInt(y,10))})},i=function(h,m,y){if(h&&typeof h=="string"&&m.comma&&h.indexOf(",")>-1)return h.split(",");if(m.throwOnLimitExceeded&&y>=m.arrayLimit)throw new RangeError("Array limit exceeded. Only "+m.arrayLimit+" element"+(m.arrayLimit===1?"":"s")+" allowed in an array.");return h},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(m,y){var g={__proto__:null},v=y.ignoreQueryPrefix?m.replace(/^\?/,""):m;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=y.parameterLimit===1/0?void 0:y.parameterLimit,x=v.split(y.delimiter,y.throwOnLimitExceeded?b+1:b);if(y.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var T=-1,E,I=y.charset;if(y.charsetSentinel)for(E=0;E<x.length;++E)x[E].indexOf("utf8=")===0&&(x[E]===a?I="utf-8":x[E]===s&&(I="iso-8859-1"),T=E,E=x.length);for(E=0;E<x.length;++E)if(E!==T){var w=x[E],C=w.indexOf("]="),A=C===-1?w.indexOf("="):C+1,O,_;if(A===-1?(O=y.decoder(w,r.decoder,I,"key"),_=y.strictNullHandling?null:""):(O=y.decoder(w.slice(0,A),r.decoder,I,"key"),O!==null&&(_=e.maybeMap(i(w.slice(A+1),y,n(g[O])?g[O].length:0),function($){return y.decoder($,r.decoder,I,"value")}))),_&&y.interpretNumericEntities&&I==="iso-8859-1"&&(_=o(String(_))),w.indexOf("[]=")>-1&&(_=n(_)?[_]:_),y.comma&&n(_)&&_.length>y.arrayLimit){if(y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");_=e.combine([],_,y.arrayLimit,y.plainObjects)}if(O!==null){var N=t.call(g,O);N&&(y.duplicates==="combine"||w.indexOf("[]=")>-1)?g[O]=e.combine(g[O],_,y.arrayLimit,y.plainObjects):(!N||y.duplicates==="last")&&(g[O]=_)}}return g},c=function(h,m,y,g){var v=0;if(h.length>0&&h[h.length-1]==="[]"){var b=h.slice(0,-1).join("");v=Array.isArray(m)&&m[b]?m[b].length:0}for(var x=g?m:i(m,y,v),T=h.length-1;T>=0;--T){var E,I=h[T];if(I==="[]"&&y.parseArrays)e.isOverflow(x)?E=x:E=y.allowEmptyArrays&&(x===""||y.strictNullHandling&&x===null)?[]:e.combine([],x,y.arrayLimit,y.plainObjects);else{E=y.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,C=y.decodeDotInKeys?w.replace(/%2E/g,"."):w,A=parseInt(C,10),O=!isNaN(A)&&I!==C&&String(A)===C&&A>=0&&y.parseArrays;if(!y.parseArrays&&C==="")E={0:x};else if(O&&A<y.arrayLimit)E=[],E[A]=x;else{if(O&&y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");O?(E[A]=x,e.markOverflow(E,A)):C!=="__proto__"&&(E[C]=x)}}x=E}return x},u=function(m,y){var g=y.allowDots?m.replace(/\.([^.[]+)/g,"[$1]"):m;if(y.depth<=0)return!y.plainObjects&&t.call(Object.prototype,g)&&!y.allowPrototypes?void 0:[g];var v=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=v.exec(g),T=x?g.slice(0,x.index):g,E=[];if(T){if(!y.plainObjects&&t.call(Object.prototype,T)&&!y.allowPrototypes)return;E[E.length]=T}for(var I=0;(x=b.exec(g))!==null&&I<y.depth;){I+=1;var w=x[1].slice(1,-1);if(!y.plainObjects&&t.call(Object.prototype,w)&&!y.allowPrototypes)return;E[E.length]=x[1]}if(x){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");E[E.length]="["+g.slice(x.index)+"]"}return E},d=function(m,y,g,v){if(m){var b=u(m,g);if(b)return c(b,y,g,v)}},f=function(m){if(!m)return r;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.decodeDotInKeys<"u"&&typeof m.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(m.decoder!==null&&typeof m.decoder<"u"&&typeof m.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof m.throwOnLimitExceeded<"u"&&typeof m.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof m.charset>"u"?r.charset:m.charset,g=typeof m.duplicates>"u"?r.duplicates:m.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof m.allowDots>"u"?m.decodeDotInKeys===!0?!0:r.allowDots:!!m.allowDots;return{allowDots:v,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof m.allowPrototypes=="boolean"?m.allowPrototypes:r.allowPrototypes,allowSparse:typeof m.allowSparse=="boolean"?m.allowSparse:r.allowSparse,arrayLimit:typeof m.arrayLimit=="number"?m.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:r.charsetSentinel,comma:typeof m.comma=="boolean"?m.comma:r.comma,decodeDotInKeys:typeof m.decodeDotInKeys=="boolean"?m.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof m.decoder=="function"?m.decoder:r.decoder,delimiter:typeof m.delimiter=="string"||e.isRegExp(m.delimiter)?m.delimiter:r.delimiter,depth:typeof m.depth=="number"||m.depth===!1?+m.depth:r.depth,duplicates:g,ignoreQueryPrefix:m.ignoreQueryPrefix===!0,interpretNumericEntities:typeof m.interpretNumericEntities=="boolean"?m.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof m.parameterLimit=="number"?m.parameterLimit:r.parameterLimit,parseArrays:m.parseArrays!==!1,plainObjects:typeof m.plainObjects=="boolean"?m.plainObjects:r.plainObjects,strictDepth:typeof m.strictDepth=="boolean"?!!m.strictDepth:r.strictDepth,strictMerge:typeof m.strictMerge=="boolean"?!!m.strictMerge:r.strictMerge,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof m.throwOnLimitExceeded=="boolean"?m.throwOnLimitExceeded:!1}};return Jh=function(h,m){var y=f(m);if(h===""||h===null||typeof h>"u")return y.plainObjects?{__proto__:null}:{};for(var g=typeof h=="string"?l(h,y):h,v=y.plainObjects?{__proto__:null}:{},b=Object.keys(g),x=0;x<b.length;++x){var T=b[x],E=d(T,g[T],y,typeof h=="string");v=e.merge(v,E,y)}return y.allowSparse===!0?v:e.compact(v)},Jh}var em,tC;function KW(){if(tC)return em;tC=1;var e=GW(),t=YW(),n=Zh();return em={formats:n,parse:t,stringify:e},em}var ZW=KW(),et;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},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 s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(et||(et={}));var nC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(nC||(nC={}));const ke=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kr=e=>{switch(typeof e){case"undefined":return ke.undefined;case"string":return ke.string;case"number":return Number.isNaN(e)?ke.nan:ke.number;case"boolean":return ke.boolean;case"function":return ke.function;case"bigint":return ke.bigint;case"symbol":return ke.symbol;case"object":return Array.isArray(e)?ke.array:e===null?ke.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ke.promise:typeof Map<"u"&&e instanceof Map?ke.map:typeof Set<"u"&&e instanceof Set?ke.set:typeof Date<"u"&&e instanceof Date?ke.date:ke.object;default:return ke.unknown}},ye=et.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 Sr 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 s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof Sr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.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()}}Sr.create=e=>new Sr(e);const tm=(e,t)=>{let n;switch(e.code){case ye.invalid_type:e.received===ke.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ye.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ye.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ye.invalid_union:n="Invalid input";break;case ye.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ye.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ye.invalid_arguments:n="Invalid function arguments";break;case ye.invalid_return_type:n="Invalid function return type";break;case ye.invalid_date:n="Invalid date";break;case ye.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}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ye.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 ye.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 ye.custom:n="Invalid input";break;case ye.invalid_intersection_types:n="Intersection results could not be merged";break;case ye.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ye.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let XW=tm;function QW(){return XW}const JW=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function xe(e,t){const n=QW(),r=JW({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===tm?void 0:tm].filter(o=>!!o)});e.common.issues.push(r)}class bn{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 Le;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,s=await o.value;r.push({key:i,value:s})}return bn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),ca=e=>({status:"dirty",value:e}),An=e=>({status:"valid",value:e}),rC=e=>e.status==="aborted",oC=e=>e.status==="dirty",Fi=e=>e.status==="valid",Oc=e=>typeof Promise<"u"&&e instanceof Promise;var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ie||(Ie={}));class Zr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const iC=(e,t)=>{if(Fi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Sr(e.common.issues);return this._error=n,this._error}}};function Ge(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:(s,a)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}class Ze{get description(){return this._def.description}_getType(t){return Kr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new bn,ctx:{common:t.parent.common,data:t.data,parsedType:Kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Oc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return iC(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Fi(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Fi(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Oc(o)?o:Promise.resolve(o));return iC(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 s=t(o),a=()=>i.addIssue({code:ye.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!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 zi({schema:this,typeName:Ve.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 Qr.create(this,this._def)}nullable(){return ji.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cr.create(this)}promise(){return _c.create(this,this._def)}or(t){return Nc.create([this,t],this._def)}and(t){return Mc.create(this,t,this._def)}transform(t){return new zi({...Ge(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new om({...Ge(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new S3({typeName:Ve.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new im({...Ge(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return sm.create(this,t)}readonly(){return am.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const e3=/^c[^\s-]{8,}$/i,t3=/^[0-9a-z]+$/,n3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,r3=/^[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,o3=/^[a-z0-9_-]{21}$/i,i3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,s3=/^[-+]?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)?)??$/,a3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,l3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let nm;const c3=/^(?:(?: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])$/,u3=/^(?:(?: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])$/,d3=/^(([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]))$/,f3=/^(([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])$/,p3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,h3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,sC="((\\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])))",m3=new RegExp(`^${sC}$`);function aC(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 g3(e){return new RegExp(`^${aC(e)}$`)}function y3(e){let t=`${sC}T${aC(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 v3(e,t){return!!((t==="v4"||!t)&&c3.test(e)||(t==="v6"||!t)&&d3.test(e))}function b3(e,t){if(!i3.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function x3(e,t){return!!((t==="v4"||!t)&&u3.test(e)||(t==="v6"||!t)&&f3.test(e))}class No extends Ze{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ke.string){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:ke.string,received:i.parsedType}),Le}const r=new bn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.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),xe(o,{code:ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?xe(o,{code:ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&xe(o,{code:ye.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")a3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")nm||(nm=new RegExp(l3,"u")),nm.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")r3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")o3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")e3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")t3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")n3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:ye.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),xe(o,{validation:"regex",code:ye.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),xe(o,{code:ye.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),xe(o,{code:ye.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?y3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?m3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?g3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?s3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?v3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?b3(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?x3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?p3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?h3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:ye.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ye.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new No({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ie.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ie.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ie.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ie.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new No({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new No({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new No({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}No.create=e=>new No({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ge(e)});function w3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}class Li extends Ze{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)!==ke.number){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:ke.number,received:i.parsedType}),Le}let r;const o=new bn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.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),xe(r,{code:ye.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),xe(r,{code:ye.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?w3(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,o){return new Li({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new Li({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.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"&&et.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)}}Li.create=e=>new Li({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ge(e)});class ua extends Ze{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)!==ke.bigint)return this._getInvalidInput(t);let r;const o=new bn;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),xe(r,{code:ye.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),xe(r,{code:ye.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),xe(r,{code:ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:ke.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,o){return new ua({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new ua({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.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}}ua.create=e=>new ua({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ge(e)});class lC extends Ze{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ke.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.boolean,received:r.parsedType}),Le}return An(t.data)}}lC.create=e=>new lC({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ge(e)});class Dc extends Ze{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ke.date){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:ke.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_date}),Le}const r=new bn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.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),xe(o,{code:ye.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Dc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.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}}Dc.create=e=>new Dc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ge(e)});class cC extends Ze{_parse(t){if(this._getType(t)!==ke.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.symbol,received:r.parsedType}),Le}return An(t.data)}}cC.create=e=>new cC({typeName:Ve.ZodSymbol,...Ge(e)});class uC extends Ze{_parse(t){if(this._getType(t)!==ke.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.undefined,received:r.parsedType}),Le}return An(t.data)}}uC.create=e=>new uC({typeName:Ve.ZodUndefined,...Ge(e)});class dC extends Ze{_parse(t){if(this._getType(t)!==ke.null){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.null,received:r.parsedType}),Le}return An(t.data)}}dC.create=e=>new dC({typeName:Ve.ZodNull,...Ge(e)});class fC extends Ze{constructor(){super(...arguments),this._any=!0}_parse(t){return An(t.data)}}fC.create=e=>new fC({typeName:Ve.ZodAny,...Ge(e)});class pC extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return An(t.data)}}pC.create=e=>new pC({typeName:Ve.ZodUnknown,...Ge(e)});class Xr extends Ze{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:ke.never,received:n.parsedType}),Le}}Xr.create=e=>new Xr({typeName:Ve.ZodNever,...Ge(e)});class hC extends Ze{_parse(t){if(this._getType(t)!==ke.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.void,received:r.parsedType}),Le}return An(t.data)}}hC.create=e=>new hC({typeName:Ve.ZodVoid,...Ge(e)});class cr extends Ze{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ke.array)return xe(n,{code:ye.invalid_type,expected:ke.array,received:n.parsedType}),Le;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(xe(n,{code:s?ye.too_big:ye.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?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&&(xe(n,{code:ye.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&&(xe(n,{code:ye.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((s,a)=>o.type._parseAsync(new Zr(n,s,n.path,a)))).then(s=>bn.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Zr(n,s,n.path,a)));return bn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cr({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new cr({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new cr({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}cr.create=(e,t)=>new cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ge(t)});function Vi(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Qr.create(Vi(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof cr?new cr({...e._def,type:Vi(e.element)}):e instanceof Qr?Qr.create(Vi(e.unwrap())):e instanceof ji?ji.create(Vi(e.unwrap())):e instanceof Mo?Mo.create(e.items.map(t=>Vi(t))):e}class Bt extends Ze{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=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ke.object){const c=this._getOrReturnCtx(t);return xe(c,{code:ye.invalid_type,expected:ke.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Zr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Xr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(xe(o,{code:ye.unrecognized_keys,keys:a}),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 a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Zr(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,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>bn.mergeObjectSync(r,c)):bn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ie.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Vi(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Qr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return vC(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)});class Nc extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new Sr(a.ctx.common.issues));return xe(n,{code:ye.invalid_union,unionErrors:s}),Le}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];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&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new Sr(l));return xe(n,{code:ye.invalid_union,unionErrors:a}),Le}}get options(){return this._def.options}}Nc.create=(e,t)=>new Nc({options:e,typeName:Ve.ZodUnion,...Ge(t)});function rm(e,t){const n=Kr(e),r=Kr(t);if(e===t)return{valid:!0,data:e};if(n===ke.object&&r===ke.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=rm(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===ke.array&&r===ke.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=rm(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ke.date&&r===ke.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Mc extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(rC(i)||rC(s))return Le;const a=rm(i.value,s.value);return a.valid?((oC(i)||oC(s))&&n.dirty(),{status:n.value,value:a.data}):(xe(r,{code:ye.invalid_intersection_types}),Le)};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,s])=>o(i,s)):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}))}}Mc.create=(e,t,n)=>new Mc({left:e,right:t,typeName:Ve.ZodIntersection,...Ge(n)});class Mo extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.array)return xe(r,{code:ye.invalid_type,expected:ke.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return xe(r,{code:ye.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ye.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Zr(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>bn.mergeArray(n,s)):bn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Mo({...this._def,rest:t})}}Mo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Mo({items:e,typeName:Ve.ZodTuple,rest:null,...Ge(t)})};class mC extends Ze{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!==ke.map)return xe(r,{code:ye.invalid_type,expected:ke.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Zr(r,a,r.path,[c,"key"])),value:i._parse(new Zr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}mC.create=(e,t,n)=>new mC({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ge(n)});class da extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.set)return xe(r,{code:ye.invalid_type,expected:ke.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(xe(r,{code:ye.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&&(xe(r,{code:ye.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Zr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new da({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new da({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}da.create=(e,t)=>new da({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ge(t)});class gC extends Ze{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})}}gC.create=(e,t)=>new gC({getter:e,typeName:Ve.ZodLazy,...Ge(t)});class yC extends Ze{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:ye.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}yC.create=(e,t)=>new yC({value:e,typeName:Ve.ZodLiteral,...Ge(t)});function vC(e,t){return new $i({values:e,typeName:Ve.ZodEnum,...Ge(t)})}class $i extends Ze{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:et.joinValues(r),received:n.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:ye.invalid_enum_value,options:r}),Le}return An(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 $i.create(t,{...this._def,...n})}exclude(t,n=this._def){return $i.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}$i.create=vC;class bC extends Ze{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ke.string&&r.parsedType!==ke.number){const o=et.objectValues(n);return xe(r,{expected:et.joinValues(o),received:r.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return xe(r,{received:r.data,code:ye.invalid_enum_value,options:o}),Le}return An(t.data)}get enum(){return this._def.values}}bC.create=(e,t)=>new bC({values:e,typeName:Ve.ZodNativeEnum,...Ge(t)});class _c extends Ze{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ke.promise&&n.common.async===!1)return xe(n,{code:ye.invalid_type,expected:ke.promise,received:n.parsedType}),Le;const r=n.parsedType===ke.promise?n.data:Promise.resolve(n.data);return An(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}_c.create=(e,t)=>new _c({type:e,typeName:Ve.ZodPromise,...Ge(t)});class zi extends Ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.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:s=>{xe(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?ca(l.value):l});{if(n.value==="aborted")return Le;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"||n.value==="dirty"?ca(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,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 a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Le:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Fi(s))return Le;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Fi(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):Le);et.assertNever(o)}}zi.create=(e,t,n)=>new zi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ge(n)}),zi.createWithPreprocess=(e,t,n)=>new zi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ge(n)});class Qr extends Ze{_parse(t){return this._getType(t)===ke.undefined?An(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qr.create=(e,t)=>new Qr({innerType:e,typeName:Ve.ZodOptional,...Ge(t)});class ji extends Ze{_parse(t){return this._getType(t)===ke.null?An(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ji.create=(e,t)=>new ji({innerType:e,typeName:Ve.ZodNullable,...Ge(t)});class om extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ke.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}om.create=(e,t)=>new om({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class im extends Ze{_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 Oc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}im.create=(e,t)=>new im({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class xC extends Ze{_parse(t){if(this._getType(t)!==ke.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}xC.create=e=>new xC({typeName:Ve.ZodNaN,...Ge(e)});class S3 extends Ze{_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 sm extends Ze{_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"?Le:i.status==="dirty"?(n.dirty(),ca(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"?Le: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 sm({in:t,out:n,typeName:Ve.ZodPipeline})}}class am extends Ze{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Fi(o)&&(o.value=Object.freeze(o.value)),o);return Oc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}am.create=(e,t)=>new am({innerType:e,typeName:Ve.ZodReadonly,...Ge(t)});var Ve;(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"})(Ve||(Ve={})),Xr.create,cr.create,Nc.create,Mc.create,Mo.create,$i.create,_c.create,Qr.create,ji.create;const T3=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},E3=(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 s=t[o+1];e[i]=isNaN(Number(s))?{}:[]}e=e[i]}}},wC=e=>e.replace(/\[(\d+)]/g,".$1").split("."),xn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):wC(t),o=structuredClone(e);return E3(o,r,n),o},C3=(e,t)=>e.localeCompare(t),Bi={},SC=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return TC(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=SC(e._def.innerType);return t==="ZodArray"?n??[]:n}},TC=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,SC(n)])),EC=(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]=EC(i,o):n[r]=o||i)}return n},k3={sort:C3,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},CC=e=>{const t=new FormData(e),n=new URLSearchParams(t);return ZW.parse(n.toString(),k3)},Jr=(e,t)=>wC(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),eo=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),lm=e=>{const t=e.dataset.target;if(!t)return eo(e);const n=document.querySelector(`[data-origin="${t}"]`);return eo(n||e)},I3={state:{},loading:!1,useOnChange:!1},kC=e=>e.dataset.target||e.name,A3=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Gs.LocalStorage.get(t);return T3(n)?n:{}},clear:()=>{Gs.LocalStorage.delete(t)},set:n=>Gs.LocalStorage.set(t,n)}},P3=(e,t,n=I3)=>{const[r,o]=S.useState(null),i=S.useRef({}),[s,a]=S.useState(()=>Re.function(n?.state)?n.state():n?.state??TC(e)??{}),l=S.useCallback(x=>{const T=x.target,E=x.currentTarget;if(T.dataset.optional==="true")return;const w=kC(T),C=lm(T)||(E?eo(E):""),A=Jr(w,e);if(T.setAttribute("data-initialized","true"),A){const O=A.safeParse(C),_=O.success?void 0:O.error.issues[0]?.message??"";o(N=>xn(N??{},w,_))}},[e]),c=S.useCallback(x=>T=>{const E=T.currentTarget,I=Object.values(i.current).reduce((C,A)=>{const O=A.element,_=A.schema.safeParse(eo(O));if(O.dataset.ignore==="ignore"||_.success)return C;const N=_.error.issues[0]?.message;O.setAttribute("data-initialized","true");const $=O.dataset.name||O.name||"";return xn(C,$,N)},{}),w=Re.empty(I)?null:I;o(w),console.error(w),x?.({form:E,errors:w||{}})},[]),u=(x,T=Bi)=>{const E=Jr(x,e),I=w=>{if(!pc(w))return;a(A=>xn(A,x,w.toISOString())),o(A=>xn(A,x,void 0));const C=i.current[x].element;if(C){const A=C.getAttribute("data-origin"),O=document.querySelector(`input[data-target="${A}"]`);O&&O.setCustomValidity("")}T?.onChange?.(w)};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,date:Re.string(s[x])?new Date(s[x]):s[x],required:T.required??!E.isOptional(),error:Hn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:E})}}},d=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChange:w=>{const C=w.target.value;a(A=>xn(A,x,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),value:Hn(s,x,void 0)??"",required:T.required??!E.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:E}:void 0}},f=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChange:w=>{const C=w.target.checked;a(A=>xn(A??{},x,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:E}):void 0}},h=(x,T=Bi)=>{const E=Jr(x,e),I=w=>{w.persist?.();const C=w.target.value;T?.onChange?.(w),a(A=>xn(A,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),value:Hn(s,x,void 0)||T?.value||"",type:Re.instance(E,Li)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:E}}},m=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChangeOptions:w=>{a(C=>xn(C,x,w))},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),value:Hn(s,x,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:E})}},y=(x,T=Bi)=>{const E=Jr(x,e),I=E._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const A=I?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),a(O=>xn(O,x,A))},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),type:I?"number":T?.type??"text",value:Hn(s,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:E})}};S.useEffect(()=>{const x=Object.values(i.current).map(E=>{const I=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(eo(I)),C=N=>{const $=kC(N.target);if(!$)return!1;const D=N.target,F=lm(N.target)||(N.relatedTarget?eo(N.relatedTarget):""),z=E.schema.safeParse(F);if(D.setAttribute("value",F),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(Re.null(M))return null;const k=xn(M,$,void 0);return Re.empty(M)||Re.nil(M)||Re.empty(k)?null:k}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(k=>{if(Re.null(k))return null;const V=xn(k,$,M||void 0);return Re.empty(V)?null:V})}return!1},A=new AbortController,O=I.getAttribute("data-trigger")||"blur";I.addEventListener(O,C,{signal:A.signal});const _=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:_,unsubscribe:()=>A.abort()}});return x.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>x.forEach(E=>E.unsubscribe())});const g=x=>T=>{T.preventDefault();const E=T.currentTarget;let I=CC(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(_=>{if(_.tagName==="SELECT"){const N=_;I=xn(I,N.name,N.value)}if(_.tagName==="INPUT"){const N=_,$=lm(N)||(N?eo(N):"");I=xn(I,N.dataset.target||N.name,$)}});const C=EC(I,s),A=e.safeParse(C),O=()=>{KE(E),n.interceptor?.clear()};if(A.success){const _=JSON.stringify(A.data);return E.setAttribute("data-json",_),n.interceptor?.clear(),x?.(T,{form:E,event:T,reset:O,setErrors:o,errors:[],success:!0,data:A.data,json:A.data})}return console.group("useForm error"),console.info(A),console.info(A.error.issues),console.error(A.error),console.groupEnd(),E.reportValidity(),x?.(T,{form:E,json:I,event:T,reset:O,setErrors:o,data:I,success:!1,errors:A.error.issues.map(_=>({message:_.message,path:_.path.map(N=>String(N))}))})},v=x=>xd(s,x)||"",b=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(s)},[s]),{get:v,input:y,state:s,errors:r,select:d,checkbox:f,onSubmit:g,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:m,disabled:r!==null}},O3=e=>e?JSON.parse(e.getAttribute("data-json")):{},D3=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},IC={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},AC={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem",dialog:"20rem","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"},PC={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},N3={name:"dark",zIndex:PC,rounded:IC,spacing:AC,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 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)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(240, 5%, 96%)",background:"hsla(240, 10%, 8%)",border:"hsla(240, 4%, 16%)",disabled:"hsla(240, 4%, 16%)",muted:{DEFAULT:"hsla(240, 4%, 16%)",foreground:"hsla(240, 5%, 65%)",subtle:"hsla(240, 5%, 65%)",hover:"hsla(240, 4%, 20%)"},emphasis:{foreground:"hsla(199, 89%, 48%)",DEFAULT:"hsla(199, 89%, 10%)",subtle:"hsla(199, 89%, 15%)",hover:"hsla(199, 89%, 40%)"},primary:{foreground:"hsla(240, 6%, 10%)",DEFAULT:"hsla(201,49%,54%)",subtle:"hsla(201,49%,36%)",hover:"hsla(201,49%,22%)"},secondary:{DEFAULT:"hsla(240, 5%, 96%)",background:"hsla(240, 4%, 16%)",subtle:"hsla(240, 4%, 20%)",hover:"hsla(240, 4%, 25%)",foreground:"hsla(240, 5%, 96%)"},info:{DEFAULT:"hsla(199, 89%, 48%)",subtle:"hsla(199, 89%, 15%)",hover:"hsla(199, 89%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(199, 89%, 48%)"},danger:{DEFAULT:"hsla(0, 84%, 60%)",subtle:"hsla(0, 84%, 15%)",hover:"hsla(0, 84%, 50%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(0, 84%, 60%)"},warn:{DEFAULT:"hsla(38, 92%, 50%)",subtle:"hsla(38, 92%, 15%)",hover:"hsla(38, 92%, 45%)",foreground:"hsla(240, 10%, 4%)",notification:"hsla(38, 92%, 50%)"},success:{DEFAULT:"hsla(142, 71%, 45%)",subtle:"hsla(142, 71%, 15%)",hover:"hsla(142, 71%, 40%)",foreground:"hsla(240, 10%, 4%)",notification:"hsla(142, 71%, 45%)"},input:{border:"hsla(240, 4%, 16%)",placeholder:"hsla(240, 5%, 65%)","mask-error":"hsla(0, 84%, 20%)","switch-bg":"hsla(240, 4%, 16%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(240, 4%, 10%)",border:"hsla(240, 4%, 11%)",background:"hsla(221, 16%, 9%)"},floating:{foreground:"hsla(240, 5%, 96%)",background:"hsla(240, 10%, 8%)",hover:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 16%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(240, 10%, 4%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 100%)",border:"hsla(0, 0%, 100%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(240, 4%, 10%)",border:"hsla(240, 4%, 16%)",background:"hsla(240, 10%, 4%)"},button:{primary:{text:"hsla(221, 52%, 100%)",bg:"hsla(201,49%,42%)"},warn:{text:"hsla(240, 10%, 4%)",bg:"hsla(38, 92%, 50%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(199, 89%, 48%)"},success:{text:"hsla(240, 10%, 4%)",bg:"hsla(142, 71%, 45%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(0, 84%, 60%)"},muted:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 4%, 20%)"},warn:{text:"hsla(38, 92%, 70%)",bg:"hsla(38, 92%, 15%)"},info:{text:"hsla(199, 89%, 70%)",bg:"hsla(199, 89%, 15%)"},success:{text:"hsla(142, 71%, 70%)",bg:"hsla(142, 71%, 15%)"},danger:{text:"hsla(0, 84%, 70%)",bg:"hsla(0, 84%, 15%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)"},muted:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"}},alert:{primary:{text:"hsla(199, 89%, 80%)",border:"hsla(199, 89%, 25%)",bg:"hsla(199, 89%, 12%)"},warn:{bg:"hsla(38, 92%, 12%)",border:"hsla(38, 92%, 25%)",text:"hsla(38, 92%, 80%)"},info:{text:"hsla(199, 89%, 80%)",bg:"hsla(199, 89%, 12%)",border:"hsla(199, 89%, 25%)"},success:{text:"hsla(142, 71%, 80%)",bg:"hsla(142, 71%, 12%)",border:"hsla(142, 71%, 25%)"},danger:{text:"hsla(0, 84%, 80%)",bg:"hsla(0, 84%, 12%)",border:"hsla(0, 84%, 25%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 20%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)",border:"hsla(0, 0%, 100%)"},muted:{bg:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 20%)",text:"hsla(240, 5%, 96%)"}}}},M3={rounded:IC,spacing:AC,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 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:PC,colors:{foreground:"hsla(221, 15%, 23%)",background:"hsla(0, 0%, 100%)",border:"hsla(240, 6%, 90%)",muted:{DEFAULT:"hsla(240, 5%, 96%)",foreground:"hsla(240, 4%, 46%)",subtle:"hsla(240, 4%, 46%)",hover:"hsla(240, 5%, 96%)"},disabled:"hsla(240, 5%, 96%)",emphasis:{foreground:"hsla(199, 89%, 48%)",DEFAULT:"hsla(199, 89%, 96%)",subtle:"hsla(199, 89%, 92%)",hover:"hsla(199, 89%, 40%)"},primary:{foreground:"hsla(240, 6%, 10%)",DEFAULT:"hsla(201,49%,54%)",subtle:"hsla(201,49%,36%)",hover:"hsla(201,49%,22%)"},secondary:{background:"hsla(240, 5%, 96%)",DEFAULT:"hsla(240, 6%, 10%)",subtle:"hsla(240, 5%, 96%)",hover:"hsla(240, 6%, 15%)",foreground:"hsla(0, 0%, 100%)"},info:{DEFAULT:"hsla(199, 89%, 48%)",subtle:"hsla(199, 89%, 96%)",hover:"hsla(199, 89%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(199, 89%, 48%)"},danger:{DEFAULT:"hsla(0, 84%, 60%)",subtle:"hsla(0, 84%, 96%)",hover:"hsla(0, 84%, 50%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(0, 84%, 60%)"},warn:{DEFAULT:"hsla(38, 92%, 50%)",subtle:"hsla(38, 92%, 96%)",hover:"hsla(38, 92%, 45%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(38, 92%, 50%)"},success:{DEFAULT:"hsla(142, 71%, 45%)",subtle:"hsla(142, 71%, 96%)",hover:"hsla(142, 71%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(142, 71%, 45%)"},input:{border:"hsla(240, 6%, 90%)",placeholder:"hsla(240, 4%, 46%)","mask-error":"hsla(0, 84%, 96%)","switch-bg":"hsla(240, 6%, 90%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(199, 89%, 48%)"},card:{muted:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(240, 10%, 4%)",background:"hsla(0, 0%, 100%)",hover:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)",overlay:"hsla(240, 10%, 4%)"},tooltip:{foreground:"hsla(0, 0%, 100%)",background:"hsla(240, 10%, 4%)",hover:"hsla(240, 10%, 4%)",border:"hsla(240, 10%, 4%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(240, 5%, 96%)",background:"hsla(0, 0%, 100%)",border:"hsla(240, 6%, 90%)"},button:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 6%, 10%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(201,49%,54%)"},warn:{bg:"hsla(38, 92%, 50%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(199, 89%, 48%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(142, 71%, 45%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(0, 84%, 60%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)"}},tag:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 4%, 46%)"},primary:{text:"hsla(199, 89%, 48%)",bg:"hsla(199, 89%, 96%)"},warn:{bg:"hsla(38, 92%, 96%)",text:"hsla(38, 92%, 40%)"},info:{text:"hsla(199, 89%, 40%)",bg:"hsla(199, 89%, 96%)"},success:{text:"hsla(142, 71%, 35%)",bg:"hsla(142, 71%, 96%)"},danger:{text:"hsla(0, 84%, 45%)",bg:"hsla(0, 84%, 96%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)"}},alert:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 6%, 10%)",border:"hsla(240, 6%, 90%)"},primary:{text:"hsla(199, 89%, 40%)",border:"hsla(199, 89%, 90%)",bg:"hsla(199, 89%, 98%)"},warn:{bg:"hsla(38, 92%, 98%)",text:"hsla(38, 92%, 35%)",border:"hsla(38, 92%, 90%)"},info:{text:"hsla(199, 89%, 35%)",bg:"hsla(199, 89%, 98%)",border:"hsla(199, 89%, 90%)"},success:{text:"hsla(142, 71%, 30%)",bg:"hsla(142, 71%, 98%)",border:"hsla(142, 71%, 90%)"},danger:{text:"hsla(0, 84%, 40%)",bg:"hsla(0, 84%, 98%)",border:"hsla(0, 84%, 90%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)",border:"hsla(240, 6%, 10%)"}}}},_3=N3,F3=M3,L3=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...Aa,...e.tweaks},parser:e.parser||Ca.hsla,map:{...Ia,...e.map}}),[e]);return p.jsx(oo.Provider,{value:t,children:p.jsx(BS,{children:e.children})})};ne.Alert=Az,ne.AnimatedList=fz,ne.AnimatedListItem=pz,ne.Autocomplete=dH,ne.Button=Jt,ne.Calendar=vh,ne.Card=ac,ne.Checkbox=ih,ne.ColType=Ii,ne.Collapse=DS,ne.CommandPalette=BE,ne.Commander=BE,ne.ComponentsProvider=L3,ne.Context=oo,ne.DatePicker=FB,ne.Description=tj,ne.Dict=Bn,ne.Dropdown=ki,ne.Empty=yS,ne.Expand=ij,ne.FileUpload=tH,ne.Form=lI,ne.Info=nj,ne.Input=Jo,ne.InputFeedback=Vv,ne.InputField=as,ne.Loading=oj,ne.Menu=jz,ne.MenuItem=zz,ne.Modal=Ys,ne.ModalConfirmProvider=BS,ne.MultiSelect=vH,ne.Notifications=IW,ne.PageCalendar=qW,ne.PageHeader=rj,ne.PageTitle=RS,ne.Paragraph=ej,ne.Polymorph=un,ne.Progress=PB,ne.Radiobox=Bz,ne.RenderOnView=TH,ne.Select=po,ne.Slider=$D,ne.Spinner=HS,ne.Stats=Pz,ne.StatsCard=uz,ne.Step=xz,ne.Steps=wz,ne.Switch=zD,ne.Tab=Cz,ne.Table=cz,ne.Tabs=Tz,ne.Tag=zo,ne.TaskList=Jz,ne.Textarea=Rz,ne.Timeline=OB,ne.TimelineItem=mc,ne.Toolbar=DB,ne.Tooltip=Sd,ne.TransferList=wH,ne.Wizard=uj,ne.createColumns=N$,ne.createCssProperties=ZI,ne.createDesignTokens=sy,ne.createFormStorage=A3,ne.createOptionCols=Xp,ne.createStyles=GI,ne.createTheme=KI,ne.createTokenStyles=XI,ne.css=Pe,ne.defaultDarkTheme=_3,ne.defaultLightTheme=F3,ne.defaultTranslations=Ia,ne.defaultTweaks=Aa,ne.dispatchInput=Vg,ne.formReset=KE,ne.formToJson=CC,ne.formatDay=oa,ne.formatEventTime=Pc,ne.formatFullDate=sa,ne.formatHourLabel=ia,ne.formatMonthShort=UE,ne.formatMonthYear=Gh,ne.formatTime=GE,ne.formatWeekdayLong=WE,ne.formatWeekdayShort=qE,ne.getCoords=oI,ne.getHourSlots=Uh,ne.getJsonForm=O3,ne.getModalScrollerRef=V$,ne.getMonthDays=HE,ne.getRemainingSize=Yi,ne.getSchemaShape=Jr,ne.getWeekDays=qh,ne.getWeekNumber=YE,ne.groupEventsByDate=RE,ne.hasVerticalScroll=$g,ne.initializeInputDataset=Gi,ne.isChildVisible=zg,ne.isMobile=Lv,ne.isReactComponent=rI,ne.isReactFC=Du,ne.isSsr=Mr,ne.mergeRefs=fr,ne.negate=hO,ne.noop=Qo,ne.parsers=Ca,ne.path=xd,ne.reduceTokens=Cr,ne.safeRegex=wd,ne.splitInto=Fv,ne.toDateKey=Yr,ne.useColorParser=SS,ne.useConfirm=Uz,ne.useForm=P3,ne.useLocale=Fr,ne.useNotification=TW,ne.usePrevious=D3,ne.useReactive=CS,ne.useStableRef=Lr,ne.useStepContext=ES,ne.useSwipe=dT,ne.useTablePreferences=F$,ne.useTranslations=vt,ne.uuid=Xo,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})}));
28
28
  //# sourceMappingURL=index.umd.js.map