@g4rcez/components 2.2.9 → 2.3.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 (126) hide show
  1. package/dist/components/core/button.d.ts.map +1 -1
  2. package/dist/components/core/polymorph.d.ts.map +1 -1
  3. package/dist/components/core/slot.d.ts +1 -1
  4. package/dist/components/core/slot.d.ts.map +1 -1
  5. package/dist/components/core/slot.jsx +28 -35
  6. package/dist/components/core/tag.jsx +1 -1
  7. package/dist/components/core/typography.d.ts.map +1 -1
  8. package/dist/components/core/typography.jsx +16 -20
  9. package/dist/components/display/alert.d.ts.map +1 -1
  10. package/dist/components/display/alert.jsx +22 -24
  11. package/dist/components/display/calendar.d.ts.map +1 -1
  12. package/dist/components/display/calendar.jsx +5 -7
  13. package/dist/components/display/card.d.ts.map +1 -1
  14. package/dist/components/display/card.jsx +5 -5
  15. package/dist/components/display/empty.jsx +1 -1
  16. package/dist/components/display/notifications.d.ts.map +1 -1
  17. package/dist/components/display/notifications.jsx +35 -35
  18. package/dist/components/display/progress.d.ts.map +1 -1
  19. package/dist/components/display/progress.jsx +6 -8
  20. package/dist/components/display/shortcut.jsx +1 -1
  21. package/dist/components/display/skeleton.d.ts.map +1 -1
  22. package/dist/components/display/skeleton.jsx +3 -5
  23. package/dist/components/display/step.d.ts.map +1 -1
  24. package/dist/components/display/step.jsx +27 -27
  25. package/dist/components/display/tabs.d.ts.map +1 -1
  26. package/dist/components/display/tabs.jsx +5 -7
  27. package/dist/components/floating/command-palette.d.ts.map +1 -1
  28. package/dist/components/floating/command-palette.jsx +40 -40
  29. package/dist/components/floating/dropdown.d.ts.map +1 -1
  30. package/dist/components/floating/dropdown.jsx +15 -15
  31. package/dist/components/floating/modal.d.ts.map +1 -1
  32. package/dist/components/floating/modal.jsx +73 -67
  33. package/dist/components/floating/tooltip.d.ts.map +1 -1
  34. package/dist/components/floating/tooltip.jsx +2 -8
  35. package/dist/components/floating/wizard.d.ts +1 -1
  36. package/dist/components/floating/wizard.d.ts.map +1 -1
  37. package/dist/components/floating/wizard.jsx +50 -53
  38. package/dist/components/form/autocomplete.d.ts.map +1 -1
  39. package/dist/components/form/autocomplete.jsx +38 -35
  40. package/dist/components/form/checkbox.jsx +2 -2
  41. package/dist/components/form/date-picker.d.ts.map +1 -1
  42. package/dist/components/form/date-picker.jsx +14 -14
  43. package/dist/components/form/file-upload.jsx +13 -13
  44. package/dist/components/form/free-text.d.ts.map +1 -1
  45. package/dist/components/form/free-text.jsx +2 -2
  46. package/dist/components/form/input-field.d.ts.map +1 -1
  47. package/dist/components/form/input-field.jsx +42 -41
  48. package/dist/components/form/multi-select.d.ts.map +1 -1
  49. package/dist/components/form/multi-select.jsx +56 -56
  50. package/dist/components/form/select.d.ts.map +1 -1
  51. package/dist/components/form/select.jsx +13 -13
  52. package/dist/components/form/slider.d.ts.map +1 -1
  53. package/dist/components/form/slider.jsx +10 -10
  54. package/dist/components/form/transfer-list.jsx +3 -3
  55. package/dist/components/index.d.ts +1 -0
  56. package/dist/components/index.d.ts.map +1 -1
  57. package/dist/components/index.js +1 -0
  58. package/dist/components/page-calendar/calendar-header.d.ts +16 -0
  59. package/dist/components/page-calendar/calendar-header.d.ts.map +1 -0
  60. package/dist/components/page-calendar/calendar-header.jsx +81 -0
  61. package/dist/components/page-calendar/day-view.d.ts +12 -0
  62. package/dist/components/page-calendar/day-view.d.ts.map +1 -0
  63. package/dist/components/page-calendar/day-view.jsx +84 -0
  64. package/dist/components/page-calendar/event-pill.d.ts +9 -0
  65. package/dist/components/page-calendar/event-pill.d.ts.map +1 -0
  66. package/dist/components/page-calendar/event-pill.jsx +23 -0
  67. package/dist/components/page-calendar/index.d.ts +4 -0
  68. package/dist/components/page-calendar/index.d.ts.map +1 -0
  69. package/dist/components/page-calendar/index.js +2 -0
  70. package/dist/components/page-calendar/month-view.d.ts +11 -0
  71. package/dist/components/page-calendar/month-view.d.ts.map +1 -0
  72. package/dist/components/page-calendar/month-view.jsx +47 -0
  73. package/dist/components/page-calendar/page-calendar.d.ts +18 -0
  74. package/dist/components/page-calendar/page-calendar.d.ts.map +1 -0
  75. package/dist/components/page-calendar/page-calendar.jsx +39 -0
  76. package/dist/components/page-calendar/page-calendar.types.d.ts +18 -0
  77. package/dist/components/page-calendar/page-calendar.types.d.ts.map +1 -0
  78. package/dist/components/page-calendar/page-calendar.types.js +1 -0
  79. package/dist/components/page-calendar/page-calendar.utils.d.ts +18 -0
  80. package/dist/components/page-calendar/page-calendar.utils.d.ts.map +1 -0
  81. package/dist/components/page-calendar/page-calendar.utils.js +71 -0
  82. package/dist/components/page-calendar/week-view.d.ts +11 -0
  83. package/dist/components/page-calendar/week-view.d.ts.map +1 -0
  84. package/dist/components/page-calendar/week-view.jsx +61 -0
  85. package/dist/components/table/filter.jsx +4 -4
  86. package/dist/components/table/index.d.ts.map +1 -1
  87. package/dist/components/table/index.jsx +10 -10
  88. package/dist/components/table/inner-table.d.ts.map +1 -1
  89. package/dist/components/table/inner-table.jsx +18 -18
  90. package/dist/components/table/metadata.d.ts.map +1 -1
  91. package/dist/components/table/metadata.jsx +29 -30
  92. package/dist/components/table/pagination.jsx +1 -1
  93. package/dist/components/table/row.d.ts.map +1 -1
  94. package/dist/components/table/row.jsx +17 -17
  95. package/dist/components/table/sort.jsx +1 -1
  96. package/dist/components/table/table-lib.d.ts.map +1 -1
  97. package/dist/components/table/table-lib.js +1 -2
  98. package/dist/components/table/thead.d.ts.map +1 -1
  99. package/dist/components/table/thead.jsx +5 -5
  100. package/dist/config/context.d.ts.map +1 -1
  101. package/dist/config/default-translations.d.ts +10 -0
  102. package/dist/config/default-translations.d.ts.map +1 -1
  103. package/dist/config/default-translations.jsx +11 -1
  104. package/dist/constants.d.ts.map +1 -1
  105. package/dist/hooks/use-components-provider.d.ts.map +1 -1
  106. package/dist/hooks/use-components-provider.jsx +2 -2
  107. package/dist/hooks/use-form.d.ts.map +1 -1
  108. package/dist/hooks/use-input-id.d.ts.map +1 -1
  109. package/dist/hooks/use-is-coarse-device.js +1 -1
  110. package/dist/hooks/use-preferences.d.ts.map +1 -1
  111. package/dist/hooks/use-resize-observer.d.ts.map +1 -1
  112. package/dist/hooks/use-translations.d.ts +10 -0
  113. package/dist/hooks/use-translations.d.ts.map +1 -1
  114. package/dist/index.css +1 -1
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js.map +1 -1
  117. package/dist/index.mjs +10121 -9704
  118. package/dist/index.mjs.map +1 -1
  119. package/dist/index.umd.js +14 -14
  120. package/dist/index.umd.js.map +1 -1
  121. package/dist/lib/dom.d.ts.map +1 -1
  122. package/dist/lib/fns.d.ts.map +1 -1
  123. package/dist/lib/fns.js +2 -2
  124. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  125. package/dist/styles/theme.types.d.ts.map +1 -1
  126. package/package.json +289 -289
package/dist/index.umd.js CHANGED
@@ -1,10 +1,10 @@
1
- (function(se,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):(se=typeof globalThis<"u"?globalThis:se||self,S(se.components={},se.React,se["react/jsx-runtime"],se.ReactDOM))})(this,(function(se,S,g,Ri){"use strict";function em(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=em(S),cr=em(Ri);function tm(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=tm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nm(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=tm(e))&&(r&&(r+=" "),r+=t);return r}const rm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,om=nm,_o=(e,t)=>n=>{var r;if(t?.variants==null)return om(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=rm(u)||rm(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(h=>{let[y,m]=h;return Array.isArray(m)?m.includes({...i,...a}[y]):{...i,...a}[y]===m})?[...c,d,f]:c},[]);return om(e,s,l,n?.class,n?.className)};var im=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 uk(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 Ac,am;function Mo(){return am||(am=1,Ac=TypeError),Ac}const dk=uk(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Pc,lm;function ra(){if(lm)return Pc;lm=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,h=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,N=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,D=(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=dk,L=V.custom,B=ce(L)?L:null,U={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Pc=function W(K,Oe,Ue,Ye){var $e=Oe||{};if(re($e,"quoteStyle")&&!re(U,$e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(re($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=re($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(re($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(re($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 xn=String(K)+"n";return gt?C(K,xn):xn}var Qr=typeof $e.depth>"u"?5:$e.depth;if(typeof Ue>"u"&&(Ue=0),Ue>=Qr&&Qr>0&&typeof K=="object")return te(K)?"[Array]":"[Object]";var Jr=Nt($e,Ue);if(typeof Ye>"u")Ye=[];else if(le(Ye,K)>=0)return"[Circular]";function In(ji,Ic,lW){if(Ic&&(Ye=A.call(Ye),Ye.push(Ic)),lW){var ck={depth:$e.depth};return re($e,"quoteStyle")&&(ck.quoteStyle=$e.quoteStyle),W(ji,ck,Ue+1,Ye)}return W(ji,$e,Ue+1,Ye)}if(typeof K=="function"&&!Y(K)){var $i=oe(K),zi=Re(K,In);return"[Function"+($i?": "+$i:" (anonymous)")+"]"+(zi.length>0?" { "+k.call(zi,", ")+" }":"")}if(ce(K)){var ok=_?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(K);return typeof K=="object"&&!_?ke(ok):ok}if(X(K)){for(var na="<"+E.call(String(K.nodeName)),Gh=K.attributes||[],Cc=0;Cc<Gh.length;Cc++)na+=" "+Gh[Cc].name+"="+H(ee(Gh[Cc].value),"double",$e);return na+=">",K.childNodes&&K.childNodes.length&&(na+="..."),na+="</"+E.call(String(K.nodeName))+">",na}if(te(K)){if(K.length===0)return"[]";var Yh=Re(K,In);return Jr&&!ct(Yh)?"["+Qt(Yh,Jr)+"]":"[ "+k.call(Yh,", ")+" ]"}if(Z(K)){var Kh=Re(K,In);return!("cause"in Error.prototype)&&"cause"in K&&!z.call(K,"cause")?"{ ["+String(K)+"] "+k.call(w.call("[cause]: "+In(K.cause),Kh),", ")+" }":Kh.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+k.call(Kh,", ")+" }"}if(typeof K=="object"&&ot){if(B&&typeof K[B]=="function"&&V)return V(K,{depth:Qr-Ue});if(ot!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(be(K)){var ik=[];return r&&r.call(K,function(ji,Ic){ik.push(In(Ic,K,!0)+" => "+In(ji,K))}),Ne("Map",n.call(K),ik,Jr)}if(J(K)){var sk=[];return a&&a.call(K,function(ji){sk.push(In(ji,K))}),Ne("Set",s.call(K),sk,Jr)}if(de(K))return De("WeakMap");if(j(K))return De("WeakSet");if(ne(K))return De("WeakRef");if(R(K))return ke(In(Number(K)));if(Q(K))return ke(In(N.call(K)));if(ae(K))return ke(h.call(K));if(pe(K))return ke(In(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof im<"u"&&K===im)return"{ [object globalThis] }";if(!q(K)&&!Y(K)){var Zh=Re(K,In),ak=D?D(K)===Object.prototype:K instanceof Object||K.constructor===Object,Xh=K instanceof Object?"":"null prototype",lk=!ak&&F&&Object(K)===K&&F in K?b.call(he(K),8,-1):Xh?"Object":"",aW=ak||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",Qh=aW+(lk||Xh?"["+k.call(w.call([],lk||[],Xh||[]),": ")+"] ":"");return Zh.length===0?Qh+"{}":Jr?Qh+"{"+Qt(Zh,Jr)+"}":Qh+"{ "+k.call(Zh,", ")+" }"}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 ie(W){return!F||!(typeof W=="object"&&(F in W||typeof W[F]<"u"))}function te(W){return he(W)==="[object Array]"&&ie(W)}function q(W){return he(W)==="[object Date]"&&ie(W)}function Y(W){return he(W)==="[object RegExp]"&&ie(W)}function Z(W){return he(W)==="[object Error]"&&ie(W)}function pe(W){return he(W)==="[object String]"&&ie(W)}function R(W){return he(W)==="[object Number]"&&ie(W)}function ae(W){return he(W)==="[object Boolean]"&&ie(W)}function ce(W){if(_)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function Q(W){if(!W||typeof W!="object"||!N)return!1;try{return N.call(W),!0}catch{}return!1}var ue=Object.prototype.hasOwnProperty||function(W){return W in this};function re(W,K){return ue.call(W,K)}function he(W){return y.call(W)}function oe(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 De(W){return W+" { ? }"}function Ne(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 Nt(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=`
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
3
  `+K.prev+K.base;return Oe+k.call(W,","+Oe)+`
4
- `+K.prev}function Re(W,K){var Oe=te(W),Ue=[];if(Oe){Ue.length=W.length;for(var Ye=0;Ye<W.length;Ye++)Ue[Ye]=re(W,Ye)?K(W[Ye],W):""}var $e=typeof M=="function"?M(W):[],ot;if(_){ot={};for(var gt=0;gt<$e.length;gt++)ot["$"+$e[gt]]=$e[gt]}for(var it in W)re(W,it)&&(Oe&&String(Number(it))===it&&it<W.length||_&&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 M=="function")for(var xn=0;xn<$e.length;xn++)z.call(W,$e[xn])&&Ue.push("["+K($e[xn])+"]: "+K(W[$e[xn]],W));return Ue}return Pc}var Oc,cm;function fk(){if(cm)return Oc;cm=1;var e=ra(),t=Mo(),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 Oc=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},Oc}var _c,um;function dm(){return um||(um=1,_c=Object),_c}var Mc,fm;function pk(){return fm||(fm=1,Mc=Error),Mc}var Dc,pm;function hk(){return pm||(pm=1,Dc=EvalError),Dc}var Nc,hm;function mk(){return hm||(hm=1,Nc=RangeError),Nc}var Fc,mm;function gk(){return mm||(mm=1,Fc=ReferenceError),Fc}var Lc,gm;function yk(){return gm||(gm=1,Lc=SyntaxError),Lc}var Vc,ym;function vk(){return ym||(ym=1,Vc=URIError),Vc}var $c,vm;function bk(){return vm||(vm=1,$c=Math.abs),$c}var zc,bm;function xk(){return bm||(bm=1,zc=Math.floor),zc}var jc,xm;function wk(){return xm||(xm=1,jc=Math.max),jc}var Rc,wm;function Sk(){return wm||(wm=1,Rc=Math.min),Rc}var Bc,Sm;function Tk(){return Sm||(Sm=1,Bc=Math.pow),Bc}var Hc,Tm;function Ek(){return Tm||(Tm=1,Hc=Math.round),Hc}var Wc,Em;function kk(){return Em||(Em=1,Wc=Number.isNaN||function(t){return t!==t}),Wc}var qc,km;function Ck(){if(km)return qc;km=1;var e=kk();return qc=function(n){return e(n)||n===0?n:n<0?-1:1},qc}var Uc,Cm;function Ik(){return Cm||(Cm=1,Uc=Object.getOwnPropertyDescriptor),Uc}var Gc,Im;function Am(){if(Im)return Gc;Im=1;var e=Ik();if(e)try{e([],"length")}catch{e=null}return Gc=e,Gc}var Yc,Pm;function Ak(){if(Pm)return Yc;Pm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Yc=e,Yc}var Kc,Om;function Pk(){return Om||(Om=1,Kc=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}),Kc}var Zc,_m;function Ok(){if(_m)return Zc;_m=1;var e=typeof Symbol<"u"&&Symbol,t=Pk();return Zc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Zc}var Xc,Mm;function Dm(){return Mm||(Mm=1,Xc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Xc}var Qc,Nm;function Fm(){if(Nm)return Qc;Nm=1;var e=dm();return Qc=e.getPrototypeOf||null,Qc}var Jc,Lm;function _k(){if(Lm)return Jc;Lm=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 Jc=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),h=[],y=0;y<p;y++)h[y]="$"+y;if(d=Function("binder","return function ("+s(h,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},Jc}var eu,Vm;function oa(){if(Vm)return eu;Vm=1;var e=_k();return eu=Function.prototype.bind||e,eu}var tu,$m;function nu(){return $m||($m=1,tu=Function.prototype.call),tu}var ru,zm;function jm(){return zm||(zm=1,ru=Function.prototype.apply),ru}var ou,Rm;function Mk(){return Rm||(Rm=1,ou=typeof Reflect<"u"&&Reflect&&Reflect.apply),ou}var iu,Bm;function Dk(){if(Bm)return iu;Bm=1;var e=oa(),t=jm(),n=nu(),r=Mk();return iu=r||e.call(n,t),iu}var su,Hm;function Wm(){if(Hm)return su;Hm=1;var e=oa(),t=Mo(),n=nu(),r=Dk();return su=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},su}var au,qm;function Nk(){if(qm)return au;qm=1;var e=Wm(),t=Am(),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 au=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,au}var lu,Um;function Fk(){if(Um)return lu;Um=1;var e=Dm(),t=Fm(),n=Nk();return lu=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,lu}var cu,Gm;function Lk(){if(Gm)return cu;Gm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=oa();return cu=n.call(e,t),cu}var uu,Ym;function du(){if(Ym)return uu;Ym=1;var e,t=dm(),n=pk(),r=hk(),o=mk(),i=gk(),s=yk(),a=Mo(),l=vk(),c=bk(),u=xk(),d=wk(),f=Sk(),p=Tk(),h=Ek(),y=Ck(),m=Function,v=function(Y){try{return m('"use strict"; return ('+Y+").constructor;")()}catch{}},b=Am(),x=Ak(),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=Ok()(),w=Fk(),k=Fm(),A=Dm(),O=jm(),N=nu(),M={},$=typeof Uint8Array>"u"||!w?e:w(Uint8Array),_={__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%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%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%":M,"%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%":N,"%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%":h,"%Math.sign%":y,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(Y){var F=w(w(Y));_["%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 R=Y("%AsyncGeneratorFunction%");R&&(pe=R.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ae=Y("%AsyncGenerator%");ae&&w&&(pe=w(ae.prototype))}return _[Z]=pe,pe},D={__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=oa(),V=Lk(),L=C.call(N,Array.prototype.concat),B=C.call(O,Array.prototype.splice),U=C.call(N,String.prototype.replace),G=C.call(N,String.prototype.slice),H=C.call(N,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,te=function(Z){var pe=G(Z,0,1),R=G(Z,-1);if(pe==="%"&&R!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(R==="%"&&pe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ae=[];return U(Z,ee,function(ce,Q,ue,re){ae[ae.length]=ue?U(re,ie,"$1"):Q||ce}),ae},q=function(Z,pe){var R=Z,ae;if(V(D,R)&&(ae=D[R],R="%"+ae[0]+"%"),V(_,R)){var ce=_[R];if(ce===M&&(ce=z(R)),typeof ce>"u"&&!pe)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ae,name:R,value:ce}}throw new s("intrinsic "+Z+" does not exist!")};return uu=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 R=te(Z),ae=R.length>0?R[0]:"",ce=q("%"+ae+"%",pe),Q=ce.name,ue=ce.value,re=!1,he=ce.alias;he&&(ae=he[0],B(R,L([0,1],he)));for(var oe=1,le=!0;oe<R.length;oe+=1){var be=R[oe],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)&&(re=!0),ae+="."+be,Q="%"+ae+"%",V(_,Q))ue=_[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&&oe+1>=R.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&&!re&&(_[Q]=ue)}}return ue},uu}var fu,Km;function Zm(){if(Km)return fu;Km=1;var e=du(),t=Wm(),n=t([e("%String.prototype.indexOf%")]);return fu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},fu}var pu,Xm;function Qm(){if(Xm)return pu;Xm=1;var e=du(),t=Zm(),n=ra(),r=Mo(),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 pu=!!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 h=l(d,p);return c(d)===0&&(d=void 0),h}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?a(d,p):!1},set:function(p,h){d||(d=new o),s(d,p,h)}};return f},pu}var hu,Jm;function Vk(){if(Jm)return hu;Jm=1;var e=du(),t=Zm(),n=ra(),r=Qm(),o=Mo(),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 hu=i?function(){var d,f,p={assert:function(h){if(!p.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&f)return f.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?s(d,h):f&&f.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!f&&f.has(h)},set:function(h,y){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),a(d,h,y)):r&&(f||(f=r()),f.set(h,y))}};return p}:r,hu}var mu,eg;function tg(){if(eg)return mu;eg=1;var e=Mo(),t=ra(),n=fk(),r=Qm(),o=Vk(),i=o||r||n;return mu=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},mu}var ng=e=>Array.isArray(e),gu=e=>e===void 0,yu=e=>e===null,$k=Function.bind.call(Function.call,Object.prototype.toString),zk=e=>!!e&&$k(e)==="[object Error]"||e instanceof Error,rg=(e,t)=>e instanceof t,jk=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Rk=e=>Object.prototype.toString.call(e)==="[object Date]"&&rg(e,Date),Be={array:ng,date:Rk,empty:e=>yu(e)||gu(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:rg,isError:zk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>yu(e)||gu(e),null:yu,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!ng(e)&&typeof e=="object",primitive:jk,string:e=>typeof e=="string",undefined:gu},Bk=e=>Object.keys(e),Rn=(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},Hk=e=>e.replace(/[^0-9]/g,"");const Wk=(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},qk=(e,t)=>({classGroupId:e,validator:t}),og=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ia="-",ig=[],Uk="arbitrary..",Gk=e=>{const t=Kk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Yk(s);const a=s.split(ia),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?Wk(c,l):l:c||ig}return n[s]||ig}}},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(ia):e.slice(t).join(ia),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},Yk=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?Uk+r:void 0})(),Kk=e=>{const{theme:t,classGroups:n}=e;return Zk(n,t)},Zk=(e,t)=>{const n=og();for(const r in e){const o=e[r];vu(o,n,r,t)}return n},vu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Xk(s,t,n,r)}},Xk=(e,t,n,r)=>{if(typeof e=="string"){Qk(e,t,n);return}if(typeof e=="function"){Jk(e,t,n,r);return}eC(e,t,n,r)},Qk=(e,t,n)=>{const r=e===""?t:ag(t,e);r.classGroupId=n},Jk=(e,t,n,r)=>{if(tC(e)){vu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qk(n,e))},eC=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];vu(l,ag(t,a),n,r)}},ag=(e,t)=>{let n=e;const r=t.split(ia),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=og(),n.nextPart.set(s,a)),n=a}return n},tC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nC=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)}}},bu="!",lg=":",rC=[],cg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),oC=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===lg){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(bu)?(f=d.slice(0,-1),p=!0):d.startsWith(bu)&&(f=d.slice(1),p=!0);const h=c&&c>l?c-l:void 0;return cg(i,p,f,h)};if(t){const o=t+lg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):cg(rC,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},iC=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}},sC=e=>({cache:nC(e.cacheSize),parseClassName:oC(e),sortModifiers:iC(e),...Gk(e)}),aC=/\s+/,lC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(aC);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!y,v=r(m?h.substring(0,y):h);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=p?b+bu: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},cC=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=ug(n))&&(o&&(o+=" "),o+=r);return o},ug=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ug(e[r]))&&(n&&(n+=" "),n+=t);return n},uC=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=sC(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=lC(l,n);return o(l,u),u};return i=s,(...l)=>i(cC(...l))},dC=[],$t=e=>{const t=n=>n[e]||dC;return t.isThemeGetter=!0,t},dg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fC=/^\d+\/\d+$/,pC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hC=/\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$/,mC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Do=e=>fC.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),xu=e=>e.endsWith("%")&&qe(e.slice(0,-1)),ur=e=>pC.test(e),vC=()=>!0,bC=e=>hC.test(e)&&!mC.test(e),pg=()=>!1,xC=e=>gC.test(e),wC=e=>yC.test(e),SC=e=>!Se(e)&&!Te(e),TC=e=>No(e,vg,pg),Se=e=>dg.test(e),eo=e=>No(e,bg,bC),wu=e=>No(e,AC,qe),hg=e=>No(e,gg,pg),EC=e=>No(e,yg,wC),sa=e=>No(e,xg,xC),Te=e=>fg.test(e),Bi=e=>Fo(e,bg),kC=e=>Fo(e,PC),mg=e=>Fo(e,gg),CC=e=>Fo(e,vg),IC=e=>Fo(e,yg),aa=e=>Fo(e,xg,!0),No=(e,t,n)=>{const r=dg.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fo=(e,t,n=!1)=>{const r=fg.exec(e);return r?r[1]?t(r[1]):n:!1},gg=e=>e==="position"||e==="percentage",yg=e=>e==="image"||e==="url",vg=e=>e==="length"||e==="size"||e==="bg-size",bg=e=>e==="length",AC=e=>e==="number",PC=e=>e==="family-name",xg=e=>e==="shadow",OC=uC(()=>{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"),h=$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=()=>[Do,"full","auto",...k()],O=()=>[Tr,"none","subgrid",Te,Se],N=()=>["auto",{span:["full",Tr,Te,Se]},Tr,Te,Se],M=()=>[Tr,"auto",Te,Se],$=()=>["auto","min","max","fr",Te,Se],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],D=()=>[Do,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,Te,Se],V=()=>[...T(),mg,hg,{position:[Te,Se]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",CC,TC,{size:[Te,Se]}],U=()=>[xu,Bi,eo],G=()=>["","none","full",c,Te,Se],H=()=>["",qe,Bi,eo],ee=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[qe,xu,mg,hg],q=()=>["","none",h,Te,Se],Y=()=>["none",qe,Te,Se],Z=()=>["none",qe,Te,Se],pe=()=>[qe,Te,Se],R=()=>[Do,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ur],breakpoint:[ur],color:[vC],container:[ur],"drop-shadow":[ur],ease:["in","out","in-out"],font:[SC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ur],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ur],shadow:[ur],spacing:["px",qe],text:[ur],"text-shadow":[ur],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Do,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:[Do,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Do,"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:N()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"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:[..._(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"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:D()}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Bi,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,wu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xu,Se]}],"font-family":[{font:[kC,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,wu]}],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,eo]}],"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:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,Te,Se],radial:["",Te,Se],conic:[Tr,Te,Se]},IC,EC]}],"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,Bi,eo]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,aa,sa]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,aa,sa]}],"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,eo]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,aa,sa]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[qe,Te,Se]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"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:B()}],"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,aa,sa]}],"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:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"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,Bi,eo,wu]}],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"]}}),dr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},_C=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Su=e=>Be.function(e),Pe=(...e)=>OC(nm(e)),wg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Hi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Sg=e=>e.scrollHeight>e.clientHeight,Wi=(e,t)=>{if(e&&e.getBoundingClientRect){const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)}return 320},MC=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},Tg=(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},cn=S.forwardRef(function(t,n){const r=t.as||"span";return g.jsx(r,{ref:n,...t,as:void 0})}),DC={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"}},NC=_o("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),FC=_o("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:DC,defaultVariants:{theme:"primary",size:"default"}}),la=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return g.jsxs(cn,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Pe(FC({size:s,theme:o?"loading":i}),t),children:[n?g.jsx("span",{"aria-hidden":"true",className:NC({theme:n})}):null,r,a.children]})}),LC=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return g.jsx("form",{...e,onSubmit:t})};var _t=function(){return _t=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},_t.apply(this,arguments)};function Tu(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 Eu(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 qi=function(e){return e.replace(new RegExp(" ","g")," ")},Eg=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)},VC=function(e){return e.replace(/^0+([0-9]+)/,"$1")},kg=function(e,t,n){var r=e.length-2,o=VC(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Cg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ca=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},$C=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ku=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},zC=function(e){return e==="money"||e==="currency"},jC=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return _t(_t({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ua=function(e,t){var n=Eg(Cg(e),t.fraction.length),r="".concat(t.currency).concat(kg(n,t.group,t.decimal));return qi(r)},RC=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=Tu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var h=jC(r,i,a);return h.currency=qi("".concat(h.currency.trim()," ")),h.literal=qi(h.literal.trim()),h},[r,i]),f=function(h){var y=ua(h.target.value,d),m=ca(y);h.target.value=y,h.target.setAttribute("data-number",m.toString()),l?.(h),m!==0&&(u.current.selectionEnd=y.length)};S.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var y=ua(h,d),m=ca(y);u.current.value=y,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l?.(_t(_t({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=y.length)}}},[d]);var p=c.defaultValue?ua(c.defaultValue,d):void 0;return S.createElement("input",_t({},c,{value:typeof c.value=="string"?ua(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),BC=1,HC=function(e){return e==="percentage"||e==="percent"||e==="percentual"},WC=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return _t(_t({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},da=function(e,t){var n=Eg(Cg(e),t.fraction.length),r="".concat(kg(n,t.group,t.decimal)," ").concat(t.percentSign);return qi(r)},qC=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=Tu(e,["locale","mask","onChange","onKeyUp"]),a=S.useRef(null),l=Eu(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(da(b,d))},[s.value]);var d=S.useMemo(function(){var v=WC(r);return v.percentSign=qi("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-BC,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)))},h=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=da(v.target.value,d),x=ca(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=da(v,d),x=ca(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(_t(_t({},T),{target:a.current,currentTarget:a.current}))}}},[]),S.useEffect(function(){return p()},[c]);var m=s.defaultValue?da(s.defaultValue,d):void 0;return S.createElement("input",_t({},s,{defaultValue:m,inputMode:"decimal",onChange:y,onFocus:p,onKeyUp:h,ref:a,type:"text"}))}),Ui={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},UC=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=fa[i];s===void 0?r.push(i.replace(Ui.dots,"\\.").replace(Ui.openParenthesis,"\\(").replace(Ui.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ui.leadingBars,"\\")},Gi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Cu(o,n);var i=UC(o);return n?"^".concat(i,"$"):i},GC=function(e){return e.replace(Ui.escape,"\\$&")},Cu=function(e,t){var n=e.map(function(r){return typeof r=="string"?GC(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},fa={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]/}},YC=/\d/,Ig="(dd) 9dddd-dddd",Ag="(dd) dddd-dddd",Pg="ddd.ddd.ddd-dd",Og="dd.ddd.ddd/dddd-dd",pa=function(e){return e.replace(/\D/g,"")},KC=["2",/[0-3]/,":",/[0-5]/,/\d/],ZC=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Pg,isoDate:"dddd-dd-dd",cnpj:Og,telephone:Ag,cellphone:Ig,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return pa(e).length<=11?Pg:Og},int:function(e){return e===void 0&&(e=""),YC.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=pa(e);return t.length<11?Ag:Ig},time:function(e){var t=pa(e),n=t[0];return n==="2"?KC:ZC}},rn=function(e,t,n){var r;return n===void 0&&(n={}),_t({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Gi(e,"",!0),infinity:n.infinity},n)},Kt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:pa}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function _g(e,t,n,r){var o,i;r===void 0&&(r=fa);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 Mg=function(e){return e},XC=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Gi(e,n,t));return r.test(n)};function QC(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var JC=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=Tu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=S.useRef(null);S.useImperativeHandle(t,function(){return h.current});var y=ku(a),m=ku(d),v=ku(u),b=S.useRef(XC(u,i,p.value||p.defaultValue)),x=f??"input",T=Eu(S.useState(""),2),E=T[0],I=T[1],w=QC(E),k=S.useCallback(function(F,z){var D,C,V=(D=F??z)!==null&&D!==void 0?D:"";if(u===void 0)return V;var L=(C=V?.toString())!==null&&C!==void 0?C:"";return _g(L,typeof u=="function"?u(L):u,s??Mg,c??fa)},[s,u,c]),A=Eu(S.useState(function(){return k(p.value,p.defaultValue)}),2),O=A[0],N=A[1],M=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)?Cu(F,i):Gi(u,O,i)}return typeof u=="string"?Gi(u,O,i):Cu(u,i)},[l,O,i,u]);S.useEffect(function(){if(p.value!==void 0){var F=k(p.value,p.defaultValue);N(F),h.current!==null&&(h.current.value=F)}},[p.value,u,s,p.defaultValue]);var _=function(F){var z,D,C,V,L,B=F.currentTarget,U=F.target.value;if(v.current===void 0)return N(U),(z=m.current)===null||z===void 0||z.call(m,U),(D=y.current)===null||D===void 0||D.call(y,F),d?.(U);var G=new RegExp(Gi(v.current,U,i)),H=(C=B.selectionEnd)!==null&&C!==void 0?C:0,ee=function(Z,pe,R){if(Z.type!=="number")return Z.setSelectionRange(pe,R)};if(r&&b.current&&U.length>=O.length)return B.value=O,ee(B,H-1,H-1);var ie=!1;U.length<w.length&&(b.current=!1,ie=!0),G.test(U)&&(b.current=!0);var te=H,q=U[te-1],Y=_g(U,typeof v.current=="function"?v.current(U):v.current,s??Mg,c??fa);for(B.value=Y,N(Y);te<Y.length&&Y.charAt(te-1)!==q;)te+=1;ie?ee(B,H,H):ee(B,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,_t({},p,{ref:h,pattern:$,onChange:_,defaultValue:Dg(p.defaultValue)?M:void 0,value:Dg(p.value)?k(p.value,p.value):p.value}))}),Dg=function(e){return typeof e=="string"},Ng=S.forwardRef(function(e,t){return zC(e.mask)?S.createElement(RC,_t({},e,{mask:void 0,ref:t})):HC(e.mask)?S.createElement(qC,_t({},e,{mask:void 0,ref:t})):S.createElement(JC,_t({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(Ng,_t({},e,t))}};on(Kt.cellTelephone),on(Kt.cellphone),on(Kt.cep),on(Kt.cnpj),on(Kt.color),on(Kt.cpf),on(Kt.cpfCnpj),on(Kt.creditCard),on(Kt.date),on(Kt.int),on(Kt.isoDate),on(Kt.telephone),on(Kt.time),on(Kt.uuid);var Fg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&$C(Kt,t.mask)?Kt[t.mask]:{mask:t.mask}},[t.mask]),o=_t(_t({},t),r);return S.createElement(Ng,_t({},o,{ref:n}))});const Lg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const eI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const tI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Vg=e=>{const t=tI(e);return t.charAt(0).toUpperCase()+t.slice(1)};var nI={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 rI=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,...nI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Lg("lucide",o),...!i&&!rI(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const et=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(oI,{ref:i,iconNode:t,className:Lg(`lucide-${eI(Vg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Vg(e),n};const iI=et("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 sI=et("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 $g=et("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 aI=et("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 lI=et("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 Iu=et("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const cI=et("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Au=et("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Pu=et("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 uI=et("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 dI=et("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 fI=et("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 zg=et("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 jg=et("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 Rg=et("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 pI=et("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 hI=et("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 Ou=et("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 mI=et("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=et("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 gI=et("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const yI=et("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const vI=et("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const _u=et("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const bI=et("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 xI=et("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 Mu=et("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 ha=et("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 Du=et("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 wI=et("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 Lo=et("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ma={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))},[]),Bg=(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]:Bg(s,t,n,a)}},{}),Hg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ga=(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)},SI={default:e=>ga(e,{result:Hg.default}),dark:e=>ga(e,{result:Hg.dark})},Vo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},TI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Nu=(e,t)=>{const n=kr(e.colors,Vo(t?.colors)),r=kr(e.spacing,Vo(t?.spacing)),o=kr(e.rounded,Vo(t?.rounded)),i=kr(e.shadow,Vo(t?.rounded)),s=kr(e.zIndex,Vo(t?.zIndex??TI)),a=e.custom?kr(e.custom,Vo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},EI=(e,t)=>ga(Nu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),kI=(e,t)=>Nu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),CI=(e,t)=>ga(Nu(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),ya={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",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=>g.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"},va={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},to=S.createContext({parser:ma.hsla,tweaks:va,floatingRef:void 0,map:ya,locale:void 0}),At=()=>{const e=S.useContext(to);return e?e.map:ya},Fu=()=>{const e=S.useContext(to);return e?e.tweaks:va};function ba(){return typeof window<"u"}function Cr(e){return xa(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(xa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xa(e){return ba()?e instanceof Node||e instanceof Wt(e).Node:!1}function tt(e){return ba()?e instanceof Element||e instanceof Wt(e).Element:!1}function Pt(e){return ba()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Yi(e){return!ba()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}const II=new Set(["inline","contents"]);function Ki(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=un(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!II.has(o)}const AI=new Set(["table","td","th"]);function PI(e){return AI.has(Cr(e))}const OI=[":popover-open",":modal"];function wa(e){return OI.some(t=>{try{return e.matches(t)}catch{return!1}})}const _I=["transform","translate","scale","rotate","perspective"],MI=["transform","translate","scale","rotate","perspective","filter"],DI=["paint","layout","strict","content"];function Lu(e){const t=Sa(),n=tt(e)?un(e):e;return _I.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)||MI.some(r=>(n.willChange||"").includes(r))||DI.some(r=>(n.contain||"").includes(r))}function NI(e){let t=pr(e);for(;Pt(t)&&!fr(t);){if(Lu(t))return t;if(wa(t))return null;t=pr(t)}return null}function Sa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const FI=new Set(["html","body","#document"]);function fr(e){return FI.has(Cr(e))}function un(e){return Wt(e).getComputedStyle(e)}function Ta(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pr(e){if(Cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yi(e)&&e.host||Bn(e);return Yi(t)?t.host:t}function Wg(e){const t=pr(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&Ki(t)?t:Wg(t)}function Ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){const a=Vu(s);return t.concat(s,s.visualViewport||[],Ki(o)?o:[],a&&n?Ir(a):[])}return t.concat(o,Ir(o,[],n))}function Vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const LI=["top","right","bottom","left"],qg=["start","end"],Ug=LI.reduce((e,t)=>e.concat(t,t+"-"+qg[0],t+"-"+qg[1]),[]),Ar=Math.min,dn=Math.max,Ea=Math.round,$o=Math.floor,Hn=e=>({x:e,y:e}),VI={left:"right",right:"left",bottom:"top",top:"bottom"},$I={start:"end",end:"start"};function $u(e,t,n){return dn(e,Ar(t,n))}function no(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function An(e){return e.split("-")[1]}function Gg(e){return e==="x"?"y":"x"}function zu(e){return e==="y"?"height":"width"}const zI=new Set(["top","bottom"]);function hr(e){return zI.has(Wn(e))?"y":"x"}function ju(e){return Gg(hr(e))}function Yg(e,t,n){n===void 0&&(n=!1);const r=An(e),o=ju(e),i=zu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ca(s)),[s,Ca(s)]}function jI(e){const t=Ca(e);return[ka(e),t,ka(t)]}function ka(e){return e.replace(/start|end/g,t=>$I[t])}const Kg=["left","right"],Zg=["right","left"],RI=["top","bottom"],BI=["bottom","top"];function HI(e,t,n){switch(e){case"top":case"bottom":return n?t?Zg:Kg:t?Kg:Zg;case"left":case"right":return t?RI:BI;default:return[]}}function WI(e,t,n,r){const o=An(e);let i=HI(Wn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ka)))),i}function Ca(e){return e.replace(/left|right|bottom|top/g,t=>VI[t])}function qI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xg(e){return typeof e!="number"?qI(e):{top:e,right:e,bottom:e,left:e}}function Ia(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 UI=["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] *)"],Aa=UI.join(","),Qg=typeof Element>"u",zo=Qg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Pa=!Qg&&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},Oa=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]"):Oa(t.parentNode));return s},GI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Jg=function(t,n,r){if(Oa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Aa));return n&&zo.call(t,Aa)&&o.unshift(t),o=o.filter(r),o},_a=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Oa(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=_a(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=zo.call(s,Aa);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!Oa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=_a(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},ey=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ty=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||GI(t))&&!ey(t)?0:t.tabIndex},YI=function(t,n){var r=ty(t);return r<0&&n&&!ey(t)?0:r},KI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ny=function(t){return t.tagName==="INPUT"},ZI=function(t){return ny(t)&&t.type==="hidden"},XI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JI=function(t){if(!t.name)return!0;var n=t.form||Pa(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=QI(o,t.form);return!i||i===t},eA=function(t){return ny(t)&&t.type==="radio"},tA=function(t){return eA(t)&&!JI(t)},nA=function(t){var n,r=t&&Pa(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=Pa(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},ry=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},rA=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=zo.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(zo.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=Pa(t);if(c&&!c.shadowRoot&&o(c)===!0)return ry(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(nA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ry(t);return!1},oA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return zo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ru=function(t,n){return!(n.disabled||ZI(n)||rA(n,t)||XI(n)||oA(n))},Bu=function(t,n){return!(tA(n)||ty(n)<0||!Ru(t,n))},iA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},oy=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=YI(a,s),c=s?oy(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(KI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},jo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_a([t],n.includeContainer,{filter:Bu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:iA}):r=Jg(t,n.includeContainer,Bu.bind(null,n)),oy(r)},sA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_a([t],n.includeContainer,{filter:Ru.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Jg(t,n.includeContainer,Ru.bind(null,n)),r},iy=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return zo.call(t,Aa)===!1?!1:Bu(n,t)};function Hu(){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 ay(){return/apple/i.test(navigator.vendor)}function Wu(){const e=/android/i;return e.test(Hu())||e.test(sy())}function aA(){return Hu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function ly(){return sy().includes("jsdom/")}const cy="data-floating-ui-focusable",lA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",qu="ArrowLeft",Uu="ArrowRight",cA="ArrowUp",uA="ArrowDown";function qn(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 Bt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Gu(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 dA(e){return e.matches("html,body")}function qt(e){return e?.ownerDocument||document}function Yu(e){return Pt(e)&&e.matches(lA)}function Ku(e){return e?e.getAttribute("role")==="combobox"&&Yu(e):!1}function fA(e){if(!e||ly())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ma(e){return e?e.hasAttribute(cy)?e:e.querySelector("["+cy+"]")||e:null}function ro(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,...ro(e,o.id,n)])}function pA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),ro(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function uy(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 hA(e){return"nativeEvent"in e}function dy(e){return e.mozInputSource===0&&e.isTrusted?!0:Wu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fy(e){return ly()?!1:!Wu()&&e.width===0&&e.height===0||Wu()&&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 Ro(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var mA=typeof document<"u",gA=function(){},nt=mA?S.useLayoutEffect:gA;const yA={...P};function Ht(e){const t=P.useRef(e);return nt(()=>{t.current=e}),t}const vA=yA.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 vA(()=>{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 Da(e,t,n){return Math.floor(e/t)!==n}function Zi(e,t){return t<0||t>=e.current.length}function Zu(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&&Na(e,s,o));return s}function bA(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===cA){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,h=c%s,y=c-(h-p);h===p?f=c:f=h>p?y:y-s}Zi(e,f)&&(f=u)}if(n.key===uA&&(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}))),Zi(e,f)&&(f=u)),r==="both"){const p=$o(u/s);n.key===(i?qu:Uu)&&(d&&Ut(n),u%s!==s-1?(f=Zt(e,{startingIndex:u,disabledIndices:a}),o&&Da(f,s,p)&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a})),Da(f,s,p)&&(f=u)),n.key===(i?Uu:qu)&&(d&&Ut(n),u%s!==0?(f=Zt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Da(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})),Da(f,s,p)&&(f=u));const h=$o(c/s)===p;Zi(e,f)&&(o&&h?f=n.key===(i?Uu:qu)?c:Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function xA(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 wA(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 SA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Na(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 Xi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hy(e,t){const n=jo(e,Xi()),r=n.length;if(r===0)return;const o=qn(qt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function my(e){return hy(qt(e).body,1)||e}function gy(e){return hy(qt(e).body,-1)||e}function Qi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Bt(n,r)}function TA(e){jo(e,Xi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function yy(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 vy(e,t,n){let{reference:r,floating:o}=e;const i=hr(t),s=ju(t),a=zu(s),l=Wn(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(An(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 EA(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}=no(t,e),h=Xg(p),m=a[f?d==="floating"?"reference":"floating":d],v=Ia(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=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-E.top+h.top)/T.y,bottom:(E.bottom-v.bottom+h.bottom)/T.y,left:(v.left-E.left+h.left)/T.x,right:(E.right-v.right+h.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}=vy(c,r,l),f=r,p={},h=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:EA},elements:{reference:e,floating:t}});u=x??u,d=T??d,p={...p,[v]:{...p[v],...E}},I&&h<=50&&(h++,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}=vy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}},CA=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}=no(e,t)||{};if(c==null)return{};const d=Xg(u),f={x:n,y:r},p=ju(o),h=zu(p),y=await s.getDimensions(c),m=p==="y",v=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",T=i.reference[h]+i.reference[p]-f[p]-i.floating[h],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[h]);const k=T/2-E/2,A=w/2-y[h]/2-1,O=Ar(d[v],A),N=Ar(d[b],A),M=O,$=w-y[h]-N,_=w/2-y[h]/2+k,F=$u(M,_,$),z=!l.arrow&&An(o)!=null&&_!==F&&i.reference[h]/2-(_<M?O:N)-y[h]/2<0,D=z?_<M?_-M:_-$:0;return{[p]:f[p]+D,data:{[p]:F,centerOffset:_-F-D,...z&&{alignmentOffset:D}},reset:z}}});function IA(e,t,n){return(e?[...n.filter(o=>An(o)===e),...n.filter(o=>An(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?An(o)===e||(t?ka(o)!==o:!1):!0)}const AA=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=Ug,autoAlignment:p=!0,...h}=no(e,t),y=d!==void 0||f===Ug?IA(d||null,p,f):f,m=await l.detectOverflow(t,h),v=((n=s.autoPlacement)==null?void 0:n.index)||0,b=y[v];if(b==null)return{};const x=Yg(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:y[0]}};const T=[m[Wn(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 N=An(O.placement);return[O.placement,N&&u?O.overflows.slice(0,2).reduce((M,$)=>M+$,0):O.overflows[0],O.overflows]}).sort((O,N)=>O[1]-N[1]),A=((o=w.filter(O=>O[2].slice(0,An(O[0])?2:3).every(N=>N<=0))[0])==null?void 0:o[0])||w[0][0];return A!==a?{data:{index:v+1,overflows:E},reset:{placement:A}}:{}}}},PA=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:h="none",flipAlignment:y=!0,...m}=no(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Wn(o),b=hr(a),x=Wn(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!y?[Ca(a)]:jI(a)),I=h!=="none";!f&&I&&E.push(...WI(a,y,h,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 _=Yg(o,s,T);A.push(k[_[0]],k[_[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(_=>_<=0)){var N,M;const _=(((N=i.flip)==null?void 0:N.index)||0)+1,F=w[_];if(F&&(!(d==="alignment"?b!==hr(F):!1)||O.every(C=>hr(C.placement)===b?C.overflows[0]>0:!0)))return{data:{index:_,overflows:O},reset:{placement:F}};let z=(M=O.filter(D=>D.overflows[0]<=0).sort((D,C)=>D.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!z)switch(p){case"bestFit":{var $;const D=($=O.filter(C=>{if(I){const V=hr(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];D&&(z=D);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},OA=new Set(["left","top"]);async function _A(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Wn(n),a=An(n),l=hr(n)==="y",c=OA.has(s)?-1:1,u=i&&l?-1:1,d=no(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const MA=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 _A(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}}}}},DA=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}=no(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=hr(Wn(o)),p=Gg(f);let h=u[p],y=u[f];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+d[v],T=h-d[b];h=$u(x,h,T)}if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=y+d[v],T=y-d[b];y=$u(x,y,T)}const m=l.fn({...t,[p]:h,[f]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:s,[f]:a}}}}}},NA=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}=no(e,t),u=await s.detectOverflow(t,c),d=Wn(o),f=An(o),p=hr(o)==="y",{width:h,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=h-u.left-u.right,T=Ar(y-u[m],b),E=Ar(h-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=dn(u.left,0),N=dn(u.right,0),M=dn(u.top,0),$=dn(u.bottom,0);p?k=h-2*(O!==0||N!==0?O+N:dn(u.left,u.right)):w=y-2*(M!==0||$!==0?M+$:dn(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const A=await s.getDimensions(a.floating);return h!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function by(e){const t=un(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=Ea(n)!==i||Ea(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Xu(e){return tt(e)?e:e.contextElement}function Bo(e){const t=Xu(e);if(!Pt(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=by(t);let s=(i?Ea(n.width):n.width)/r,a=(i?Ea(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const FA=Hn(0);function xy(e){const t=Wt(e);return!Sa()||!t.visualViewport?FA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function oo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xu(e);let s=Hn(1);t&&(r?tt(r)&&(s=Bo(r)):s=Bo(e));const a=LA(i,n,r)?xy(i):Hn(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 h=f,y=Vu(h);for(;y&&r&&p!==h;){const m=Bo(y),v=y.getBoundingClientRect(),b=un(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,h=Wt(y),y=Vu(h)}}return Ia({width:u,height:d,x:l,y:c})}function Fa(e,t){const n=Ta(e).scrollLeft;return t?t.left+n:oo(Bn(e)).left+n}function wy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function VA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Bn(r),a=t?wa(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Pt(r);if((d||!d&&!i)&&((Cr(r)!=="body"||Ki(s))&&(l=Ta(r)),Pt(r))){const p=oo(r);c=Bo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=s&&!d&&!i?wy(s,l):Hn(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 $A(e){return Array.from(e.getClientRects())}function zA(e){const t=Bn(e),n=Ta(e),r=e.ownerDocument.body,o=dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Fa(e);const a=-n.scrollTop;return un(r).direction==="rtl"&&(s+=dn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sy=25;function jA(e,t){const n=Wt(e),r=Bn(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=Sa();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Fa(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,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=Sy&&(i-=h)}else c<=Sy&&(i+=c);return{width:i,height:s,x:a,y:l}}const RA=new Set(["absolute","fixed"]);function BA(e,t){const n=oo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pt(e)?Bo(e):Hn(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 Ty(e,t,n){let r;if(t==="viewport")r=jA(e,n);else if(t==="document")r=zA(Bn(e));else if(tt(t))r=BA(t,n);else{const o=xy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ia(r)}function Ey(e,t){const n=pr(e);return n===t||!tt(n)||fr(n)?!1:un(n).position==="fixed"||Ey(n,t)}function HA(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=un(e).position==="fixed";let s=i?pr(e):e;for(;tt(s)&&!fr(s);){const a=un(s),l=Lu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&RA.has(o.position)||Ki(s)&&!l&&Ey(e,s))?r=r.filter(u=>u!==s):o=a,s=pr(s)}return t.set(e,r),r}function WA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?wa(t)?[]:HA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Ty(t,u,o);return c.top=dn(d.top,c.top),c.right=Ar(d.right,c.right),c.bottom=Ar(d.bottom,c.bottom),c.left=dn(d.left,c.left),c},Ty(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qA(e){const{width:t,height:n}=by(e);return{width:t,height:n}}function UA(e,t,n){const r=Pt(t),o=Bn(t),i=n==="fixed",s=oo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Fa(o)}if(r||!r&&!i)if((Cr(t)!=="body"||Ki(o))&&(a=Ta(t)),r){const p=oo(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?wy(o,a):Hn(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 Qu(e){return un(e).position==="static"}function ky(e,t){if(!Pt(e)||un(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function Cy(e,t){const n=Wt(e);if(wa(e))return n;if(!Pt(e)){let o=pr(e);for(;o&&!fr(o);){if(tt(o)&&!Qu(o))return o;o=pr(o)}return n}let r=ky(e,t);for(;r&&PI(r)&&Qu(r);)r=ky(r,t);return r&&fr(r)&&Qu(r)&&!Lu(r)?n:r||NI(e)||n}const GA=async function(e){const t=this.getOffsetParent||Cy,n=this.getDimensions,r=await n(e.floating);return{reference:UA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function YA(e){return un(e).direction==="rtl"}const KA={convertOffsetParentRelativeRectToViewportRelativeRect:VA,getDocumentElement:Bn,getClippingRect:WA,getOffsetParent:Cy,getElementRects:GA,getClientRects:$A,getDimensions:qA,getScale:Bo,isElement:tt,isRTL:YA};function Iy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ZA(e,t){let n=null,r;const o=Bn(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 h=$o(d),y=$o(o.clientWidth-(u+f)),m=$o(o.clientHeight-(d+p)),v=$o(u),x={rootMargin:-h+"px "+-y+"px "+-m+"px "+-v+"px",threshold:dn(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&&!Iy(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 io(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=Xu(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?ZA(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 h,y=l?oo(e):null;l&&m();function m(){const v=oo(e);y&&!Iy(y,v)&&n(),y=v,h=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(h)}}const XA=MA,QA=AA,JA=DA,eP=PA,tP=NA,Ay=CA,nP=(e,t,n)=>{const r=new Map,o={platform:KA,...n},i={...o.platform,_c:r};return kA(e,t,{...o,platform:i})};var rP=typeof document<"u",oP=function(){},La=rP?S.useLayoutEffect:oP;function Va(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(!Va(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)&&!Va(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Py(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oy(e,t){const n=Py(e);return Math.round(t*n)/n}function Ju(e){const t=P.useRef(e);return La(()=>{t.current=e}),t}function iP(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);Va(f,r)||p(r);const[h,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||h,E=s||m,I=P.useRef(null),w=P.useRef(null),k=P.useRef(u),A=l!=null,O=Ju(l),N=Ju(o),M=Ju(c),$=P.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};N.current&&(C.platform=N.current),nP(I.current,w.current,C).then(V=>{const L={...V,isPositioned:M.current!==!1};_.current&&!Va(k.current,L)&&(k.current=L,cr.flushSync(()=>{d(L)}))})},[f,t,n,N,M]);La(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const _=P.useRef(!1);La(()=>(_.current=!0,()=>{_.current=!1}),[]),La(()=>{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]),D=P.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const V=Oy(z.floating,u.x),L=Oy(z.floating,u.y);return a?{...C,transform:"translate("+V+"px, "+L+"px)",...Py(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:D}),[u,$,F,z,D])}const sP=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?Ay({element:r.current,padding:o}).fn(n):{}:r?Ay({element:r,padding:o}).fn(n):{}}}},Ho=(e,t)=>({...XA(e),options:[e,t]}),$a=(e,t)=>({...JA(e),options:[e,t]}),za=(e,t)=>({...eP(e),options:[e,t]}),_y=(e,t)=>({...tP(e),options:[e,t]}),My=(e,t)=>({...QA(e),options:[e,t]}),ed=(e,t)=>({...sP(e),options:[e,t]});function aP(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 Dy=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function lP(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(aP).forEach((d,f)=>{c.set(d,f)}),c},[o]);return g.jsx(Dy.Provider,{value:P.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function Ny(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=P.useContext(Dy),[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 cP="data-floating-ui-focusable",Fy="active",Ly="selected",Ji="ArrowLeft",es="ArrowRight",Vy="ArrowUp",ja="ArrowDown",uP={...P};let $y=!1,dP=0;const zy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dP++;function fP(){const[e,t]=P.useState(()=>$y?zy():void 0);return nt(()=>{e==null&&t(zy())},[]),P.useEffect(()=>{$y=!0},[]),e}const ts=uP.useId||fP;let ns;process.env.NODE_ENV!=="production"&&(ns=new Set);function Ra(){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=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.warn(o)}}function pP(){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=ns)!=null&&e.has(o))){var i;(i=ns)==null||i.add(o),console.error(o)}}const td=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:h,...y}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Ra("The `ref` prop is required for `FloatingArrow`."));const v=ts(),[b,x]=P.useState(!1);if(nt(()=>{if(!o)return;un(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),N=l/2*c/4,M=!!p,$=w&&E==="end"?"bottom":"top";let _=w&&E==="end"?"right":"left";w&&b&&(_=E==="end"?"left":"right");const F=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-N))+(" Q"+a/2+","+l+" "+O+","+(l-N))+" Z",C={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[T];return g.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:M?a:a+k,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[_]:F,[$]:z,[T]:I||M?"100%":"calc(100% - "+k/2+"px)",transform:[C,h].filter(V=>!!V).join(" "),...y},children:[k>0&&g.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:D}),g.jsx("path",{stroke:k&&!p?m.fill:"none",d:D}),g.jsx("clipPath",{id:v,children:g.jsx("rect",{x:-A,y:A*(M?-1:1),width:a+k,height:a})})]})});function jy(){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 Ry=P.createContext(null),By=P.createContext(null),Pr=()=>{var e;return((e=P.useContext(Ry))==null?void 0:e.id)||null},Or=()=>P.useContext(By);function hP(e){const t=ts(),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 mP(e){const{children:t,id:n}=e,r=Pr();return g.jsx(Ry.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function gP(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(()=>jy());return g.jsx(By.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function so(e){return"data-floating-ui-"+e}function Gt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Hy=so("safe-polygon");function nd(e,t,n){if(n&&!Ro(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 rd(e){return typeof e=="function"?e():e}function Wy(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(),h=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),N=kt(()=>{var D;const C=(D=o.current.openEvent)==null?void 0:D.type;return C?.includes("mouse")&&C!=="mousedown"});P.useEffect(()=>{if(!a)return;function D(C){let{open:V}=C;V||(Gt(T),Gt(I),w.current=!0,O.current=!1)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[a,i]),P.useEffect(()=>{if(!a||!y.current||!n)return;function D(V){N()&&r(!1,V,"hover")}const C=qt(s.floating).documentElement;return C.addEventListener("mouseleave",D),()=>{C.removeEventListener("mouseleave",D)}},[s.floating,n,r,a,y,N]);const M=P.useCallback(function(D,C,V){C===void 0&&(C=!0),V===void 0&&(V="hover");const L=nd(m.current,"close",x.current);L&&!E.current?(Gt(T),T.current=window.setTimeout(()=>r(!1,D,V),L)):C&&(Gt(T),r(!1,D,V))},[m,r]),$=kt(()=>{A.current(),E.current=void 0}),_=kt(()=>{if(k.current){const D=qt(s.floating).body;D.style.pointerEvents="",D.removeAttribute(Hy),k.current=!1}}),F=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);P.useEffect(()=>{if(!a)return;function D(U){if(Gt(T),w.current=!1,u&&!Ro(x.current)||rd(b.current)>0&&!nd(m.current,"open"))return;const G=nd(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()){_();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(){_(),$(),F()||M(U,!0,"safe-polygon")}});const ee=E.current;G.addEventListener("mousemove",ee),A.current=()=>{G.removeEventListener("mousemove",ee)};return}(x.current!=="touch"||!Bt(s.floating,U.relatedTarget))&&M(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(){_(),$(),F()||M(U)}})(U))}function L(){Gt(T)}function B(U){F()||M(U,!1)}if(tt(s.domReference)){const U=s.domReference,G=s.floating;return n&&U.addEventListener("mouseleave",V),f&&U.addEventListener("mousemove",D,{once:!0}),U.addEventListener("mouseenter",D),U.addEventListener("mouseleave",C),G&&(G.addEventListener("mouseleave",V),G.addEventListener("mouseenter",L),G.addEventListener("mouseleave",B)),()=>{n&&U.removeEventListener("mouseleave",V),f&&U.removeEventListener("mousemove",D),U.removeEventListener("mouseenter",D),U.removeEventListener("mouseleave",C),G&&(G.removeEventListener("mouseleave",V),G.removeEventListener("mouseenter",L),G.removeEventListener("mouseleave",B))}}},[s,a,e,u,f,M,$,_,r,n,v,p,m,y,o,F,b]),nt(()=>{var D;if(a&&n&&(D=y.current)!=null&&(D=D.__options)!=null&&D.blockPointerEvents&&N()){k.current=!0;const V=s.floating;if(tt(s.domReference)&&V){var C;const L=qt(s.floating).body;L.setAttribute(Hy,"");const B=s.domReference,U=p==null||(C=p.nodesRef.current.find(G=>G.id===h))==null||(C=C.context)==null?void 0:C.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",B.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{L.style.pointerEvents="",B.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,h,s,p,y,N]),nt(()=>{n||(x.current=void 0,O.current=!1,$(),_())},[n,$,_]),P.useEffect(()=>()=>{$(),Gt(T),Gt(I),_()},[a,s.domReference,$,_]);const z=P.useMemo(()=>{function D(C){x.current=C.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(C){const{nativeEvent:V}=C;function L(){!w.current&&!v.current&&r(!0,V,"hover")}u&&!Ro(x.current)||n||rd(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,rd(b.current))))}}},[u,r,n,v,b]);return P.useMemo(()=>a?{reference:z}:{},[a,z])}let qy=0;function ao(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(qy);const i=()=>e?.focus({preventScroll:n});o?i():qy=requestAnimationFrame(i)}function od(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vP(e){return e?.ownerDocument||document}const Wo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Uy(e){return e==="inert"?Wo.inert:e==="aria-hidden"?Wo["aria-hidden"]:Wo.none}let Ba=new WeakSet,Ha={},id=0;const bP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Gy=e=>e&&(e.host||Gy(e.parentNode)),xP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Gy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function wP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=xP(t,e),a=new Set,l=new Set(s),c=[];Ha[o]||(Ha[o]=new WeakMap);const u=Ha[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,h=>{if(Cr(h)!=="script")if(a.has(h))f(h);else{const y=i?h.getAttribute(i):null,m=y!==null&&y!=="false",v=Uy(i),b=(v.get(h)||0)+1,x=(u.get(h)||0)+1;v.set(h,b),u.set(h,x),c.push(h),b===1&&m&&Ba.add(h),x===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,i==="inert"?"":"true")}})}return id++,()=>{c.forEach(p=>{const h=Uy(i),m=(h.get(p)||0)-1,v=(u.get(p)||0)-1;h.set(p,m),u.set(p,v),m||(!Ba.has(p)&&i&&p.removeAttribute(i),Ba.delete(p)),v||p.removeAttribute(o)}),id--,id||(Wo.inert=new WeakMap,Wo["aria-hidden"]=new WeakMap,Wo.none=new WeakMap,Ba=new WeakSet,Ha={})}}function Yy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vP(e[0]).body;return wP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const sd={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},Wa=P.forwardRef(function(t,n){const[r,o]=P.useState();nt(()=>{ay()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[so("focus-guard")]:"",style:sd};return g.jsx("span",{...t,...i})}),SP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ky=P.createContext(null),Zy=so("portal");function TP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ts(),o=Xy(),[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(Zy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!xa(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(Zy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function mr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=TP({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,h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||f)return;function y(m){i&&Qi(m)&&(m.type==="focusin"?yy:TA)(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||yy(i))},[p,i]),g.jsxs(Ky.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[h&&i&&g.jsx(Wa,{"data-type":"outside",ref:l,onFocus:y=>{if(Qi(y,i)){var m;(m=u.current)==null||m.focus()}else{const v=s?s.domReference:null,b=gy(v);b?.focus()}}}),h&&i&&g.jsx("span",{"aria-owns":i.id,style:SP}),i&&cr.createPortal(t,i),h&&i&&g.jsx(Wa,{"data-type":"outside",ref:c,onFocus:y=>{if(Qi(y,i)){var m;(m=d.current)==null||m.focus()}else{const v=s?s.domReference:null,b=my(v);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const Xy=()=>P.useContext(Ky);function Qy(e){return P.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const EP=20;let _r=[];function ad(){_r=_r.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function kP(e){ad(),e&&Cr(e)!=="body"&&(_r.push(new WeakRef(e)),_r.length>EP&&(_r=_r.slice(-20)))}function Jy(){ad();const e=_r[_r.length-1];return e?.deref()}function CP(e){const t=Xi();return iy(e,t)?e:jo(e,t)[0]||e}function ev(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Xi(),i=sA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return iy(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 IP=P.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:sd})});function lo(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:h,onOpenChange:y,events:m,dataRef:v,elements:{domReference:b,floating:x}}=t,T=kt(()=>{var R;return(R=v.current.floatingContext)==null?void 0:R.nodeId}),E=kt(p),I=typeof s=="number"&&s<0,w=Ku(b)&&I,k=bP(),A=k?i:!0,O=!A||k&&f,N=Ht(o),M=Ht(s),$=Ht(a),_=Or(),F=Xy(),z=P.useRef(null),D=P.useRef(null),C=P.useRef(!1),V=P.useRef(!1),L=P.useRef(-1),B=P.useRef(-1),U=F!=null,G=Ma(x),H=kt(function(R){return R===void 0&&(R=G),R?jo(R,Xi()):[]}),ee=kt(R=>{const ae=H(R);return N.current.map(ce=>b&&ce==="reference"?b:G&&ce==="floating"?G:ae).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function R(ce){if(ce.key==="Tab"){Bt(G,qn(qt(G)))&&H().length===0&&!w&&Ut(ce);const Q=ee(),ue=Un(ce);N.current[0]==="reference"&&ue===b&&(Ut(ce),ce.shiftKey?ao(Q[Q.length-1]):ao(Q[1])),N.current[1]==="floating"&&ue===G&&ce.shiftKey&&(Ut(ce),ao(Q[0]))}}const ae=qt(G);return ae.addEventListener("keydown",R),()=>{ae.removeEventListener("keydown",R)}},[r,b,G,c,N,w,H,ee]),P.useEffect(()=>{if(r||!x)return;function R(ae){const ce=Un(ae),ue=H().indexOf(ce);ue!==-1&&(L.current=ue)}return x.addEventListener("focusin",R),()=>{x.removeEventListener("focusin",R)}},[r,x,H]),P.useEffect(()=>{if(r||!d)return;function R(){V.current=!0,setTimeout(()=>{V.current=!1})}function ae(ue){const re=ue.relatedTarget,he=ue.currentTarget,oe=Un(ue);queueMicrotask(()=>{const le=T(),be=!(Bt(b,re)||Bt(x,re)||Bt(re,x)||Bt(F?.portalNode,re)||re!=null&&re.hasAttribute(so("focus-guard"))||_&&(ro(_.nodesRef.current,le).find(de=>{var ne,J;return Bt((ne=de.context)==null?void 0:ne.elements.floating,re)||Bt((J=de.context)==null?void 0:J.elements.domReference,re)})||uy(_.nodesRef.current,le).find(de=>{var ne,J,j;return[(ne=de.context)==null?void 0:ne.elements.floating,Ma((J=de.context)==null?void 0:J.elements.floating)].includes(re)||((j=de.context)==null?void 0:j.elements.domReference)===re})));if(he===b&&G&&ev(G,N),l&&he!==b&&!(oe!=null&&oe.isConnected)&&qn(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)&&re&&be&&!V.current&&re!==Jy()&&(C.current=!0,y(!1,ue,"focus-out"))})}const ce=!!(!_&&F);function Q(){Gt(B),v.current.insideReactTree=!0,B.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Pt(b))return b.addEventListener("focusout",ae),b.addEventListener("pointerdown",R),x.addEventListener("focusout",ae),ce&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",ae),b.removeEventListener("pointerdown",R),x.removeEventListener("focusout",ae),ce&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,_,F,y,d,l,H,w,T,N,v]);const ie=P.useRef(null),te=P.useRef(null),q=Qy([ie,F?.beforeInsideRef]),Y=Qy([te,F?.afterInsideRef]);P.useEffect(()=>{var R,ae;if(r||!x)return;const ce=Array.from((F==null||(R=F.portalNode)==null?void 0:R.querySelectorAll("["+so("portal")+"]"))||[]),ue=(ae=(_?uy(_.nodesRef.current,T()):[]).find(oe=>{var le;return Ku(((le=oe.context)==null?void 0:le.elements.domReference)||null)}))==null||(ae=ae.context)==null?void 0:ae.elements.domReference,re=[x,ue,...ce,...E(),z.current,D.current,ie.current,te.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,N.current.includes("reference")||w?b:null].filter(oe=>oe!=null),he=c||w?Yy(re,!O,O):Yy(re);return()=>{he()}},[r,b,x,c,N,F,w,A,O,_,T,E]),nt(()=>{if(r||!Pt(G))return;const R=qt(G),ae=qn(R);queueMicrotask(()=>{const ce=ee(G),Q=M.current,ue=(typeof Q=="number"?ce[Q]:Q.current)||G,re=Bt(G,ae);!I&&!re&&h&&ao(ue,{preventScroll:ue===G})})},[r,h,G,I,ee,M]),nt(()=>{if(r||!G)return;const R=qt(G),ae=qn(R);kP(ae);function ce(re){let{reason:he,event:oe,nested:le}=re;if(["hover","safe-polygon"].includes(he)&&oe.type==="mouseleave"&&(C.current=!0),he==="outside-press")if(le)C.current=!1;else if(dy(oe)||fy(oe))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=R.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,sd),U&&b&&b.insertAdjacentElement("afterend",Q);function ue(){if(typeof $.current=="boolean"){const re=b||Jy();return re&&re.isConnected?re:Q}return $.current.current||Q}return()=>{m.off("openchange",ce);const re=qn(R),he=Bt(x,re)||_&&ro(_.nodesRef.current,T(),!1).some(le=>{var be;return Bt((be=le.context)==null?void 0:be.elements.floating,re)}),oe=ue();queueMicrotask(()=>{const le=CP(oe);$.current&&!C.current&&Pt(le)&&(!(le!==re&&re!==R.body)||he)&&le.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,$,v,m,_,U,b,T]),P.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(ad)}),[r]),nt(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:y,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,c,h,y,d,b]),nt(()=>{r||G&&ev(G,N)},[r,G,N]);function Z(R){return r||!u||!c?null:g.jsx(IP,{ref:R==="start"?z:D,onClick:ae=>y(!1,ae.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const pe=!r&&A&&(c?!w:!0)&&(U||c);return g.jsxs(g.Fragment,{children:[pe&&g.jsx(Wa,{"data-type":"inside",ref:q,onFocus:R=>{if(c){const ce=ee();ao(o[0]==="reference"?ce[0]:ce[ce.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(C.current=!1,Qi(R,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&&g.jsx(Wa,{"data-type":"inside",ref:Y,onFocus:R=>{if(c)ao(ee()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(C.current=!0),Qi(R,F.portalNode)){const ce=gy(b);ce?.focus()}else{var ae;(ae=F.afterOutsideRef.current)==null||ae.focus()}}})]})}let qa=0;const tv="--floating-ui-scrollbar-width";function AP(){const e=Hu(),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(tv,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(tv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let nv=()=>{};const ld=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return qa++,qa===1&&(nv=AP()),()=>{qa--,qa===0&&nv()}},[r]),g.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function rv(e){return Pt(e.target)&&e.target.tagName==="BUTTON"}function PP(e){return Pt(e.target)&&e.target.tagName==="A"}function ov(e){return Yu(e)}function qo(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),h=P.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const m=f.current;y.button===0&&a!=="click"&&(Ro(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}Ro(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||rv(y))&&(y.key===" "&&!ov(i)&&(y.preventDefault(),p.current=!0),!PP(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!u||rv(y)||ov(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:h}:{},[s,h])}function OP(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 iv(e){return e!=null&&e.clientX!=null}function _P(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,h]=P.useState(),[y,m]=P.useState([]),v=kt((I,w)=>{d.current||r.current.openEvent&&!iv(r.current.openEvent)||s.setPositionReference(OP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),b=kt(I=>{c!=null||u!=null||(n?f.current||m([]):v(I.clientX,I.clientY))}),x=Ro(p)?o:n,T=P.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const I=Wt(o);function w(k){const A=Un(k);Bt(o,A)?(I.removeEventListener("mousemove",w),f.current=null):v(k.clientX,k.clientY)}if(!r.current.openEvent||iv(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;h(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return P.useMemo(()=>a?{reference:E}:{},[a,E])}const MP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},DP={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 Mr(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:h}=t,y=Or(),m=kt(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(h),w=P.useRef(!1),k=kt(_=>{var F;if(!n||!s||!a||_.key!=="Escape"||w.current)return;const z=(F=i.current.floatingContext)==null?void 0:F.nodeId,D=y?ro(y.nodesRef.current,z):[];if(!x&&(_.stopPropagation(),D.length>0)){let C=!0;if(D.forEach(V=>{var L;if((L=V.context)!=null&&L.open&&!V.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,hA(_)?_.nativeEvent:_,"escape-key")}),A=kt(_=>{var F;const z=()=>{var D;k(_),(D=Un(_))==null||D.removeEventListener("keydown",z)};(F=Un(_))==null||F.addEventListener("keydown",z)}),O=kt(_=>{var F;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const D=b.current;if(b.current=!1,c==="click"&&D||z||typeof v=="function"&&!v(_))return;const C=Un(_),V="["+so("inert")+"]",L=qt(o.floating).querySelectorAll(V);let B=tt(C)?C:null;for(;B&&!fr(B);){const ee=pr(B);if(fr(ee)||!tt(ee))break;B=ee}if(L.length&&tt(C)&&!dA(C)&&!Bt(C,o.floating)&&Array.from(L).every(ee=>!Bt(B,ee)))return;if(Pt(C)&&$){const ee=fr(C),ie=un(C),te=/auto|scroll/,q=ee||te.test(ie.overflowX),Y=ee||te.test(ie.overflowY),Z=q&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,pe=Y&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,R=ie.direction==="rtl",ae=pe&&(R?_.offsetX<=C.offsetWidth-C.clientWidth:_.offsetX>C.clientWidth),ce=Z&&_.offsetY>C.clientHeight;if(ae||ce)return}const U=(F=i.current.floatingContext)==null?void 0:F.nodeId,G=y&&ro(y.nodesRef.current,U).some(ee=>{var ie;return Gu(_,(ie=ee.context)==null?void 0:ie.elements.floating)});if(Gu(_,o.floating)||Gu(_,o.domReference)||G)return;const H=y?ro(y.nodesRef.current,U):[];if(H.length>0){let ee=!0;if(H.forEach(ie=>{var te;if((te=ie.context)!=null&&te.open&&!ie.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,_,"outside-press")}),N=kt(_=>{var F;const z=()=>{var D;O(_),(D=Un(_))==null||D.removeEventListener(c,z)};(F=Un(_))==null||F.addEventListener(c,z)});P.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let _=-1;function F(L){r(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(_),w.current=!0}function D(){_=window.setTimeout(()=>{w.current=!1},Sa()?5:0)}const C=qt(o.floating);a&&(C.addEventListener("keydown",E?A:k,E),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",D)),v&&C.addEventListener(c,I?N: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 B;return L!==((B=C.defaultView)==null?void 0:B.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",D)),v&&C.removeEventListener(c,I?N:O,I),V.forEach(L=>{L.removeEventListener("scroll",F)}),window.clearTimeout(_)}},[i,o,a,v,c,n,r,f,s,x,T,k,E,A,O,I,N]),P.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const M=P.useMemo(()=>({onKeyDown:k,...u&&{[MP[d]]:_=>{r(!1,_.nativeEvent,"reference-press")},...d!=="click"&&{onClick(_){r(!1,_.nativeEvent,"reference-press")}}}}),[k,r,u,d]),$=P.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[DP[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return P.useMemo(()=>s?{reference:M,floating:$}:{},[s,M,$])}function NP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ts(),i=P.useRef({}),[s]=P.useState(()=>jy()),a=Pr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&pP("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((p,h,y)=>{i.current.openEvent=p?h:void 0,s.emit("openchange",{open:p,event:h,reason:y,nested:a}),n?.(p,h,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 Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=NP({...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=iP({...e,elements:{...o,...a&&{reference:a}}}),h=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:h,domReference:d}),[p.refs,y,h]),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 cd(){return aA()&&ay()}function FP(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 h(){!n&&Pt(s.domReference)&&s.domReference===qn(qt(s.domReference))&&(c.current=!0)}function y(){d.current=!0}function m(){d.current=!1}return p.addEventListener("blur",h),cd()&&(p.addEventListener("keydown",y,!0),p.addEventListener("pointerdown",m,!0)),()=>{p.removeEventListener("blur",h),cd()&&(p.removeEventListener("keydown",y,!0),p.removeEventListener("pointerdown",m,!0))}},[s.domReference,n,a]),P.useEffect(()=>{if(!a)return;function p(h){let{reason:y}=h;(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 h=Un(p.nativeEvent);if(l&&tt(h)){if(cd()&&!p.relatedTarget){if(!d.current&&!Yu(h))return}else if(!fA(h))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const h=p.relatedTarget,y=p.nativeEvent,m=tt(h)&&h.hasAttribute(so("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=qn(s.domReference?s.domReference.ownerDocument:document);!h&&b===s.domReference||Bt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Bt(s.domReference,b)||m||r(!1,y,"focus")})}}),[i,s.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function ud(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Fy]:s,[Ly]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[cP]:""},...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&&[Fy,Ly].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,h=new Array(p),y=0;y<p;y++)h[y]=arguments[y];return(f=r.get(c))==null?void 0:f.map(m=>m(...h)).find(m=>m!==void 0)}}}else s[c]=u}),s),{})}}function Yn(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=>ud(a,e,"reference"),t),i=P.useCallback(a=>ud(a,e,"floating"),n),s=P.useCallback(a=>ud(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const LP="Escape";function Ua(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ga(e,t){return Ua(t,e===Vy||e===ja,e===Ji||e===es)}function dd(e,t,n){return Ua(t,e===ja,n?e===Ji:e===es)||e==="Enter"||e===" "||e===""}function av(e,t,n){return Ua(t,n?e===Ji:e===es,e===ja)}function lv(e,t,n,r){const o=n?e===es:e===Ji,i=e===Vy;return t==="both"||t==="horizontal"&&r&&r>1?e===LP:Ua(t,o,i)}function Ya(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:h=!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||Ra("`useListNavigation` looping must be enabled to allow escaping."),y||Ra("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Ra("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const N=Ma(o.floating),M=Ht(N),$=Pr(),_=Or();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const F=kt(()=>{l(C.current===-1?null:C.current)}),z=Ku(o.domReference),D=P.useRef(m),C=P.useRef(u??-1),V=P.useRef(null),L=P.useRef(!0),B=P.useRef(F),U=P.useRef(!!o.floating),G=P.useRef(n),H=P.useRef(!1),ee=P.useRef(!1),ie=Ht(x),te=Ht(n),q=Ht(w),Y=Ht(u),[Z,pe]=P.useState(),[R,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),_?.events.emit("virtualfocus",X),k&&(k.current=X)}else ao(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?D.current&&u!=null&&(ee.current=!0,C.current=u,F()):U.current&&(C.current=-1,B.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)&&D.current&&(V.current!=null||D.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||dd(V.current,T,h)||p?Zu(s,ie.current):py(s,ie.current),V.current=null,F())};ne()}}else Zi(s,a)||(C.current=a,ce(),ee.current=!1)},[c,n,o.floating,a,Y,p,s,T,h,F,ce,ie]),nt(()=>{var de;if(!c||o.floating||!_||y||!U.current)return;const ne=_.nodesRef.current,J=(de=ne.find(me=>me.id===$))==null||(de=de.context)==null?void 0:de.elements.floating,j=qn(qt(o.floating)),X=ne.some(me=>me.context&&Bt(me.context.elements.floating,j));J&&!X&&L.current&&J.focus({preventScroll:!0})},[c,o.floating,_,$,y]),nt(()=>{if(!c||!_||!y||$)return;function de(ne){ae(ne.id),k&&(k.current=ne)}return _.events.on("virtualfocus",de),()=>{_.events.off("virtualfocus",de)}},[c,_,y,$,k]),nt(()=>{B.current=F,G.current=n,U.current=!!o.floating}),nt(()=>{n||(V.current=null,D.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=M.current)==null||X.focus({preventScroll:!0})}}}},[te,M,v,s,F,y]),re=P.useCallback(()=>{var de;return E??(_==null||(de=_.nodesRef.current.find(ne=>ne.id===$))==null||(de=de.context)==null||(de=de.dataRef)==null?void 0:de.current.orientation)},[$,_,E]),he=kt(de=>{if(L.current=!1,H.current=!0,de.which===229||!te.current&&de.currentTarget===M.current)return;if(p&&lv(de.key,T,h,I)){Ga(de.key,re())||Ut(de),r(!1,de.nativeEvent,"list-navigation"),Pt(o.domReference)&&(y?_?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const ne=C.current,J=Zu(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=xA(X,I,O),ve=me.findIndex(Ne=>Ne!=null&&!Na(s,Ne,x)),ke=me.reduce((Ne,ct,Nt)=>ct!=null&&!Na(s,ct,x)?Nt:Ne,-1),De=me[bA({current:me.map(Ne=>Ne!=null?s.current[Ne]:null)},{event:de,orientation:T,loop:f,rtl:h,cols:I,disabledIndices:SA([...(typeof x!="function"?x:null)||s.current.map((Ne,ct)=>Na(s,ct,x)?ct:void 0),void 0],me),minIndex:ve,maxIndex:ke,prevIndex:wA(C.current>j?J:C.current,X,me,I,de.key===ja?"bl":de.key===(h?Ji:es)?"tr":"tl"),stopEvent:!0})];if(De!=null&&(C.current=De,F()),T==="both")return}if(Ga(de.key,T)){if(Ut(de),n&&!y&&qn(de.currentTarget.ownerDocument)===de.currentTarget){C.current=dd(de.key,T,h)?J:j,F();return}dd(de.key,T,h)?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})),Zi(s,C.current)&&(C.current=-1),F()}}),oe=P.useMemo(()=>y&&n&&Q&&{"aria-activedescendant":R||Z},[y,n,Q,R,Z]),le=P.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:oe,onKeyDown:he,onPointerMove(){L.current=!0}}),[oe,he,T,z]),be=P.useMemo(()=>{function de(J){m==="auto"&&dy(J.nativeEvent)&&(D.current=!0)}function ne(J){D.current=m,m==="auto"&&fy(J.nativeEvent)&&(D.current=!0)}return{...oe,onKeyDown(J){L.current=!1;const j=J.key.startsWith("Arrow"),X=["Home","End"].includes(J.key),me=j||X,ve=av(J.key,T,h),ke=lv(J.key,T,h,I),De=av(J.key,re(),h),Ne=Ga(J.key,T),ct=(p?De:Ne)||J.key==="Enter"||J.key.trim()==="";if(y&&n){const W=_?.nodesRef.current.find(Oe=>Oe.parentId==null),K=_&&W?pA(_.nodesRef.current,W.id):null;if(me&&K&&k){const Oe=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ve||ke){var Nt,Qt;const Ue=((Nt=K.context)==null?void 0:Nt.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((Ne||X)&&K.context&&K.context.open&&K.parentId&&J.currentTarget!==K.context.elements.domReference){var Re;Ut(J),(Re=K.context.elements.domReference)==null||Re.dispatchEvent(Oe);return}}return he(J)}if(!(!n&&!b&&j)){if(ct){const W=Ga(J.key,re());V.current=p&&W?null:J.key}if(p){De&&(Ut(J),n?(C.current=Zu(s,ie.current),F()):r(!0,J.nativeEvent,"list-navigation"));return}Ne&&(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,oe,I,he,ie,m,s,p,F,r,n,b,T,re,h,u,_,y,k]);return P.useMemo(()=>c?{reference:be,floating:le,item:ue}:{},[c,be,le,ue])}const VP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gr(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=ts(),u=((n=i.domReference)==null?void 0:n.id)||c,d=P.useMemo(()=>{var b;return((b=Ma(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=VP.get(l))!=null?r:l,h=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"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,h,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 cv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Uo(e,t){return typeof e=="function"?e(t):e}function $P(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 zP(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=$P(n,s);return!c&&a==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{cr.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function uv(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,h]=P.useState(()=>({...Uo(i,c),...Uo(n,c)})),{isMounted:y,status:m}=zP(e,{duration:s}),v=Ht(n),b=Ht(r),x=Ht(o),T=Ht(i);return nt(()=>{const E=Uo(v.current,c),I=Uo(x.current,c),w=Uo(T.current,c),k=Uo(b.current,c)||Object.keys(E).reduce((A,O)=>(A[O]="",A),{});if(m==="initial"&&h(A=>({transitionProperty:A.transitionProperty,...w,...E})),m==="open"&&h({transitionProperty:Object.keys(k).map(cv).join(","),transitionDuration:d+"ms",...w,...k}),m==="close"){const A=I||E;h({transitionProperty:Object.keys(A).map(cv).join(","),transitionDuration:f+"ms",...w,...A})}},[f,x,v,b,T,d,m,c]),{isMounted:y,styles:p}}function jP(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,h=P.useRef(-1),y=P.useRef(""),m=P.useRef((n=p??s)!=null?n:-1),v=P.useRef(null),b=kt(a),x=kt(l),T=Ht(u),E=Ht(f);nt(()=>{r&&(Gt(h),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=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 N(z,D,C){const V=T.current?T.current(D,C):D.find(L=>L?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return V?z.indexOf(V):-1}const M=i.current;if(y.current.length>0&&y.current[0]!==" "&&(N(M,M,y.current)===-1?I(!1):O.key===" "&&Ut(O)),M==null||E.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Ut(O),I(!0)),M.every(z=>{var D,C;return z?((D=z[0])==null?void 0:D.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(h),h.current=window.setTimeout(()=>{y.current="",m.current=v.current,I(!1)},d);const _=m.current,F=N(M,[...M.slice((_||0)+1),...M.slice(0,(_||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 dv(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,...dv(e,o.id,n)])}function fv(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 RP(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(),h=p-l;if(s===null||a===null||h===0)return s=d,a=f,l=p,null;const y=d-s,m=f-a,b=Math.sqrt(y*y+m*m)/h;return s=d,a=f,l=p,b}const u=d=>{let{x:f,y:p,placement:h,elements:y,onClose:m,nodeId:v,tree:b}=d;return function(T){function E(){Gt(o),m()}if(Gt(o),!y.domReference||!y.floating||h==null||f==null||p==null)return;const{clientX:I,clientY:w}=T,k=[I,w],A=yP(T),O=T.type==="mouseleave",N=od(y.floating,A),M=od(y.domReference,A),$=y.domReference.getBoundingClientRect(),_=y.floating.getBoundingClientRect(),F=h.split("-")[0],z=f>_.right-_.width/2,D=p>_.bottom-_.height/2,C=RP(k,$),V=_.width>$.width,L=_.height>$.height,B=(V?$:_).left,U=(V?$:_).right,G=(L?$:_).top,H=(L?$:_).bottom;if(N&&(i=!0,!O))return;if(M&&(i=!1),M&&!O){i=!0;return}if(O&&tt(T.relatedTarget)&&od(y.floating,T.relatedTarget)||b&&dv(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=[[B,$.top+1],[B,_.bottom-1],[U,_.bottom-1],[U,$.top+1]];break;case"bottom":ee=[[B,_.top+1],[B,$.bottom-1],[U,$.bottom-1],[U,_.top+1]];break;case"left":ee=[[_.right-1,H],[_.right-1,G],[$.left+1,G],[$.left+1,H]];break;case"right":ee=[[$.right-1,H],[$.right-1,G],[_.left+1,G],[_.left+1,H]];break}function ie(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],R=[[_.left,z||V?_.bottom-t:_.top],[_.right,z?V?_.bottom-t:_.top:_.bottom-t]];return[Z,pe,...R]}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],R=[[_.left,z||V?_.top+t:_.bottom],[_.right,z?V?_.top+t:_.bottom:_.top+t]];return[Z,pe,...R]}case"left":{const Z=[q+t+1,L?Y+t/2:D?Y+t*4:Y-t*4],pe=[q+t+1,L?Y-t/2:D?Y+t*4:Y-t*4];return[...[[D||L?_.right-t:_.left,_.top],[D?L?_.right-t:_.left:_.right-t,_.bottom]],Z,pe]}case"right":{const Z=[q-t,L?Y+t/2:D?Y+t*4:Y-t*4],pe=[q-t,L?Y-t/2:D?Y+t*4:Y-t*4],R=[[D||L?_.left+t:_.right,_.top],[D?L?_.left+t:_.right:_.left+t,_.bottom]];return[Z,pe,...R]}}}if(!fv([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()}fv([I,w],ie([f,p]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const hv=200,BP=500,Go=()=>{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),gv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},fd=(e,t)=>{const n=mv(t,gv.basic,e)||mv(t,gv.extend,e);return n===void 0||n===e?void 0:n},Dr=()=>typeof window>"u",pd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yv=(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},HP=e=>!e,Yo=()=>{},vv=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},hd=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=Yo,followCursor:d=!1,...f},p){const[h,y]=S.useState(n??!1),m=S.useRef(null),v=t||"span",b=_=>{y(_),u?.(_)},{refs:x,floatingStyles:T,context:E}=Gn({placement:i,open:h,whileElementsMounted:io,onOpenChange:n?void 0:b,middleware:[$a(),Ho(5),My(),ed({padding:5,element:m}),za({fallbackAxisSideDirection:"start"})]}),I=Mr(E,{enabled:l}),w=gr(E,{role:"tooltip",enabled:l}),k=FP(E,{enabled:l?s:!1}),A=qo(E,{enabled:l?c:!1}),O=_P(E,{enabled:!!l&&!!d}),N=Wy(E,{move:!0,delay:{open:hv},enabled:l?a:!1,handleClose:c?pv():null}),{getReferenceProps:M,getFloatingProps:$}=Yn([w,I,O,s?k:void 0,a?N:void 0,c?A:void 0]);return S.useEffect(()=>y(n===void 0?!1:n),[n]),g.jsxs(S.Fragment,{children:[g.jsx(v,{...M(f),ref:dr(x.setReference,p),children:r}),h&&g.jsx(mr,{children:g.jsxs(cn,{...$(),ref:x.setFloating,style:T,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[g.jsx(td,{ref:m,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),bv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>g.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:g.jsxs("span",{className:"flex gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[s,e||o?g.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?g.jsx(hd,{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:g.jsx("span",{className:"cursor-help",children:g.jsx(Er,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:g.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full break-words max-w-48 whitespace-break-spaces",children:o})}):null,e?g.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[g.jsx(Pu,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),g.jsx(uI,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),rs=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:h,componentName:y,placeholder:m,hideLeft:v=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=Fu(),k=T!==void 0?T:w.input.iconFeedback,A=d??p,O=At(),N=e??O.inputOptionalLabel;return g.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 max-w-full min-w-0 flex-col items-start",r),children:[g.jsxs("label",{form:u,htmlFor:A,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:g.jsx(bv,{info:a,hideLeft:v,reportStatus:k,title:h,placeholder:m,children:N||n?g.jsxs(S.Fragment,{children:[b?null:g.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:N}),n?g.jsx(S.Fragment,{children:n}):null]}):null}),g.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?g.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,s?g.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",children:s}):null]})]}),g.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}),g.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})]})}),xv=(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:h="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=Hi(k.current),N=r?.(A),M=$=>{const _=$;if(_.key==="Enter"&&A.enterKeyHint==="next"){const F=A.getAttribute("data-next");if(F){const z=document.getElementById(F);if(z)return z.focus(),void _.preventDefault()}}};return A.addEventListener("keydown",M),()=>{N?.(),O(),A.removeEventListener("keydown",M)}},[]),g.jsx(rs,{...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:g.jsx(I,{...n,...T,id:w,name:w,type:h,"data-next":a,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:dr(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)})})}),Ko=xv(Fg,"input",{type:"text"}),WP=_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"}}),yr=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 g.jsxs(cn,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Pe(WP({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),co=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:h,error:y,...m},v)=>{const b=At(),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=Hi(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 g.jsx(rs,{info:n,left:h,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:g.jsxs("label",{htmlFor:T,children:[p,g.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:g.jsxs("select",{...m,id:T,name:T,required:e,ref:dr(v,x),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:Pe("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",m.className),children:[g.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 sn(e){return e?.ownerDocument||document}function qP({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(`
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(`
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 wv={};function Kn(e,t){const n=P.useRef(wv);return n.current===wv&&(n.current=e(t)),n}const md=P[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],UP=md&&md!==P.useLayoutEffect?md:e=>e();function ut(e){const t=Kn(GP).current;return t.next=e,UP(t.effect),t.trampoline}function GP(){const e={next:void 0,callback:YP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function YP(){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 gd(e){const t=Kn(KP,e).current;return t.next=e,pt(t.effect),t}function KP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let yd;process.env.NODE_ENV!=="production"&&(yd=new Set);function ZP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");yd.has(t)||(yd.add(t),console.warn(`Base UI: ${t}`))}}function fn(){}const Pn=Object.freeze({}),XP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},QP="none",Sv="track-press",JP="input-change",eO="focus-out",tO="keyboard",nO="drag";function Zo(e,t,n,r){let o=!1,i=!1;const s=r??Pn;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 Tv(e,t,n){const r=Pn;return{reason:e,event:t??new Event("base-ui"),...r}}function rO(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 vd={...P};let Ev=0;function oO(e,t="mui"){const[n,r]=P.useState(e),o=e||n;return P.useEffect(()=>{n==null&&(Ev+=1,r(`${t}-${Ev}`))},[n,t]),o}const kv=vd.useId;function Ka(e,t){if(kv!==void 0){const n=kv();return e??(t?`${t}-${n}`:n)}return oO(e,t)}function Za(e){return Ka(e,"base-ui")}function On(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 bd(e,t,n,r){const o=Kn(Cv).current;return sO(o,e,t,n,r)&&Iv(o,[e,t,n,r]),o.callback}function iO(e){const t=Kn(Cv).current;return aO(t,e)&&Iv(t,e),t.callback}function Cv(){return{callback:null,cleanup:null,refs:[]}}function sO(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function aO(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Iv(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 lO=parseInt(P.version,10);function xd(e){return lO>=e}function Av(e){if(!P.isValidElement(e))return null;const t=e,n=t.props;return(xd(19)?n?.ref:t.ref)??null}function wd(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function cO(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 uO(e,t){return typeof e=="function"?e(t):e}function dO(e,t){return typeof e=="function"?e(t):e}const os={};function Sd(e,t,n,r,o){let i={...Td(e,os)};return t&&(i=Xa(i,t)),n&&(i=Xa(i,n)),r&&(i=Xa(i,r)),i}function fO(e){if(e.length===0)return os;if(e.length===1)return Td(e[0],os);let t={...Td(e[0],os)};for(let n=1;n<e.length;n+=1)t=Xa(t,e[n]);return t}function Xa(e,t){return Pv(t)?t(e):pO(e,t)}function pO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=wd(e.style,r);break}case"className":{e[n]=Ov(e.className,r);break}default:hO(n,r)?e[n]=mO(e[n],r):e[n]=r}}return e}function hO(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 Pv(e){return typeof e=="function"}function Td(e,t){return Pv(e)?e(t):e??os}function mO(e,t){return t?e?n=>{if(gO(n)){const o=n;Ed(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Ed(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ov(e,t){return t?e?t+" "+e:t:e}function gO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=yO(t,n);if(n.enabled===!1)return null;const i=n.state??Pn;return bO(e,r,o,i)}function yO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Pn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?uO(n,i):void 0,d=c?dO(r,i):void 0,f=c?cO(i,l):Pn,p=c?wd(f,Array.isArray(a)?fO(a):a)??Pn:Pn;return typeof document<"u"&&(c?Array.isArray(s)?p.ref=iO([p.ref,Av(o),...s]):p.ref=bd(p.ref,Av(o),s):bd(null,null)),c?(u!==void 0&&(p.className=Ov(p.className,u)),d!==void 0&&(p.style=wd(p.style,d)),p):Pn}const vO=Symbol.for("react.lazy");function bO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Sd(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===vO&&(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 xO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":On(8))}function xO(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 _n(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function _v(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const is=typeof navigator<"u",kd=kO(),wO=IO(),SO=CO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),kd.platform==="MacIntel"&&kd.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(kd.platform);const TO=is&&/apple/i.test(navigator.vendor);is&&wO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const EO=SO.includes("jsdom/");function kO(){if(!is)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 CO(){if(!is)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function IO(){if(!is)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function uo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Nr(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Yi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Cd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Id(e){if(!e||EO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}const Mv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Dv(e,t){const n=jo(e,Mv()),r=n.length;if(r===0)return;const o=uo(sn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function AO(e){return Dv(sn(e).body,1)||e}function PO(e){return Dv(sn(e).body,-1)||e}function Ad(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nr(n,r)}function OO(e){jo(e,Mv()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Nv(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 Pd=P.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Pd.displayName="CompositeListContext");function _O(){return P.useContext(Pd)}function MO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ut(o),s=P.useRef(0),a=Kn(NO).current,l=Kn(DO).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)}),h=P.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(FO).forEach((x,T)=>{const E=l.get(x)??{};v.set(x,{...E,index:T})}),v},[l,c]);pt(()=>{if(typeof MutationObserver!="function"||h.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 h.forEach((b,x)=>{x.parentElement&&v.observe(x.parentElement,{childList:!0})}),()=>{v.disconnect()}},[h]),pt(()=>{d.current===c&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),s.current=h.size),i(h)},[i,h,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(h))},[a,h]);const m=P.useMemo(()=>({register:f,unregister:p,subscribeMapChange:y,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,p,y,n,r,s]);return g.jsx(Pd.Provider,{value:m,children:t})}function DO(){return new Map}function NO(){return new Set}function FO(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 LO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Fv=P.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:fn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Fv.displayName="FormContext");function Lv(){return P.useContext(Fv)}let Vv=(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 VO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},$O={valid(e){return e===null?null:e?{[Vv.valid]:""}:{[Vv.invalid]:""}}},$v=P.createContext({invalid:void 0,name:void 0,validityData:{state:VO,errors:[],error:"",value:"",initialValue:null},setValidityData:fn,disabled:void 0,touched:!1,setTouched:fn,dirty:!1,setDirty:fn,filled:!1,setFilled:fn,focused:!1,setFocused:fn,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=Pn)=>e,getInputValidationProps:(e=Pn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&($v.displayName="FieldRootContext");function Od(e=!0){const t=P.useContext($v);if(t.setValidityData===fn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":On(28));return t}function zO(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=Lv(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=Od(),f=ut(e.getValue);pt(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(h=>({...h,initialValue:p}))},[t,d,n,u.initialValue,f]),pt(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:LO(u,l),validate(p=!0){let h=n;h===void 0&&(h=f()),c.current=!0,p?cr.flushSync(()=>s(h)):s(h)}})},[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 zv=P.createContext({controlId:void 0,registerControlId:fn,labelId:void 0,setLabelId:fn,messageIds:[],setMessageIds:fn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(zv.displayName="LabelableContext");function jv(){return P.useContext(zv)}function Rv(e,t){return e-t}function jO(e,t,n){const r=e.slice();return r[t]=n,r.sort(Rv)}function Bv(e,t,n,r,o,i){let s=e;return s=_n(s,n,r),o&&(s=jO(i,t,_n(s,i[t-1]||-1/0,i[t+1]||1/0))),s}function Hv(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 ss={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...$O},_d=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(_d.displayName="SliderRootContext");function Qa(){const e=P.useContext(_d);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>.":On(62));return e}function RO(e){return"key"in e?tO:JP}function BO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?_v(e,t):!1}const Wv=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:h=0,name:y,onValueChange:m,onValueCommitted:v,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,k=Za(a),A=ut(m),O=ut(v),{clearErrors:N}=Lv(),{state:M,disabled:$,name:_,setTouched:F,setDirty:z,validityData:D,shouldValidateOnChange:C,validation:V}=Od(),{labelId:L}=jv(),B=r??L,U=$||s,G=_??y,[H,ee]=qP({controlled:I,default:i??p,name:"Slider"}),ie=P.useRef(null),te=P.useRef(null),q=P.useRef([]),Y=P.useRef(null),Z=P.useRef(null),pe=P.useRef(-1),R=P.useRef(null),ae=P.useRef(null),ce=P.useRef("none"),Q=gd(l),[ue,re]=P.useState(-1),[he,oe]=P.useState(-1),[le,be]=P.useState(!1),[de,ne]=P.useState(()=>new Map),[J,j]=P.useState([void 0,void 0]),X=ut(Re=>{re(Re),Re!==-1&&oe(Re)});zO({id:k,commit:V.commit,value:H,controlRef:te,name:G,getValue:()=>H}),rO(H,()=>{N(G),C()?V.commit(H):V.commit(H,!0);const Re=D.initialValue;let W;Array.isArray(H)&&Array.isArray(Re)?W=!_v(H,Re):W=H!==Re,z(W)});const me=ut(Re=>{Re&&(te.current=Re)}),ve=Array.isArray(H),ke=P.useMemo(()=>ve?H.slice().sort(Rv):[_n(H,p,f)],[f,p,ve,H]),De=ut((Re,W)=>{if(Number.isNaN(Re)||BO(Re,H))return;const K=W??Zo(QP,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:Re,name:G}}),K.event=Ye,ae.current=Re,A(Re,K),!K.isCanceled&&ee(Re)}),Ne=ut((Re,W,K)=>{const Oe=Bv(Re,W,p,f,ve,ke);if(Hv(Oe,x,h)){const Ue=RO(K);De(Oe,Zo(Ue,K.nativeEvent,void 0,{activeThumbIndex:W})),F(!0);const Ye=ae.current??Oe;O(Ye,Tv(Ue,K.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&ZP("Slider `max` must be greater than `min`."),pt(()=>{const Re=uo(sn(ie.current));U&&Re&&ie.current?.contains(Re)&&Re.blur()},[U]),U&&ue!==-1&&X(-1);const ct=P.useMemo(()=>({...M,activeThumbIndex:ue,disabled:U,dragging:le,orientation:b,max:f,min:p,minStepsBetweenValues:h,step:x,values:ke}),[M,ue,U,le,f,p,h,b,x,ke]),Nt=P.useMemo(()=>({active:ue,controlRef:te,disabled:U,dragging:le,validation:V,formatOptionsRef:Q,handleInputChange:Ne,indicatorPosition:J,inset:E!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:he,lastChangedValueRef:ae,lastChangeReasonRef:ce,locale:u,max:f,min:p,minStepsBetweenValues:h,name:G,onValueCommitted:O,orientation:b,pressedInputRef:Y,pressedThumbCenterOffsetRef:Z,pressedThumbIndexRef:pe,pressedValuesRef:R,registerFieldControlRef:me,renderBeforeHydration:E==="edge",setActive:X,setDragging:be,setIndicatorPosition:j,setValue:De,state:ct,step:x,thumbCollisionBehavior:T,thumbMap:de,thumbRefs:q,values:ke}),[ue,te,B,U,le,V,Q,Ne,J,c,he,ae,ce,u,f,p,h,G,O,b,Y,Z,pe,R,me,X,be,j,De,ct,x,T,E,de,q,ke]),Qt=an("div",t,{state:ct,ref:[n,ie],props:[{"aria-labelledby":B,id:k,role:"group"},V.getValidationProps,w],stateAttributesMapping:ss});return g.jsx(_d.Provider,{value:Nt,children:g.jsx(MO,{elementsRef:q,onMapChange:ne,children:Qt})})});process.env.NODE_ENV!=="production"&&(Wv.displayName="SliderRoot");const qv=new Map;function HO(e,t){const n=JSON.stringify({locale:e,options:t}),r=qv.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return qv.set(n,o),o}function Xo(e,t,n){return e==null?"":HO(t,n).format(e)}function WO(e,t,n){return e==null?"":n?Xo(e,t,n):Xo(e/100,t,{style:"percent"})}const qO=[];function as(e){P.useEffect(e,qO)}const Ja=null;let Uv=globalThis.requestAnimationFrame;class UO{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"&&Uv!==requestAnimationFrame&&(Uv=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 el=new UO;class Md{static create(){return new Md}static request(t){return el.request(t)}static cancel(t){return el.cancel(t)}currentId=Ja;request(t){this.cancel(),this.currentId=el.request(()=>{this.currentId=Ja,t()})}cancel=()=>{this.currentId!==Ja&&(el.cancel(this.currentId),this.currentId=Ja)};disposeEffect=()=>this.cancel}function Gv(){const e=Kn(Md.create).current;return as(e.disposeEffect),e}const Yv=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Yv.displayName="DirectionContext");function Kv(){return P.useContext(Yv)?.direction??"ltr"}function Zv(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function GO(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 Xv(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(GO(t)))}function Qv({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]=_n(n,f,p);for(let h=t+1;h<=u;h+=1){const y=l[h-1]+c,m=o-(u-h)*c,v=d[h]??l[h];let b=Math.max(l[h],y);v<b&&(b=Math.max(v,y)),l[h]=_n(b,y,m)}for(let h=t-1;h>=0;h-=1){const y=l[h+1]-c,m=r+h*c,v=d[h]??l[h];let b=Math.min(l[h],y);v>b&&(b=Math.min(v,y)),l[h]=_n(b,m,y)}for(let h=0;h<=u;h+=1)l[h]=Number(l[h].toFixed(12));return l}function YO({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 h=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=_n(i,x,T),I=Number(E.toFixed(12));m[o]=I;const w=i>h,k=i<h,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 N=A?o+1:o-1,M=m.map((z,D)=>{if(D===o)return I;const C=d[D];return C??u[D]});let $=i;A?$=Math.max(i,m[N]):$=Math.min(i,m[N]);const _=Qv({values:m,index:N,nextValue:$,min:s,max:a,step:l,minStepsBetweenValues:c,initialValues:M}),F=A?N-1:N+1;if(F>=0&&F<_.length){const z=_[F-1],D=_[F+1];let C=z!=null?z+p:s;C=Math.max(C,s+F*p);let V=D!=null?D-p:a;V=Math.min(V,a-(_.length-1-F)*p);const L=_n(I,C,V);_[F]=Number(L.toFixed(12))}return{value:_,thumbIndex:N,didSwap:!0}}case"push":return{value:Qv({values:u,index:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const h=u.slice(),y=h[o-1],m=h[o+1],v=y!=null?y+p:s,b=m!=null?m-p:a,x=_n(i,v,b);return h[o]=Number(x.toFixed(12)),{value:h,thumbIndex:o,didSwap:!1}}}}const KO=2;function ZO(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 tl(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 Jv=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:h,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:N,thumbCollisionBehavior:M,thumbRefs:$,values:_}=Qa(),F=Kv(),z=_.length>1,D=m==="vertical",C=P.useRef(null),V=P.useRef(null),L=ut(Q=>{Q&&V.current==null&&V.current==null&&(V.current=getComputedStyle(Q))}),B=P.useRef(null),U=P.useRef(0),G=P.useRef(0),H=gd(_),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"]')}),ie=ut(Q=>{const ue=C.current;if(!ue)return null;const{width:re,height:he,bottom:oe,left:le,right:be}=ue.getBoundingClientRect(),de=ZO(V.current,D),ne=G.current,J=(D?he:re)-de.start-de.end-ne*2,j=b.current??0,X=Q.x-j,me=Q.y-j,ve=D?oe-me-de.end:(F==="rtl"?be-X:X-le)-de.start,ke=_n((ve-ne)/J,0,1);let De=(f-p)*ke+p;if(De=Xv(De,N,p),De=_n(De,p,f),!z)return{value:De,thumbIndex:0,didSwap:!1};const Ne=x.current;if(Ne<0)return null;const ct=YO({behavior:M,values:_,currentValues:H.current??_,initialValues:T.current,pressedIndex:Ne,nextValue:De,min:p,max:f,step:N,minStepsBetweenValues:h});return M==="swap"&&ct.didSwap?ee(ct.thumbIndex):x.current=ct.thumbIndex,ct}),te=ut(Q=>{T.current=z?_.slice():null,H.current=_;const ue=x.current;let re=ue;if(ue>-1&&ue<_.length){if(_[ue]===f){let he=ue;for(;he>0&&_[he-1]===f;)he-=1;re=he}}else{const he=D?"y":"x";let oe;re=-1;for(let le=0;le<$.current.length;le+=1){const be=$.current[le];if(tt(be)){const de=Zv(be),ne=Math.abs(Q[he]-de[he]);(oe===void 0||ne<=oe)&&(re=le,oe=ne)}}}if(re>-1&&re!==ue&&ee(re),c){const he=$.current[re];if(tt(he)){const oe=he.getBoundingClientRect(),le=D?"height":"width";G.current=oe[le]/2}}}),q=ut(Q=>{$.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),Y=ut(Q=>{const ue=tl(Q,B);if(ue==null)return;if(U.current+=1,Q.type==="pointermove"&&Q.buttons===0){Z(Q);return}const re=ie(ue);re!=null&&Hv(re.value,N,h)&&(!a&&U.current>KO&&k(!0),A(re.value,Zo(nO,Q,void 0,{activeThumbIndex:re.thumbIndex})),H.current=Array.isArray(re.value)?re.value:[re.value],re.didSwap&&q(re.thumbIndex))});function Z(Q){w(-1),k(!1),v.current=null,b.current=null;const ue=tl(Q,B),re=ue!=null?ie(ue):null;if(re!=null){const he=d.current;l.commit(u.current??re.value),y(u.current??re.value,Tv(he,Q))}"pointerType"in Q&&C.current?.hasPointerCapture(Q.pointerId)&&C.current?.releasePointerCapture(Q.pointerId),x.current=-1,B.current=null,T.current=null,R()}const pe=ut(Q=>{if(s)return;const ue=Q.changedTouches[0];ue!=null&&(B.current=ue.identifier);const re=tl(Q,B);if(re!=null){te(re);const oe=ie(re);if(oe==null)return;q(oe.thumbIndex),A(oe.value,Zo(Sv,Q,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex)}U.current=0;const he=sn(C.current);he.addEventListener("touchmove",Y,{passive:!0}),he.addEventListener("touchend",Z,{passive:!0})}),R=ut(()=>{const Q=sn(C.current);Q.removeEventListener("pointermove",Y),Q.removeEventListener("pointerup",Z),Q.removeEventListener("touchmove",Y),Q.removeEventListener("touchend",Z),T.current=null}),ae=Gv();return P.useEffect(()=>{const Q=C.current;return Q?(Q.addEventListener("touchstart",pe,{passive:!0}),()=>{Q.removeEventListener("touchstart",pe),ae.cancel(),R()}):()=>R()},[R,pe,C,ae]),P.useEffect(()=>{s&&R()},[s,R]),an("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 re=tl(Q,B);if(re!=null){te(re);const oe=ie(re);if(oe==null)return;Nr($.current[oe.thumbIndex],uo(sn(ue)))?Q.preventDefault():ae.request(()=>{q(oe.thumbIndex)}),k(!0),b.current!=null||(A(oe.value,Zo(Sv,Q.nativeEvent,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex))}Q.nativeEvent.pointerId&&ue.setPointerCapture(Q.nativeEvent.pointerId),U.current=0;const he=sn(C.current);he.addEventListener("pointermove",Y,{passive:!0}),he.addEventListener("pointerup",Z,{once:!0})},tabIndex:-1},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(Jv.displayName="SliderControl");const eb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:s}=Qa();return an("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(eb.displayName="SliderTrack");const nl={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function rl(e,t,n){return(e-t)*100/(n-t)}const ol="ArrowUp",il="ArrowDown",sl="ArrowLeft",al="ArrowRight",ll="Home",cl="End",XO=new Set([sl,al]),QO=new Set([ol,il]),JO=new Set([...XO,...QO]);[...JO];const e_=new Set([ol,il,sl,al,ll,cl]);let t_=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function n_(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}=_O(),f=P.useRef(-1),[p,h]=P.useState(i??(o===t_.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&&h(b)})},[i,l,h]),P.useMemo(()=>({ref:m,index:p}),[p,m])}const tb=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(tb.displayName="CSPContext");const r_={disableStyleElements:!1};function o_(){return P.useContext(tb)??r_}function i_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=jv(),s=Za(t),a=n?o:void 0,l=Kn(()=>Symbol("labelable-control")),c=P.useRef(!1),u=P.useRef(t!=null),d=ut(()=>{!c.current||i===fn||(c.current=!1,i(l.current,void 0))});return pt(()=>{if(i===fn)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 s_=(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 a_='!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"))))}}();',nb="PageUp",rb="PageDown",l_=new Set([ol,il,sl,al,ll,cl,nb,rb]);function c_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Xo(e[t],r,n)} start range`:`${Xo(e[t],r,n)} end range`:n?Xo(e[t],r,n):void 0}function Qo(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const ob=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:h,onBlur:y,onFocus:m,onKeyDown:v,tabIndex:b,...x}=t,{nonce:T}=o_(),E=Za(f),{active:I,lastUsedThumbIndex:w,controlRef:k,disabled:A,validation:O,formatOptionsRef:N,handleInputChange:M,inset:$,labelId:_,largeStep:F,locale:z,max:D,min:C,minStepsBetweenValues:V,name:L,orientation:B,pressedInputRef:U,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:H,renderBeforeHydration:ee,setActive:ie,setIndicatorPosition:te,state:q,step:Y,values:Z}=Qa(),pe=Kv(),R=c||A,ae=Z.length>1,ce=B==="vertical",Q=pe==="rtl",{setTouched:ue,setFocused:re,validationMode:he}=Od(),oe=P.useRef(null),le=P.useRef(null),be=Za(),de=i_(),ne=ae?be:de,J=P.useMemo(()=>({inputId:ne}),[ne]),{ref:j,index:X}=n_({metadata:J}),me=ae?p??X:0,ve=me===Z.length-1,ke=Z[me],De=rl(ke,C,D),[Ne,ct]=P.useState(!1),[Nt,Qt]=P.useState();as(()=>ct(!0));const Re=w>=0&&w<Z.length?w:-1,W=ut(()=>{const ot=k.current,gt=oe.current;if(!ot||!gt)return;const it=gt.getBoundingClientRect(),xn=ot.getBoundingClientRect(),Qr=ce?"height":"width",Jr=xn[Qr]-it[Qr],$i=(it[Qr]/2+Jr*De/100)/xn[Qr]*100;Qt($i),me===0?te(zi=>[$i,zi[1]]):ve&&te(zi=>[zi[0],$i])});pt(()=>{$&&queueMicrotask(W)},[W,$]),pt(()=>{$&&W()},[W,$,De]);const K=P.useCallback(()=>{const ot=ce?"bottom":"insetInlineStart",gt=ce?"left":"top";let it;return ae?I===me?it=2:Re===me&&(it=1):I===me&&(it=1),$?{"--position":`${Nt}%`,visibility:ee&&!Ne||Nt===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(De)?{position:"absolute",[ot]:`${De}%`,[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:nl},[I,me,$,Ne,Nt,ae,ee,Q,Re,De,ce]);let Oe;B==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ue=Sd({"aria-label":typeof u=="function"?u(me):a,"aria-labelledby":l??_,"aria-describedby":s,"aria-orientation":B,"aria-valuenow":ke,"aria-valuetext":typeof d=="function"?d(Xo(ke,z,N.current??void 0),ke,me):c_(Z,me,N.current??void 0,z),disabled:R,id:ne,max:D,min:C,name:L,onChange(ot){M(ot.target.valueAsNumber,me,ot)},onFocus(){ie(me),re(!0)},onBlur(){oe.current&&(ie(-1),ue(!0),re(!1),he==="onBlur"&&O.commit(Bv(ke,me,C,D,ae,Z)))},onKeyDown(ot){if(!l_.has(ot.key))return;e_.has(ot.key)&&ot.stopPropagation();let gt=null;const it=Xv(ke,Y,C);switch(ot.key){case ol:gt=Qo(it,ot.shiftKey?F:Y,1,C,D);break;case al:gt=Qo(it,ot.shiftKey?F:Y,Q?-1:1,C,D);break;case il:gt=Qo(it,ot.shiftKey?F:Y,-1,C,D);break;case sl:gt=Qo(it,ot.shiftKey?F:Y,Q?1:-1,C,D);break;case nb:gt=Qo(it,F,1,C,D);break;case rb:gt=Qo(it,F,-1,C,D);break;case cl:gt=D,ae&&(gt=Number.isFinite(Z[me+1])?Z[me+1]-Y*V:D);break;case ll:gt=C,ae&&(gt=Number.isFinite(Z[me-1])?Z[me-1]+Y*V:C);break}gt!==null&&(M(gt,me,ot),ot.preventDefault())},step:Y,style:{...nl,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:ke??""},O.getInputValidationProps),Ye=bd(le,O.inputRef,h);return an("div",t,{state:q,ref:[n,j,oe],props:[{[s_.index]:me,children:g.jsxs(P.Fragment,{children:[o,g.jsx("input",{ref:Ye,...Ue}),$&&!Ne&&ee&&ve&&g.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:a_},suppressHydrationWarning:!0})]}),id:E,onBlur:y,onFocus:m,onPointerDown(ot){if(H.current=me,oe.current!=null){const gt=B==="horizontal"?"x":"y",it=Zv(oe.current),xn=(B==="horizontal"?ot.clientX:ot.clientY)-it[gt];G.current=xn}le.current!=null&&U.current!==le.current&&(U.current=le.current)},style:K(),suppressHydrationWarning:ee||void 0,tabIndex:-1},x],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(ob.displayName="SliderThumb");function u_(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 d_(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 ib=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}=Qa(),[h,y]=P.useState(!1);as(()=>y(!0));const m=u==="vertical",v=p.length>1,b=a?u_(m,v,s[0],s[1],d,h):d_(m,v,rl(p[0],c,l),rl(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:ss})});process.env.NODE_ENV!=="production"&&(ib.displayName="SliderIndicator");const ul=e=>{const t=S.useContext(to);if(e)return e;if(t)return t.locale||e},f_=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"));Be.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Be.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),g.jsx(hd,{title:"",ref:r,as:ob,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline active:cursor-grabbing",children:t})},p_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=S.useRef(Go()),a=r||o||[],l=ul();return g.jsx(Wv,{...i,value:o,locale:l,defaultValue:r,children:g.jsxs(Jv,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[g.jsx(eb,{className:"relative h-2 rounded-full grow bg-background",children:g.jsx(ib,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(a)?a.map((c,u)=>g.jsx(f_,{tooltip:t??!1},`${s.current}-${u}`)):null]})})},Fr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},h_=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=Fr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=y=>{d.current&&d.current(y)},h=u.current;return h.addEventListener("change",p),()=>h?.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 g.jsxs("fieldset",{className:Pe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[g.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[g.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)}),g.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:g.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"})}),g.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:g.jsx("span",{className:"font-medium text-foreground",children:e})})]}),g.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),ls=S.createContext({});function Zn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const sb=typeof window<"u",dl=sb?S.useLayoutEffect:S.useEffect,fl=S.createContext(null);function Dd(e,t){e.indexOf(t)===-1&&e.push(t)}function Jo(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function m_([...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 Xn=(e,t,n)=>n>t?t:n<e?e:n;function Nd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ei=()=>{},pn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(ei=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Nd(t,n))},pn=(e,t,n)=>{if(!e)throw new Error(Nd(t,n))});const vr={},ab=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function lb(e){return typeof e=="object"&&e!==null}const cb=e=>/^0[^.\s]+$/u.test(e);function ub(e){let t;return()=>(t===void 0&&(t=e()),t)}const wn=e=>e,g_=(e,t)=>n=>t(e(n)),cs=(...e)=>e.reduce(g_),ti=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fd{constructor(){this.subscriptions=[]}add(t){return Dd(this.subscriptions,t),()=>Jo(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 hn=e=>e*1e3,Sn=e=>e/1e3;function db(e,t){return t?e*(1e3/t):0}const fb=new Set;function pl(e,t,n){e||fb.has(t)||(console.warn(Nd(t,n)),fb.add(t))}const y_=(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,v_=1e-7,b_=12;function x_(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)>v_&&++a<b_);return s}function us(e,t,n,r){if(e===t&&n===r)return wn;const o=i=>x_(i,0,1,e,n);return i=>i===0||i===1?i:pb(o(i),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,mb=e=>t=>1-e(1-t),gb=us(.33,1.53,.69,.99),Ld=mb(gb),yb=hb(Ld),vb=e=>(e*=2)<1?.5*Ld(e):.5*(2-Math.pow(2,-10*(e-1))),Vd=e=>1-Math.sin(Math.acos(e)),bb=mb(Vd),xb=hb(Vd),w_=us(.42,0,1,1),S_=us(0,0,.58,1),wb=us(.42,0,.58,1),Sb=e=>Array.isArray(e)&&typeof e[0]!="number";function Tb(e,t){return Sb(e)?e[y_(0,e.length,t)]:e}const Eb=e=>Array.isArray(e)&&typeof e[0]=="number",kb={linear:wn,easeIn:w_,easeInOut:wb,easeOut:S_,circIn:Vd,circInOut:xb,circOut:bb,backIn:Ld,backInOut:yb,backOut:gb,anticipate:vb},T_=e=>typeof e=="string",$d=e=>{if(Eb(e)){pn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return us(t,n,r,o)}else if(T_(e))return pn(kb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),kb[e];return e},hl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function E_(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 h=f&&o?n:r;return d&&s.add(u),h.has(u)||h.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 k_=40;function Cb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=hl.reduce((x,T)=>(x[T]=E_(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=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,k_),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),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},m=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:hl.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<hl.length;T++)s[hl[T]].cancel(x)},state:o,steps:s}}const{schedule:ht,cancel:br,state:Yt,steps:zd}=Cb(typeof requestAnimationFrame<"u"?requestAnimationFrame:wn,!0);let ml;function C_(){ml=void 0}const Jt={now:()=>(ml===void 0&&Jt.set(Yt.isProcessing||vr.useManualTiming?Yt.timestamp:performance.now()),ml),set:e=>{ml=e,queueMicrotask(C_)}},Ib=e=>t=>typeof t=="string"&&t.startsWith(e),Ab=Ib("--"),I_=Ib("var(--"),jd=e=>I_(e)?A_.test(e.split("/*")[0].trim()):!1,A_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ni={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ds={...ni,transform:e=>Xn(0,1,e)},gl={...ni,default:1},fs=e=>Math.round(e*1e5)/1e5,Rd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function P_(e){return e==null}const O_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bd=(e,t)=>n=>!!(typeof n=="string"&&O_.test(n)&&n.startsWith(e)||t&&!P_(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ob=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(Rd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},__=e=>Xn(0,255,e),Hd={...ni,transform:e=>Math.round(__(e))},fo={test:Bd("rgb","red"),parse:Ob("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Hd.transform(e)+", "+Hd.transform(t)+", "+Hd.transform(n)+", "+fs(ds.transform(r))+")"};function M_(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 Wd={test:Bd("#"),parse:M_,transform:fo.transform},ps=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lr=ps("deg"),Qn=ps("%"),Ee=ps("px"),D_=ps("vh"),N_=ps("vw"),_b={...Qn,parse:e=>Qn.parse(e)/100,transform:e=>Qn.transform(e*100)},ri={test:Bd("hsl","hue"),parse:Ob("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qn.transform(fs(t))+", "+Qn.transform(fs(n))+", "+fs(ds.transform(r))+")"},Ft={test:e=>fo.test(e)||Wd.test(e)||ri.test(e),parse:e=>fo.test(e)?fo.parse(e):ri.test(e)?ri.parse(e):Wd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fo.transform(e):ri.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},F_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function L_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Rd)?.length||0)+(e.match(F_)?.length||0)>0}const Mb="number",Db="color",V_="var",$_="var(",Nb="${}",z_=/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 hs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(z_,l=>(Ft.test(l)?(r.color.push(i),o.push(Db),n.push(Ft.parse(l))):l.startsWith($_)?(r.var.push(i),o.push(V_),n.push(l)):(r.number.push(i),o.push(Mb),n.push(parseFloat(l))),++i,Nb)).split(Nb);return{values:n,split:a,indexes:r,types:o}}function Fb(e){return hs(e).values}function Lb(e){const{split:t,types:n}=hs(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===Mb?i+=fs(o[s]):a===Db?i+=Ft.transform(o[s]):i+=o[s]}return i}}const j_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function R_(e){const t=Fb(e);return Lb(e)(t.map(j_))}const Mn={test:L_,parse:Fb,createTransformer:Lb,getAnimatableNone:R_};function qd(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 B_({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=qd(l,a,e+1/3),i=qd(l,a,e),s=qd(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function yl(e,t){return n=>n>0?t:e}const vt=(e,t,n)=>e+(t-e)*n,Ud=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},H_=[Wd,fo,ri],W_=e=>H_.find(t=>t.test(e));function Vb(e){const t=W_(e);if(ei(!!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===ri&&(n=B_(n)),n}const $b=(e,t)=>{const n=Vb(e),r=Vb(t);if(!n||!r)return yl(e,t);const o={...n};return i=>(o.red=Ud(n.red,r.red,i),o.green=Ud(n.green,r.green,i),o.blue=Ud(n.blue,r.blue,i),o.alpha=vt(n.alpha,r.alpha,i),fo.transform(o))},Gd=new Set(["none","hidden"]);function q_(e,t){return Gd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function U_(e,t){return n=>vt(e,t,n)}function Yd(e){return typeof e=="number"?U_:typeof e=="string"?jd(e)?yl:Ft.test(e)?$b:K_:Array.isArray(e)?zb:typeof e=="object"?Ft.test(e)?$b:G_:yl}function zb(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Yd(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function G_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Yd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function Y_(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 K_=(e,t)=>{const n=Mn.createTransformer(t),r=hs(e),o=hs(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?Gd.has(e)&&!o.values.length||Gd.has(t)&&!r.values.length?q_(e,t):cs(zb(Y_(r,o),o.values),n):(ei(!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"),yl(e,t))};function jb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?vt(e,t,n):Yd(e)(e,t)}const Z_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>br(t),now:()=>Yt.isProcessing?Yt.timestamp:Jt.now()}},Rb=(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)})`},vl=2e4;function Kd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<vl;)t+=n,r=e.next(t);return t>=vl?1/0:t}function Bb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Kd(r),vl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Sn(o)}}const X_=5;function Hb(e,t,n){const r=Math.max(t-X_,0);return db(n-e(r),t-r)}const Ct={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},Zd=.001;function Q_({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let o,i;ei(e<=hn(Ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Xn(Ct.minDamping,Ct.maxDamping,s),e=Xn(Ct.minDuration,Ct.maxDuration,Sn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,p=Xd(c,s),h=Math.exp(-d);return Zd-f/p*h},i=c=>{const d=c*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,h=Math.exp(-d),y=Xd(Math.pow(c,2),s);return(-o(c)+Zd>0?-1:1)*((f-p)*h)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Zd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=eM(o,i,a);if(e=hn(e),isNaN(l))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const J_=12;function eM(e,t,n){let r=n;for(let o=1;o<J_;o++)r=r-e(r)/t(r);return r}function Xd(e,t){return e*Math.sqrt(1-t*t)}const tM=["duration","bounce"],nM=["stiffness","damping","mass"];function Wb(e,t){return t.some(n=>e[n]!==void 0)}function rM(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!Wb(e,nM)&&Wb(e,tM))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Xn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ct.mass,stiffness:o,damping:i}}else{const n=Q_({...e,velocity:0});t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function ms(e=Ct.visualDuration,t=Ct.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}=rM({...n,velocity:-Sn(n.velocity||0)}),h=f||0,y=c/(2*Math.sqrt(l*u)),m=s-i,v=Sn(Math.sqrt(l/u)),b=Math.abs(m)<5;r||(r=b?Ct.restSpeed.granular:Ct.restSpeed.default),o||(o=b?Ct.restDelta.granular:Ct.restDelta.default);let x;if(y<1){const E=Xd(v,y);x=I=>{const w=Math.exp(-y*v*I);return s-w*((h+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+(h+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*((h+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?h:0;y<1&&(w=E===0?hn(h):Hb(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(Kd(T),vl),I=Rb(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}ms.applyToOptions=e=>{const t=Bb(e,100,ms);return e.ease=t.ease,e.duration=hn(t.duration),e.type="keyframes",e};function Qd({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,h=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=ms({keyframes:[f.value,h(f.value)],velocity:Hb(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 oM(e,t,n){const r=[],o=n||vr.mix||jb,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]||wn:t;a=cs(l,a)}r.push(a)}return r}function qb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(pn(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=oM(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=ti(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Xn(e[0],e[i-1],u)):c}function Ub(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ti(0,t,r);e.push(vt(n,1,o))}}function Gb(e){const t=[0];return Ub(t,e.length-1),t}function iM(e,t){return e.map(n=>n*t)}function sM(e,t){return e.map(()=>t||wb).splice(0,e.length-1)}function oi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Sb(r)?r.map($d):$d(r),i={done:!1,value:t[0]},s=iM(n&&n.length===t.length?n:Gb(t),e),a=qb(s,t,{ease:Array.isArray(o)?o:sM(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const aM=e=>e!==null;function Jd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(aM),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const lM={decay:Qd,inertia:Qd,tween:oi,keyframes:oi,spring:ms};function Yb(e){typeof e.type=="string"&&(e.type=lM[e.type])}class ef{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 cM=e=>e/100;class tf extends ef{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!==Jt.now()&&this.tick(Jt.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;Yb(t);const{type:n=oi,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||oi;process.env.NODE_ENV!=="production"&&l!==oi&&pn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==oi&&typeof a[0]!="number"&&(this.mixKeyframes=cs(cM,jb(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=Kd(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:h,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=Xn(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&&h!==Qd&&(E.value=Jd(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 Sn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sn(t)}get time(){return Sn(this.currentTime)}set time(t){t=hn(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(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Sn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Z_,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(Jt.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 uM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const po=e=>e*180/Math.PI,nf=e=>{const t=po(Math.atan2(e[1],e[0]));return rf(t)},dM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:nf,rotateZ:nf,skewX:e=>po(Math.atan(e[1])),skewY:e=>po(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},rf=e=>(e=e%360,e<0&&(e+=360),e),Kb=nf,Zb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zb,scaleY:Xb,scale:e=>(Zb(e)+Xb(e))/2,rotateX:e=>rf(po(Math.atan2(e[6],e[5]))),rotateY:e=>rf(po(Math.atan2(-e[2],e[0]))),rotateZ:Kb,rotate:Kb,skewX:e=>po(Math.atan(e[4])),skewY:e=>po(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function of(e){return e.includes("scale")?1:0}function sf(e,t){if(!e||e==="none")return of(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=fM,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dM,o=a}if(!o)return of(t);const i=r[t],s=o[1].split(",").map(hM);return typeof i=="function"?i(s):s[i]}const pM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sf(n,t)};function hM(e){return parseFloat(e.trim())}const ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],si=new Set(ii),Qb=e=>e===ni||e===Ee,mM=new Set(["x","y","z"]),gM=ii.filter(e=>!mM.has(e));function yM(e){const t=[];return gM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Vr={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})=>sf(t,"x"),y:(e,{transform:t})=>sf(t,"y")};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const ho=new Set;let af=!1,lf=!1,cf=!1;function Jb(){if(lf){const e=Array.from(ho).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=yM(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)})}lf=!1,af=!1,ho.forEach(e=>e.complete(cf)),ho.clear()}function ex(){ho.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(lf=!0)})}function vM(){cf=!0,ex(),Jb(),cf=!1}class uf{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?(ho.add(this),af||(af=!0,ht.read(ex),ht.resolveKeyframes(Jb))):(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])}uM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ho.delete(this)}cancel(){this.state==="scheduled"&&(ho.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const bM=e=>e.startsWith("--");function xM(e,t,n){bM(t)?e.style.setProperty(t,n):e.style[t]=n}const wM={};function tx(e,t){const n=ub(e);return()=>wM[t]??n()}const SM=tx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),nx=tx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gs([0,.65,.55,1]),circOut:gs([.55,0,1,.45]),backIn:gs([.31,.01,.66,-.59]),backOut:gs([.33,1.53,.69,.99])};function ox(e,t){if(e)return typeof e=="function"?nx()?Rb(e,t):"ease-out":Eb(e)?gs(e):Array.isArray(e)?e.map(n=>ox(n,t)||rx.easeOut):rx[e]}function TM(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=ox(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 df(e){return typeof e=="function"&&"applyToOptions"in e}function EM({type:e,...t}){return df(e)&&nx()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ix extends ef{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,pn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=EM(t);this.animation=TM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Jd(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):xM(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 Sn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sn(t)}get time(){return Sn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hn(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&&SM()?(this.animation.timeline=t,wn):n(this)}}const sx={anticipate:vb,backInOut:yb,circInOut:xb};function kM(e){return e in sx}function CM(e){typeof e.ease=="string"&&kM(e.ease)&&(e.ease=sx[e.ease])}const ff=10;class IM extends ix{constructor(t){CM(t),Yb(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 tf({...s,autoplay:!1}),l=Math.max(ff,Jt.now()-this.startTime),c=Xn(0,ff,l-ff);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const ax=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Mn.test(e)||e==="0")&&!e.startsWith("url("));function AM(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 PM(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=ax(o,t),a=ax(i,t);return ei(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:AM(e)||(n==="spring"||df(n))&&r}function pf(e){e.duration=0,e.type="keyframes"}const OM=new Set(["opacity","clipPath","filter","transform"]),_M=ub(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function MM(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 _M()&&n&&OM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const DM=40;class NM extends ef{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=Jt.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||uf;this.keyframeResolver=new p(a,(h,y,m)=>this.onKeyframesResolved(h,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=Jt.now(),PM(t,i,s,a)||((vr.instantAnimations||!l)&&u?.(Jd(t,r,n)),t[0]=t[t.length-1],pf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>DM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&MM(f),h=f.motionValue?.owner?.current,y=p?new IM({...f,element:h}):new tf(f);y.finished.then(()=>{this.notifyFinished()}).catch(wn),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(),vM()),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 FM{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 lx(this.animations,"duration")}get iterationDuration(){return lx(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 lx(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 LM extends FM{then(t,n){return this.finished.finally(t).then(()=>{})}}function cx(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 VM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $M(e){const t=VM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const zM=4;function ux(e,t,n=1){pn(n<=zM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=$M(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return ab(s)?parseFloat(s):s}return jd(o)?ux(o,t,n+1):o}const jM={type:"spring",stiffness:500,damping:25,restSpeed:10},RM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BM={type:"keyframes",duration:.8},HM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WM=(e,{keyframes:t})=>t.length>2?BM:si.has(e)?e.startsWith("scale")?RM(t[1]):jM:HM,qM=e=>e!==null;function UM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(qM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function hf(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function mf(e,t){const n=e?.[t]??e?.default??e;return n!==e?hf(n,e):n}function GM({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 gf=(e,t,n,r={},o,i)=>s=>{const a=mf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-hn(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};GM(a)||Object.assign(u,WM(e,u)),u.duration&&(u.duration=hn(u.duration)),u.repeatDelay&&(u.repeatDelay=hn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(pf(u),u.delay===0&&(d=!0)),(vr.instantAnimations||vr.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,pf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=UM(u.keyframes,a);if(f!==void 0){ht.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new tf(u):new NM(u)};function dx(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function yf(e,t,n,r){if(typeof t=="function"){const[o,i]=dx(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]=dx(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ai(e,t,n){const r=e.getProps();return yf(r,t,n!==void 0?n:r.custom,e)}const fx=new Set(["width","height","top","left","right","bottom",...ii]),px=30,YM=e=>!isNaN(parseFloat(e)),ys={current:void 0};class KM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.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=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=YM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pl(!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 Fd);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 ys.current&&ys.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>px)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,px);return db(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 $r(e,t){return new KM(e,t)}const vf=e=>Array.isArray(e);function ZM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$r(n))}function XM(e){return vf(e)?e[e.length-1]||0:e}function QM(e,t){const n=ai(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=XM(i[s]);ZM(e,s,a)}}const zt=e=>!!(e&&e.getVelocity);function JM(e){return!!(zt(e)&&e.add)}function bf(e,t){const n=e.getValue("willChange");if(JM(n))return n.add(t);if(!n&&vr.WillChange){const r=new vr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function xf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const hx="data-"+xf("framerAppearId");function mx(e){return e.props[hx]}function eD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:s,...a}=t;const l=e.getDefaultTransition();i=i?hf(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),h=a[f];if(h===void 0||d&&eD(d,f))continue;const y={delay:n,...mf(i||{},f)},m=p.get();if(m!==void 0&&!p.isAnimating&&!Array.isArray(h)&&h===m&&!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)}}bf(e,f);const b=c??e.shouldReduceMotion;p.start(gf(f,p,h,b&&fx.has(f)?{type:!1}:y,e,v));const x=p.animation;x&&u.push(x)}if(s){const f=()=>ht.update(()=>{s&&QM(e,s)});u.length?Promise.all(u).then(f):f()}return u}function Sf(e,t,n={}){const r=ai(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(wf(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return tD(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 tD(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(Sf(l,t,{...s,delay:n+(typeof r=="function"?0:r)+cx(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function nD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Sf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Sf(e,t,n);else{const o=typeof t=="function"?ai(e,t,n.custom):t;r=Promise.all(wf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const rD={test:e=>e==="auto",parse:e=>e},gx=e=>t=>t.test(e),yx=[ni,Ee,Qn,Lr,N_,D_,rD],vx=e=>yx.find(gx(e));function oD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||cb(e):!0}const iD=new Set(["brightness","contrast","saturate","opacity"]);function sD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Rd)||[];if(!r)return e;const o=n.replace(r,"");let i=iD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const aD=/\b([a-z-]*)\(.*?\)/gu,Tf={...Mn,getAnimatableNone:e=>{const t=e.match(aD);return t?t.map(sD).join(" "):e}},Ef={...Mn,getAnimatableNone:e=>{const t=Mn.parse(e);return Mn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},bx={...ni,transform:Math.round},kf={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:Lr,rotateX:Lr,rotateY:Lr,rotateZ:Lr,scale:gl,scaleX:gl,scaleY:gl,scaleZ:gl,skew:Lr,skewX:Lr,skewY:Lr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:ds,originX:_b,originY:_b,originZ:Ee},zIndex:bx,fillOpacity:ds,strokeOpacity:ds,numOctaves:bx},lD={...kf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:Tf,WebkitFilter:Tf,mask:Ef,WebkitMask:Ef},xx=e=>lD[e],cD=new Set([Tf,Ef]);function wx(e,t){let n=xx(e);return cD.has(n)||(n=Mn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uD=new Set(["auto","none","0"]);function dD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!uD.has(i)&&hs(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=wx(n,o)}class fD extends uf{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(),jd(d))){const f=ux(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!fx.has(r)||t.length!==2)return;const[o,i]=t,s=vx(o),a=vx(i),l=Pb(o),c=Pb(i);if(l!==c&&Vr[r]){this.needsMeasurement=!0;return}if(s!==a)if(Qb(s)&&Qb(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Vr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||oD(t[o]))&&r.push(o);r.length&&dD(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=Vr[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]=Vr[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 pD=new Set(["opacity","clipPath","filter","transform"]);function Cf(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 Sx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function If(e){return lb(e)&&"offsetHeight"in e}const{schedule:Af}=Cb(queueMicrotask,!1),Dn={x:!1,y:!1};function Tx(){return Dn.x||Dn.y}function hD(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function Ex(e,t){const n=Cf(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function mD(e){return!(e.pointerType==="touch"||Tx())}function gD(e,t,n={}){const[r,o,i]=Ex(e,n);return r.forEach(s=>{let a=!1,l=!1,c;const u=()=>{s.removeEventListener("pointerleave",h)},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)},h=m=>{if(m.pointerType!=="touch"){if(a){l=!0;return}d(m)}},y=m=>{if(!mD(m))return;l=!1;const v=t(s,m);typeof v=="function"&&(c=v,s.addEventListener("pointerleave",h,o))};s.addEventListener("pointerenter",y,o),s.addEventListener("pointerdown",p,o)}),i}const kx=(e,t)=>t?e===t?!0:kx(e,t.parentElement):!1,Pf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vD(e){return yD.has(e.tagName)||e.isContentEditable===!0}const bD=new Set(["INPUT","SELECT","TEXTAREA"]);function xD(e){return bD.has(e.tagName)||e.isContentEditable===!0}const bl=new WeakSet;function Cx(e){return t=>{t.key==="Enter"&&e(t)}}function Of(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Cx(()=>{if(bl.has(n))return;Of(n,"down");const o=Cx(()=>{Of(n,"up")}),i=()=>Of(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 Ix(e){return Pf(e)&&!Tx()}const Ax=new WeakSet;function SD(e,t,n={}){const[r,o,i]=Ex(e,n),s=a=>{const l=a.currentTarget;if(!Ix(a)||Ax.has(a))return;bl.add(l),n.stopPropagation&&Ax.add(a);const c=t(l,a),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),bl.has(l)&&bl.delete(l),Ix(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||kx(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),If(a)&&(a.addEventListener("focus",c=>wD(c,o)),!vD(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function xl(e){return lb(e)&&"ownerSVGElement"in e}const wl=new WeakMap;let Sl;const Px=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:xl(r)&&"getBBox"in r?r.getBBox()[t]:r[n],TD=Px("inline","width","offsetWidth"),ED=Px("block","height","offsetHeight");function kD({target:e,borderBoxSize:t}){wl.get(e)?.forEach(n=>{n(e,{get width(){return TD(e,t)},get height(){return ED(e,t)}})})}function CD(e){e.forEach(kD)}function ID(){typeof ResizeObserver>"u"||(Sl=new ResizeObserver(CD))}function AD(e,t){Sl||ID();const n=Cf(e);return n.forEach(r=>{let o=wl.get(r);o||(o=new Set,wl.set(r,o)),o.add(t),Sl?.observe(r)}),()=>{n.forEach(r=>{const o=wl.get(r);o?.delete(t),o?.size||Sl?.unobserve(r)})}}const Tl=new Set;let li;function PD(){li=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Tl.forEach(t=>t(e))},window.addEventListener("resize",li)}function OD(e){return Tl.add(e),li||PD(),()=>{Tl.delete(e),!Tl.size&&typeof li=="function"&&(window.removeEventListener("resize",li),li=void 0)}}function Ox(e,t){return typeof e=="function"?OD(e):AD(e,t)}function _x(e){return xl(e)&&e.tagName==="svg"}function _D(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function MD(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:_D(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=$d(r)(l/c)*c}return t+l}}function DD(...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=qb(o,i,s);return t?a(r):a}const ND=[...yx,Ft,Mn],FD=e=>ND.find(gx(e)),Mx=()=>({translate:0,scale:1,origin:0,originPoint:0}),ci=()=>({x:Mx(),y:Mx()}),Dx=()=>({min:0,max:0}),Lt=()=>({x:Dx(),y:Dx()}),vs=new WeakMap;function El(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bs(e){return typeof e=="string"||Array.isArray(e)}const _f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mf=["initial",..._f];function kl(e){return El(e.animate)||Mf.some(t=>bs(e[t]))}function Nx(e){return!!(kl(e)||e.variants)}function LD(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,$r(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,$r(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Cl={current:null},Df={current:!1},VD=typeof window<"u";function Fx(){if(Df.current=!0,!!VD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Cl.current=e.matches;e.addEventListener("change",t),t()}else Cl.current=!1}const Lx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Il={};function Vx(e){Il=e}function $D(){return Il}class $x{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=uf,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=Jt.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=kl(n),this.isVariantNode=Nx(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 h=f[p];c[p]!==void 0&&zt(h)&&h.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,vs.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:(Df.current||Fx(),this.shouldReduceMotion=Cl.current),process.env.NODE_ENV!=="production"&&pl(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&&pD.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new ix({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:hn(u)}),f=s(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=si.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 Il){const n=Il[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<Lx.length;r++){const o=Lx[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=LD(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=$r(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"&&(ab(r)||cb(r))?r=parseFloat(r):!FD(r)&&Mn.test(n)&&(r=wx(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=yf(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 Fd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Af.render(this.render)}}class zx extends $x{constructor(){super(...arguments),this.KeyframeResolver=fD}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 zr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function jx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function jD(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 Nf(e){return e===void 0||e===1}function Ff({scale:e,scaleX:t,scaleY:n}){return!Nf(e)||!Nf(t)||!Nf(n)}function mo(e){return Ff(e)||Rx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Rx(e){return Bx(e.x)||Bx(e.y)}function Bx(e){return e&&e!=="0%"}function Al(e,t,n){const r=e-n,o=t*r;return n+o}function Hx(e,t,n,r,o){return o!==void 0&&(e=Al(e,o,r)),Al(e,n,r)+t}function Lf(e,t=0,n=1,r,o){e.min=Hx(e.min,t,n,r,o),e.max=Hx(e.max,t,n,r,o)}function Wx(e,{x:t,y:n}){Lf(e.x,t.translate,t.scale,t.originPoint),Lf(e.y,n.translate,n.scale,n.originPoint)}const qx=.999999999999,Ux=1.0000000000001;function RD(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&&di(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Wx(e,s)),r&&mo(i.latestValues)&&di(e,i.latestValues))}t.x<Ux&&t.x>qx&&(t.x=1),t.y<Ux&&t.y>qx&&(t.y=1)}function ui(e,t){e.min=e.min+t,e.max=e.max+t}function Gx(e,t,n,r,o=.5){const i=vt(e.min,e.max,o);Lf(e,t,n,i,r)}function di(e,t){Gx(e.x,t.x,t.scaleX,t.scale,t.originX),Gx(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yx(e,t){return jx(jD(e.getBoundingClientRect(),t))}function BD(e,t,n){const r=Yx(e,n),{scroll:o}=t;return o&&(ui(r.x,o.offset.x),ui(r.y,o.offset.y)),r}const HD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WD=ii.length;function qD(e,t,n){let r="",o=!0;for(let i=0;i<WD;i++){const s=ii[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=Sx(a,kf[s]);if(!l){o=!1;const u=HD[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Vf(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(si.has(l)){s=!0;continue}else if(Ab(l)){o[l]=c;continue}else{const u=Sx(c,kf[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=qD(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 Kx(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 Zx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=Zx(e,t.target.x),r=Zx(e,t.target.y);return`${n}% ${r}%`}},UD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Mn.parse(e);if(o.length>5)return r;const i=Mn.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)}},$f={borderRadius:{...xs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xs,borderTopRightRadius:xs,borderBottomLeftRadius:xs,borderBottomRightRadius:xs,boxShadow:UD};function Xx(e,{layout:t,layoutId:n}){return si.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$f[e]||e==="opacity")}function zf(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])||Xx(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function GD(e){return window.getComputedStyle(e)}class Qx extends zx{constructor(){super(...arguments),this.type="html",this.renderInstance=Kx}readValueFromInstance(t,n){if(si.has(n))return this.projection?.isProjecting?of(n):pM(t,n);{const r=GD(t),o=(Ab(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yx(t,n)}build(t,n,r){Vf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zf(t,n,r)}}function YD(e,t){return e in t}class KD extends $x{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(YD(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 ZD={offset:"stroke-dashoffset",array:"stroke-dasharray"},XD={offset:"strokeDashoffset",array:"strokeDasharray"};function QD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ZD:XD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const JD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Jx(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Vf(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 JD)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&&QD(d,o,i,s,!1)}const e0=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"]),t0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function eN(e,t,n,r){Kx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(e0.has(o)?o:xf(o),t.attrs[o])}function n0(e,t,n){const r=zf(e,t,n);for(const o in e)if(zt(e[o])||zt(t[o])){const i=ii.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class r0 extends zx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(si.has(n)){const r=xx(n);return r&&r.default||0}return n=e0.has(n)?n:xf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return n0(t,n,r)}build(t,n,r){Jx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){eN(t,n,r,o)}mount(t){this.isSVGTag=t0(t.tagName),super.mount(t)}}const tN=Mf.length;function o0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?o0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<tN;n++){const r=Mf[n],o=e.props[r];(bs(o)||o===!1)&&(t[r]=o)}return t}function i0(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 nN=[..._f].reverse(),rN=_f.length;function oN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>nD(e,n,r)))}function iN(e){let t=oN(e),n=s0(),r=!0;const o=l=>(c,u)=>{const d=ai(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...h}=d;c={...c,...h,...p}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=o0(e.parent)||{},d=[],f=new Set;let p={},h=1/0;for(let m=0;m<rN;m++){const v=nN[m],b=n[v],x=c[v]!==void 0?c[v]:u[v],T=bs(x),E=v===l?b.isActive:null;E===!1&&(h=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||El(x)||typeof x=="boolean")continue;if(v==="exit"&&b.isActive&&E!==!0){b.prevResolvedValues&&(p={...p,...b.prevResolvedValues});continue}const w=sN(b.prevProp,x);let k=w||v===l&&b.isActive&&!I&&T||m>h&&T,A=!1;const O=Array.isArray(x)?x:[x];let N=O.reduce(o(v),{});E===!1&&(N={});const{prevResolvedValues:M={}}=b,$={...M,...N},_=D=>{k=!0,f.has(D)&&(A=!0,f.delete(D)),b.needsAnimating[D]=!0;const C=e.getValue(D);C&&(C.liveStyle=!1)};for(const D in $){const C=N[D],V=M[D];if(p.hasOwnProperty(D))continue;let L=!1;vf(C)&&vf(V)?L=!i0(C,V):L=C!==V,L?C!=null?_(D):f.add(D):C!==void 0&&f.has(D)?_(D):b.protectedKeys[D]=!0}b.prevProp=x,b.prevResolvedValues=N,b.isActive&&(p={...p,...N}),r&&e.blockInitialAnimation&&(k=!1);const F=I&&w;k&&(!F||A)&&d.push(...O.map(D=>{const C={type:v};if(typeof D=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,L=ai(V,D);if(V.enteringChildren&&L){const{delayChildren:B}=L.transition||{};C.delay=cx(V.enteringChildren,e,B)}}return{animation:D,options:C}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const v=ai(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 sN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!i0(t,e):!1}function go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function s0(){return{animate:go(!0),whileInView:go(),whileHover:go(),whileTap:go(),whileDrag:go(),whileFocus:go(),exit:go()}}function a0(e,t){e.min=t.min,e.max=t.max}function Nn(e,t){a0(e.x,t.x),a0(e.y,t.y)}function l0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const c0=1e-4,aN=1-c0,lN=1+c0,u0=.01,cN=0-u0,uN=0+u0;function en(e){return e.max-e.min}function dN(e,t,n){return Math.abs(e-t)<=n}function d0(e,t,n,r=.5){e.origin=r,e.originPoint=vt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=aN&&e.scale<=lN||isNaN(e.scale))&&(e.scale=1),(e.translate>=cN&&e.translate<=uN||isNaN(e.translate))&&(e.translate=0)}function ws(e,t,n,r){d0(e.x,t.x,n.x,r?r.originX:void 0),d0(e.y,t.y,n.y,r?r.originY:void 0)}function f0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function fN(e,t,n){f0(e.x,t.x,n.x),f0(e.y,t.y,n.y)}function p0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function Pl(e,t,n){p0(e.x,t.x,n.x),p0(e.y,t.y,n.y)}function h0(e,t,n,r,o){return e-=t,e=Al(e,1/n,r),o!==void 0&&(e=Al(e,1/o,r)),e}function pN(e,t=0,n=1,r=.5,o,i=e,s=e){if(Qn.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=h0(e.min,t,n,a,o),e.max=h0(e.max,t,n,a,o)}function m0(e,t,[n,r,o],i,s){pN(e,t[n],t[r],t[o],t.scale,i,s)}const hN=["x","scaleX","originX"],mN=["y","scaleY","originY"];function g0(e,t,n,r){m0(e.x,t,hN,n?n.x:void 0,r?r.x:void 0),m0(e.y,t,mN,n?n.y:void 0,r?r.y:void 0)}function y0(e){return e.translate===0&&e.scale===1}function v0(e){return y0(e.x)&&y0(e.y)}function b0(e,t){return e.min===t.min&&e.max===t.max}function gN(e,t){return b0(e.x,t.x)&&b0(e.y,t.y)}function x0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function w0(e,t){return x0(e.x,t.x)&&x0(e.y,t.y)}function S0(e){return en(e.x)/en(e.y)}function T0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Jn(e){return[e("x"),e("y")]}function yN(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:h}=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) `),h&&(r+=`skewY(${h}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 E0=["TopLeft","TopRight","BottomLeft","BottomRight"],vN=E0.length,k0=e=>typeof e=="string"?parseFloat(e):e,C0=e=>typeof e=="number"||Ee.test(e);function bN(e,t,n,r,o,i){o?(e.opacity=vt(0,n.opacity??1,xN(r)),e.opacityExit=vt(t.opacity??1,0,wN(r))):i&&(e.opacity=vt(t.opacity??1,n.opacity??1,r));for(let s=0;s<vN;s++){const a=`border${E0[s]}Radius`;let l=I0(t,a),c=I0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||C0(l)===C0(c)?(e[a]=Math.max(vt(k0(l),k0(c),r),0),(Qn.test(c)||Qn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=vt(t.rotate||0,n.rotate||0,r))}function I0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xN=A0(0,.5,bb),wN=A0(.5,.95,wn);function A0(e,t,n){return r=>r<e?0:r>t?1:n(ti(e,t,r))}function P0(e,t,n){const r=zt(e)?e:$r(e);return r.start(gf("",r,t,n)),r.animation}function Ss(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const SN=(e,t)=>e.depth-t.depth;class TN{constructor(){this.children=[],this.isDirty=!1}add(t){Dd(this.children,t),this.isDirty=!0}remove(t){Jo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(SN),this.isDirty=!1,this.children.forEach(t)}}function EN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(br(r),e(i-t))};return ht.setup(r,!0),()=>br(r)}function Ol(e){return zt(e)?e.get():e}class kN{constructor(){this.members=[]}add(t){Dd(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&&Jo(this.members,r)}t.scheduleRender()}remove(t){if(Jo(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},jf=["","X","Y","Z"],CN=1e3;let IN=0;function Rf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function O0(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&&O0(r)}function _0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=IN++,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(ON),this.nodes.forEach(NN),this.nodes.forEach(FN),this.nodes.forEach(_N)},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 TN)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Fd),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=xl(s)&&!_x(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=EN(f,250),_l.hasAnimatedSinceResize&&(_l.hasAnimatedSinceResize=!1,this.nodes.forEach(N0)))})}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 h=this.options.transition||c.getDefaultTransition()||jN,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),v=!this.targetLayout||!w0(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={...mf(h,"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||N0(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(LN),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&&O0(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(M0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(D0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(DN),this.nodes.forEach(AN),this.nodes.forEach(PN)):this.nodes.forEach(D0),this.clearAllSnapshots();const a=Jt.now();Yt.delta=Xn(0,1e3/60,a-Yt.timestamp),Yt.timestamp=a,Yt.isProcessing=!0,zd.update.process(Yt),zd.preRender.process(Yt),zd.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Af.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(MN),this.sharedNodes.forEach(VN)}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&&!en(this.snapshot.measuredBox.x)&&!en(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&&!v0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||mo(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)),RN(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(BN))){const{scroll:c}=this.root;c&&(ui(a.x,c.offset.x),ui(a.y,c.offset.y))}return a}removeElementScroll(s){const a=Lt();if(Nn(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&&Nn(a,s),ui(a.x,u.offset.x),ui(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=Lt();Nn(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&&di(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),mo(u.latestValues)&&di(l,u.latestValues)}return mo(this.latestValues)&&di(l,this.latestValues),l}removeTransform(s){const a=Lt();Nn(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!mo(c.latestValues))continue;Ff(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Nn(u,d),g0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return mo(this.latestValues)&&g0(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(),fN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nn(this.target,this.layout.layoutBox),Wx(this.target,this.targetDelta)):Nn(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||Ff(this.parent.latestValues)||Rx(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(),Pl(this.relativeTargetOrigin,a,l),Nn(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;Nn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;RD(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():(l0(this.prevProjectionDelta.x,this.projectionDelta.x),l0(this.prevProjectionDelta.y,this.projectionDelta.y)),ws(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!T0(this.projectionDelta.x,this.prevProjectionDelta.x)||!T0(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=ci(),this.projectionDelta=ci(),this.projectionDeltaWithTransform=ci()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Lt(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,y=p!==h,m=this.getStack(),v=!m||m.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(zN));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const E=T/1e3;F0(d.x,s.x,E),F0(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$N(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&gN(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Nn(x,this.relativeTarget)),y&&(this.animationValues=u,bN(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=$r(0)),this.motionValue.jump(0,!1),this.currentAnimation=P0(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(CN),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&&j0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Nn(a,l),di(a,u),ws(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new kN),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&&Rf("z",s,c,this.animationValues);for(let u=0;u<jf.length;u++)Rf(`rotate${jf[u]}`,s,c,this.animationValues),Rf(`skew${jf[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=Ol(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=Ol(a?.pointerEvents)||""),this.hasProjected&&!mo(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=yN(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 h in $f){if(u[h]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:v}=$f[h],b=d==="none"?u[h]:y(u[h],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[h]=b:s[h]=b}this.options.layoutId&&(s.pointerEvents=c===this?Ol(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(M0),this.root.sharedNodes.clear()}}}function AN(e){e.updateLayout()}function PN(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"?Jn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):j0(o,t.layoutBox,n)&&Jn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(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=ci();ws(s,n,t.layoutBox);const a=ci();i?ws(a,e.applyTransform(r,!0),t.measuredBox):ws(a,n,t.layoutBox);const l=!v0(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();Pl(p,t.layoutBox,d.layoutBox);const h=Lt();Pl(h,n,f.layoutBox),w0(p,h)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=h,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 ON(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 _N(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function MN(e){e.clearSnapshot()}function M0(e){e.clearMeasurements()}function D0(e){e.isLayoutDirty=!1}function DN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function N0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NN(e){e.resolveTargetDelta()}function FN(e){e.calcProjection()}function LN(e){e.resetSkewAndRotation()}function VN(e){e.removeLeadSnapshot()}function F0(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 L0(e,t,n,r){e.min=vt(t.min,n.min,r),e.max=vt(t.max,n.max,r)}function $N(e,t,n,r){L0(e.x,t.x,n.x,r),L0(e.y,t.y,n.y,r)}function zN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const jN={duration:.45,ease:[.4,0,.1,1]},V0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$0=V0("applewebkit/")&&!V0("chrome/")?Math.round:wn;function z0(e){e.min=$0(e.min),e.max=$0(e.max)}function RN(e){z0(e.x),z0(e.y)}function j0(e,t,n){return e==="position"||e==="preserve-aspect"&&!dN(S0(t),S0(n),.2)}function BN(e){return e!==e.root&&e.scroll?.wasRoot}const HN=_0({attachResizeListener:(e,t)=>Ss(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),WN=e=>!e.isLayoutDirty&&e.willUpdate(!1);function R0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(WN);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 Bf={current:void 0},B0=_0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bf.current){const e=new HN({});e.mount(window),e.setOptions({layoutScroll:!0}),Bf.current=e}return Bf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function H0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qN(...e){return t=>{let n=!1;const r=e.map(o=>{const i=H0(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():H0(e[o],null)}}}}function UN(...e){return P.useCallback(qN(...e),e)}class GN 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=If(r)&&r.offsetWidth||0,i=If(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 YN({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(yo),u=e.props?.ref??e?.ref,d=UN(a,u);return S.useInsertionEffect(()=>{const{width:f,height:p,top:h,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: ${h}`;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 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(`
8
8
  [data-motion-pop-id="${s}"] {
9
9
  position: absolute !important;
10
10
  width: ${f}px !important;
@@ -12,17 +12,17 @@
12
12
  ${b}px !important;
13
13
  ${x}px !important;
14
14
  }
15
- `),()=>{E.contains(T)&&E.removeChild(T)}},[t]),g.jsx(GN,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:P.cloneElement(e,{ref:d})})}const KN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,anchorY:l,root:c})=>{const u=Zn(ZN),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:h=>{u.set(h,!0);for(const y of u.values())if(!y)return;r&&r()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((h,y)=>u.set(y,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=g.jsx(YN,{pop:s==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),g.jsx(fl.Provider,{value:p,children:e})};function ZN(){return new Map}function W0(e=!0){const t=S.useContext(fl);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 Ml=e=>e.key||"";function q0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const mn=({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]=W0(s),f=S.useMemo(()=>q0(e),[e]),p=s&&!u?[]:f.map(Ml),h=S.useRef(!0),y=S.useRef(f),m=Zn(()=>new Map),v=S.useRef(new Set),[b,x]=S.useState(f),[T,E]=S.useState(f);dl(()=>{h.current=!1,y.current=f;for(let k=0;k<T.length;k++){const A=Ml(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],N=Ml(O);p.includes(N)||(k.splice(A,0,O),I.push(O))}return i==="wait"&&I.length&&(k=I),E(q0(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(ls);return g.jsx(g.Fragment,{children:T.map(k=>{const A=Ml(k),O=s&&!u?!1:f===T||p.includes(A),N=()=>{if(v.current.has(A))return;if(v.current.add(A),m.has(A))m.set(A,!0);else return;let M=!0;m.forEach($=>{$||(M=!1)}),M&&(w?.(),E(y.current),s&&d?.(),r&&r())};return g.jsx(KN,{isPresent:O,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:O?void 0:N,anchorX:a,anchorY:l,children:k},A)})})},XN=S.createContext(null);function QN(){const e=S.useRef(!1);return dl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function JN(){const e=QN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ht.postRender(r),[r]),t]}const U0=e=>e===!0,e2=e=>U0(e===!0)||e==="id",t2=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(ls),o=S.useContext(XN),[i,s]=JN(),a=S.useRef(null),l=r.id||o;a.current===null&&(e2(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:U0(n)&&r.group||R0()});const c=S.useMemo(()=>({...a.current,forceRender:i}),[s]);return g.jsx(ls.Provider,{value:c,children:e})},G0=S.createContext({strict:!1}),Y0={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 K0=!1;function n2(){if(K0)return;const e={};for(const t in Y0)e[t]={isEnabled:n=>Y0[t].some(r=>!!n[r])};Vx(e),K0=!0}function Z0(){return n2(),$D()}function r2(e){const t=Z0();for(const n in e)t[n]={...t[n],...e[n]};Vx(t)}const o2=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 Dl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||o2.has(e)}let X0=e=>!Dl(e);function Q0(e){typeof e=="function"&&(X0=t=>t.startsWith("on")?!Dl(t):e(t))}try{Q0(require("@emotion/is-prop-valid").default)}catch{}function i2(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(X0(o)||n===!0&&Dl(o)||!t&&!Dl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Hf({children:e,isValidProp:t,...n}){t&&Q0(t);const r=S.useContext(yo);n={...r,...n},n.transition=hf(n.transition,r.transition),n.isStatic=Zn(()=>n.isStatic);const o=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return g.jsx(yo.Provider,{value:o,children:e})}const Nl=S.createContext({});function s2(e,t){if(kl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||bs(n)?n:void 0,animate:bs(r)?r:void 0}}return e.inherit!==!1?t:{}}function a2(e){const{initial:t,animate:n}=s2(e,S.useContext(Nl));return S.useMemo(()=>({initial:t,animate:n}),[J0(t),J0(n)])}function J0(e){return Array.isArray(e)?e.join(" "):e}const Wf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ew(e,t,n){for(const r in t)!zt(t[r])&&!Xx(r,n)&&(e[r]=t[r])}function l2({transformTemplate:e},t){return S.useMemo(()=>{const n=Wf();return Vf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function c2(e,t){const n=e.style||{},r={};return ew(r,n,e),Object.assign(r,l2(e,t)),r}function u2(e,t){const n={},r=c2(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 tw=()=>({...Wf(),attrs:{}});function d2(e,t,n,r){const o=S.useMemo(()=>{const i=tw();return Jx(i,t,t0(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};ew(i,e.style,e),o.style={...i,...o.style}}return o}const f2=["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 qf(e){return typeof e!="string"||e.includes("-")?!1:!!(f2.indexOf(e)>-1||/[A-Z]/u.test(e))}function p2(e,t,n,{latestValues:r},o,i=!1,s){const l=(s??qf(e)?d2:u2)(t,r,o,e),c=i2(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 h2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:m2(n,r,o,e),renderState:t()}}function m2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Ol(i[f]);let{initial:s,animate:a}=e;const l=kl(e),c=Nx(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"&&!El(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const h=yf(e,f[p]);if(h){const{transitionEnd:y,transition:m,...v}=h;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 nw=e=>(t,n)=>{const r=S.useContext(Nl),o=S.useContext(fl),i=()=>h2(e,t,r,o);return n?i():Zn(i)},g2=nw({scrapeMotionValuesFromProps:zf,createRenderState:Wf}),y2=nw({scrapeMotionValuesFromProps:n0,createRenderState:tw}),v2=Symbol.for("motionComponentSymbol");function b2(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 rw=S.createContext({});function fi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function x2(e,t,n,r,o,i){const{visualElement:s}=S.useContext(Nl),a=S.useContext(G0),l=S.useContext(fl),c=S.useContext(yo),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 h=f.current,y=S.useContext(rw);h&&!h.projection&&o&&(h.type==="html"||h.type==="svg")&&w2(f.current,n,o,y);const m=S.useRef(!1);S.useInsertionEffect(()=>{h&&m.current&&h.update(n,l)});const v=n[hx],b=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return dl(()=>{p.current=!0,h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),b.current&&h.animationState&&h.animationState.animateChanges())}),S.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),b.current=!1),h.enteringChildren=void 0)}),h}function w2(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:ow(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&fi(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function ow(e){if(e)return e.options.allowProjection!==!1?e.projection:ow(e.parent)}function Uf(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&r2(r);const i=n?n==="svg":qf(e),s=i?y2:g2;function a(c,u){let d;const f={...S.useContext(yo),...c,layoutId:S2(c)},{isStatic:p}=f,h=a2(c),y=s(c,p);if(!p&&sb){T2(f,r);const m=E2(f);d=m.MeasureLayout,h.visualElement=x2(e,y,f,o,m.ProjectionNode,i)}return g.jsxs(Nl.Provider,{value:h,children:[d&&h.visualElement?g.jsx(d,{visualElement:h.visualElement,...f}):null,p2(e,c,b2(y,h.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[v2]=e,l}function S2({layoutId:e}){const t=S.useContext(ls).id;return t&&e!==void 0?t+"-"+e:e}function T2(e,t){const n=S.useContext(G0).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?ei(!1,r,"lazy-strict-mode"):pn(!1,r,"lazy-strict-mode")}}function E2(e){const t=Z0(),{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 Uf;const n=new Map,r=(i,s)=>Uf(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&pl(!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,Uf(s,void 0,e,t)),n.get(s))})}const C2=(e,t)=>t.isSVG??qf(e)?new r0(t):new Qx(t,{allowProjection:e!==S.Fragment});class I2 extends zr{constructor(t){super(t),t.animationState||(t.animationState=iN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();El(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 A2=0;class P2 extends zr{constructor(){super(...arguments),this.id=A2++}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 O2={animation:{Feature:I2},exit:{Feature:P2}};function Ts(e){return{point:{x:e.pageX,y:e.pageY}}}const _2=e=>t=>Pf(t)&&e(t,Ts(t));function Es(e,t,n,r){return Ss(e,t,_2(n),r)}const iw=({current:e})=>e?e.ownerDocument.defaultView:null,sw=(e,t)=>Math.abs(e-t);function M2(e,t){const n=sw(e.x,t.x),r=sw(e.y,t.y);return Math.sqrt(n**2+r**2)}const aw=new Set(["auto","scroll"]);class lw{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=Yf(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=M2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!y)return;const{point:m}=p,{timestamp:v}=Yt;this.history.push({...m,timestamp:v});const{onStart:b,onMove:x}=this.handlers;h||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Gf(h,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{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=Yf(p.type==="pointercancel"?this.lastMoveEventInfo:Gf(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,b),m&&m(p,b)},!Pf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const l=Ts(t),c=Gf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Yf(c,this.history)),this.removeListeners=cs(Es(this.contextWindow,"pointermove",this.handlePointerMove),Es(this.contextWindow,"pointerup",this.handlePointerUp),Es(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(aw.has(r.overflowX)||aw.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 Gf(e,t){return t?{point:t(e.point)}:e}function cw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yf({point:e},t){return{point:e,delta:cw(e,uw(t)),offset:cw(e,D2(t)),velocity:N2(t,.1)}}function D2(e){return e[0]}function uw(e){return e[e.length-1]}function N2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=uw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>hn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>hn(t)*2&&(r=e[1]);const i=Sn(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 F2(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 dw(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 L2(e,{top:t,left:n,bottom:r,right:o}){return{x:dw(e.x,n,o),y:dw(e.y,t,r)}}function fw(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 V2(e,t){return{x:fw(e.x,t.x),y:fw(e.y,t.y)}}function $2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=ti(t.min,t.max-r,e.min):r>o&&(n=ti(e.min,e.max-o,t.min)),Xn(0,1,n)}function z2(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 Kf=.35;function j2(e=Kf){return e===!1?e=0:e===!0&&(e=Kf),{x:pw(e,"left","right"),y:pw(e,"top","bottom")}}function pw(e,t,n){return{min:hw(e,t),max:hw(e,n)}}function hw(e,t){return typeof e=="number"?e:e[t]||0}const R2=new WeakMap;class B2{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(Ts(d).point),this.stopAnimation()},s=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hD(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),Jn(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Qn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[v];T&&(b=en(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),y&&ht.update(()=>y(d,f),!1,!0),bf(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:h,onDirectionLock:y,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=W2(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 lw(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:iw(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||!Fl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=F2(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&&fi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=L2(r.layoutBox,t):this.constraints=!1,this.elastic=j2(n),o!==this.constraints&&!fi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Jn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=z2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!fi(t))return!1;const r=t.current;pn(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=BD(r,o.root,this.visualElement.getTransformPagePoint());let s=V2(o.layout.layoutBox,i);if(n){const a=n(zD(s));this.hasMutatedConstraints=!!a,a&&(s=jx(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Jn(u=>{if(!Fl(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,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bf(this.visualElement,t),r.start(gf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Jn(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){Jn(n=>{const{drag:r}=this.getProps();if(!Fl(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(!fi(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Jn(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=$2({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(),Jn(s=>{if(!Fl(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;R2.set(this.visualElement,this);const t=this.visualElement.current,n=Es(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,p=f!==t&&xD(f);u&&d&&!p&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();fi(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=H2(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=Ss(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Jn(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=Kf,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 H2(e,t,n){const r=Ox(e,mw(n)),o=Ox(t,mw(n));return()=>{r(),o()}}function Fl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function W2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class q2 extends zr{constructor(t){super(t),this.removeGroupControls=wn,this.removeListeners=wn,this.controls=new B2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wn}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 Zf=e=>(t,n)=>{e&&ht.update(()=>e(t,n),!1,!0)};class U2 extends zr{constructor(){super(...arguments),this.removePointerDownListener=wn}onPointerDown(t){this.session=new lw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iw(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Zf(t),onStart:Zf(n),onMove:Zf(r),onEnd:(i,s)=>{delete this.session,o&&ht.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Es(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 Xf=!1;class G2 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),Xf&&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}),Xf=!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(),Af.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Xf=!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 gw(e){const[t,n]=W0(),r=S.useContext(ls);return g.jsx(G2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(rw),isPresent:t,safeToRemove:n})}const Y2={pan:{Feature:U2},drag:{Feature:q2,ProjectionNode:B0,MeasureLayout:gw}};function yw(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,Ts(t)))}class K2 extends zr{mount(){const{current:t}=this.node;t&&(this.unmount=gD(t,(n,r)=>(yw(this.node,r,"Start"),o=>yw(this.node,o,"End"))))}unmount(){}}class Z2 extends zr{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=cs(Ss(this.node.current,"focus",()=>this.onFocus()),Ss(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function vw(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,Ts(t)))}class X2 extends zr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=SD(t,(o,i)=>(vw(this.node,i,"Start"),(s,{success:a})=>vw(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const Qf=new WeakMap,Jf=new WeakMap,Q2=e=>{const t=Qf.get(e.target);t&&t(e)},J2=e=>{e.forEach(Q2)};function eF({root:e,...t}){const n=e||document;Jf.has(n)||Jf.set(n,{});const r=Jf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(J2,{root:e,...t})),r[o]}function tF(e,t,n){const r=eF(t);return Qf.set(e,n),r.observe(e),()=>{Qf.delete(e),r.unobserve(e)}}const nF={some:0,all:1};class rF extends zr{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:nF[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 tF(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(oF(t,n))&&this.startObserver()}unmount(){}}function oF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const iF={...O2,...{inView:{Feature:rF},tap:{Feature:X2},focus:{Feature:Z2},hover:{Feature:K2}},...Y2,...{layout:{ProjectionNode:B0,MeasureLayout:gw}}},He=k2(iF,C2);function sF(e){return S.useEffect(()=>()=>e(),[])}function vo(e){const t=Zn(()=>$r(e)),{isStatic:n}=S.useContext(yo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function bw(e,t){const n=vo(t()),r=()=>n.set(t());return r(),dl(()=>{const o=()=>ht.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),br(r)}}),n}function aF(e){ys.current=[],e();const t=bw(ys.current,e);return ys.current=void 0,t}function lF(e,t,n,r){if(typeof e=="function")return aF(e);const i=typeof t=="function"?t:DD(t,n,r),s=Array.isArray(e)?xw(e,i):xw([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 xw(e,t){const n=Zn(()=>[]);return bw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function cF(){!Df.current&&Fx();const[e]=S.useState(Cl.current);return process.env.NODE_ENV!=="production"&&pl(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),e}function uF(){const e=cF(),{reducedMotion:t}=S.useContext(yo);return t==="never"?!1:t==="always"?!0:e}function ep(e){return typeof e=="object"&&!Array.isArray(e)}function ww(e,t,n,r){return e==null?[]:typeof e=="string"&&ep(t)?Cf(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function dF(e,t,n){return e*(t+1)}function Sw(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 fF(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Jo(e,o),r--)}}function pF(e,t,n,r,o,i){fF(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:vt(o,i,r[s]),easing:Tb(n,s)})}function hF(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function mF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const gF="easeInOut",yF=20;function vF(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 h=e[p];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,Sw(d,h.at,u,c));continue}let[y,m,v={}]=h;v.at!==void 0&&(d=Sw(d,v.at,u,c));let b=0;const x=(T,E,I,w=0,k=0)=>{const A=bF(T),{delay:O=0,times:N=Gb(A),type:M=t.type||"keyframes",repeat:$,repeatType:_,repeatDelay:F=0,...z}=E;let{ease:D=t.ease||"easeOut",duration:C}=E;const V=typeof O=="function"?O(w,k):O,L=A.length,B=df(M)?M:o?.[M||"keyframes"];if(L<=2&&B){let ee=100;if(L===2&&SF(A)){const q=A[1]-A[0];ee=Math.abs(q)}const ie={...t,...z};C!==void 0&&(ie.duration=hn(C));const te=Bb(ie,ee,B);D=te.ease,C=te.duration}C??(C=i);const U=d+V;N.length===1&&N[0]===0&&(N[1]=1);const G=N.length-A.length;if(G>0&&Ub(N,G),A.length===1&&A.unshift(null),$){pn($<yF,"Repeat count too high, must be less than 20","repeat-count-high"),C=dF(C,$);const ee=[...A],ie=[...N];D=Array.isArray(D)?[...D]:[D];const te=[...D];for(let q=0;q<$;q++){A.push(...ee);for(let Y=0;Y<ee.length;Y++)N.push(ie[Y]+(q+1)),D.push(Y===0?"linear":Tb(te,Y-1))}hF(N,$)}const H=U+C;pF(I,A,D,N,U,H),b=Math.max(V+C,b),f=Math.max(H,f)};if(zt(y)){const T=Tw(y,a);x(m,v,Ew("default",T))}else{const T=ww(y,m,r,l),E=T.length;for(let I=0;I<E;I++){m=m,v=v;const w=T[I],k=Tw(w,a);for(const A in m)x(m[A],xF(v,A),Ew(A,k),I,E)}}u=d,d+=b}return a.forEach((p,h)=>{for(const y in p){const m=p[y];m.sort(mF);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(ti(0,f,k)),x.push(O||"easeOut")}b[0]!==0&&(b.unshift(0),v.unshift(v[0]),x.unshift(gF)),b[b.length-1]!==1&&(b.push(1),v.push(null)),s.has(h)||s.set(h,{keyframes:{},transition:{}});const T=s.get(h);T.keyframes[y]=v;const{type:E,...I}=t;T.transition[y]={...I,duration:f,ease:x,times:b,...n}}}),s}function Tw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ew(e,t){return t[e]||(t[e]=[]),t[e]}function bF(e){return Array.isArray(e)?e:[e]}function xF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const wF=e=>typeof e=="number",SF=e=>e.every(wF);function TF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=xl(e)&&!_x(e)?new r0(t):new Qx(t);n.mount(e),vs.set(e,n)}function EF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new KD(t);n.mount(e),vs.set(e,n)}function kF(e,t){return zt(e)||typeof e=="number"||typeof e=="string"&&!ep(t)}function kw(e,t,n,r){const o=[];if(kF(e,t))o.push(P0(e,ep(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=ww(e,t,r),s=i.length;pn(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=i[a],c=l instanceof Element?TF:EF;vs.has(l)||c(l);const u=vs.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),o.push(...wf(u,{...t,transition:d},{}))}}return o}function CF(e,t,n){const r=[],o=e.map(s=>{if(Array.isArray(s)&&typeof s[0]=="function"){const a=s[0],l=$r(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 vF(o,t,n,{spring:ms}).forEach(({keyframes:s,transition:a},l)=>{r.push(...kw(l,s,a))}),r}function IF(e){return Array.isArray(e)&&e.some(Array.isArray)}function Cw(e={}){const{scope:t,reduceMotion:n}=e;function r(o,i,s){let a=[],l;if(IF(o))a=CF(o,n!==void 0?{reduceMotion:n,...i}:i,t);else{const{onComplete:u,...d}=s||{};typeof u=="function"&&(l=u),a=kw(o,i,n!==void 0?{reduceMotion:n,...d}:d,t)}const c=new LM(a);return l&&c.finished.then(l),t&&(t.animations.push(c),c.finished.then(()=>{Jo(t.animations,c)})),c}return r}const Iw=Cw();function AF(){const e=Zn(()=>({current:null,animations:[]})),t=uF()??void 0,n=S.useMemo(()=>Cw({scope:e,reduceMotion:t}),[e,t]);return sF(()=>{e.animations.forEach(r=>r.stop()),e.animations.length=0}),[e,n]}class PF{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 OF=()=>new PF;function _F(){return Zn(OF)}const Aw=S.createContext(null);function MF(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?m_(e,o,o+i):e}function DF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Zn(()=>He[t]),l=[],c=S.useRef(!1),u=S.useRef(null);pn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(h,y)=>{const m=l.findIndex(v=>h===v.value);m!==-1?l[m].layout=y[n]:l.push({value:h,layout:y[n]}),l.sort(FF)},updateOrder:(h,y,m)=>{if(c.current)return;const v=MF(l,h,y,m);l!==v&&(c.current=!0,r(v.map(NF).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=h=>{u.current=h,typeof s=="function"?s(h):s&&(s.current=h)},p={overflowAnchor:"none",...i.style};return g.jsx(a,{...i,style:p,ref:f,ignoreStrict:!0,children:g.jsx(Aw.Provider,{value:d,children:e})})}const Pw=S.forwardRef(DF);function NF(e){return e.value}function FF(e,t){return e.layout.min-t.layout.min}const Ll=50,Ow=25,LF=new Set(["auto","scroll"]),ks=new WeakMap,Cs=new WeakMap;let Is=null;function VF(){if(Is){const e=tp(Is,"y");e&&(Cs.delete(e),ks.delete(e));const t=tp(Is,"x");t&&t!==e&&(Cs.delete(t),ks.delete(t)),Is=null}}function $F(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY,o=e===document.body||e===document.documentElement;return LF.has(r)||o}function tp(e,t){let n=e?.parentElement;for(;n;){if($F(n,t))return n;n=n.parentElement}return null}function zF(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<Ll){const l=1-s/Ll;return{amount:-Ow*l*l,edge:"start"}}else if(a<Ll){const l=1-a/Ll;return{amount:Ow*l*l,edge:"end"}}return{amount:0,edge:null}}function jF(e,t,n,r){if(!e)return;Is=e;const o=tp(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=zF(i,o,n);if(a===null){Cs.delete(o),ks.delete(o);return}const l=Cs.get(o),c=o===document.body||o===document.documentElement;if(l!==a){if(!(a==="start"&&r<0||a==="end"&&r>0))return;Cs.set(o,a);const d=n==="x"?o.scrollWidth-(c?window.innerWidth:o.clientWidth):o.scrollHeight-(c?window.innerHeight:o.clientHeight);ks.set(o,d)}if(s>0){const u=ks.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 _w(e,t=0){return zt(e)?e:vo(t)}function RF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:s=!0,...a},l){const c=Zn(()=>He[r]),u=S.useContext(Aw),d={x:_w(t.x),y:_w(t.y)},f=lF([d.x,d.y],([v,b])=>v||b?1:"unset");pn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:h,updateOrder:y,groupRef:m}=u;return g.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]),jF(m.current,T[p],p,x[p]),o&&o(v,b)},onDragEnd:(v,b)=>{VF(),i&&i(v,b)},onLayoutMeasure:v=>{h(n,v)},ref:l,ignoreStrict:!0,children:e})}const Mw=S.forwardRef(RF);var Vl={exports:{}},np={},$l={exports:{}},rp={};var Dw;function BF(){if(Dw)return rp;Dw=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(),h=r({inst:{value:p,getSnapshot:f}}),y=h[0].inst,m=h[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 rp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,rp}var op={};var Nw;function HF(){return Nw||(Nw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}function t(p,h){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=h();if(!d){var m=h();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:h}});var v=m[0].inst,b=m[1];return l(function(){v.value=y,v.getSnapshot=h,n(v)&&b({inst:v})},[p,y,h]),a(function(){return n(v)&&b({inst:v}),p(function(){n(v)&&b({inst:v})})},[p]),c(y),y}function n(p){var h=p.getSnapshot;p=p.value;try{var y=h();return!i(p,y)}catch{return!0}}function r(p,h){return h()}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;op.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())})()),op}var Fw;function ip(){return Fw||(Fw=1,process.env.NODE_ENV==="production"?$l.exports=BF():$l.exports=HF()),$l.exports}var Lw;function WF(){if(Lw)return np;Lw=1;var e=S,t=ip();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 np.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=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,h[0],h[1]);return s(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},np}var sp={};var Vw;function qF(){return Vw||(Vw=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=ip(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;sp.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=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,h[0],h[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())})()),sp}var $w;function UF(){return $w||($w=1,process.env.NODE_ENV==="production"?Vl.exports=WF():Vl.exports=qF()),Vl.exports}var GF=UF(),YF=ip(),pi=function(){return pi=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},pi.apply(this,arguments)};function As(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 zw(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 hi=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},KF=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},ZF=function(e){return Object.entries(e)},jw=function(e){return e instanceof Promise},Rw=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)},pi(pi({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},XF=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,zw([],As(s),!1)),u=function(d,f){return n(function(p){return Rw(d,p,i,f)})};return jw(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))}},QF=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,zw([],As(s),!1)),c=function(u){return n(function(d){return Rw(u,d,i,o.current)})};return jw(l)?l.then(function(u){return c(u)}):c(l)}},ap=function(e,t,n){var r,o,i,s=As(S.useState(function(){return e}),2),a=s[0],l=s[1],c=hi(a),u=hi((r=n?.props)!==null&&r!==void 0?r:{}),d=hi(t),f=hi((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=hi((i=n?.interceptor)!==null&&i!==void 0?i:[]),h=S.useRef(e),y=KF(a),m=hi(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=As(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:h.current,previousState:function(){return m.current}});return ZF(E).reduce(function(I,w){var k,A=As(w,2),O=A[0],N=A[1];return pi(pi({},I),(k={},k[O]=n?.debug?XF(O,N,l,T,v,p.current):QF(O,N,l,T,v,p.current),k))},{})}),1),x=b[0];return[a,x,u.current]},JF=Object.defineProperty,Bw=Object.getOwnPropertySymbols,eL=Object.prototype.hasOwnProperty,tL=Object.prototype.propertyIsEnumerable,Hw=(e,t,n)=>t in e?JF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nL=(e,t)=>{for(var n in t||(t={}))eL.call(t,n)&&Hw(e,n,t[n]);if(Bw)for(var n of Bw(t))tL.call(t,n)&&Hw(e,n,t[n]);return e},lp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},rL=(e,t,n,r)=>jl(lp,e,t,n,r),mi=e=>typeof e=="object",jr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!mi(e)&&!mi(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=>jr(e[r],t[r]))},oL=(e,t)=>(mi(e)||Array.isArray(e))&&t?e[t]:e,iL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,zl=e=>/[0-9.]+/.test(e),Ww=e=>["string","number"].includes(typeof e),qw=e=>e==null||e?.length===0||e==="",Uw={eq:jr,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:qw,notEmpty:e=>!qw(e),in:(e,t)=>lp(t,n=>jr(e,n)),notIn:(e,t)=>Gw(t,n=>!jr(e,n))},sL=e=>{if(e in Uw)return Uw[e];throw new Error("Linq - Symbol not found")},gi=(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},jl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=sL(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},aL=(e,t,n,r)=>jl(gi,e,t,n,r),Gw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},lL=(e,t,n,r)=>jl(Gw,e,t,n,r),Yw=e=>{if(e===null)return null;const t=nL({},e);return Object.keys(t).forEach(n=>t[n]=mi(e[n])?Yw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Kw=(e,t)=>{if(mi(t)){for(let n=0;n<e.length;n++){const r=e[n];if(jr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(jr(t,r))return!0}return!1},cL=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},uL=e=>gi(e,(t,n,r)=>mi(t)?n===r.findIndex(o=>jr(o,t)):n===r.indexOf(t)),dL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Zw=(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())},fL=(e,t)=>Zw(e,n=>n[t]),Xw=(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},pL=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},hL=(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 zl(e)&&zl(t)?r.map(s=>Number.parseInt(s)):r},cp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&zl(e)&&zl(t)){const o=[],[i,s]=pL(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return hL(e,t,r)},mL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?cp(r,o,1):cp(r,i,Number.parseInt(o,10))}return Ww(e)&&Ww(t)?cp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},up=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},Qw=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},gL=(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)},yL=(e,t,n,r)=>jl(gL,e,t,n,r),Jw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(iL(t))},e1=(e=>(e.Asc="asc",e.Desc="desc",e))(e1||{}),vL=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),bL=(e,t)=>e.sort(vL(t)),xL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:gi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},wL=class Jh{constructor(t=[]){this.array=t}static Range(...t){return mL(...t)}static New(t){return new Jh(t)}Where(t,n,r){return this.array=aL(this.array,t,n,r),this}Some(t,n,r){return rL(this.array,t,n,r)}All(t,n,r){return lL(this.array,t,n,r)}Reverse(){return this.array=Qw(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=yL(this.array,t,n,r),this}Distinct(){return this.array=uL(this.array),this}First(t){return t===void 0?this.array[0]:dL(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?up((n,r)=>n+r,0,this.array):up((n,r)=>n+oL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return fL(this.array,t)}GroupWith(t){return Zw(this.array,t)}Except(t){return gi(this.array,n=>!Kw(t,n))}Intersect(t){return gi(this.array,n=>Kw(t,n))}OrderBy(t,n){let r;return r=t?Jw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Qw(r):r,this}Includes(t){return lp(this.array,n=>jr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return up(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Xw(this.array,n=>[t,n]))}Zip(t,n){return Xw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:gi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Jh(Yw(this.array))}ToObject(t){return cL(this.array,t)}Sort(t){return Array.isArray(t)?bL(this.array,t):Jw(this.array,t)}Unique(t){return xL(this.array,t)}},t1=wL;const Rl=0,Rr=1,yi=2,n1=4;function r1(e){return()=>e}function SL(e){e()}function Ps(e,t){return n=>e(t(n))}function o1(e,t){return()=>e(t)}function TL(e,t){return n=>e(t,n)}function dp(e){return e!==void 0}function EL(...e){return()=>{e.map(SL)}}function vi(){}function Bl(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(Rl,t)}function fp(e){e(yi)}function Tt(e){return e(n1)}function Ae(e,t){return st(e,TL(t,Rl))}function Fn(e,t){const n=e(Rr,r=>{n(),t(r)});return n}function i1(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 _e(e){return t=>n=>{e(n)&&t(n)}}function we(e){return t=>Ps(t,e)}function er(e){return t=>()=>{t(e)}}function fe(e,...t){const n=CL(...t);return((r,o)=>{switch(r){case yi:fp(e);return;case Rr:return st(e,n(o))}})}function tr(e,t){return n=>r=>{n(t=e(t,r))}}function bo(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 CL(...e){return t=>e.reduceRight(kL,t)}function IL(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(),vi);case yi:r(),n=null;return}}}function ge(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Rl:t=o;break;case Rr:{o(t);break}case n1:return t}return n(r,o)})}function Xt(e,t){return Bl(ge(t),n=>Ae(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Rl:e.slice().forEach(r=>{r(n)});return;case yi:e.splice(0,e.length);return;case Rr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function gn(e){return Bl(Ke(),t=>Ae(e,t))}function Xe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:AL(),singleton:n}}const AL=()=>Symbol();function PL(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 yi:{fp(t);return}case Rr:return r===o&&s(n),st(t,s)}}}function Me(e,t=s1){return fe(e,xt(t))}function pp(...e){return function(t,n){switch(t){case yi:return;case Rr:return EL(...e.map(r=>st(r,n)))}}}var ln=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(ln||{});const OL={0:"debug",3:"error",1:"log",2:"warn"},_L=()=>typeof globalThis>"u"?window:globalThis,Br=Xe(()=>{const e=ge(3);return{log:ge((t,n,r=1)=>{var o;const i=(o=_L().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[OL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function nr(e,t,n){return hp(e,t,n).callbackRef}function hp(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 a1(e,t,n,r,o,i,s,a,l){const c=S.useCallback(u=>{const d=ML(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 h;p&&(h=f.ownerDocument.defaultView);const y=s?a?s.scrollLeft:s.scrollTop:p?a?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:a?f.scrollLeft:f.scrollTop,m=s?a?s.scrollWidth:s.scrollHeight:p?a?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:a?f.scrollWidth:f.scrollHeight,v=s?a?s.offsetWidth:s.offsetHeight:p?a?h.innerWidth:h.innerHeight:a?f.offsetWidth:f.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(y,0),viewportHeight:v}),i?.(a?l1("column-gap",getComputedStyle(u).columnGap,o):l1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,s,r,a]);return hp(c,n,l)}function ML(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},ln.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 l1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,ln.WARN),t==="normal"?0:parseInt(t??"0",10)}function mp(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(),h=c.top-p.top;f=p.height-Math.max(0,h),d=h+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}=hp(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 tn=Xe(()=>{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),h=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:h,scrollBy:f,scrollContainerState:e,scrollHeight:s,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:y,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Os={lvl:0};function c1(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===Os}function _s(e,t){if(!mt(e))return t===e.k?e.v:t<e.k?_s(e.l,t):_s(e.r,t)}function Ln(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=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function yn(e,t,n){return mt(e)?f1(t,n,1):t===e.k?jt(e,{k:t,v:n}):t<e.k?p1(jt(e,{l:yn(e.l,t,n)})):p1(jt(e,{r:yn(e.r,t,n)}))}function bi(){return Os}function xi(e,t,n){if(mt(e))return[];const r=Ln(e,t)[0];return DL(yp(e,r,n))}function gp(e,t){if(mt(e))return Os;const{k:n,l:r,r:o}=e;if(t===n){if(mt(r))return o;if(mt(o))return r;{const[i,s]=d1(r);return Hl(jt(e,{k:i,l:u1(r),v:s}))}}else return t<n?Hl(jt(e,{l:gp(r,t)})):Hl(jt(e,{r:gp(o,t)}))}function xo(e){return mt(e)?[]:[...xo(e.l),{k:e.k,v:e.v},...xo(e.r)]}function yp(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(yp(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(yp(i,t,n))),a}function Hl(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(vp(t))return h1(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(vp(e))return bp(jt(e,{lvl:n-1}));if(!mt(r)&&!mt(r.l)){const o=r.l,i=vp(o)?r.lvl-1:r.lvl;return jt(o,{l:jt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:bp(jt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function jt(e,t){return f1(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 u1(e){return mt(e.r)?e.l:Hl(jt(e,{r:u1(e.r)}))}function vp(e){return mt(e)||e.lvl>e.r.lvl}function d1(e){return mt(e.r)?[e.k,e.v]:d1(e.r)}function f1(e,t,n,r=Os,o=Os){return{k:e,l:r,lvl:n,r:o,v:t}}function p1(e){return bp(h1(e))}function h1(e){const{l:t}=e;return!mt(t)&&t.lvl===e.lvl?jt(t,{r:jt(e,{l:t.r})}):e}function bp(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 DL(e){return c1(e,({k:t,v:n})=>({index:t,value:n}))}function m1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Ms(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const xp=Xe(()=>({recalcInProgress:ge(!1)}),[],{singleton:!0});function g1(e,t,n){return e[Wl(e,t,n)]}function Wl(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 NL(e,t,n,r){const o=Wl(e,t,r),i=Wl(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function ql(e){return!mt(e.groupOffsetTree)}function wp({index:e},t){return t===e?0:t<e?-1:1}function FL(){return{groupIndices:[],groupOffsetTree:bi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:bi()}}function LL(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=yn(e,0,i);continue}const a=xi(e,s-1,o+1);if(a.some(HL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of a)l?(o>=d||i===f)&&(e=gp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=yn(e,o+1,f));c&&(e=yn(e,s,i))}return[e,n]}function VL(e){return typeof e.groupIndex<"u"}function $L({offset:e},t){return t===e?0:t<e?-1:1}function Ds(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=g1(t,e,wp),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function y1(e,t){if(!ql(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function v1(e,t,n){if(VL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=y1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function zL(e,t,n,r=0){return r>0&&(t=Math.max(t,g1(e,r,wp).offset)),c1(NL(e,t,n,$L),BL)}function jL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,ln.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((h,y)=>yn(yn(h,y,f),y+1,p),s)}else[s,a]=LL(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Sp(e.offsetTree,a,s,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>yn(f,p,Ds(p,d,o)),bi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:s}}function RL(e){return xo(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 b1(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 Sp(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Wl(o,t-1,wp),a=o[l].offset;const c=Ln(n,t-1);i=c[0],s=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of xi(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 BL(e){return{index:e.index,value:e}}function HL(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 WL={offsetHeight:"height",offsetWidth:"width"},rr=Xe(([{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)=>Vn(w,WL[k])),h=ge(void 0),y=ge(0),m=FL(),v=Xt(fe(n,We(l,e,y),tr(jL,m),xt()),m),b=Xt(fe(l,xt(),tr((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),we(({prev:w})=>w)),[]);Ae(fe(l,_e(w=>w.length>0),We(v,y),we(([w,k,A])=>{const O=w.reduce((N,M,$)=>yn(N,M,Ds(M,k.offsetTree,A)||$),bi());return{...k,groupIndices:w,groupOffsetTree:O}})),v),Ae(fe(r,We(v),_e(([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,_e(w=>w!==void 0&&mt(Tt(v).sizeTree)),we(w=>{const k=Tt(d),A=Tt(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,_e(w=>w!==void 0&&w.length>0&&mt(Tt(v).sizeTree)),we(w=>{const k=[];let A=w[0],O=0;for(let N=1;N<w.length;N++){const M=w[N];M!==A&&(k.push({endIndex:N-1,size:A,startIndex:O}),A=M,O=N)}return k.push({endIndex:w.length-1,size:A,startIndex:O}),k})),n),Ae(fe(l,We(d,u),_e(([,w,k])=>w!==void 0&&k!==void 0),we(([w,k,A])=>{const O=[];for(let N=0;N<w.length;N++){const M=w[N],$=w[N+1];O.push({startIndex:M,endIndex:M,size:k}),$!==void 0&&O.push({startIndex:M+1,endIndex:$-1,size:A})}return O})),n);const T=gn(fe(n,We(v),tr(({sizes:w},[k,A])=>({changed:A!==w,sizes:A}),{changed:!1,sizes:m}),we(w=>w.changed)));st(fe(a,tr((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),we(w=>w.diff)),w=>{const{groupIndices:k}=Tt(v);if(w>0)ze(t,!0),ze(i,w+b1(w,k));else if(w<0){const A=Tt(b);A.length>0&&(w-=b1(-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},ln.ERROR)});const E=gn(i);Ae(fe(i,We(v),we(([w,k])=>{const A=k.groupIndices.length>0,O=[],N=k.lastSize;if(A){const M=_s(k.sizeTree,0);let $=0,_=0;for(;$<w;){const z=k.groupIndices[_],D=k.groupIndices.length===_+1?1/0:k.groupIndices[_+1]-z-1;O.push({endIndex:z,size:M,startIndex:z}),O.push({endIndex:z+1+D-1,size:N,startIndex:z+1}),_++,$+=D+1}const F=xo(k.sizeTree);return $!==w&&F.shift(),F.reduce((z,{k:D,v:C})=>{let V=z.ranges;return z.prevSize!==0&&(V=[...z.ranges,{endIndex:D+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:D+w,prevSize:C,ranges:V}},{prevIndex:w,prevSize:0,ranges:O}).ranges}return xo(k.sizeTree).reduce((M,{k:$,v:_})=>({prevIndex:$+w,prevSize:_,ranges:[...M.ranges,{endIndex:$+w-1,size:M.prevSize,startIndex:M.prevIndex}]}),{prevIndex:0,prevSize:N,ranges:[]}).ranges})),n);const I=gn(fe(s,We(v,y),we(([w,{offsetTree:k},A])=>{const O=-w;return Ds(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=bi();const N=Tt(b);let M=0,$=0,_=0;for(;M<-w;){_=N[$];const F=N[$+1]-_-1;$++,M+=F+1}if(O=xo(k.sizeTree).reduce((F,{k:z,v:D})=>yn(F,Math.max(0,z+w),D),O),M!==-w){const F=_s(k.sizeTree,_);O=yn(O,0,F);const z=Ln(k.sizeTree,-w+1)[1];O=yn(O,1,z)}return{...k,sizeTree:O,...Sp(k.offsetTree,0,O,A)}}else{const O=xo(k.sizeTree).reduce((N,{k:M,v:$})=>yn(N,Math.max(0,M+w),$),bi());return{...k,sizeTree:O,...Sp(k.offsetTree,0,O,A)}}})),v),{beforeUnshiftWith:E,data:h,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(Br,xp),{singleton:!0});function qL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const x1=Xe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),s=Ke(),a=gn(fe(i,we(qL)));return Ae(fe(a,we(l=>l.totalCount)),n),Ae(fe(a,we(l=>l.groupIndices)),e),Ae(fe(Vt(o,t,r),_e(([l,c])=>ql(c)),we(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),we(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},bt(rr,tn)),Hr=Xe(([{log:e}])=>{const t=ge(!1),n=gn(fe(t,_e(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},ln.DEBUG)}),{didMount:n,propsReady:t}},bt(Br),{singleton:!0}),UL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function w1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!UL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ns=Xe(([{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(),h=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],M,$,_])=>{const F=w1(T),{align:z,behavior:D,offset:C}=F,V=w-1,L=v1(F,E,V);let B=Ds(L,E.offsetTree,M)+A;z==="end"?(B+=$+Ln(E.sizeTree,L)[1]-I+_,L===V&&(B+=O)):z==="center"?B+=($+Ln(E.sizeTree,L)[1]-I+_)/2:B-=k,C&&(B+=C);const U=G=>{x(),G?(N("retrying to scroll to",{location:T},ln.DEBUG),ze(p,T)):(ze(h,!0),N("list did not change, scroll successful",{},ln.DEBUG))};if(x(),D==="smooth"){let G=!1;b=st(t,H=>{G=G||H}),m=Fn(u,()=>{U(G)})}else m=Fn(fe(t,GL(150)),U);return v=setTimeout(()=>{x()},1200),ze(l,!0),N("scrolling from index to",{behavior:D,index:L,top:B},ln.DEBUG),{behavior:D,top:B}})),c),{scrollTargetReached:h,scrollToIndex:p,topListHeight:y}},bt(rr,tn,Br),{singleton:!0});function GL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Tp(e,t){e==0?t():requestAnimationFrame(()=>{Tp(e-1,t)})}function Ep(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Fs=Xe(([{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),_e(([u,d])=>!!d),er(!1)),a),Ae(fe(s,We(l),_e(([u,d])=>!!d),er(!1)),c),st(fe(Vt(t,s),We(a,n,e,c),_e(([[,u],d,{sizeTree:f},p,h])=>u&&(!mt(f)||dp(p))&&!d&&!h),We(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),Tp(4,()=>{Fn(r,()=>{ze(a,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},bt(rr,tn,Ns,Hr),{singleton:!0});function S1(e,t){return Math.abs(e-t)<1.01}const Ls="up",Vs="down",YL="none",KL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ZL=0,$s=Xe(([{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(ZL),f=Xt(fe(pp(fe(Me(o),bo(1),er(!0)),fe(Me(o),bo(1),er(!1),i1(100))),xt()),!1),p=Xt(fe(pp(fe(n,er(!0)),fe(n,er(!1),i1(200))),xt()),!1);Ae(fe(Vt(Me(o),Me(d)),we(([b,x])=>b<=x),xt()),a),Ae(fe(a,xr(50)),c);const h=gn(fe(Vt(r,Me(i),Me(t),Me(e),Me(u)),tr((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 M,$;return T>b.state.scrollTop?(M="SCROLLED_DOWN",$=b.state.scrollTop-T):(M="SIZE_DECREASED",$=b.state.scrollTop-T||b.scrollTopDelta),{atBottom:!0,atBottomBecause:M,scrollTopDelta:$,state:O}}let N;return O.scrollHeight>b.state.scrollHeight?N="SIZE_INCREASED":E<b.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":T<b.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:O}},KL),xt((b,x)=>b&&b.atBottom===x.atBottom))),y=Xt(fe(r,tr((b,{scrollHeight:x,scrollTop:T,viewportHeight:E})=>{if(S1(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}),_e(b=>b.changed),we(b=>b.jump)),0);Ae(fe(h,we(b=>b.atBottom)),s),Ae(fe(s,xr(50)),l);const m=ge(Vs);Ae(fe(r,we(({scrollTop:b})=>b),xt(),tr((b,x)=>Tt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Ls:Vs,prevScrollTop:x},{direction:Vs,prevScrollTop:0}),we(b=>b.direction)),m),Ae(fe(r,xr(50),er(YL)),m);const v=ge(0);return Ae(fe(f,_e(b=>!b),er(0)),v),Ae(fe(o,xr(100),We(f),_e(([b,x])=>x),tr(([b,x],[T])=>[x,T],[0,0]),we(([b,x])=>x-b)),v),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:s,isAtTop:a,isScrolling:f,lastJumpDueToItemResize:y,scrollDirection:m,scrollVelocity:v}},bt(tn)),zs="top",js="bottom",T1="none";function E1(e,t,n){return typeof e=="number"?n===Ls&&t===zs||n===Vs&&t===js?e:0:n===Ls?t===zs?e.main:e.reverse:t===js?e.main:e.reverse}function k1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const kp=Xe(([{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(Me(r),Me(o),Me(n),Me(i,Ms),Me(l),Me(s),Me(t),Me(e),Me(a)),we(([u,d,f,[p,h],y,m,v,b,x])=>{const T=u-b,E=m+v,I=Math.max(f-T,0);let w=T1;const k=k1(x,zs),A=k1(x,js);return p-=b,p+=f+v,h+=f+v,h-=b,p>u+E-k&&(w=Ls),h<u-I+d+A&&(w=Vs),w!==T1?[Math.max(T-f-E1(y,zs,w)-k,0),T-I-v+d+E1(y,js,w)+A]:null}),_e(u=>u!=null),xt(Ms)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},bt(tn),{singleton:!0});function XL(e,t,n){if(ql(t)){const r=y1(e,t);return[{index:Ln(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 Cp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ul(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,h=f-u;return{bottom:u,firstItemIndex:i,items:I1(e,o,i),offsetBottom:h,offsetTop:c,top:p,topItems:I1(t,o,i),topListHeight:t.reduce((y,m)=>m.size+y,0),totalCount:n}}function C1(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=Ep(t,a),c=Array.from({length:a}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Ul(c,[],a,o,n,r)}function I1(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=xi(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 A1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const wo=Xe(([{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:h}])=>{const y=ge([]),m=ge(0),v=Ke(),b=ge(0);Ae(i.topItemsIndexes,y);const x=Xt(fe(Vt(p,h,Me(l,Ms),Me(o),Me(r),Me(c),u,Me(y),Me(t),Me(n),Me(b),e),_e(([w,k,,A,,,,,,,,O])=>{const N=O&&O.length!==A;return w&&!k&&!N}),we(([,,[w,k],A,O,N,M,$,_,F,z,D])=>{var C,V,L,B;const U=O,{offsetTree:G,sizeTree:H}=U,ee=Tt(m);if(A===0)return{...Cp,totalCount:A};if(w===0&&k===0)return ee===0?{...Cp,totalCount:A}:C1(ee,N,O,_,F,D||[]);if(mt(H))return ee>0?null:Ul(XL(Ep(N,A),U,D),[],A,F,U,_);const ie=[];if($.length>0){const ae=$[0],ce=$[$.length-1];let Q=0;for(const ue of xi(H,ae,ce)){const re=ue.value,he=Math.max(ue.start,ae),oe=Math.min(ue.end,ce);for(let le=he;le<=oe;le++)ie.push({data:D?.[le],index:le,offset:Q,size:re}),Q+=re}}if(!M)return Ul([],ie,A,F,U,_);const te=$.length>0?$[$.length-1]+1:0,q=zL(G,w,k,te);if(q.length===0)return null;const Y=A-1,Z=Bl([],ae=>{for(const ce of q){const Q=ce.value;let ue=Q.offset,re=ce.start;const he=Q.size;if(Q.offset<w){re+=Math.floor((w-Q.offset+F)/(he+F));const le=re-ce.start;ue+=le*he+le*F}re<te&&(ue+=(te-re)*he,re=te);const oe=Math.min(ce.end,Y);for(let le=re;le<=oe&&!(ue>=k);le++)ae.push({data:D?.[le],index:le,offset:ue,size:he}),ue+=he+F}}),pe=A1(z,zs),R=A1(z,js);if(Z.length>0&&(pe>0||R>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 re=ae.offset;for(let he=ae.index-1;he>=ae.index-Q;he--){const oe=(V=(C=xi(H,he,he)[0])==null?void 0:C.value)!=null?V:ae.size;re-=oe+F,ue.unshift({data:D?.[he],index:he,offset:re,size:oe})}Z.unshift(...ue)}if(R>0&&ce.index<Y){const Q=Math.min(R,Y-ce.index);let ue=ce.offset+ce.size+F;for(let re=ce.index+1;re<=ce.index+Q;re++){const he=(B=(L=xi(H,re,re)[0])==null?void 0:L.value)!=null?B:ce.size;Z.push({data:D?.[re],index:re,offset:ue,size:he}),ue+=he+F}}}return Ul(Z,ie,A,F,U,_)}),_e(w=>w!==null),xt()),Cp);Ae(fe(e,_e(dp),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=gn(fe(x,_e(({items:w})=>w.length>0),We(o,e),_e(([{items:w},k])=>w[w.length-1].originalIndex===k-1),we(([,w,k])=>[w-1,k]),xt(Ms),we(([w])=>w))),E=gn(fe(x,xr(200),_e(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),we(({items:w})=>w[0].index),xt())),I=gn(fe(x,_e(({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(m1)));return{endReached:T,initialItemCount:m,itemsRendered:v,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:E,topItemsIndexes:y,...f}},bt(rr,x1,kp,Fs,Ns,$s,Hr,xp),{singleton:!0}),P1=Xe(([{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(Me(s),i),{totalListHeight:s,totalListHeightChanged:i}},bt(tn,wo),{singleton:!0}),QL=Xe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ge(!1),r=Xt(fe(Vt(n,e,t),_e(([o])=>o),we(([,o,i])=>Math.max(0,o-i)),xr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,P1),{singleton:!0}),O1=Xe(()=>({context:ge(null)})),JL=({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,_1=Xe(([{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,h,y,m,v,b],x])=>{const{align:T,behavior:E,calculateViewLocation:I=JL,done:w,...k}=d,A=v1(d,f,h-1),O=Ds(A,f.offsetTree,x)+y+m,N=O+Ln(f.sizeTree,A)[1],M=b+m,$=b+p-v,_=I({itemBottom:N,itemTop:O,locationParams:{align:T,behavior:E,...k},viewportBottom:$,viewportTop:M});return _?w&&Fn(fe(s,_e(F=>!F),bo(Tt(s)?1:2)),w):w?.(),_}),_e(d=>d!==null)),c),{scrollIntoView:u}},bt(rr,tn,Ns,wo,Br),{singleton:!0});function M1(e){return e?e==="smooth"?"smooth":"auto":!1}const eV=(e,t)=>typeof e=="function"?M1(e(t)):t&&M1(e),tV=Xe(([{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 h=ge(!1),y=Ke();let m=null;function v(E){ze(s,{align:"end",behavior:E,index:"LAST"})}st(fe(Vt(fe(Me(t),bo(1)),l),We(Me(h),i,a,d),we(([[E,I],w,k,A,O])=>{let N=I&&A,M="auto";return N&&(M=eV(w,k||O),N=N&&!!M),{followOutputBehavior:M,shouldFollow:N,totalCount:E}}),_e(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},ln.DEBUG),v(E)}):m=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},ln.DEBUG),v(E),m=null})});function b(E){const I=Fn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Tt(u)("scrolling to bottom due to increased size",{},ln.DEBUG),v("auto"))});setTimeout(I,100)}st(fe(Vt(Me(h),t,c),_e(([E,,I])=>E&&I),tr(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),_e(({refreshed:E})=>E),We(h,t)),([,E])=>{Tt(a)&&b(E!==!1)}),st(y,()=>{b(Tt(h)!==!1)}),st(Vt(Me(h),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ge(null),T=Ke();return Ae(pp(fe(Me(r),we(E=>{var I;return(I=E?.length)!=null?I:0})),fe(Me(t))),T),st(fe(Vt(fe(T,bo(1)),l),We(Me(x),a,d,f),we(([[E,I],w,k,A,O])=>I&&k&&w?.({context:O,totalCount:E,scrollingInProgress:A})),_e(E=>!!E),xr(0)),E=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),ze(p,E)}):m=Fn(e,()=>{Tt(u)("scrolling into view",{}),ze(p,E),m=null})}),{autoscrollToBottom:y,followOutput:h,scrollIntoViewOnChange:x}},bt(rr,$s,Ns,Fs,Hr,Br,tn,O1,_1)),nV=Xe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(Ae(fe(a,We(i),_e(([,l])=>l!==0),We(o,r,t,n,e),we(([[,l],c,u,d,f,p=[]])=>C1(l,c,u,d,f,p))),s),{}),bt(rr,Fs,wo,Hr),{singleton:!0}),rV=Xe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ge(0);return st(fe(e,We(r),_e(([,o])=>o!==0),we(([,o])=>({top:o}))),o=>{Fn(fe(n,bo(1),_e(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(Hr,tn,wo),{singleton:!0}),D1=Xe(([{scrollVelocity:e}])=>{const t=ge(!1),n=Ke(),r=ge(!1);return Ae(fe(e,We(r,t,n),_e(([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($s),{singleton:!0}),Ip=Xe(([{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(tn)),oV=Xe(([{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,h,y,m,v,b,x])=>{const T=RL(h.sizeTree);m&&v!==null&&b!==null&&(y=v.scrollTop-b.offsetTop),y-=x,p({ranges:T,scrollTop:y})}),Ae(fe(u,_e(dp),we(iV)),o),Ae(fe(i,We(u),_e(([,p])=>p!==void 0),xt(),we(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(rr,tn,Fs,Hr,Ip));function iV(e){return{align:"start",index:0,offset:e.scrollTop}}const sV=Xe(([{topItemsIndexes:e}])=>{const t=ge(0);return Ae(fe(t,_e(n=>n>=0),we(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(wo));function N1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const aV=N1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),lV=Xe(([{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:h}])=>{const y=gn(fe(l,We(s),tr(([,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]),_e(([v])=>v!==0),We(r,a,n,o,p,h),_e(([,v,b,x,,,T])=>!T&&!x&&v!==0&&b===Ls),we(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},ln.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&&aV()?ze(e,b-v):m(-v)}),st(fe(Vt(Xt(i,!1),e,h),_e(([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=_s(T,0);let A=0,O=0;for(;A<v;){A++,w+=k;let N=b.length===O+1?1/0:b[O+1]-b[O]-1;A+N>v&&(w-=k,N=v-A+1),A+=N,w+=I(N),O++}return w}})),v=>{ze(e,v),requestAnimationFrame(()=>{ze(t,{top:v}),requestAnimationFrame(()=>{ze(e,0),ze(h,!1)})})}),{deviation:e}},bt(tn,$s,wo,rr,Br,xp)),cV=Xe(([e,t,n,r,o,i,s,a,l,c,u])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c,...u}),bt(kp,nV,Hr,D1,P1,rV,QL,Ip,_1,Br,O1)),F1=Xe(([{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:h,initialTopMostItemIndex:y,scrolledToInitialItem:m},v,b,x,T,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:k},A])=>{const{listState:O,minOverscanItemCount:N,topItemsIndexes:M,rangeChanged:$,..._}=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:h,initialTopMostItemIndex:y,scrolledToInitialItem:m,sizeRanges:c,topItemCount:w,topItemsIndexes:M,totalCount:f,...x,groupIndices:s,itemSize:l,listState:O,minOverscanItemCount:N,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:p,rangeChanged:$,..._,...A,...v,sizes:u,...b}},bt(rr,Fs,tn,oV,tV,wo,Ns,lV,sV,x1,cV));function uV(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 Gl=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Ap(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]=IL(m[t.events[b]]),v),{})}const d=S.forwardRef((m,v)=>{const{children:b,...x}=m,[T]=S.useState(()=>Bl(PL(e),w=>{l(w,x)})),[E]=S.useState(o1(u,T));Gl(()=>{for(const w of s)w in x&&st(E[w],x[w]);return()=>{Object.values(E).map(fp)}},[x,E,T]),Gl(()=>{l(T,x)}),S.useImperativeHandle(v,r1(c(T)));const I=n;return g.jsx(a.Provider,{value:T,children:n?g.jsx(I,{...uV([...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,()=>Tt(v),()=>Tt(v))},h=m=>{const v=S.useContext(a)[m],[b,x]=S.useState(o1(Tt,v));return Gl(()=>st(v,T=>{T!==b&&x(r1(T))}),[v,b]),b},y=S.version.startsWith("18")?p:h;return{Component:d,useEmitter:(m,v)=>{const b=S.useContext(a)[m];Gl(()=>st(b,v),[v,b])},useEmitterValue:y,usePublisher:f}}const Yl=S.createContext(void 0),L1=S.createContext(void 0),V1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Pp(e){return"self"in e}function dV(e){return"body"in e}function $1(e,t,n,r=vi,o,i){const s=S.useRef(null),a=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,h,y;const m=f.target;if(dV(m)||Pp(m)){const b=Pp(m)?m:m.defaultView;y=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,h=i?b.innerWidth:b.innerHeight}else y=i?m.scrollLeft:m.scrollTop,p=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:p,scrollTop:Math.max(y,0),viewportHeight:h})};f.suppressFlushSync?v():Ri.flushSync(v),a.current!==null&&(y===a.current||y<=0||y===p-h)&&(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 h=f.behavior==="smooth";let y,m,v;Pp(p)?(m=Math.max(Vn(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=Vn(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)),S1(y,m)||f.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:y}),h&&t(!0);return}h?(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 Op="-webkit-sticky",z1="sticky",_p=N1(()=>{if(typeof document>"u")return z1;const e=document.createElement("div");return e.style.position=Op,e.style.position===Op?Op:z1});function Mp(e){return e}const fV=Xe(()=>{const e=ge(a=>`Item ${a}`),t=ge(a=>`Group ${a}`),n=ge({}),r=ge(Mp),o=ge("div"),i=ge(vi),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")}}),pV=Xe(([e,t])=>({...e,...t}),bt(F1,fV)),hV=({height:e})=>g.jsx("div",{style:{height:e}}),mV={overflowAnchor:"none",position:_p(),zIndex:1},j1={overflowAnchor:"none"},gV={...j1,display:"inline-block",height:"100%"},R1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=Tn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=Tn("windowScrollContainerState"),s=Tn("scrollContainerState"),a=o||r?i:s,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),h=Tn("gap"),y=Fe("horizontalDirection"),{callbackRef:m}=a1(n,f,d,e?vi:a,p,h,o,y,Fe("skipAnimationFrameInResizeObserver")),[v,b]=S.useState(0);Fp("deviation",_=>{v!==_&&b(_)});const x=Fe("EmptyPlaceholder"),T=Fe("ScrollSeekPlaceholder")||hV,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),A=Fe("isSeeking"),O=Fe("groupIndices").length>0,N=Fe("alignToBottom"),M=Fe("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:N?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:N?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...M?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?g.jsx(x,{...wt(x,c)}):g.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(_=>{const F=_.originalIndex,z=k(F+t.firstItemIndex,_.data,c);return A?S.createElement(T,{...wt(T,c),height:_.size,index:_.index,key:z,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?S.createElement(w,{...wt(w,c),"data-index":F,"data-item-index":_.index,"data-known-size":_.size,key:z,style:mV},u(_.index,c)):S.createElement(I,{...wt(I,c),...B1(I,_.data),"data-index":F,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:z,style:y?gV:j1},O?l(_.index,_.groupIndex,_.data,c):l(_.index,_.data,c))})})}),yV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},vV={outline:"none",overflowX:"auto",position:"relative"},wi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),bV={position:_p(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function B1(e,t){return{item:typeof e=="string"?void 0:t}}const xV=S.memo(function(){const e=Fe("HeaderComponent"),t=Tn("headerHeight"),n=Fe("HeaderFooterTag"),r=nr(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),wV=S.memo(function(){const e=Fe("FooterComponent"),t=Tn("footerHeight"),n=Fe("HeaderFooterTag"),r=nr(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null});function Dp({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:h}=$1(a,c,l,u,void 0,d);return e("scrollTo",h),e("scrollBy",f),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?vV:yV,...o},tabIndex:0,...s,...wt(l,i),children:r})})}function Np({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),h=t("scrollerRef"),{scrollByCallback:y,scrollerRef:m,scrollToCallback:v}=$1(a,c,l,h,f);return V1(()=>{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),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...s,...wt(l,i),children:r})})}const SV=({children:e})=>{const t=S.useContext(Yl),n=Tn("viewportHeight"),r=Tn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),s=S.useMemo(()=>Ps(n,l=>Vn(l,i?"width":"height")),[n,i]),a=nr(s,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:a,style:wi(o),children:e})},TV=({children:e})=>{const t=S.useContext(Yl),n=Tn("windowViewportRect"),r=Tn("fixedItemHeight"),o=Fe("customScrollParent"),i=mp(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]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:wi(s),children:e})},EV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...bV,marginTop:`${n}px`},o=Fe("context");return g.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 g.jsxs(r||t?AV:IV,{...e,context:o,children:[n&&g.jsx(EV,{children:g.jsx(R1,{showTopList:!0})}),g.jsxs(r||t?TV:SV,{children:[g.jsx(xV,{}),g.jsx(R1,{}),g.jsx(wV,{})]})]})}),{Component:CV,useEmitter:Fp,useEmitterValue:Fe,usePublisher:Tn}=Ap(pV,{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),IV=Dp({useEmitter:Fp,useEmitterValue:Fe,usePublisher:Tn}),AV=Np({useEmitter:Fp,useEmitterValue:Fe,usePublisher:Tn}),Lp=CV,PV=Xe(()=>{const e=ge(c=>g.jsxs("td",{children:["Item $",c]})),t=ge(null),n=ge(c=>g.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ge(null),o=ge(null),i=ge({}),s=ge(Mp),a=ge(vi),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")}}),OV=Xe(([e,t])=>({...e,...t}),bt(F1,PV)),_V=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{height:e}})}),MV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{border:0,height:e,padding:0}})}),DV={overflowAnchor:"none"},H1={position:_p(),zIndex:2,overflowAnchor:"none"},W1=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")||_V,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),[]),h=(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:{...H1,top:s}},c(y.index,o)):S.createElement(f,{...wt(f,o),...B1(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?{...H1,top:s+b}:DV},a?l(y.index,y.groupIndex,y.data,o):l(y.index,y.data,o))});return g.jsx(g.Fragment,{children:h})}),NV=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=$n("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=$n("windowScrollContainerState"),s=$n("scrollContainerState"),a=o||r?i:s,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=a1(n,c,l,a,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,h]=S.useState(0);Vp("deviation",O=>{p!==O&&(f.current.style.marginTop=`${O}px`,h(O))});const y=je("EmptyPlaceholder"),m=je("FillerRow")||MV,v=je("TableBodyComponent"),b=je("paddingTopAddition"),x=je("statefulTotalCount"),T=je("context");if(x===0&&y)return g.jsx(y,{...wt(y,T)});const E=(t?e.topItems:[]).reduce((O,N)=>O+N.size,0),I=e.offsetTop+b+p-E,w=e.offsetBottom,k=I>0?g.jsx(m,{context:T,height:I},"padding-top"):null,A=w>0?g.jsx(m,{context:T,height:w},"padding-bottom"):null;return g.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...wt(v,T),children:[k,t&&g.jsx(W1,{showTopList:!0}),g.jsx(W1,{}),A]})}),FV=({children:e})=>{const t=S.useContext(Yl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=nr(S.useMemo(()=>Ps(n,i=>Vn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:wi(!1),children:e})},LV=({children:e})=>{const t=S.useContext(Yl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=je("customScrollParent"),i=mp(n,o,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:wi(!1),children:e})},VV=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=je("fixedHeaderContent"),s=je("fixedFooterContent"),a=je("context"),l=nr(S.useMemo(()=>Ps(r,v=>Vn(v,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=nr(S.useMemo(()=>Ps(o,v=>Vn(v,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?jV:zV,d=n||t?LV:FV,f=je("TableComponent"),p=je("TableHeadComponent"),h=je("TableFooterComponent"),y=i?g.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,a),children:i()},"TableHead"):null,m=s?g.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(h,a),children:s()},"TableFoot"):null;return g.jsx(u,{...e,...wt(u,a),children:g.jsx(d,{children:g.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,a),children:[y,g.jsx(NV,{},"TableBody"),m]})})})}),{Component:$V,useEmitter:Vp,useEmitterValue:je,usePublisher:$n}=Ap(OV,{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"}},VV),zV=Dp({useEmitter:Vp,useEmitterValue:je,usePublisher:$n}),jV=Np({useEmitter:Vp,useEmitterValue:je,usePublisher:$n}),RV=$V,q1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},BV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:U1,floor:Kl,max:Rs,min:$p,round:G1}=Math;function Y1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function HV(e){return{...BV,items:e}}function Zl(e,t){return e&&e.width===t.width&&e.height===t.height}function WV(e,t){return e&&e.column===t.column&&e.row===t.row}const qV=Xe(([{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:h,propsReady:y},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T},E])=>{const I=ge(0),w=ge(0),k=ge(q1),A=ge({height:0,width:0}),O=ge({height:0,width:0}),N=Ke(),M=Ke(),$=ge(0),_=ge(null),F=ge({column:0,row:0}),z=Ke(),D=Ke(),C=ge(!1),V=ge(0),L=ge(!0),B=ge(!1),U=ge(!1);st(fe(h,We(V),_e(([q,Y])=>!!Y)),()=>{ze(L,!1)}),st(fe(Vt(h,L,O,A,V,B),_e(([q,Y,Z,pe,,R])=>q&&!Y&&Z.height!==0&&pe.height!==0&&!R)),([,,,,q])=>{ze(B,!0),Tp(1,()=>{ze(N,q)}),Fn(fe(c),()=>{ze(t,[0,0]),ze(L,!0)})}),Ae(fe(D,_e(q=>q!=null&&q.scrollTop>0),er(0)),w),st(fe(h,We(D),_e(([,q])=>q!=null)),([,q])=>{q&&(ze(A,q.viewport),ze(O,q.item),ze(F,q.gap),q.scrollTop>0&&(ze(C,!0),Fn(fe(c,bo(1)),Y=>{ze(C,!1)}),ze(l,{top:q.scrollTop})))}),Ae(fe(A,we(({height:q})=>q)),d),Ae(fe(Vt(Me(A,Zl),Me(O,Zl),Me(F,(q,Y)=>q&&q.column===Y.column&&q.row===Y.row),Me(c)),we(([q,Y,Z,pe])=>({gap:Z,item:Y,scrollTop:pe,viewport:q}))),z),Ae(fe(Vt(Me(I),r,Me(F,WV),Me(O,Zl),Me(A,Zl),Me(_),Me(w),Me(C),Me(L),Me(V)),_e(([,,,,,,,q])=>!q),we(([q,[Y,Z],pe,R,ae,ce,Q,,ue,re])=>{const{column:he,row:oe}=pe,{height:le,width:be}=R,{width:de}=ae;if(Q===0&&(q===0||de===0))return q1;if(be===0){const Ne=Ep(re,q),ct=Ne+Math.max(Q-1,0);return HV(Y1(Ne,ct,ce))}const ne=K1(de,be,he);let J,j;ue?Y===0&&Z===0&&Q>0?(J=0,j=Q-1):(J=ne*Kl((Y+oe)/(le+oe)),j=ne*U1((Z+oe)/(le+oe))-1,j=$p(q-1,Rs(j,ne-1)),J=$p(j,Rs(0,J))):(J=0,j=-1);const X=Y1(J,j,ce),{bottom:me,top:ve}=Z1(ae,pe,R,X),ke=U1(q/ne),De=ke*le+(ke-1)*oe-me;return{bottom:me,itemHeight:le,items:X,itemWidth:be,offsetBottom:De,offsetTop:ve,top:ve}})),k),Ae(fe(_,_e(q=>q!==null),we(q=>q.length)),I),Ae(fe(Vt(A,O,k,F),_e(([q,Y,{items:Z}])=>Z.length>0&&Y.height!==0&&q.height!==0),we(([q,Y,{items:Z},pe])=>{const{bottom:R,top:ae}=Z1(q,pe,Y,Z);return[ae,R]}),xt(Ms)),t);const G=ge(!1);Ae(fe(c,We(G),we(([q,Y])=>Y||q!==0)),G);const H=gn(fe(Vt(k,I),_e(([{items:q}])=>q.length>0),We(G),_e(([[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=gn(fe(Me(k),_e(({items:q})=>q.length>0&&q[0].index===0),er(0),xt())),ie=gn(fe(Me(k),We(C),_e(([{items:q},Y])=>q.length>0&&!Y),we(([{items:q}])=>({endIndex:q[q.length-1].index,startIndex:q[0].index})),xt(m1),xr(0)));Ae(ie,p.scrollSeekRangeChanged),Ae(fe(N,We(A,O,I,F),we(([q,Y,Z,pe,R])=>{const ae=w1(q),{align:ce,behavior:Q,offset:ue}=ae;let re=ae.index;re==="LAST"&&(re=pe-1),re=Rs(0,re,$p(pe-1,re));let he=zp(Y,R,Z,re);return ce==="end"?he=G1(he-Y.height+Z.height):ce==="center"&&(he=G1(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:_,deviation:$,footerHeight:o,gap:F,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:O,overscan:n,restoreStateFrom:D,scrollBy:s,scrollContainerState:a,scrollHeight:M,scrollTo:l,scrollToIndex:N,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:ie,startReached:ee,stateChanged:z,stateRestoreInProgress:C,...E}},bt(kp,tn,$s,D1,Hr,Ip,Br));function K1(e,t,n){return Rs(1,Kl((e+n)/(Kl(t)+n)))}function Z1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=zp(e,t,n,r[0].index);return{bottom:zp(e,t,n,r[r.length-1].index)+o,top:i}}function zp(e,t,n,r){const o=K1(e.width,n.width,t.column),i=Kl(r/o),s=i*n.height+Rs(0,i-1)*t.row;return s>0?s+t.row:s}const UV=Xe(()=>{const e=ge(d=>`Item ${d}`),t=ge({}),n=ge(null),r=ge("virtuoso-grid-item"),o=ge("virtuoso-grid-list"),i=ge(Mp),s=ge("div"),a=ge(vi),l=(d,f=null)=>Xt(fe(t,we(p=>p[d]),xt()),f),c=ge(!1),u=ge(!1);return Ae(Me(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")}}),GV=Xe(([e,t])=>({...e,...t}),bt(qV,UV)),YV=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),s=En("scrollHeight"),a=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=En("itemDimensions"),f=En("gap"),p=Et("log"),h=Et("stateRestoreInProgress"),y=En("reportReadyState"),m=nr(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:Q1("column-gap",getComputedStyle(v).columnGap,p),row:Q1("row-gap",getComputedStyle(v).rowGap,p)})},[s,d,f,p]),!0,!1);return V1(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),h?null:g.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?g.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))})})}),KV=S.memo(function(){const e=Et("HeaderComponent"),t=En("headerHeight"),n=Et("headerFooterTag"),r=nr(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),ZV=S.memo(function(){const e=Et("FooterComponent"),t=En("footerHeight"),n=Et("headerFooterTag"),r=nr(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),XV=({children:e})=>{const t=S.useContext(L1),n=En("itemDimensions"),r=En("viewportDimensions"),o=nr(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]),g.jsx("div",{ref:o,style:wi(!1),children:e})},QV=({children:e})=>{const t=S.useContext(L1),n=En("windowViewportRect"),r=En("itemDimensions"),o=Et("customScrollParent"),i=mp(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]),g.jsx("div",{ref:i,style:wi(!1),children:e})},JV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?t$:e$,o=n||t?QV:XV,i=Et("context");return g.jsx(r,{...e,...wt(r,i),children:g.jsxs(o,{children:[g.jsx(KV,{}),g.jsx(YV,{}),g.jsx(ZV,{})]})})}),{useEmitter:X1,useEmitterValue:Et,usePublisher:En}=Ap(GV,{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"}},JV),e$=Dp({useEmitter:X1,useEmitterValue:Et,usePublisher:En}),t$=Np({useEmitter:X1,useEmitterValue:Et,usePublisher:En});function Q1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,ln.WARN),t==="normal"?0:parseInt(t??"0",10)}const J1=e=>{const t=e.Icon??Rg,n=At();return g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[g.jsx(t,{size:64,className:"text-disabled"}),g.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},jp=g.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),Bs=e=>g.jsx(cn,{...e,as:e.as||"span",className:Pe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function n$(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 r$=e=>{const t=S.useId(),n=At(),r=S.useMemo(()=>n$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return g.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[g.jsx("p",{children:g.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?g.jsxs(S.Fragment,{children:[g.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),g.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=>g.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),g.jsx("nav",{children:g.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?g.jsx("li",{children:g.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:g.jsx(S.Fragment,{children:typeof i=="string"?g.jsx("li",{children:"..."}):g.jsx("li",{children:g.jsx(cn,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?g.jsx("li",{children:g.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},o$=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()},[]),g.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:g.jsx("div",{ref:n,className:"block isolate",children:e.children})})},i$=(e,t,n)=>{const r=n.cols,o=n.loading;return g.jsx(S.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=fd(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 p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?g.jsx(o$,{children:g.jsx(f,{col:i,row:t,rowIndex:e})}):null,g.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),g.jsx("span",{className:"relative",children:o?jp:c?g.jsx(S.Fragment,{children:g.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l})}):g.jsx(S.Fragment,{children:Be.nil(l)?"":l})}))})})},Si=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(()=>[Ho(10),za({fallbackAxisSideDirection:"end"}),$a(),ed({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:io,onOpenChange:(h,y)=>{const m=y?.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),e.onChange?.(h))}}),c=qo(l),u=Mr(l),d=gr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return g.jsxs(S.Fragment,{children:[g.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&g.jsx(mr,{preserveTabOrder:!0,id:`${t}-portal`,children:g.jsx(lo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:g.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:s.setFloating,"aria-labelledby":t,style:a,...p(),children:[g.jsx(td,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),g.jsx("header",{className:"mb-2",children:g.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Rp={},eS;function s$(){return eS||(eS=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()))}}},h=p(()=>window.sessionStorage),y=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=y,e.SessionStorage=h,e.createStorage=p})(Rp)),Rp}var Hs=s$();const Bp=e=>e.headerLabel??e.thead??e.id,Hp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ti=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ti||{});const Wp=e=>e.type==="number"?e.valueAsNumber:e.value,a$=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},l$={},c$=(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})},u$=(e,t,n=l$)=>{const r=Dr()?null:Hs.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=ap({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:c$(t,r?.cols)},s=>{const a=l=>{const c=s.state(),u={...c,...l};return Dr()||Hs.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(s.state()),{set:l=>a(l)}});return{...o,...i,name:e}},d$=e=>{const t=Fr(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]},f$=()=>Dr()?void 0:document.querySelector('[data-component="modal-body"]'),p$=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),h$=(e,t)=>e.toSorted(p$(t)),tS=(e,t,n)=>({label:t,id:Go(),type:n,value:e.id}),m$=e=>{const t=At(),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,tS(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 g.jsx(S.Fragment,{children:g.jsx(Si,{title:t.tableSortDropdownTitle,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx($g,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(co,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),g.jsx(co,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),g.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:g.jsx(ha,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[g.jsx(_u,{size:14})," ",t.tableSortAddButton]})})]})})})},g$=e=>{const t=At(),[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=tS(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Bp(e.col);return g.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[g.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?g.jsx(sI,{size:14}):null,n==="desc"?g.jsx(iI,{size:14}):null,n==="undefined"?g.jsx($g,{size:14}):null]})},nS=S.createContext({}),y$=nS.Provider,v$=()=>S.useContext(nS),qp=(e,t,n,r={})=>{const o=e.id,i=e.type??Ti.Text,s=t[i]??[],a=s.find(c=>c["data-default"])?.value??s[0]?.value,l=n[a];return{id:Go(),operation:l,label:Bp(e),name:o,type:i,value:"",...r}},Up=()=>{const e=At(),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(()=>({[Ti.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ti.Boolean]:[t.is,t.isNot],[Ti.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},b$=e=>{const t=At(),n=Up(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,qp(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(h=>u===h.id);return qp(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=Wp(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return g.jsx(S.Fragment,{children:g.jsx(Si,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:g.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[g.jsx(gI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(co,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),g.jsx(co,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),g.jsx(Ko,{optionalText:"","data-id":l.id,onChange:a,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),g.jsx("div",{className:"flex justify-center items-center mt-5",children:g.jsx("button",{"data-id":l.id,type:"button",onClick:s,children:g.jsx(ha,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[g.jsx(_u,{size:14})," ",t.tableFilterNewFilter]})})]})})})},x$=({filter:e,onDelete:t,set:n})=>{const r=At(),o=Up(),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=Wp(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return g.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[g.jsx(co,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),g.jsx(Ko,{optionalText:" ","data-id":e.id,onChange:s,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),g.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:g.jsx(ha,{className:"text-danger",size:14})})]})},w$={top:0,left:0,right:0,bottom:-1},S$=e=>{const t=Fu(),n=At(),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=Up(),l=o?bI:xI,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===e1.Asc?"ascending":"descending":"none",h=Bp(e.header);return g.jsxs(Mw,{...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:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[g.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:g.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&s?g.jsx(Si,{arrow:!0,trigger:g.jsxs("span",{children:[g.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),g.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:g.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",g.jsx("span",{className:"font-medium",children:h})]}),children:g.jsxs("ul",{className:"font-medium",children:[r.length===0?null:g.jsx(S.Fragment,{children:r.map(y=>g.jsx("li",{className:"my-1",children:g.jsx(x$,{onDelete:u,filter:y,set:e.setFilters})},`thead-filter-${y.id}`))}),g.jsx("li",{children:g.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(y=>y.concat(qp(e.header,a.options,a.operations))),children:[g.jsx(_u,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,g.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?g.jsx(g$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:g.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:w$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary 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`}})]})},T$=e=>{const[t,n]=d$(e.setCols);return g.jsx(Pw,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:g.jsx(mn,{children:e.headers.map((r,o)=>g.jsx(S$,{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}`))})})},E$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:g.jsx(mn,{children:n.children})})),k$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),C$=S.forwardRef(({context:e,...t},n)=>{const r=v$(),o={...t?.style,top:Be.number(r.sticky)?`${r.sticky}px`:void 0};return g.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),I$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return g.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),A$=S.forwardRef((e,t)=>e.context.loadingMore?g.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:g.jsx("tr",{role:"row",className:"bg-card-background",children:g.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:g.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),P$={TableRow:I$,TableFoot:A$,TableHead:C$,Table:k$,TableBody:E$},O$=[0,0,0,0,0,0,0,0,0,0],_$=e=>g.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?jp:g.jsx(J1,{})}),M$=()=>g.jsx(S.Fragment,{}),D$=[],rS=({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=Fr(s),h=Fr(u.loadingMore),y=S.useMemo(()=>{if(u.loading)return O$;if(c)return u.rows;const b=new t1(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():h$(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&&h.current?(p.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[h,p]);const m=y.length===0,v={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return g.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[g.jsx(RV,{components:P$,context:v,totalCount:y.length,itemContent:m?M$:i$,data:m?D$:y,useWindowScroll:!a,customScrollParent:a?a():void 0,fixedHeaderContent:()=>g.jsx(T$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),m?g.jsx(_$,{loading:u.loading}):null,g.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?g.jsx(r$,{...l}):null]})},N$=({item:e,onPointerDown:t})=>{const n=vo(0);return g.jsxs(Mw,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[g.jsx("button",{type:"button",className:"cursor-grab",children:g.jsx(mI,{size:14})}),g.jsx("span",{children:e.groupName})]},e.groupId)},F$=e=>{const t=At(),n=Hp(e.cols),r=_F(),[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 t1(e.rows).GroupBy(u),h=e.cols.find(y=>y.id===u);e.setGroups(Bk(p).map((y,m)=>{const v=p[y];return{...h,groupId:Go(),groupKey:u,index:m,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return g.jsx(S.Fragment,{children:g.jsxs(Si,{arrow:!1,title:t.tableGroupLabel,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(wI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[g.jsxs("div",{className:"flex flex-nowrap items-center",children:[g.jsx(co,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),g.jsx(yr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:g.jsx(ha,{size:16,className:"text-danger"})})]}),e.groups.length>0?g.jsxs("section",{className:"my-4",children:[g.jsx("header",{children:g.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),g.jsx(t2,{children:g.jsx(Pw,{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=>g.jsx(N$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},L$=e=>g.jsx("header",{className:"mb-1 min-w-full",children:g.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[g.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[g.jsx("span",{children:g.jsx(b$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),g.jsx("span",{children:g.jsx(m$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),g.jsx("span",{children:g.jsx(F$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),g.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>g.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[g.jsxs("span",{children:[g.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),g.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[g.jsx("span",{"aria-hidden":"true",className:"invisible p-0 whitespace-pre",children:t.value||" "}),g.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=Wp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),V$=(e,t)=>typeof t=="function"?t(e):t,Xl=(e,t,n)=>e===t?void 0:n?.(t),$$=e=>{const t=Fu(),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(()=>Hp(e.cols),[e.cols]),[i,s]=ap({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const l=c=>u=>{const d=a.state();return{...d,[c]:V$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(a,l)=>(e.set?.(a),Xl(l?.filters??[],a.filters??[],e.setFilters),Xl(l?.sorters??[],a.sorters??[],e.setSorters),Xl(l?.groups??[],a.groups??[],e.setGroups),Xl(l?.cols??[],a.cols??[],e.setCols),a)]});return S.useEffect(()=>{s.cols(e.cols)},[e.cols]),g.jsx(y$,{value:n,children:g.jsxs(mn,{initial:!1,children:[r?g.jsx(L$,{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?g.jsx(rS,{...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}):g.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((a,l)=>g.jsx("div",{className:"min-w-full",children:g.jsx(rS,{...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}`))})]})})},Ql=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:s="",...a})=>g.jsxs(cn,{...a,as:r||"div","data-component":"card",className:Pe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-3",i),children:[e?g.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,g.jsx("div",{"data-component":"card-body",className:Pe("min-w-full px-6",a.className),children:t?g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(Bs,{className:"w-full"}),g.jsx(Bs,{className:"w-8/12"}),g.jsx(Bs,{className:"w-10/12"}),g.jsx(Bs,{className:"w-1/2"})]}):n})]});Ql.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",s=t||"h2",a=n||"nav";return g.jsxs(i,{...o,title:Be.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:[g.jsx(s,{className:"font-semibold",children:o.title}),r?g.jsx(a,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const z$=e=>{const t=e.interactive??!0,n=e.Icon??Er;return g.jsx(Ql,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:g.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:[g.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:g.jsx(n,{size:48})}),g.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[g.jsx("p",{className:"text-lg",children:e.title}),e.loading?g.jsx(Bs,{className:"h-10"}):g.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},j$=({item:e,context:t,setter:n,get:r,refs:o})=>g.jsx(mr,{children:g.jsx(Hf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:g.jsxs(mn,{presenceAffectsLayout:!0,children:[e?g.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?g.jsx(ld,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:g.jsx(lo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:g.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:[g.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:g.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:g.jsx(Lo,{})})}),g.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[g.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),R$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),s=qo(o),a=gr(o,{role:"dialog"}),l=Mr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([s,a,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return g.jsxs(S.Fragment,{children:[g.jsx(j$,{refs:i,context:o,get:c,item:t,setter:u}),g.jsx("ul",{role:"list",children:d.map((f,p)=>{const h=f.props,y=`${r}-${p}`,m=()=>n({...h,id:y}),v=h.leading;return g.jsx(He.li,{layout:!0,layoutId:`item-${y}`,className:"border-b border-card-border py-2 last:border-transparent",children:g.jsx(He.div,{layoutId:`toast-${y}`,className:"relative",children:g.jsx("div",{className:"relative flex items-start space-x-3",children:g.jsxs(S.Fragment,{children:[h.avatar?g.jsx("div",{children:g.jsx("div",{className:"relative px-1",children:g.jsx("button",{onClick:m,className:"flex size-10 items-center justify-center ring-primary",children:h.avatar})})}):null,g.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:g.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[g.jsxs("button",{onClick:m,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[g.jsx("h3",{children:h.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:h.description})]}),v?g.jsx(v,{open:m}):null]})})]})})})},y)})})]})},B$=e=>g.jsx(S.Fragment,{children:e.children}),oS=()=>{const e=S.useContext(to);return e?e.parser:ma.hsla},Gp=.3,Jl={duration:Gp,type:"tween",ease:"easeInOut"},iS=S.createContext(null),Yp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},Ei={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},H$=e=>g.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx(He.path,{className:"currentColor",initial:Ei.initial,animate:Ei.animate,transition:Yp,d:"M18 6 6 18"}),g.jsx(He.path,{className:"currentColor",initial:Ei.initial,animate:Ei.animate,transition:Yp,d:"m6 6 12 12"})]}),W$=e=>g.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:g.jsx(He.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:Ei.animate,initial:Ei.initial,transition:Yp})}),q$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},U$={duration:.6,delay:.2,type:"tween",ease:"circOut"},G$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",Y$=(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(iS),K$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const s=oS(),a=sS(),[l,c]=S.useState(t);S.useEffect(()=>{if(!a){c(t);return}const d=Y$(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=G$(e,l,n);return a?.steps&&100/a?.steps,g.jsxs(S.Fragment,{children:[g.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),g.jsxs(He.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[g.jsx(He.div,{variants:q$,transition:U$,className:`hidden xl:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),g.jsx(He.div,{initial:!1,animate:u,transition:Jl,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:s("var(--danger-foreground)"),borderColor:s("var(--danger-hover)"),backgroundColor:s("var(--danger-DEFAULT)")},inactive:{transition:Jl,color:s("var(--disabled)"),borderColor:s("var(--card-border)"),backgroundColor:s("var(--background)")},active:{transition:Jl,color:s("var(--primary-foreground)"),borderColor:s("var(--primary-DEFAULT)"),backgroundColor:s("var(--primary-DEFAULT)")},complete:{transition:Jl,color:s("var(--success-foreground)"),borderColor:s("var(--success-DEFAULT)"),backgroundColor:s("var(--success-DEFAULT)")}},children:g.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?g.jsx(W$,{className:"size-6 text-primary-foreground"}):u==="error"?g.jsx(H$,{className:"size-6 text-danger-foreground"}):g.jsx(S.Fragment,{children:g.jsx("span",{children:e})})})}),g.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:g.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},Z$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Gp*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Gp,steps:S.Children.count(e.children)};return g.jsx(iS.Provider,{value:o,children:g.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},aS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},lS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},cS=S.createContext(""),X$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Kp=(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(!X$(s))return s}return n==="backward"?Kp(e,e.length-1,"backward"):Kp(e,-1,"forward")},uS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Kp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},dS={[lS.ArrowLeft]:(e,t)=>uS(t,"backward"),[lS.ArrowRight]:(e,t)=>uS(t,"forward")},Q$=e=>{const[t,n]=aS(e.active),r=S.useRef(null),o=Fr(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(Be.keyof(dS,c)){const u=dS[c],d=u(l,r.current);if(d===null)return;n(d)}};return g.jsx(cS.Provider,{value:t,children:g.jsx(Ql,{className:e.className,container:Pe("pt-0 max-w-full w-full min-w-0",e.container),header:g.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[g.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),g.jsx("nav",{className:"min-w-0",children:g.jsx("ul",{onKeyDown:a,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return g.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:g.jsx(cn,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:s,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},J$=()=>S.useContext(cS),ez=e=>{const t=J$();return g.jsx(S.Fragment,{children:e.id===t?e.children:null})},fS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},tz={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},pS=e=>g.jsx(He.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:fS,exit:fS.false,transition:tz,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Pe("aria-hidden:pointer-events-none",e.className),children:e.children}),nz=_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"}}),rz=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const l=()=>o?.(!1);return g.jsx(mn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?g.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:g.jsx(pS,{"data-open":!!i,open:!!i,children:g.jsx(cn,{...s,ref:a,role:"alert","data-theme":n,as:s.as??"div",className:Pe(nz({theme:n}),t),children:g.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",children:[o!==void 0&&i?g.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:g.jsx(Lo,{size:20})}):null,g.jsxs("div",{className:Pe("flex gap-2 items-center",s.title?"":"w-fit"),children:[!r&&n==="success"?g.jsx(Pu,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?g.jsx(Er,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?g.jsx(Du,{"aria-hidden":"true",size:20}):null,r]}),s.title?g.jsx("h4",{className:"col-start-2 text-lg font-semibold tracking-3 text-balance",children:s.title}):null,g.jsx("div",{className:"col-start-2 w-full",children:s.children})]})})})}):null})}),oz=e=>g.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[g.jsxs("header",{className:"flex items-start gap-4 p-6",children:[g.jsx("div",{className:Pe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:g.jsx("div",{children:g.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("header",{children:g.jsx("h3",{className:"text-base leading-none",children:e.title})}),g.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?g.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),iz=Symbol.for("react.lazy");function hS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sz(...e){return t=>{let n=!1;const r=e.map(o=>{const i=hS(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():hS(e[o],null)}}}}const ec=P[" use ".trim().toString()];function az(e){return typeof e=="object"&&e!==null&&"then"in e}function mS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===iz&&"_payload"in e&&az(e._payload)}function lz(e){const t=cz(e),n=P.forwardRef((r,o)=>{let{children:i,...s}=r;mS(i)&&typeof ec=="function"&&(i=ec(i._payload));const a=P.Children.toArray(i),l=a.find(dz);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 g.jsx(t,{...s,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return g.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const gS=lz("Slot");function cz(e){const t=P.forwardRef((n,r)=>{let{children:o,...i}=n;if(mS(o)&&typeof ec=="function"&&(o=ec(o._payload)),P.isValidElement(o)){const s=pz(o),a=fz(i,o.props);return o.type!==P.Fragment&&(a.ref=r?sz(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 uz=Symbol("radix.slottable");function dz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uz}function fz(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 pz(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 yS=(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),Zp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),vS=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),[h,y]=S.useState(null),m=S.useRef([]),v=S.useRef([]),b=S.useContext(Zp),x=Pr(),T=Or(),E=hP(),I=Ny(),w=x!==null,{floatingStyles:k,refs:A,context:O}=Gn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:io,placement:w?"right":"bottom-start",middleware:[Ho({mainAxis:w?0:4,alignmentAxis:w?-4:0}),za(),$a()]}),N=gr(O,{role:"menu"}),M=Mr(O,{bubbles:!0}),$=Wy(O,{move:!1,enabled:n,delay:{open:hv},handleClose:pv({blockPointerEvents:!0,requireIntent:!1})}),_=qo(O,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),F=Ya(O,{loop:!0,activeIndex:h,nested:w,listRef:m,onNavigate:y}),z=jP(O,{activeIndex:h,listRef:v,resetMs:BP,onMatch:u?y:void 0}),{getReferenceProps:D,getFloatingProps:C,getItemProps:V}=Yn([$,_,N,M,F,z]);S.useEffect(()=>{if(!T)return;const B=()=>d(!1),U=G=>{G.nodeId!==E&&G.parentId===x&&d(!1)};return T.events.on("click",B),T.events.on("menuopen",U),()=>{T.events.off("click",B),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(yS(l.className));return g.jsxs(mP,{id:E,children:[g.jsx(S.Fragment,{children:l.asChild?g.jsx(gS,{...D(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),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:dr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):g.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:dr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...D(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:[a,w&&g.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[g.jsx("span",{className:"sr-only",children:"Next menu"}),g.jsx(Au,{size:14})]})]})}),g.jsx(Zp.Provider,{value:{activeIndex:h,setActiveIndex:y,getItemProps:V,setHasFocusInside:p,isOpen:u},children:g.jsx(lP,{elementsRef:m,labelsRef:v,children:u&&g.jsx(mr,{children:g.jsx(lo,{context:O,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:g.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})})})})})]})}),hz=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const s=S.useContext(Zp),a=Ny({label:n?null:e}),l=Or(),c=a.index===s.activeIndex;return g.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":s.isOpen,tabIndex:c?0:-1,ref:dr(a.ref,i),className:yS(`${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?g.jsx(t,{size:16}):null]})}),mz=S.forwardRef((e,t)=>Pr()===null?g.jsx(gP,{children:g.jsx(vS,{...e,isParent:!0,ref:t})}):g.jsx(vS,{...e,isParent:!1,ref:t})),Xp=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 g.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:[g.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,g.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})]})}),gz=({children:e,className:t="",size:n,...r})=>g.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:[g.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]}),yz=xv("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)}),vz=(e,t)=>Dr()?t:window.matchMedia(e).matches,bz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(vz(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},xz=()=>S.useContext(to).floatingRef??void 0,bS=S.createContext(async()=>!1),wz=()=>S.useContext(bS),kn="500ms",Sz={exit:{x:["0%","-30%"],opacity:0,animationDuration:kn},enter:{x:["-30%","0%"],opacity:1,animationDuration:kn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:kn}},Tz={enter:{x:"0%",opacity:1,animationDuration:kn},exit:{x:["0%","30%"],opacity:0,animationDuration:kn},initial:{x:["30%","0%"],opacity:.8,animationDuration:kn}},Qp={drawer:e=>e==="left"?Sz:Tz,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"}}}},Ez=_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"}}),xS={top:0,left:0,right:0,bottom:0},wS=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=wS(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 g.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:xS,whileDrag:{cursor:"grabbing"},className:Pe("absolute rounded-lg isolate z-calendar",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?g.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},tc={drawer:"right",sheet:"none",dialog:"none"},Cz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??tc.drawer:tc[o]:t?tc[o]:tc.sheet},Iz=[],Ws=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:h=void 0,overlayClassName:y="",type:m="dialog",position:v,overlayClickClose:b=!1,closeOnFocusOut:x=!1,interactions:T=Iz,...E},I)=>{const w=xz(),k=S.useRef(null),A=S.useRef(null),O=S.useId(),N=S.useId(),M=bz("(min-width: 64rem)"),$=Cz(M,p,m,v),_=M||p?Qp[m]:Qp.sheet,F=typeof _=="function"?_($):_,z=M||p?m:"sheet",D=z!=="dialog",C=Gn({open:e,onOpenChange:s,strategy:"fixed"}),V=qo(C.context,{}),L=gr(C.context,{role:"dialog"}),B=Mr(C.context,{bubbles:!0,escapeKey:!0,outsidePress:ce=>{const Q=ce.target;return b&&!!Q?.isConnected}}),U=Yn([V,B,L].concat(T)),G=o,H=vo(void 0),ee=vo(void 0),ie=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:xS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ce,Q)=>{const re=C.refs.floating.current.getBoundingClientRect(),he=H.get()||re.height,oe=Math.abs(he-Q.delta.y),le=window.outerHeight,be=wS(le);return oe>=be?H.set(oe):(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=vo(void 0),R=vo(void 0),ae=r?gS:He.button;return g.jsxs(S.Fragment,{children:[o?g.jsx(ae,{ref:C.refs.setReference,...U.getReferenceProps(),layoutId:h,type:"button",children:G}):null,g.jsx(Hf,{reducedMotion:d?"user":"always",children:g.jsx(mr,{preserveTabOrder:!0,root:w,children:g.jsx(mn,{mode:"wait",propagate:!0,children:e?g.jsx(ld,{lockScroll:!0,className:Pe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",z==="drawer"?"":"items-start justify-center lg:p-10 pt-10",y),children:g.jsx(lo,{guards:!0,modal:!0,closeOnFocusOut:x,context:C.context,children:g.jsx(mn,{propagate:!0,children:g.jsxs(He.div,{...E,...t?{"aria-labelledby":O,"aria-describedby":N}:{"aria-label":a},...U.getFloatingProps({"aria-modal":e,ref:dr(C.refs.setFloating,A),className:Pe(Ez({position:$,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:h,variants:F,"data-component":"modal",style:z==="drawer"?{width:H}:{height:H,y:ee},children:[D&&u?g.jsx(kz,{onChange:s,value:H,sheet:z==="sheet",position:$,parent:C.refs.floating}):null,t?g.jsx(He.header,{...Z,className:"relative w-full isolate",children:t?g.jsx("h2",{id:O,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,g.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(R.set(void 0),pe.set(void 0),ie.current){const ce=ee.get()||0,Q=window.innerHeight*.2;ce>Q?(await Iw(ee,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,s(!1)):Iw(ee,0,{type:"spring",bounce:0,duration:.3}),ie.current=!1}},onTouchStart:ce=>{const Q=ce.changedTouches[0];pe.set(Q.pageY),R.set(Q.pageY),ie.current=!1},onTouchMove:ce=>{const ue=ce.changedTouches[0].pageY,re=R.get()||ue,he=k.current?.scrollTop||0;if(!ie.current&&he<=0&&ue>re&&z==="sheet"&&(ie.current=!0,te.current=ue),ie.current){const oe=ue-te.current;oe<0?ee.set(oe*.2):ee.set(oe)}R.set(ue)},children:i}),n?g.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?g.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:g.jsx("button",{type:"button",onClick:q,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:g.jsx(Lo,{})})}):null]})})})}):null})})})]})});let SS=async e=>(typeof window<"u"&&console.warn("ConfirmationProvider is not mounted"),!1);Ws.confirm=e=>SS(e);const TS=({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(()=>{SS=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 g.jsxs(bS.Provider,{value:a,children:[e,g.jsx(Ws,{open:t,type:"dialog",closable:!1,onChange:n,overlayClickClose:!1,title:r.title||"Confirmation",className:"container max-w-dialog lg:max-w-96",footer:g.jsxs("div",{className:"flex gap-2 justify-end",children:[g.jsx(yr,{theme:r.cancel?.theme||"ghost-muted",onClick:c,children:r.cancel?.text||"Cancel"}),g.jsx(yr,{theme:r.confirm?.theme||"primary",onClick:l,children:r.confirm?.text||"Confirm"})]}),children:g.jsx("div",{className:"py-2 text-foreground",children:r.description})})]})},Az=e=>{const[t,n]=AF();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:MD(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),g.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},Pz=e=>g.jsx("p",{...e,className:Pe("text-base leading-snug",e.className)}),Oz=e=>g.jsx("p",{...e,className:Pe("mb-kilo text-sm text-secondary",e.className)}),_z=e=>g.jsx("div",{className:Pe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:g.jsxs(S.Fragment,{children:[g.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),g.jsx("span",{className:Pe(e.disabled?"text-disabled":"",e.row?"text-base w-fit":"w-full text-lg"),children:e.children})]})}),ES=e=>g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),g.jsx("p",{className:"text-secondary typography",children:e.children})]}),Mz=e=>g.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[g.jsx("div",{children:g.jsx(ES,{title:e.title,children:e.description})}),g.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),kS=e=>g.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)}),Dz=()=>g.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:g.jsx(kS,{})}),Nz=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}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=qo(a,{enabled:e.disabled??!0}),u=gr(a,{role:"tooltip"}),d=Mr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return g.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[g.jsx(yr,{...p(e),as:He.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:g.jsx(He.span,{layoutId:o,children:e.trigger})}),g.jsx(mn,{children:i?g.jsx(mr,{root:t,children:g.jsx(lo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:g.jsx(He.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Fz=(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])},Lz=()=>{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},Vz=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),$z=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,zz=({steps:e,active:t=!1,onClose:n=Yo,onFinish:r=Yo,onChange:o=Yo,labels:i})=>{const s=At(),[a,l]=S.useState(0),c=e[a],[u,d]=S.useState(null),[f,p]=S.useState(Vz()),[h,y]=S.useState(!1),m=S.useRef(null),{width:v,height:b}=Lz(),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}=Gn({open:t&&h,placement:c?.side||"bottom",whileElementsMounted:io,middleware:[Ho(10),za(),$a(),ed({element:m})]}),{getFloatingProps:w}=Yn([gr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{y(!1)},[a,t]),S.useEffect(()=>{if(!t||!c)return;const M=$z(c.element);M?(c.onEnter?.(),setTimeout(()=>{p(M.getBoundingClientRect()),T.setReference(M),d(M)},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 M=()=>p(u.getBoundingClientRect());return M(),window.addEventListener("scroll",M,{capture:!0,passive:!0}),window.addEventListener("resize",M,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",M,{capture:!0}),window.removeEventListener("resize",M,{capture:!0})}},[u,v,b]),Fz(u,M=>{p(M.target.getBoundingClientRect())});const k=()=>{c.onNext?.(),setTimeout(()=>{a<e.length-1?(l(M=>M+1),o(a+1)):(r(),n())},0)},A=()=>{c.onPrevious?.(),a>0&&(l(M=>M-1),o(a-1))};if(!t)return null;const O=a<e.length-1,N=a>0;return g.jsx(mr,{children:g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-wizard",children:[g.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsxs("mask",{id:"driver-mask",children:[g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),g.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}})]})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),g.jsx(mn,{mode:"wait",children:c&&h&&g.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-none pointer-events-auto",children:g.jsxs(He.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-floating-background border-floating-border",children:[u&&g.jsx(td,{ref:m,context:I,className:"fill-floating-background stroke-floating-border"}),c.title&&g.jsx("h3",{children:c.title}),c.description&&g.jsx(S.Fragment,{children:c.description}),g.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[g.jsx(yr,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),g.jsxs("div",{className:"flex gap-2",children:[N&&g.jsx(yr,{size:"small",theme:"ghost-muted",onClick:A,children:x.previous}),g.jsx(yr,{size:"small",onClick:k,children:O?x.next:x.finish})]})]}),g.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[a+1," / ",e.length]})]})})})]})})},CS=6048e5,jz=864e5,Rz=6e4,Bz=36e5,Hz=1e3,IS=Symbol.for("constructDateFrom");function dt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&IS in e?e[IS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qe(e,t){return dt(t||e,e)}function nc(e,t,n){const r=Qe(e,n?.in);return isNaN(t)?dt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function AS(e,t,n){const r=Qe(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 ki(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=Qe(e,n?.in),d=o||r?AS(u,o+r*12):u,f=s||i?nc(d,s+i*7):d,p=l+a*60,y=(c+p*60)*1e3;return dt(e,+f+y)}let Wz={};function So(){return Wz}function or(e,t){const n=So(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Qe(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 Ci(e,t){return or(e,{...t,weekStartsOn:1})}function PS(e,t){const n=Qe(e,t?.in),r=n.getFullYear(),o=dt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Ci(o),s=dt(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=Ci(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function rc(e){const t=Qe(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 oc(e,...t){const n=dt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function To(e,t){const n=Qe(e,t?.in);return n.setHours(0,0,0,0),n}function qz(e,t,n){const[r,o]=oc(n?.in,e,t),i=To(r),s=To(o),a=+i-rc(i),l=+s-rc(s);return Math.round((a-l)/jz)}function Uz(e,t){const n=PS(e,t),r=dt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ci(r)}function Gz(e){return dt(e,Date.now())}function Yz(e,t,n){const[r,o]=oc(n?.in,e,t);return+To(r)==+To(o)}function Kz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ic(e){return!(!Kz(e)&&typeof e!="number"||isNaN(+Qe(e)))}function Zz(e,t){const[n,r]=oc(e,t.start,t.end);return{start:n,end:r}}function OS(e,t){const{start:n,end:r}=Zz(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 _S(e,t){const n=Qe(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Xz(e,t){const n=Qe(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Qz(e,t){const n=So(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Qe(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 Jz={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=Jz[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 Jp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nj={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rj={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oj={date:Jp({formats:tj,defaultWidth:"full"}),time:Jp({formats:nj,defaultWidth:"full"}),dateTime:Jp({formats:rj,defaultWidth:"full"})},ij={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sj=(e,t,n,r)=>ij[e];function qs(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 aj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cj={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"]},uj={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"]},dj={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"}},fj={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"}},pj={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:qs({values:aj,defaultWidth:"wide"}),quarter:qs({values:lj,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qs({values:cj,defaultWidth:"wide"}),day:qs({values:uj,defaultWidth:"wide"}),dayPeriod:qs({values:dj,defaultWidth:"wide",formattingValues:fj,defaultFormattingWidth:"wide"})};function Us(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)?mj(a,d=>d.test(s)):hj(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 hj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function gj(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 yj=/^(\d+)(th|st|nd|rd)?/i,vj=/\d+/i,bj={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},xj={any:[/^b/i,/^(a|c)/i]},wj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Sj={any:[/1/i,/2/i,/3/i,/4/i]},Tj={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},Ej={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},Cj={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]},Ij={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},Aj={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}},Pj={ordinalNumber:gj({matchPattern:yj,parsePattern:vj,valueCallback:e=>parseInt(e,10)}),era:Us({matchPatterns:bj,defaultMatchWidth:"wide",parsePatterns:xj,defaultParseWidth:"any"}),quarter:Us({matchPatterns:wj,defaultMatchWidth:"wide",parsePatterns:Sj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Us({matchPatterns:Tj,defaultMatchWidth:"wide",parsePatterns:Ej,defaultParseWidth:"any"}),day:Us({matchPatterns:kj,defaultMatchWidth:"wide",parsePatterns:Cj,defaultParseWidth:"any"}),dayPeriod:Us({matchPatterns:Ij,defaultMatchWidth:"any",parsePatterns:Aj,defaultParseWidth:"any"})},MS={code:"en-US",formatDistance:ej,formatLong:oj,formatRelative:sj,localize:pj,match:Pj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Oj(e,t){const n=Qe(e,t?.in);return qz(n,Xz(n))+1}function DS(e,t){const n=Qe(e,t?.in),r=+Ci(n)-+Uz(n);return Math.round(r/CS)+1}function eh(e,t){const n=Qe(e,t?.in),r=n.getFullYear(),o=So(),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=or(s,t),l=dt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=or(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function _j(e,t){const n=So(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=eh(e,t),i=dt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),or(i,t)}function NS(e,t){const n=Qe(e,t?.in),r=+or(n,t)-+_j(n,t);return Math.round(r/CS)+1}function ft(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Wr={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)}},Ii={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},FS={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 Wr.y(e,t)},Y:function(e,t,n,r){const o=eh(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=PS(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 Wr.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=NS(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ft(o,t.length)},I:function(e,t,n){const r=DS(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"}):Wr.d(e,t)},D:function(e,t,n){const r=Oj(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=Ii.noon:r===0?o=Ii.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=Ii.evening:r>=12?o=Ii.afternoon:r>=4?o=Ii.morning:o=Ii.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 Wr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Wr.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"}):Wr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Wr.s(e,t)},S:function(e,t){return Wr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return VS(r);case"XXXX":case"XX":return Eo(r);default:return Eo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return VS(r);case"xxxx":case"xx":return Eo(r);default:return Eo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+LS(r,":");default:return"GMT"+Eo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+LS(r,":");default:return"GMT"+Eo(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 LS(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 VS(e,t){return e%60===0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):Eo(e,t)}function Eo(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 $S=(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"})}},zS=(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"})}},th={p:zS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $S(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}}",$S(r,t)).replace("{{time}}",zS(o,t))}},Mj=/^D+$/,Dj=/^Y+$/,Nj=["D","DD","YY","YYYY"];function jS(e){return Mj.test(e)}function RS(e){return Dj.test(e)}function nh(e,t,n){const r=Fj(e,t,n);if(console.warn(r),Nj.includes(e))throw new RangeError(r)}function Fj(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 Lj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$j=/^'([^]*?)'?$/,zj=/''/g,jj=/[a-zA-Z]/;function rh(e,t,n){const r=So(),o=r.locale??MS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Qe(e,n?.in);if(!ic(a))throw new RangeError("Invalid time value");let l=t.match(Vj).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=th[d];return f(u,o.formatLong)}return u}).join("").match(Lj).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Rj(u)};if(FS[d])return{isToken:!0,value:u};if(d.match(jj))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;(RS(d)||jS(d))&&nh(d,t,String(e));const f=FS[d[0]];return f(a,d,o.localize,c)}).join("")}function Rj(e){const t=e.match($j);return t?t[1].replace(zj,"'"):e}function Bj(e,t){const n=Qe(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 Hj(){return Object.assign({},So())}function Wj(e,t){const n=Qe(e,t?.in).getDay();return n===0?7:n}function qj(e,t){return+Qe(e)>+Qe(t)}function Uj(e,t){return+Qe(e)<+Qe(t)}function Gj(e,t){const n=Yj(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 Yj(e){return typeof e=="function"&&e.prototype?.constructor===e}const Kj=10;class BS{subPriority=0;validate(t,n){return!0}}class Zj extends BS{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 Xj extends BS{priority=Kj;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>dt(n,r))}set(t,n){return n.timestampIsSet?t:dt(t,Gj(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Zj(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Qj 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 Mt={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}/},ir={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 Dt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function sr(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*Bz+i*Rz+s*Hz),rest:t.slice(n[0].length)}}function HS(e){return It(Mt.anyDigitsSigned,e)}function Ot(e,t){switch(e){case 1:return It(Mt.singleDigit,t);case 2:return It(Mt.twoDigits,t);case 3:return It(Mt.threeDigits,t);case 4:return It(Mt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function sc(e,t){switch(e){case 1:return It(Mt.singleDigitSigned,t);case 2:return It(Mt.twoDigitsSigned,t);case 3:return It(Mt.threeDigitsSigned,t);case 4:return It(Mt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function oh(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function WS(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 qS(e){return e%400===0||e%4===0&&e%100!==0}class Jj 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 Dt(Ot(4,t),o);case"yo":return Dt(r.ordinalNumber(t,{unit:"year"}),o);default:return Dt(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=WS(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 eR extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Dt(Ot(4,t),o);case"Yo":return Dt(r.ordinalNumber(t,{unit:"year"}),o);default:return Dt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=eh(t,o);if(r.isTwoDigitYear){const a=WS(r.year,i);return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),or(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),or(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class tR extends rt{priority=130;parse(t,n){return sc(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),Ci(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class nR extends rt{priority=130;parse(t,n){return sc(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 rR 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 oR 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 iR 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 Dt(It(Mt.month,t),o);case"MM":return Dt(Ot(2,t),o);case"Mo":return Dt(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 sR extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Dt(It(Mt.month,t),o);case"LL":return Dt(Ot(2,t),o);case"Lo":return Dt(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 aR(e,t,n){const r=Qe(e,n?.in),o=NS(r,n)-t;return r.setDate(r.getDate()-o*7),Qe(r,n?.in)}class lR extends rt{priority=100;parse(t,n,r){switch(n){case"w":return It(Mt.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 or(aR(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function cR(e,t,n){const r=Qe(e,n?.in),o=DS(r,n)-t;return r.setDate(r.getDate()-o*7),r}class uR extends rt{priority=100;parse(t,n,r){switch(n){case"I":return It(Mt.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 Ci(cR(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const dR=[31,28,31,30,31,30,31,31,30,31,30,31],fR=[31,29,31,30,31,30,31,31,30,31,30,31];class pR extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Mt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=qS(r),i=t.getMonth();return o?n>=1&&n<=fR[i]:n>=1&&n<=dR[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 hR extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Mt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear();return qS(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 ih(e,t,n){const r=So(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Qe(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 nc(i,u,n)}class mR 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=ih(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class gR 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 Dt(Ot(n.length,t),i);case"eo":return Dt(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=ih(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 yR 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 Dt(Ot(n.length,t),i);case"co":return Dt(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=ih(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 vR(e,t,n){const r=Qe(e,n?.in),o=Wj(r,n),i=t-o;return nc(r,i,n)}class bR 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 Dt(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 Dt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Dt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Dt(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=vR(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 xR 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(oh(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class wR 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(oh(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class SR 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(oh(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class TR extends rt{priority=70;parse(t,n,r){switch(n){case"h":return It(Mt.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 ER extends rt{priority=70;parse(t,n,r){switch(n){case"H":return It(Mt.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 kR extends rt{priority=70;parse(t,n,r){switch(n){case"K":return It(Mt.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 CR extends rt{priority=70;parse(t,n,r){switch(n){case"k":return It(Mt.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 IR extends rt{priority=60;parse(t,n,r){switch(n){case"m":return It(Mt.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 AR extends rt{priority=50;parse(t,n,r){switch(n){case"s":return It(Mt.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 PR extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Dt(Ot(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class OR extends rt{priority=10;parse(t,n){switch(n){case"X":return sr(ir.basicOptionalMinutes,t);case"XX":return sr(ir.basic,t);case"XXXX":return sr(ir.basicOptionalSeconds,t);case"XXXXX":return sr(ir.extendedOptionalSeconds,t);default:return sr(ir.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-rc(t)-r)}incompatibleTokens=["t","T","x"]}class _R extends rt{priority=10;parse(t,n){switch(n){case"x":return sr(ir.basicOptionalMinutes,t);case"xx":return sr(ir.basic,t);case"xxxx":return sr(ir.basicOptionalSeconds,t);case"xxxxx":return sr(ir.extendedOptionalSeconds,t);default:return sr(ir.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-rc(t)-r)}incompatibleTokens=["t","T","X"]}class MR extends rt{priority=40;parse(t){return HS(t)}set(t,n,r){return[dt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class DR extends rt{priority=20;parse(t){return HS(t)}set(t,n,r){return[dt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const NR={G:new Qj,y:new Jj,Y:new eR,R:new tR,u:new nR,Q:new rR,q:new oR,M:new iR,L:new sR,w:new lR,I:new uR,d:new pR,D:new hR,E:new mR,e:new gR,c:new yR,i:new bR,a:new xR,b:new wR,B:new SR,h:new TR,H:new ER,K:new kR,k:new CR,m:new IR,s:new AR,S:new PR,X:new OR,x:new _R,t:new MR,T:new DR},FR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,LR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,VR=/^'([^]*?)'?$/,$R=/''/g,zR=/\S/,jR=/[a-zA-Z]/;function RR(e,t,n,r){const o=()=>dt(n,NaN),i=Hj(),s=i.locale??MS,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Qe(n,r?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},u=[new Xj(r?.in,n)],d=t.match(LR).map(m=>{const v=m[0];if(v in th){const b=th[v];return b(m,s.formatLong)}return m}).join("").match(FR),f=[];for(let m of d){RS(m)&&nh(m,t,e),jS(m)&&nh(m,t,e);const v=m[0],b=NR[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(jR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(m==="''"?m="'":v==="'"&&(m=BR(m)),e.indexOf(m)===0)e=e.slice(m.length);else return o()}}if(e.length>0&&zR.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 h=Qe(n,r?.in);if(isNaN(+h))return o();const y={};for(const m of p){if(!m.validate(h,c))return o();const v=m.set(h,y,c);Array.isArray(v)?(h=v[0],Object.assign(y,v[1])):h=v}return h}function BR(e){return e.match(VR)[1].replace($R,"'")}function HR(e,t,n){const[r,o]=oc(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function WR(e,t){return Yz(dt(e,e),Gz(e))}function qR(e,t,n){return nc(e,-t,n)}function UR(e,t,n){const r=Qe(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=Bj(s);return r.setMonth(t,Math.min(i,a)),r}function GR(e,t,n){let r=Qe(e,n?.in);return isNaN(+r)?dt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=UR(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 YR(e,t,n){const r=Qe(e,n?.in);return isNaN(+r)?dt(e,NaN):(r.setFullYear(t),r)}function KR(e,t,n){return AS(e,-t,n)}function Gs(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=KR(e,o+r*12,n),d=qR(u,s+i*7,n),f=l+a*60,h=(c+f*60)*1e3;return dt(e,+d-h)}const ZR=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function XR(e,t){return S.useRef(ZR(e,t)).current}function US(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 QR=/^(?<hour>\d\d):(?<min>\d\d)$/,JR={type:"spring",bounce:.3,duration:.6},GS=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),YS={enter:GS(1),exit:GS(-1),middle:{x:"0%",opacity:1}},KS={exit:{visibility:"hidden"}},eB=e=>{const t=or(_S(e));return OS({start:t,end:ki(t,{days:41})})},ZS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),tB=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=_S(new Date(1970,o,1).setMonth(o)),s=ZS(i,n);return g.jsx("option",{value:s,"data-index":o,children:s},`${e}-${s}`)}),sh={ArrowLeft:(e,t)=>t==="days"?Gs(e,{days:1}):Gs(e,{months:1}),ArrowRight:(e,t)=>t==="days"?ki(e,{days:1}):ki(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Gs(e,{weeks:1}):Gs(e,{years:1}),ArrowDown:(e,t)=>t==="days"?ki(e,{weeks:1}):ki(e,{years:1})},XS=(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)},ko=e=>e.getFullYear().toString().padStart(4,"0"),nB=(e,t,n)=>e===void 0||n===void 0?!1:qj(t,e)&&Uj(t,n),rB=e=>{const t=At();return g.jsx(He.tbody,{layout:!0,variants:YS,custom:e.direction,onKeyDown:e.onKeyDown,className:Pe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Be.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return g.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?To(e.date).toISOString():void 0),l=WR(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=HR(i,e.stateDate),d=!u||c,f=e.rangeMode?nB(e.range?.from,i,e.range?.to):!1;return g.jsxs("td",{align:"center",className:Pe("relative",Be.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[g.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(`flex size-10 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-10 border border-dashed border-card-border":"",Be.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),a&&e.stateRange.from?.toISOString()===s?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,a&&e.stateRange.to?.toISOString()===s?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?g.jsx(e.RenderOnDay,{date:i}):null]},s)})},`week-${n.length}-${r}`)})})},oB=()=>To(new Date),QS=({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,...h})=>{const y=S.useRef(Go()),m=At(),v=ul(o),b=S.useRef(null),{date:x,range:T}=h,E=x||new Date,I=S.useRef(null),[w,k]=ap({date:E,isAnimating:!1,year:ko(E),direction:void 0,range:{from:T?.from,to:T?.to},months:tB(y.current,E,v),selectMode:l?"from":void 0,week:OS({start:or(E),end:Qz(E)})},D=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(XS(I.current||null,b,D.state().date,200),I.current=null,{isAnimating:!1}),date:C=>{const V=C(D.state().date);return{date:V,year:ko(V)}},nextMonth:C=>{C&&(I.current=C.currentTarget);const V=D.state();if(V.isAnimating)return V;const L=ki(V.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:ko(L)}},previousMonth:C=>{C&&(I.current=C.currentTarget);const V=D.state();if(V.isAnimating)return V;const L=Gs(V.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:ko(L)}},onSelectDate:C=>{const V=D.state(),L=C.currentTarget.dataset.range==="true",B=C.currentTarget.dataset.date||"",U=new Date(B);return{date:U,year:ko(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,B=Array.from(C.target.options).find(G=>G.value===V),U=D.state();if(B){const G=B.dataset.index||"",H=new Date(D.state().date);return H.setMonth(+G),{...U,date:H,year:ko(H)}}return U},onKeyDown:C=>{const V=C.key,L=D.state();if(V in sh){(V==="ArrowUp"||V==="ArrowDown")&&C.preventDefault();const B=D.state().date,U=Be.keyof(sh,V)?sh[V](B,C.shiftKey?"month":"days"):null;if(U!==null)return XS(C.target,b,U),{...L,date:U,year:ko(U)}}return D.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(D,C,V)=>((V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&V.props.onChangeMonth?.(D.date),D),(D,C,V)=>(V.method==="onChangeYear"&&V.props.onChangeYear?.(D.date),D),(D,C,V)=>{const L=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&L&&t?(c?.(D.range),D):(L&&t&&c?.(D.date),D)}]}),A=eB(w.date),O=yv(A,7),N=w.date.toISOString(),M=ZS(w.date,v);S.useEffect(()=>{t||c?.(w.date)},[N,t]);const $=XR(D=>k.date(C=>YR(new Date(C),+D)),1200),_=D=>{const C=D.currentTarget.value;k.onChangeYear(C),a?.(new Date(C)),$(C)},F=US((D,C)=>(D.preventDefault(),C==="right"?k.previousMonth():k.nextMonth()),10),z=()=>{const D=oB();k.date(()=>D),c?.(D)};return g.jsx(Hf,{transition:JR,children:g.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:F.onTouchEnd,onTouchStart:F.onTouchStart,className:Pe("relative overflow-hidden",Be.function(u?.calendar)?u?.calendar(A):u?.calendar),children:[g.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:g.jsx(mn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:k.onExitComplete,children:g.jsxs(He.div,{initial:"enter",animate:"middle",exit:"exit",children:[g.jsxs("header",{className:"relative flex justify-between",children:[g.jsx(He.button,{layout:!0,type:"button","data-focustrap":"prev",variants:KS,onClick:k.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(cI,{className:"h-4 w-4"})}),g.jsx(He.span,{layout:!0,variants:YS,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:g.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[g.jsx("select",{value:M,onChange:k.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${M.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),g.jsx(Fg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:_,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),g.jsx(He.button,{layout:!0,type:"button","data-focustrap":"next",variants:KS,onClick:k.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(Au,{className:"h-4 w-4"})}),g.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),g.jsxs(He.table,{className:"mt-2 table min-w-full table-auto border-0",children:[g.jsx("thead",{children:g.jsx("tr",{children:w.week.map(D=>g.jsx("th",{role:"columnheader",className:Pe("py-2 text-sm font-medium capitalize",Be.function(u?.weekDay)?u.weekDay(D):u?.weekDay),children:D.toLocaleDateString(v,{weekday:"short"})},D.toString()))})}),g.jsx(rB,{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})]})]},M)})}),f==="datetime"?g.jsx("section",{className:"grid items-center my-4",children:g.jsx(Ko,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?rh(x,"HH:mm"):void 0,title:p||m.calendarDatetimeTitle,onChange:D=>{const C=D.target.value,V=QR.exec(C);if(!V)return;const L=V.groups.hour,B=V.groups.min,U=GR(w.date,{hours:Number(L),minutes:Number(B),seconds:0});k.date(()=>U),c?.(U)}})}):null,g.jsx("footer",{className:"mt-2 text-center text-primary",children:g.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},ah=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(ah.displayName="ProgressRootContext");function iB(){const e=P.useContext(ah);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>.":On(51));return e}let lh=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const JS={status(e){return e==="progressing"?{[lh.progressing]:""}:e==="complete"?{[lh.complete]:""}:e==="indeterminate"?{[lh.indeterminate]:""}:null}};function sB(e,t){return t==null?"indeterminate progress":e||`${t}%`}const eT=P.forwardRef(function(t,n){const{format:r,getAriaValueText:o=sB,locale:i,max:s=100,min:a=0,value:l,render:c,className:u,...d}=t,[f,p]=P.useState(),h=gd(r);let y="indeterminate";Number.isFinite(l)&&(y=l===s?"complete":"progressing");const m=WO(l,i,h.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=an("div",t,{state:v,ref:n,props:[b,d],stateAttributesMapping:JS});return g.jsx(ah.Provider,{value:x,children:T})});process.env.NODE_ENV!=="production"&&(eT.displayName="ProgressRoot");const tT=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?rl(l,a,s):null,d=P.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:JS})});process.env.NODE_ENV!=="production"&&(tT.displayName="ProgressIndicator");const aB=e=>g.jsxs(eT,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Pe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[g.jsx(tT,{style:{transform:Be.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Pe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Be.number(e.percent)?g.jsx("p",{className:Pe("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),ac=e=>g.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[g.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),g.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});ac.Icon=function(t){return g.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})},ac.Body=function(t){return g.jsx(cn,{...t,className:Pe("min-w-0 flex-1",t.className),children:t.children})},ac.Right=function(t){return g.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:g.jsx(cn,{...t,type:"button"})})};const lB=e=>g.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),cB=e=>g.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}),nT=new Date(1970,11,31),ch={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},rT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},uB={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")},uh=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},dB={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},fB={day:"numeric",month:"numeric",year:"numeric"},pB=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:s=!0,type:a,...l},c)=>{const u=ul(t),d=S.useId(),f=At(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,a==="datetime"?dB:fB),[u,a]),[h,y]=S.useState(e||void 0),[m,v]=S.useState(!1),b=uh(p,nT).flatMap(M=>Be.keyof(ch,M.type)?ch[M.type](M.value):[]),x=S.useMemo(()=>uh(p,nT).reduce((M,$)=>M+(Be.keyof(rT,$.type)?rT[$.type]($.value):""),""),[p]),T=e?.toISOString(),[E,I]=S.useState(h?uh(p,h).reduce((M,$)=>M+(Be.keyof(ch,$.type)?uB[$.type](h,$.value):""),""):""),w=M=>{const $=M.target.value;if(I($),b.length===$.length&&b.every((F,z)=>{const D=$.charAt(z);return typeof F=="string"?D===F:F.test(D)})){const F=RR($,x,new Date),z=a==="datetime"?F:To(F);return y(z),r?.(z)}return y(void 0),r?.(void 0)};S.useEffect(()=>{ic(e)&&(y(e),I(rh(e,x)))},[T,x]);const k=M=>(y(M),r?.(M),i&&v(!1),I(M?rh(M,x):"")),A=ic(h),O=A?h.toISOString():void 0,N=g.jsx(QS,{...l,type:a,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:A?h:void 0});return g.jsx(S.Fragment,{children:g.jsx(Ko,{...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?g.jsxs(S.Fragment,{children:[g.jsx("input",{"data-origin":l.name,defaultValue:O,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),g.jsx(Si,{open:m,onChange:v,buttonProps:{"aria-describedby":d},trigger:g.jsxs("span",{"aria-labelledby":d,children:[g.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),g.jsx(lI,{})]}),children:N})]}):null})})}),hB=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],mB=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],gB=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],yB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],oT=(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},iT=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},vB=e=>typeof e=="number"?Math.log(e):iT(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},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},xB=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 wB(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?yB:gB:t.binary?mB:hB,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=xB(t);let l;if(e<1){const c=oT(e,t.locale,a);l=s+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?vB(e)/Math.log(1024):iT(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=oT(Number(e),t.locale,a),d=n[c];l=s+u+r+d}return sT(l,t.fixedWidth)}var lc={exports:{}},cc={exports:{}},at={};var aT;function SB(){if(aT)return at;aT=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,h=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 h: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=h,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)===h},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===h||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 lT;function TB(){return lT||(lT=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,h=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(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===i||R===o||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===h||R.$$typeof===p||R.$$typeof===s||R.$$typeof===a||R.$$typeof===u||R.$$typeof===m||R.$$typeof===v||R.$$typeof===b||R.$$typeof===y)}function T(R){if(typeof R=="object"&&R!==null){var ae=R.$$typeof;switch(ae){case t:var ce=R.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 h: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,N=r,M=h,$=p,_=n,F=i,z=o,D=d,C=!1;function V(R){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(R)||T(R)===l}function L(R){return T(R)===c}function B(R){return T(R)===a}function U(R){return T(R)===s}function G(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function H(R){return T(R)===u}function ee(R){return T(R)===r}function ie(R){return T(R)===h}function te(R){return T(R)===p}function q(R){return T(R)===n}function Y(R){return T(R)===i}function Z(R){return T(R)===o}function pe(R){return T(R)===d}lt.AsyncMode=E,lt.ConcurrentMode=I,lt.ContextConsumer=w,lt.ContextProvider=k,lt.Element=A,lt.ForwardRef=O,lt.Fragment=N,lt.Lazy=M,lt.Memo=$,lt.Portal=_,lt.Profiler=F,lt.StrictMode=z,lt.Suspense=D,lt.isAsyncMode=V,lt.isConcurrentMode=L,lt.isContextConsumer=B,lt.isContextProvider=U,lt.isElement=G,lt.isForwardRef=H,lt.isFragment=ee,lt.isLazy=ie,lt.isMemo=te,lt.isPortal=q,lt.isProfiler=Y,lt.isStrictMode=Z,lt.isSuspense=pe,lt.isValidElementType=x,lt.typeOf=T})()),lt}var cT;function uT(){return cT||(cT=1,process.env.NODE_ENV==="production"?cc.exports=SB():cc.exports=TB()),cc.exports}var dh,dT;function EB(){if(dT)return dh;dT=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 dh=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},dh}var fh,fT;function ph(){if(fT)return fh;fT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fh=e,fh}var hh,pT;function hT(){return pT||(pT=1,hh=Function.call.bind(Object.prototype.hasOwnProperty)),hh}var mh,mT;function kB(){if(mT)return mh;mT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ph(),n={},r=hT();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(h){d=h}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={})},mh=o,mh}var gh,gT;function CB(){if(gT)return gh;gT=1;var e=uT(),t=EB(),n=ph(),r=hT(),o=kB(),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 gh=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(L){var B=L&&(c&&L[c]||L[u]);if(typeof B=="function")return B}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:M,exact:$};function h(L,B){return L===B?L!==0||1/L===1/B:L!==L&&B!==B}function y(L,B){this.message=L,this.data=B&&typeof B=="object"?B:{},this.stack=""}y.prototype=Error.prototype;function m(L){if(process.env.NODE_ENV!=="production")var B={},U=0;function G(ee,ie,te,q,Y,Z,pe){if(q=q||f,Z=Z||te,pe!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=q+":"+te;!B[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."),B[ae]=!0,U++)}}return ie[te]==null?ee?ie[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(ie,te,q,Y,Z)}var H=G.bind(null,!1);return H.isRequired=G.bind(null,!0),H}function v(L){function B(U,G,H,ee,ie,te){var q=U[G],Y=z(q);if(Y!==L){var Z=D(q);return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+Z+"` supplied to `"+H+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return m(B)}function b(){return m(s)}function x(L){function B(U,G,H,ee,ie){if(typeof L!="function")return new y("Property `"+ie+"` 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+" `"+ie+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an array."))}for(var Y=0;Y<te.length;Y++){var Z=L(te,Y,H,ee,ie+"["+Y+"]",n);if(Z instanceof Error)return Z}return null}return m(B)}function T(){function L(B,U,G,H,ee){var ie=B[U];if(!a(ie)){var te=z(ie);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(B,U,G,H,ee){var ie=B[U];if(!e.isValidElementType(ie)){var te=z(ie);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 B(U,G,H,ee,ie){if(!(U[G]instanceof L)){var te=L.name||f,q=V(U[G]);return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+q+"` supplied to `"+H+"`, expected ")+("instance of `"+te+"`."))}return null}return m(B)}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 B(U,G,H,ee,ie){for(var te=U[G],q=0;q<L.length;q++)if(h(te,L[q]))return null;var Y=JSON.stringify(L,function(pe,R){var ae=D(R);return ae==="symbol"?String(R):R});return new y("Invalid "+ee+" `"+ie+"` of value `"+String(te)+"` "+("supplied to `"+H+"`, expected one of "+Y+"."))}return m(B)}function k(L){function B(U,G,H,ee,ie){if(typeof L!="function")return new y("Property `"+ie+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` 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,ie+"."+Y,n);if(Z instanceof Error)return Z}return null}return m(B)}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 B=0;B<L.length;B++){var U=L[B];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(U)+" at index "+B+"."),s}function G(H,ee,ie,te,q){for(var Y=[],Z=0;Z<L.length;Z++){var pe=L[Z],R=pe(H,ee,ie,te,q,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&Y.push(R.data.expectedType)}var ae=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new y("Invalid "+te+" `"+q+"` supplied to "+("`"+ie+"`"+ae+"."))}return m(G)}function O(){function L(B,U,G,H,ee){return _(B[U])?null:new y("Invalid "+H+" `"+ee+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return m(L)}function N(L,B,U,G,H){return new y((L||"React class")+": "+B+" type `"+U+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function M(L){function B(U,G,H,ee,ie){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));for(var Y in L){var Z=L[Y];if(typeof Z!="function")return N(H,ee,ie,Y,D(Z));var pe=Z(te,Y,H,ee,ie+"."+Y,n);if(pe)return pe}return null}return m(B)}function $(L){function B(U,G,H,ee,ie){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` 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 N(H,ee,ie,Z,D(pe));if(!pe)return new y("Invalid "+ee+" `"+ie+"` key `"+Z+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(U[G],null," ")+`
17
- Valid keys: `+JSON.stringify(Object.keys(L),null," "));var R=pe(te,Z,H,ee,ie+"."+Z,n);if(R)return R}return null}return m(B)}function _(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(_);if(L===null||a(L))return!0;var B=d(L);if(B){var U=B.call(L),G;if(B!==L.entries){for(;!(G=U.next()).done;)if(!_(G.value))return!1}else for(;!(G=U.next()).done;){var H=G.value;if(H&&!_(H[1]))return!1}}else return!1;return!0;default:return!1}}function F(L,B){return L==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z(L){var B=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":F(B,L)?"symbol":B}function D(L){if(typeof L>"u"||L===null)return""+L;var B=z(L);if(B==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return B}function C(L){var B=D(L);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}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},gh}var yh,yT;function IB(){if(yT)return yh;yT=1;var e=ph();function t(){}function n(){}return n.resetWarningCache=t,yh=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},yh}var vT;function AB(){if(vT)return lc.exports;if(vT=1,process.env.NODE_ENV!=="production"){var e=uT(),t=!0;lc.exports=CB()(e.isElement,t)}else lc.exports=IB()();return lc.exports}var PB=AB();const yt=sm(PB);function Co(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 OB=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Ai(e,t,n){const r=_B(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&bT(r,"path",i),bT(r,"relativePath",i),r}function _B(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=OB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function bT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const MB=[".DS_Store","Thumbs.db"];function DB(e){return Co(this,void 0,void 0,function*(){return uc(e)&&NB(e.dataTransfer)?$B(e.dataTransfer,e.type):FB(e)?LB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?VB(e):[]})}function NB(e){return uc(e)}function FB(e){return uc(e)&&uc(e.target)}function uc(e){return typeof e=="object"&&e!==null}function LB(e){return vh(e.target.files).map(t=>Ai(t))}function VB(e){return Co(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Ai(n))})}function $B(e,t){return Co(this,void 0,void 0,function*(){if(e.items){const n=vh(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(zB));return xT(wT(r))}return xT(vh(e.files).map(n=>Ai(n)))})}function xT(e){return e.filter(t=>MB.indexOf(t.name)===-1)}function vh(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 zB(e){if(typeof e.webkitGetAsEntry!="function")return ST(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?TT(t):ST(e,t)}function wT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?wT(n):[n]],[])}function ST(e,t){return Co(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,Ai(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Ai(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function jB(e){return Co(this,void 0,void 0,function*(){return e.isDirectory?TT(e):RB(e)})}function TT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(s=>Co(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(jB));o.push(a),i()}else try{const a=yield Promise.all(o);n(a)}catch(a){r(a)}}),s=>{r(s)})}i()})}function RB(e){return Co(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Ai(r,e.fullPath);t(o)},r=>{n(r)})})})}var dc={},ET;function BB(){return ET||(ET=1,dc.__esModule=!0,dc.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}),dc}var HB=BB();const bh=sm(HB);function kT(e){return UB(e)||qB(e)||PT(e)||WB()}function WB(){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 qB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UB(e){if(Array.isArray(e))return xh(e)}function CT(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 IT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(n),!0).forEach(function(r){AT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ys(e,t){return KB(e)||YB(e,t)||PT(e,t)||GB()}function GB(){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 PT(e,t){if(e){if(typeof e=="string")return xh(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 xh(e,t)}}function xh(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 YB(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 KB(e){if(Array.isArray(e))return e}var ZB=typeof bh=="function"?bh:bh.default,XB="file-invalid-type",QB="file-too-large",JB="file-too-small",e4="too-many-files",t4=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:XB,message:"File type must be ".concat(r)}},OT=function(t){return{code:QB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},_T=function(t){return{code:JB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},n4={code:e4,message:"Too many files"};function r4(e){return e.type===""&&typeof e.getAsFile=="function"}function MT(e,t){var n=e.type==="application/x-moz-file"||ZB(e,t)||r4(e);return[n,n?null:t4(t)]}function DT(e,t,n){if(Io(e.size))if(Io(t)&&Io(n)){if(e.size>n)return[!1,OT(n)];if(e.size<t)return[!1,_T(t)]}else{if(Io(t)&&e.size<t)return[!1,_T(t)];if(Io(n)&&e.size>n)return[!1,OT(n)]}return[!0,null]}function Io(e){return e!=null}function o4(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=MT(l,n),u=Ys(c,1),d=u[0],f=DT(l,r,o),p=Ys(f,1),h=p[0],y=a?a(l):null;return d&&h&&!y})}function fc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ks(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 NT(e){e.preventDefault()}function i4(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function s4(e){return e.indexOf("Edge/")!==-1}function a4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return i4(e)||s4(e)}function ar(){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!fc(r)&&a&&a.apply(void 0,[r].concat(i)),fc(r)})}}function l4(){return"showOpenFilePicker"in window}function c4(e){if(Io(e)){var t=Object.entries(e).filter(function(n){var r=Ys(n,2),o=r[0],i=r[1],s=!0;return FT(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(LT))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Ys(r,2),i=o[0],s=o[1];return IT(IT({},n),{},AT({},i,s))},{});return[{description:"Files",accept:t}]}return e}function u4(e){if(Io(e))return Object.entries(e).reduce(function(t,n){var r=Ys(n,2),o=r[0],i=r[1];return[].concat(kT(t),[o],kT(i))},[]).filter(function(t){return FT(t)||LT(t)}).join(",")}function d4(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function f4(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function FT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function LT(e){return/^.*\.[\w]+$/.test(e)}var p4=["children"],h4=["open"],m4=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],g4=["refKey","onChange","onClick"];function VT(e){return b4(e)||v4(e)||$T(e)||y4()}function y4(){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 v4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b4(e){if(Array.isArray(e))return Sh(e)}function wh(e,t){return S4(e)||w4(e,t)||$T(e,t)||x4()}function x4(){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 $T(e,t){if(e){if(typeof e=="string")return Sh(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 Sh(e,t)}}function Sh(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 w4(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 S4(e){if(Array.isArray(e))return e}function zT(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?zT(Object(n),!0).forEach(function(r){Th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pc(e,t){if(e==null)return{};var n=T4(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 T4(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 Eh=S.forwardRef(function(e,t){var n=e.children,r=pc(e,p4),o=RT(r),i=o.open,s=pc(o,h4);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(St(St({},s),{},{open:i})))});Eh.displayName="Dropzone";var jT={disabled:!1,getFilesFromEvent:DB,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};Eh.defaultProps=jT,Eh.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 kh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function RT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=St(St({},jT),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,h=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 u4(n)},[n]),N=S.useMemo(function(){return c4(n)},[n]),M=S.useMemo(function(){return typeof m=="function"?m:BT},[m]),$=S.useMemo(function(){return typeof y=="function"?y:BT},[y]),_=S.useRef(null),F=S.useRef(null),z=S.useReducer(E4,kh),D=wh(z,2),C=D[0],V=D[1],L=C.isFocused,B=C.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&l4()),G=function(){!U.current&&B&&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,B,$,U]);var H=S.useRef([]),ee=S.useRef([]),ie=function(X){_.current&&_.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",NT,!1),document.addEventListener("drop",ie,!1)),function(){x&&(document.removeEventListener("dragover",NT),document.removeEventListener("drop",ie))}},[_,x]),S.useEffect(function(){var j=function(De){ee.current=[].concat(VT(ee.current),[De.target]),Ks(De)&&V({isDragGlobal:!0,type:"setDragGlobal"})},X=function(De){ee.current=ee.current.filter(function(Ne){return Ne!==De.target&&Ne!==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)}},[_]),S.useEffect(function(){return!r&&b&&_.current&&_.current.focus(),function(){}},[_,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(VT(H.current),[j.target]),Ks(j)&&Promise.resolve(o(j)).then(function(X){if(!(fc(j)&&!w)){var me=X.length,ve=me>0&&o4({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=Ks(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 _.current&&_.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}),Ks(j)&&u&&u(j))},[_,u,w]),pe=S.useCallback(function(j,X){var me=[],ve=[];j.forEach(function(ke){var De=MT(ke,O),Ne=wh(De,2),ct=Ne[0],Nt=Ne[1],Qt=DT(ke,s,i),Re=wh(Qt,2),W=Re[0],K=Re[1],Oe=A?A(ke):null;if(ct&&W&&!Oe)me.push(ke);else{var Ue=[Nt,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:[n4]})}),me.splice(0)),V({acceptedFiles:me,fileRejections:ve,type:"setFiles"}),f&&f(me,ve,X),ve.length>0&&h&&h(ve,X),me.length>0&&p&&p(me,X)},[V,a,O,s,i,l,f,p,h,A]),R=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[],Ks(j)&&Promise.resolve(o(j)).then(function(X){fc(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"}),M();var j={multiple:a,types:N};window.showOpenFilePicker(j).then(function(X){return o(X)}).then(function(X){pe(X,null),V({type:"closeDialog"})}).catch(function(X){d4(X)?($(X),V({type:"closeDialog"})):f4(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"}),M(),F.current.value=null,F.current.click())},[V,M,$,v,pe,te,N,a]),ce=S.useCallback(function(j){!_.current||!_.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),ae())},[_,ae]),Q=S.useCallback(function(){V({type:"focus"})},[]),ue=S.useCallback(function(){V({type:"blur"})},[]),re=S.useCallback(function(){T||(a4()?setTimeout(ae,0):ae())},[T,ae]),he=function(X){return r?null:X},oe=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,De=j.onFocus,Ne=j.onBlur,ct=j.onClick,Nt=j.onDragEnter,Qt=j.onDragOver,Re=j.onDragLeave,W=j.onDrop,K=pc(j,m4);return St(St(Th({onKeyDown:oe(ar(ke,ce)),onFocus:oe(ar(De,Q)),onBlur:oe(ar(Ne,ue)),onClick:he(ar(ct,re)),onDragEnter:le(ar(Nt,q)),onDragOver:le(ar(Qt,Y)),onDragLeave:le(ar(Re,Z)),onDrop:le(ar(W,R)),role:typeof ve=="string"&&ve!==""?ve:"presentation"},me,_),!r&&!E?{tabIndex:0}:{}),K)}},[_,ce,Q,ue,re,q,Y,Z,R,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,De=pc(j,g4),Ne=Th({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(ar(ve,R)),onClick:he(ar(ke,ne)),tabIndex:-1},me,F);return St(St({},Ne),De)}},[F,n,a,R,r]);return St(St({},C),{},{isFocused:L&&!r,getRootProps:de,getInputProps:J,rootRef:_,inputRef:F,open:he(ae)})}function E4(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({},kh),{},{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({},kh);default:return e}}function BT(){}const HT=S.createContext([null,()=>{}]),k4=()=>S.useContext(HT),C4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,I4={csv:Mu,xls:Mu,mov:jg,mp4:jg,xlsx:Mu,pdf:zg,txt:zg,json:fI,mp3:aI},A4=e=>{const[,t]=k4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:C4(l),size:wB(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=I4[e.file.name.split(".").at(-1)]??Rg,a=n.type==="img"?g.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):g.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return g.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[g.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:a}),g.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[g.jsx("span",{children:e.file.name}),g.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?g.jsx("div",{className:"flex-1 min-w-full",children:g.jsx(e.File,{file:e.file})}):null]}),g.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:g.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:g.jsx(Lo,{size:16})})})]})},P4=e=>g.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>g.jsx(A4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),WT=e=>{const t=At(),n=e.dragging?pI:hI;return g.jsxs("div",{className:"flex flex-col justify-center items-center",children:[g.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:g.jsx(n,{className:"text-primary",size:80})}),g.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[g.jsx("p",{children:t.uploadIdle}),g.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},O4=e=>e.isDragActive?g.jsx(WT,{files:e.files,dragging:!0}):e.files.length>0?g.jsx(P4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):g.jsx(S.Fragment,{children:e.idle}),_4=g.jsx(WT,{dragging:!1}),M4=e=>{const t=e.item.file,n=e.item.type;return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),g.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?g.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?g.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?g.jsx("figure",{children:g.jsx("audio",{controls:!0,src:e.item.url})}):null]})},D4=({idle:e=_4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=At(),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:h}=RT({onDrop:d});return g.jsxs(HT.Provider,{value:s,children:[g.jsx(Ws,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?g.jsx(M4,{item:s[0]}):null}),g.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:[g.jsx("input",{...p(o),name:o.name,id:o.name}),g.jsx(O4,{File:n,onDeleteFile:t,isDragActive:h,idle:e,files:c})]})]})},qT=()=>window.matchMedia("@media (pointer: coarse)"),N4=()=>{const e=S.useRef(Dr()?null:qT()),[t,n]=S.useState(Dr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?qT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},UT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=N4(),o=S.useRef(Dr()?"":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||vv())return;document.documentElement.style.padding=Sg(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(Hk(c.style.height)):null,f=Be.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},F4=(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]},GT=(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},YT={basic:/[,[\]]+?/,extend:/[,[\].]+?/},KT=(e,t)=>{const n=GT(t,YT.basic,e);return n!==void 0&&n!==e?n:GT(t,YT.extend,e)},ZT=e=>e.replace(/[^0-9]/g,""),hc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),XT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?ZT(e).includes(ZT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?F4(e,t)!==null:!1,L4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>XT(e,o,n,r)):XT(e,t,n,r),Ch=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Be.array(i.value)?i.value.map(hc):hc(`${i.value}`)}));return e.forEach(i=>{const s=KT(i,t);o.forEach(a=>{const l=KT(i,a.key);if(!l)return;const c=hc(`${a.value}`.toLocaleLowerCase()).trim(),u=hc(`${l}`.toLocaleLowerCase()).trim();if(L4(u,c,a.score,a.match))return void r.set(s,i);Be.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},V4=e=>g.jsx(S.Fragment,{children:e.children}),$4={duration:200,open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0},initial:{transform:"scaleY(0)",opacity:.2}},z4=[],j4=S.forwardRef(function(t,n){return g.jsx(He.ul,{...t,ref:n,className:"overscroll-contain w-full max-h-96 rounded-lg",children:g.jsx(mn,{children:t.children})})}),R4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(He.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),B4={List:j4,Item:R4},Pi=40,H4=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:h=!1,...y},m)=>{const v=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=y.value??y.defaultValue??"",E=At(),[I,w]=S.useState(()=>Math.min(320,Pi*o.length)),[k,A]=S.useState(!1),[O,N]=S.useState(""),[M,$]=S.useState(T),[_,F]=S.useState(()=>o.find(j=>j.value===T)?.label??T),[z,D]=S.useState(null),C=S.useRef(z4),V=UT(k,"block-only"),L=h&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...o]:o,B=()=>Ri.flushSync(()=>A(!0)),U=O?Ch(L,"value",[{key:"value",value:O},{key:"label",value:O}]):L,G=()=>{A(!1),w(0)},H=U.filter(j=>j.hidden!==!0),ee=h?void 0:`^(${o.map(j=>`${pd(j.value)}${j.label?"|"+pd(j.label):""}`).join("|")})$`,{x:ie,y:te,strategy:q,refs:Y,context:Z,placement:pe}=Gn({open:k,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:io,middleware:[Ho(4),My({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),_y({padding:10,elementContext:"reference",apply(j){const me=j.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ve=Wi(Y.reference.current,window.innerHeight),ke=Math.min(me<Pi?ve:me,ve,j.availableHeight),De=H.length===0?Pi:Math.min(ke,ve,me),Ne=`${b.current?.getBoundingClientRect().width||ve}px`;Object.assign(j.elements.floating.style,{width:Ne,maxWidth:Ne,height:De})}})]}),R=uv(Z,$4),{getReferenceProps:ae,getFloatingProps:ce,getItemProps:Q}=Yn([gr(Z,{role:"listbox"}),Mr(Z),Ya(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=Wi(j.current,window.innerHeight);setTimeout(()=>w(Math.min(X,H.length*Pi)),100)},[O,k,Y.reference,H.length]),S.useEffect(()=>{const j=Y.reference.current;if(j)return Hi(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(),N(""),D(X)},re=j=>{const X=j.target.value;return N(X),!k&&X===""?A(!0):(j.target.name=y.name||"",X?A(!0):y.onChange?.(j))},he=()=>{B(),N(""),Y.reference.current?.focus()},oe=()=>{D(j=>j===null?0:j),B(),N("")},le=()=>{Y.reference.current?.setAttribute("data-value",""),N(""),$(""),F(""),wg(Y.reference.current),G()},be=y.id||y.name,de=`${be}-shadow`,ne=H.length===0,J=pe==="top"||pe==="top-start";return g.jsxs(rs,{...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:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:he,children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),M?g.jsx("button",{type:"button",onClick:le,className:"p-2 transition-colors md:p-1 link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.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:[g.jsx("input",{"data-shadow":"true",...ae({...y,onFocus:oe,pattern:ee,onChange:re,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=Be.number(z)?z+1:0;return X>H.length-1&&(X=0),x.current?.scrollIntoView({index:X}),D(X)}if(j.key==="ArrowUp"){let X=Be.number(z)?z-1:H.length-1;return X<0&&(X=H.length-1),x.current?.scrollIntoView({index:X}),D(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":M,"data-error":!!t,"data-name":be,"data-target":be,required:p,value:k?O:o.length===0?"":_||M,"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)}),g.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:m,required:p,defaultValue:y.value||M||void 0}),g.jsx(mr,{preserveTabOrder:!0,children:k?g.jsx(lo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs(He.div,{...ce({ref:dr(V,Y.setFloating),style:{...R.styles,left:ie,top:te??0,position:q,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:ne?"auto":I},className:Pe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground shadow-floating",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:Pi)*H.length;return Ri.flushSync(()=>w(me+2))},children:[ne?g.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||E.autocompleteEmpty})}):null,g.jsx(Lp,{overscan:40,ref:x,hidden:ne,data:H,style:{height:I},defaultItemHeight:Pi,components:B4,scrollerRef:j=>{v.current=j},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(j,X)=>{const me=X.Render??V4,ve=M===X.value||M===X.label,ke=z===j,De=X.label??X.value;return g.jsx("button",{"data-value":X.value,...Q({ref:Ne=>{C.current[j]=Ne},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:g.jsx(me,{...y,label:X.label,value:X.value,children:De})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(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 zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const QT=40,W4=e=>g.jsx(S.Fragment,{children:e.children}),q4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},JT=[],U4=S.forwardRef(function(t,n){return g.jsx(He.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:g.jsx(mn,{children:t.children})})}),G4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(He.li,{...r,ref:o,className:"last:rounded-t-lg"})}),Y4={List:U4,Item:G4},K4=e=>{const t=At(),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]),g.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?g.jsxs(la,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},Z4=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:h=!1,onChangeOptions:y,...m},v)=>{const b=S.useMemo(()=>new zn(r.map(ne=>[ne.value,ne])),[r]),x=S.useRef(null),T=S.useRef(null),E=m.value??m.defaultValue??JT,I=At(),[w,k]=S.useState(0),[A,O]=S.useState(!1),[N,M]=S.useState(""),[$,_]=S.useState(()=>{const ne=new zn;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,D]=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(JT),B=h&&N!==""?[{value:N,label:N,"data-dynamic":"true"},...r]:r,U=N.length===0?B:Ch(B,"value",[{key:"value",value:N},{key:"label",value:N}]),G=UT(A,"block-only"),H=U.filter(ne=>ne.hidden!==!0),ee=H.length===0,{x:ie,y:te,strategy:q,refs:Y,context:Z}=Gn({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:io,middleware:[Ho(4),_y({padding:10,elementContext:"reference",apply(ne){const j=ne.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,X=Wi(Y.reference.current,window.innerHeight),me=Math.min(j<QT?X:j,X,ne.availableHeight),ve=H.length===0?QT:Math.min(me,X,j),ke=`${x.current.getBoundingClientRect().width}px`;Object.assign(ne.elements.floating.style,{width:ke,maxWidth:ke,height:ve})}})]}),pe=uv(Z,q4),{getReferenceProps:R,getFloatingProps:ae,getItemProps:ce}=Yn([gr(Z,{role:"listbox"}),Mr(Z),Ya(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=Wi(ne.current,window.innerHeight);setTimeout(()=>k(Math.min(J,H.length*40)),100)},[N,A,Y.reference]),S.useEffect(()=>{m.value&&_(new zn(m.value.map(ne=>[ne,b.get(ne)])))},[m.value,b]),S.useEffect(()=>{const ne=Y.reference.current;if(ne)return Hi(ne)},[]);const Q=(ne,J)=>{const j=$.clone(ve=>ve.has(ne.value)?ve.remove(ne.value):ve.set(ne.value,ne));_(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),D(ve=>ve.concat(ne.label??"")),M(""),V(J)},ue=ne=>{const J=ne.target.value;return M(J),!A&&J===""?O(!0):(ne.target.name=m.name||"",J?O(!0):void 0)},re=()=>{O(!0),M(""),Y.reference.current?.focus()},he=()=>{O(!0),M("")},oe=()=>{Y.reference.current?.setAttribute("data-value","[]"),M(""),O(!1),_(new zn),y?.([])},le=m.id||m.name,be=$.map((ne,J)=>g.jsx(la,{size:"small",icon:g.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:j=>{j.preventDefault(),j.stopPropagation(),Q(ne,J)},children:g.jsx(Lo,{size:14})}),children:ne.label??ne.value},`MultiSelect-${ne.value}-x`)),de={height:ee?"0":$.size===0?w-49:w-86};return g.jsxs(rs,{...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:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:re,children:[g.jsx(Iu,{size:20}),g.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),$?g.jsx("button",{type:"button",onClick:oe,className:"transition-colors link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.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:[g.jsxs("ul",{...R({...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 text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[F.length>0?null:g.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),g.jsx(K4,{label:c,children:be})]}),g.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:v,required:p,defaultValue:m.value||F||void 0}),g.jsx(mr,{preserveTabOrder:!0,children:A?g.jsx(ld,{lockScroll:!0,children:g.jsx(lo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs("div",{...ae({ref:Y.setFloating,style:{...pe.styles,top:te??0,position:q,left:ie,height:w-(F.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[g.jsx("input",{autoFocus:!0,value:N,onChange:ue,title:m.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded border-b transition-colors outline-none focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y 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?g.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:a||I.autocompleteEmpty})}):null,ee?null:g.jsx(He.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:ee?"auto":w},style:de,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!A)return k(0);const J=Y.floating.current.querySelectorAll("li").item(0),j=(J?J.getBoundingClientRect().height:40)*H.length;return Ri.flushSync(()=>k(j+2))},children:g.jsx(Lp,{ref:T,hidden:ee,data:H,components:Y4,style:de,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(ne,J)=>{const j=J.Render??W4,X=$.has(J.value)||$.has(J.label??""),me=C===ne,ve=J.label??J.value;return g.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:[g.jsx(Xp,{onChange:Yo,checked:X,"aria-checked":X,onClick:ke=>{ke.stopPropagation(),Q(J,ne)}}),g.jsx(j,{...m,label:J.label,value:J.value,children:ve})]})}})}),g.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:$.size===0?g.jsx(la,{theme:"muted",size:"small",children:I.autocompleteEmpty}):be})]})})}):null})]})}),X4=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},Q4={Item:S.forwardRef(function(t,n){return g.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return g.jsx("ul",{...t,ref:n,className:"space-y-3"})})},J4=e=>{const t=S.useRef(null),n=X4(t);return g.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[g.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[g.jsx("header",{className:"border-b border-card-border pb-2"}),g.jsxs("div",{className:"px-8 space-y-2",children:[g.jsx(Ko,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),g.jsx(Lp,{height:n,useWindowScroll:!0,data:e.source,components:Q4,itemContent:(r,o)=>g.jsx(S.Fragment,{children:g.jsx(Xp,{children:g.jsx(e.Item,{data:o})})})})]})]}),g.jsx("div",{children:g.jsx(yr,{children:g.jsx(Au,{})})}),g.jsx("div",{})]})};function e3(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 t3=({children:e,...t})=>{const n=Fr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:e3(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()},[]),g.jsx("div",{...t,ref:r,children:o?e:null})},mc=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(mc.displayName="ToastContext");function Ih(){const e=P.useContext(mc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":On(73));return e}var n3=(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]),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
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})}}},r3=(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})}}},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.
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})}},o3={inputStabilityCheck:"once",identityFunctionCheck:"once"},gc=Symbol("NOT_FOUND");function i3(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function s3(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 eE=e=>Array.isArray(e)?e:[e];function l3(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 tE(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var c3=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...o3,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:n3},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:r3}}};function u3(e){let t;return{get(n){return t&&e(t.key,n)?t.value:gc},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function d3(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 gc}function o(a,l){r(a)===gc&&(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 f3=(e,t)=>e===t;function p3(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 h3(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=f3,maxSize:o=1,resultEqualityCheck:i}=n,s=p3(r);let a=0;const l=o<=1?u3(s):d3(o,s);function c(){let u=l.get(arguments);if(u===gc){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 m3=class{constructor(e){this.value=e}deref(){return this.value}},g3=typeof WeakRef<"u"?WeakRef:m3,y3=0,nE=1;function yc(){return{s:y3,v:void 0,o:null,p:null}}function rE(e,t={}){let n=yc();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 h=a.o;h===null&&(a.o=h=new WeakMap);const y=h.get(p);y===void 0?(a=yc(),h.set(p,a)):a=y}else{let h=a.p;h===null&&(a.p=h=new Map);const y=h.get(p);y===void 0?(a=yc(),h.set(p,a)):a=y}}const c=a;let u;if(a.s===nE)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 g3(u):u}return c.s=nE,c.v=u,u}return s.clearCache=()=>{n=yc(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function oE(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()),i3(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=rE,argsMemoizeOptions:h=[],devModeChecks:y={}}=u,m=eE(f),v=eE(h),b=l3(o),x=d(function(){return i++,c.apply(null,arguments)},...m);let T=!0;const E=p(function(){s++;const w=tE(b,arguments);if(a=x.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:k,inputStabilityCheck:A}=c3(T,y);if(k.shouldRun&&k.run(c,w,a),A.shouldRun){const O=tE(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 v3=oE(rE),b3=Object.assign((e,t=v3)=>{s3(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:()=>b3});const x3=oE({memoize:h3,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),jn=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":On(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},w3=(...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":On(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 h=[void 0,void 0,void 0];switch(i){case 0:break;case 1:{p=[...e.slice(0,-1),()=>h[0],r];break}case 2:{p=[...e.slice(0,-1),()=>h[0],()=>h[1],r];break}case 3:{p=[...e.slice(0,-1),()=>h[0],()=>h[1],()=>h[2],r];break}default:throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":On(2))}f=x3(...p),f.selectorArgs=h,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")}}},S3=xd(19)?E3:k3;function iE(e,t,n,r,o){return S3(e,t,n,r,o)}function T3(e,t,n,r,o){const i=P.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return YF.useSyncExternalStore(e.subscribe,i,i)}function E3(e,t,n,r,o){return T3(e,t,n,r,o)}function k3(e,t,n,r,o){return GF.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class C3{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 iE(this,t,n,r,o)}}class I3 extends C3{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),iE(this,this.selectors[t],n,r,o)}useContextCallback(t,n){P.useDebugValue(t);const r=ut(n??fn);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 Zs=0;class Xs{static create(){return new Xs}currentId=Zs;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Zs,n()},t)}isStarted(){return this.currentId!==Zs}clear=()=>{this.currentId!==Zs&&(clearTimeout(this.currentId),this.currentId=Zs)};disposeEffect=()=>this.clear}function A3(){const e=Kn(Xs.create).current;return as(e.disposeEffect),e}let sE=0;function P3(e){return sE+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${sE}`}function Ah(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 vc=w3(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:jn(e=>e.toasts),isEmpty:jn(e=>e.toasts.length===0),toast:jn(vc,(e,t)=>e.get(t)?.value),toastIndex:jn(vc,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:jn(vc,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:jn(vc,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:jn(e=>e.hovering),focused:jn(e=>e.focused),expanded:jn(e=>e.hovering||e.focused),expandedOrOutOfFocus:jn(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:jn(e=>e.prevFocusElement)};class O3 extends I3{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||P3("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 h=f.has(p.id);return p.limited!==h?{...p,limited:h}: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(h=>h.id===t?{...h,...n}:h));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 h=this.timers.get(t);h&&(h.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=Ah(n.loading),o=this.addToast({...r,type:"loading"}),i=t.then(s=>{const a=Ah(n.success,s);return this.updateToast(o,{...a,type:"success",timeout:a.timeout}),s}).catch(s=>{const a=Ah(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??=Xs.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=Cd(t);Nr(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?Xs.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=uo(sn(this.state.viewport));if(!this.state.viewport||!Nr(this.state.viewport,n)||!Id(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 aE=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,s=Kn(()=>new O3({timeout:r,limit:o,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return as(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}),g.jsx(mc.Provider,{value:s,children:n})};process.env.NODE_ENV!=="production"&&(aE.displayName="ToastProvider");const Oi=P.forwardRef(function(t,n){const[r,o]=P.useState();pt(()=>{TO&&o("button")},[]);const i={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:nl,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Oi.displayName="FocusGuard");let _3=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const lE=P.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,a=Ih(),l=A3(),c=P.useRef(!1),u=P.useRef(!1),d=a.useState("isEmpty"),f=a.useState("toasts"),p=a.useState("focused"),h=a.useState("expanded"),y=a.useState("prevFocusElement"),m=f[0]?.height??0,v=P.useMemo(()=>f.some(M=>M.transitionStatus==="ending"),[f]);P.useEffect(()=>{const M=a.state.viewport;if(!M)return;function $(F){d||F.key==="F6"&&F.target!==M&&(F.preventDefault(),a.setPrevFocusElement(uo(sn(M))),M?.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const _=Wt(M);return _.addEventListener("keydown",$),()=>{_.removeEventListener("keydown",$)}},[a,d]),P.useEffect(()=>{const M=a.state.viewport;if(!M||d)return;const $=Wt(M);function _(z){z.target===$&&(a.setIsWindowFocused(!1),a.pauseTimers())}function F(z){if(z.relatedTarget||z.target===$)return;const D=Cd(z),C=uo(sn(M));(!Nr(M,D)||!Id(C))&&a.resumeTimers(),l.start(0,()=>a.setIsWindowFocused(!0))}return $.addEventListener("blur",_,!0),$.addEventListener("focus",F,!0),()=>{$.removeEventListener("blur",_,!0),$.removeEventListener("focus",F,!0)}},[a,l,d]),P.useEffect(()=>{const M=a.state.viewport;if(!M||d)return;const $=sn(M);return $.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{$.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[d,a]);function b(M){const $=a.state.viewport;$&&(c.current=!0,M.relatedTarget===$?f[0]?.ref?.current?.focus():a.restoreFocusToPrevElement())}function x(M){M.key==="Tab"&&M.shiftKey&&M.target===a.state.viewport&&(M.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||Id(sn(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function w(M){!p||Nr(a.state.viewport,M.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:h},O=an("div",t,{ref:[n,a.setViewport],state:A,props:[k,{style:{[_3.frontmostHeight]:m?`${m}px`:void 0}},s,{children:g.jsxs(P.Fragment,{children:[!d&&y&&g.jsx(Oi,{onFocus:b}),i,!d&&y&&g.jsx(Oi,{onFocus:b})]})}]}),N=P.useMemo(()=>f.filter(M=>M.priority==="high"),[f]);return g.jsxs(P.Fragment,{children:[!d&&y&&g.jsx(Oi,{onFocus:b}),O,!p&&N.length>0&&g.jsx("div",{style:nl,children:N.map(M=>g.jsxs("div",{role:"alert","aria-atomic":!0,children:[g.jsx("div",{children:M.title}),g.jsx("div",{children:M.description})]},M.id))})]})});process.env.NODE_ENV!=="production"&&(lE.displayName="ToastViewport");function M3(e){return xd(19)?e:e?"true":void 0}const Ph=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ph.displayName="ToastRootContext");function bc(){const e=P.useContext(Ph);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":On(66));return e}let Oh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const D3={[Oh.startingStyle]:""},N3={[Oh.endingStyle]:""},F3={transitionStatus(e){return e==="starting"?D3:e==="ending"?N3:null}};function L3(e){return e==null?e:"current"in e?e.current:e}function V3(e,t=!1,n=!0){const r=Gv();return ut((o,i=null)=>{r.cancel();function s(){cr.flushSync(o)}const a=L3(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=Oh.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 $3(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=ut(o),s=V3(r,n,!1);P.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}let Ao=(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 z3={...F3,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Qs=40,j3=10,qr=.5,R3=1;function cE(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 B3(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 uE=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=Ih(),[f,p]=P.useState(void 0),[h,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,N]=P.useState(),[M,$]=P.useState(null),_=P.useRef(null),F=P.useRef({x:0,y:0}),z=P.useRef({x:0,y:0,scale:1}),D=P.useRef(void 0),C=P.useRef(0),V=P.useRef(!1),L=P.useRef({x:0,y:0}),B=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"),ie=d.useState("expanded");$3({open:r.transitionStatus!=="ending",ref:_,onComplete(){r.transitionStatus==="ending"&&d.removeToast(r.id)}});const te=ut((oe=!1)=>{const le=_.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:_,height:de,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}oe?cr.flushSync(ne):ne()});pt(te,[te]);function q(oe,le){let be=oe,de=le;return!c.includes("left")&&!c.includes("right")?be=oe>0?oe**qr:-(Math.abs(oe)**qr):(!c.includes("right")&&oe>0&&(be=oe**qr),!c.includes("left")&&oe<0&&(be=-(Math.abs(oe)**qr))),!c.includes("up")&&!c.includes("down")?de=le>0?le**qr:-(Math.abs(le)**qr):(!c.includes("down")&&le>0&&(de=le**qr),!c.includes("up")&&le<0&&(de=-(Math.abs(le)**qr))),{x:be,y:de}}function Y(oe){if(oe.button!==0)return;oe.pointerType==="touch"&&d.pauseTimers();const le=Cd(oe.nativeEvent);if(!(le&&le.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(V.current=!1,D.current=void 0,C.current=0,F.current={x:oe.clientX,y:oe.clientY},L.current=F.current,_.current){const de=B3(_.current);z.current=de,w(de),E({x:de.x,y:de.y})}d.setHovering(!0),y(!0),v(!1),$(null),B.current=!0,_.current?.setPointerCapture(oe.pointerId)}}function Z(oe){if(!h)return;oe.preventDefault(),B.current&&(F.current={x:oe.clientX,y:oe.clientY},B.current=!1);const{clientY:le,clientX:be,movementX:de,movementY:ne}=oe;(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)>=R3&&(v(!0),M===null)){const Nt=c.includes("left")||c.includes("right"),Qt=c.includes("up")||c.includes("down");if(Nt&&Qt){const Re=Math.abs(J),W=Math.abs(j);$(Re>W?"horizontal":"vertical")}}let ve;if(!D.current)M==="vertical"?j>0?ve="down":j<0&&(ve="up"):M==="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)&&(D.current=ve,C.current=cE(ve,J,j),p(ve));else{const ct=D.current,Nt=cE(ct,me,X);Nt>Qs?(V.current=!1,p(ct)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&C.current-Nt>=j3&&(V.current=!0)}const ke=q(J,j);let De=z.current.x,Ne=z.current.y;M==="horizontal"?(c.includes("left")||c.includes("right"))&&(De+=ke.x):(M==="vertical"||(c.includes("left")||c.includes("right"))&&(De+=ke.x),(c.includes("up")||c.includes("down"))&&(Ne+=ke.y)),E({x:De,y:Ne})}function pe(oe){if(!h)return;if(y(!1),v(!1),$(null),_.current?.releasePointerCapture(oe.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>Qs&&(le=!0,ne="right");break;case"left":be<-Qs&&(le=!0,ne="left");break;case"down":de>Qs&&(le=!0,ne="down");break;case"up":de<-Qs&&(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 R(oe){if(oe.key==="Escape"){if(!_.current||!Nr(_.current,uo(sn(_.current))))return;d.closeToast(r.id)}}P.useEffect(()=>{if(!u)return;const oe=_.current;if(!oe)return;function le(be){Nr(oe,be.target)&&be.preventDefault()}return oe.addEventListener("touchmove",le,{passive:!1}),()=>{oe.removeEventListener("touchmove",le)}},[u]);function ae(){if(!h&&T.x===I.x&&T.y===I.y&&!b)return{[Ao.swipeMovementX]:"0px",[Ao.swipeMovementY]:"0px"};const oe=T.x-I.x,le=T.y-I.y;return{transition:h?"none":void 0,transform:h?`translateX(${T.x}px) translateY(${T.y}px) scale(${I.scale})`:void 0,[Ao.swipeMovementX]:`${oe}px`,[Ao.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:R,inert:M3(r.limited),style:{...ae(),[Ao.index]:r.transitionStatus==="ending"?U:G,[Ao.offsetY]:`${H}px`,[Ao.height]:r.height?`${r.height}px`:void 0}},ue=P.useMemo(()=>({rootRef:_,toast:r,titleId:k,setTitleId:A,descriptionId:O,setDescriptionId:N,swiping:h,swipeDirection:f,recalculateHeight:te,index:U,visibleIndex:G,expanded:ie}),[r,k,O,h,f,te,U,G,ie]),re={transitionStatus:r.transitionStatus,expanded:ie,limited:r.limited||!1,type:r.type,swiping:ue.swiping,swipeDirection:ue.swipeDirection},he=an("div",t,{ref:[n,ue.rootRef],state:re,stateAttributesMapping:z3,props:[Q,a]});return g.jsx(Ph.Provider,{value:ue,children:he})});process.env.NODE_ENV!=="production"&&(uE.displayName="ToastRoot");const dE=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:s,expanded:a,recalculateHeight:l}=bc(),c=P.useRef(null);pt(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const h=new ResizeObserver(()=>l(!0)),y=new MutationObserver(()=>l(!0));return h.observe(p),y.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{h.disconnect(),y.disconnect()}},[l]);const u=s>0;return an("div",t,{ref:[n,c],state:{expanded:a,behind:u},props:i})});process.env.NODE_ENV!=="production"&&(dE.displayName="ToastContent");const fE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setDescriptionId:c}=bc(),u=s??l.description,d=!!u,f=Ka(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const p={type:l.type},h=an("p",t,{ref:n,state:p,props:{...a,id:f,children:u}});return d?h:null});process.env.NODE_ENV!=="production"&&(fE.displayName="ToastDescription");const pE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setTitleId:c}=bc(),u=s??l.title,d=!!u,f=Ka(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const p={type:l.type},h=an("h2",t,{ref:n,state:p,props:{...a,id:f,children:u}});return d?h:null});process.env.NODE_ENV!=="production"&&(pE.displayName="ToastTitle");let _h;process.env.NODE_ENV!=="production"&&(_h=new Set);function hE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");_h.has(t)||(_h.add(t),console.error(`Base UI: ${t}`))}}const mE=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(mE.displayName="CompositeRootContext");function H3(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>.":On(16));return t}function W3(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 q3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=P.useRef(null),s=H3(!0)!==void 0,a=ut(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=W3({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=vd.captureOwnerStack?.()||"";hE(`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=vd.captureOwnerStack?.()||"";hE(`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;U3(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:h,onKeyUp:y,onKeyDown:m,onPointerDown:v,...b}=f;return Sd({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}p?.(T)},onMouseDown(T){t||h?.(T)},onKeyDown(T){if(t||(Ed(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||(Ed(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 U3(e){return Pt(e)&&e.tagName==="BUTTON"}const gE=P.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:s=!0,...a}=t,l=Ih(),{toast:c}=bc(),u=l.useState("expanded"),[d,f]=P.useState(!1),{getButtonProps:p,buttonRef:h}=q3({disabled:i,native:s}),y={type:c.type};return an("button",t,{ref:[n,h],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"&&(gE.displayName="ToastClose");function G3(e){return`data-base-ui-${e}`}const Mh=P.createContext(null);process.env.NODE_ENV!=="production"&&(Mh.displayName="PortalContext");const Y3=()=>P.useContext(Mh),K3=G3("portal");function yE(e={}){const{ref:t,container:n,componentProps:r=Pn,elementProps:o}=e,i=Ka(),a=Y3()?.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&&(xa(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 h=an("div",r,{ref:[t,f],props:[{id:i,[K3]:""},o]});return{portalNode:u,portalSubtree:l&&h?cr.createPortal(h,l):null}}const Z3=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:u}=yE({container:o,ref:n,componentProps:t,elementProps:l}),d=P.useRef(null),f=P.useRef(null),p=P.useRef(null),h=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&&Ad(I)&&(I.type==="focusin"?Nv:OO)(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||Nv(c)},[b,c]);const T=P.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:c,setFocusManagerState:m}),[c]);return g.jsxs(P.Fragment,{children:[u,g.jsxs(Mh.Provider,{value:T,children:[x&&c&&g.jsx(Oi,{"data-type":"outside",ref:d,onFocus:E=>{if(Ad(E,c))p.current?.focus();else{const I=y?y.domReference:null;PO(I)?.focus()}}}),x&&c&&g.jsx("span",{"aria-owns":c.id,style:XP}),c&&cr.createPortal(r,c),x&&c&&g.jsx(Oi,{"data-type":"outside",ref:f,onFocus:E=>{if(Ad(E,c))h.current?.focus();else{const I=y?y.domReference:null;AO(I)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,Zo(eO,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(Z3.displayName="FloatingPortal");const vE=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,...a}=t,{portalNode:l,portalSubtree:c}=yE({container:o,ref:n,componentProps:t,elementProps:a});return!c&&!l?null:g.jsxs(P.Fragment,{children:[c,l&&cr.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(vE.displayName="FloatingPortalLite");const X3=vE;function bE(){const e=P.useContext(mc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":On(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 Q3=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},J3=_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"}}),eH={default:Er,info:Er,warn:Du,muted:Er,danger:Du,success:Pu,secondary:Er},xE=S.createContext(()=>{throw new Error("Not implemented")}),tH=()=>S.useContext(xE);function nH(e){const t=e.toast.data?.closable??!0,n=e.toast.data?.loading??!1,r=e.toast.data?.theme||"default",o=J3({theme:r}),i=n?yI:eH[r]||Er;return g.jsx(uE,{toast:e.toast,swipeDirection:"right",children:g.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 list-none w-full",children:g.jsx(dE,{className:Pe(o,"shadow-lg"),children:g.jsxs("div",{className:"flex items-start gap-3 p-4",children:[g.jsx("div",{className:Pe("mt-0.5 shrink-0 opacity-80",n&&"animate-spin"),children:g.jsx(i,{className:"size-4"})}),g.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-hidden",children:[e.toast.title?g.jsx(pE,{className:"truncate font-semibold leading-tight tracking-tight select-text"}):null,g.jsx(fE,{className:"text-xs font-medium opacity-90 select-text leading-relaxed line-clamp-2"})]}),t&&!n?g.jsx(gE,{className:"shrink-0 -mr-1 -mt-1 p-1.5 rounded-lg text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground",children:g.jsx(Lo,{className:"size-3.5"})}):null]})})})})}function rH({max:e=5}){const t=S.useRef(null),n=Q3(t),r=bE(),o=e?r.toasts.slice(0,e):r.toasts,i=n?o:o.slice(0,3),s=o.length-i.length;return g.jsxs(lE,{ref:t,className:"fixed left-1/2 top-6 z-[100] flex w-full max-w-[380px] -translate-x-1/2 flex-col gap-3 outline-none pointer-events-none overflow-visible",children:[g.jsx(mn,{mode:"popLayout",initial:!1,children:i.map(a=>g.jsx(nH,{toast:a},a.id))}),!n&&s>0&&g.jsxs(He.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"self-center px-3 py-1 text-[10px] font-bold tracking-wider uppercase bg-card-background/80 backdrop-blur shadow-sm border border-card-border rounded-full text-foreground/50 pointer-events-auto cursor-default transition-all hover:bg-card-background hover:text-foreground/80",children:["+",s," more"]})]})}function oH({children:e,max:t=5}){const n=bE(),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 g.jsxs(xE.Provider,{value:o,children:[e,g.jsx(X3,{children:g.jsx(rH,{max:t})})]})}function iH({children:e,max:t=5,timeout:n=5e3}){return g.jsx(aE,{limit:t,timeout:n,children:g.jsx(oH,{max:t,children:e})})}const sH=/Mac|iPod|iPhone|iPad/,xc=()=>sH.test(navigator.userAgent),aH=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?xc()?"Meta":"Control":n==="Hyper"?xc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),wE=e=>e.map(t=>t.trim()).join("+");class lH{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=wE(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=wE(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 cH=e=>(e=e.trim(),e==="Alt"?xc()?g.jsx(vI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?xc()?g.jsx(dI,{"aria-label":"Command",size:12}):"Ctrl":e),uH=e=>{const t=e.value.trim().split("+");return g.jsx("span",{className:"flex text-sm items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return g.jsxs(S.Fragment,{children:[g.jsx("kbd",{"aria-label":n,children:cH(n)}),o?null:g.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},dH=e=>g.jsx("span",{className:"flex items-center h-full text-sm font-medium text-left text-secondary",children:Su(e.item.title)?g.jsx(e.item.title,{text:e.text}):e.item.title}),fH=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?g.jsx("div",{id:n,className:"px-2 pt-2 pb-1 h-10",children:g.jsx(dH,{text:e.text,item:o})}):o.type!=="shortcut"?g.jsx(S.Fragment,{}):g.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:[g.jsxs("span",{className:"flex gap-2 items-center",children:[o.Icon?o.Icon:null,g.jsx("span",{children:Su(o.title)?g.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?g.jsx(uH,{value:o.shortcut}):null]})}),pH=(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:Be.function(a.title)?a.title({text:t}):a.title})),o=r.reduce((a,l)=>{const c=Be.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&a.push({...l,enabled:c}),a},[]),i=Ch(o,"title",n),s=r.filter(a=>Be.function(a.enabled)?a.enabled({text:t}):!1);return zn.unique(i.concat(s),a=>a.title)},hH=[0,0,0,0,0],SE=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=SE(n.items);if(r)return r}return null},mH=e=>{const t=S.useId(),n=S.useRef(null),[r,o]=S.useState(""),i=S.useRef([]),s=At(),a=Fr(r),[l,c]=S.useState(null),u=e.bind??"Mod + k",d=Gn({open:e.open,strategy:"absolute",whileElementsMounted:io,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(T=>T.type==="group"?[T,...T.items]:[T]),p=pH(f,r),h=Ya(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=>{Be.number(T)&&(Tg(n.current,i.current[T])||i.current[T]?.scrollIntoView({block:"start",inline:"start"})),c(E=>Be.number(T)?T:e.open?E??0:null)}}),{getItemProps:y,getReferenceProps:m,getFloatingProps:v}=Yn([h]),b=r===""?f:[{type:"group",title:"Results",items:[]},...p.filter(T=>T.type!=="group")];S.useEffect(()=>{const T=new lH;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??Ou;return g.jsx(S.Fragment,{children:g.jsxs(Ws,{...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 py-0 md:max-w-screen-sm lg:max-w-screen-md overflow-clip",children:[g.jsxs("header",{className:"flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background",children:[g.jsx("div",{className:"flex justify-center items-center size-10",children:e.Icon?g.jsx(x,{Default:Ou,text:r,size:16}):g.jsx(Ou,{size:16})}),g.jsx("input",{...m({ref:d.refs.setReference,onKeyDown:T=>{const E=Be.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=SE(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:"items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-none"})]}),e.loading?g.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]",children:[g.jsx("div",{className:"px-2 pt-2 pb-1 h-10",children:s.commandPaletteLoading}),hH.map((T,E)=>g.jsx("li",{className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:jp},`${t}-${E}-skeleton-index`))]}):g.jsxs("div",{className:"flex flex-row flex-nowrap min-w-full","data-component":"command-palette-container",children:[g.jsxs("ul",{role:"listbox",ref:n,"data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]",children:[b.map((T,E)=>S.createElement(fH,{...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?g.jsx("div",{className:Pe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:s.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Be.number(l)?g.jsx(e.Preview,{command:b[l],text:r}):null]}),e.footer?g.jsx("footer",{className:"flex items-center p-2 h-8 rounded-b-lg border-t border-floating-border",children:e.footer}):null]})})},gH=["INPUT","SELECT"],TE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{gH.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Dh,EE;function Nh(){if(EE)return Dh;EE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Dh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Dh}var Fh,kE;function CE(){if(kE)return Fh;kE=1;var e=Nh(),t=tg(),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=[],N=0;N<A.length;++N)typeof A[N]<"u"&&(O[O.length]=A[N]);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 N=a(w)+1;w[N]=k,l(w,N)}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 M=Object.keys(k),$=A&&A.plainObjects?{__proto__:null,0:w}:{0:w},_=0;_<M.length;_++){var F=parseInt(M[_],10);$[F+1]=k[M[_]]}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 D=w;return r(w)&&!r(k)&&(D=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 B=parseInt(V,10);String(B)===V&&B>=0&&B>a(C)&&l(C,B)}return C},D)},p=function(w,k){return Object.keys(k).reduce(function(A,O){return A[O]=k[O],A},w)},h=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,N){if(w.length===0)return w;var M=w;if(typeof w=="symbol"?M=Symbol.prototype.toString.call(w):typeof w!="string"&&(M=String(w)),A==="iso-8859-1")return escape(M).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var $="",_=0;_<M.length;_+=y){for(var F=M.length>=y?M.slice(_,_+y):M,z=[],D=0;D<F.length;++D){var C=F.charCodeAt(D);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||N===e.RFC1738&&(C===40||C===41)){z[z.length]=F.charAt(D);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}D+=1,C=65536+((C&1023)<<10|F.charCodeAt(D)&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 N=k[O],M=N.obj[N.prop],$=Object.keys(M),_=0;_<$.length;++_){var F=$[_],z=M[F];typeof z=="object"&&z!==null&&A.indexOf(z)===-1&&(k[k.length]={obj:M,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 N=a(w)+1;return w[N]=k,l(w,N),w}var M=[].concat(w,k);return M.length>A?i(d(M,{plainObjects:O}),M.length-1):M},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 Fh={arrayToObject:d,assign:p,combine:T,compact:v,decode:h,encode:m,isBuffer:x,isOverflow:s,isRegExp:b,markOverflow:i,maybeMap:E,merge:f},Fh}var Lh,IE;function yH(){if(IE)return Lh;IE=1;var e=tg(),t=CE(),n=Nh(),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,M,$,_,F,z,D){for(var C=m,V=D,L=0,B=!1;(V=V.get(f))!==void 0&&!B;){var U=V.get(m);if(L+=1,typeof U<"u"){if(U===L)throw new RangeError("Cyclic object value");B=!0}typeof V.get(f)>"u"&&(L=0)}if(typeof A=="function"?C=A(v,C):C instanceof Date?C=M(C):b==="comma"&&i(C)&&(C=t.maybeMap(C,function(Q){return Q instanceof Date?M(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[_(G)+"="+_(k(C,u.encoder,z,"value",$))]}return[_(v)+"="+_(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 ie=Object.keys(C);ee=O?ie.sort(O):ie}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 R=N&&w?String(Z).replace(/\./g,"%2E"):String(Z),ae=i(C)?typeof b=="function"?b(q,R):q:q+(N?"."+R:"["+R+"]");D.set(m,L);var ce=e();ce.set(f,D),a(H,y(pe,ae,b,x,T,E,I,w,b==="comma"&&F&&i(C)?null:k,A,O,N,M,$,_,F,z,ce))}}return H},h=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var 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 Lh=function(y,m){var v=y,b=h(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],N=v[O];b.skipNulls&&N===null||a(E,p(N,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 M=E.join(b.delimiter),$=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),M.length>0?$+M:""},Lh}var Vh,AE;function vH(){if(AE)return Vh;AE=1;var e=CE(),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(h,y){return String.fromCharCode(parseInt(y,10))})},i=function(p,h,y){if(p&&typeof p=="string"&&h.comma&&p.indexOf(",")>-1)return p.split(",");if(h.throwOnLimitExceeded&&y>=h.arrayLimit)throw new RangeError("Array limit exceeded. Only "+h.arrayLimit+" element"+(h.arrayLimit===1?"":"s")+" allowed in an array.");return p},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(h,y){var m={__proto__:null},v=y.ignoreQueryPrefix?h.replace(/^\?/,""):h;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,N;if(A===-1?(O=y.decoder(w,r.decoder,I,"key"),N=y.strictNullHandling?null:""):(O=y.decoder(w.slice(0,A),r.decoder,I,"key"),O!==null&&(N=e.maybeMap(i(w.slice(A+1),y,n(m[O])?m[O].length:0),function($){return y.decoder($,r.decoder,I,"value")}))),N&&y.interpretNumericEntities&&I==="iso-8859-1"&&(N=o(String(N))),w.indexOf("[]=")>-1&&(N=n(N)?[N]:N),y.comma&&n(N)&&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.");N=e.combine([],N,y.arrayLimit,y.plainObjects)}if(O!==null){var M=t.call(m,O);M&&(y.duplicates==="combine"||w.indexOf("[]=")>-1)?m[O]=e.combine(m[O],N,y.arrayLimit,y.plainObjects):(!M||y.duplicates==="last")&&(m[O]=N)}}return m},c=function(p,h,y,m){var v=0;if(p.length>0&&p[p.length-1]==="[]"){var b=p.slice(0,-1).join("");v=Array.isArray(h)&&h[b]?h[b].length:0}for(var x=m?h:i(h,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(h,y){var m=y.allowDots?h.replace(/\.([^.[]+)/g,"[$1]"):h;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(h,y,m,v){if(h){var b=u(h,m);if(b)return c(b,y,m,v)}},f=function(h){if(!h)return r;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.decodeDotInKeys<"u"&&typeof h.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(h.decoder!==null&&typeof h.decoder<"u"&&typeof h.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof h.throwOnLimitExceeded<"u"&&typeof h.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof h.charset>"u"?r.charset:h.charset,m=typeof h.duplicates>"u"?r.duplicates:h.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof h.allowDots>"u"?h.decodeDotInKeys===!0?!0:r.allowDots:!!h.allowDots;return{allowDots:v,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof h.allowPrototypes=="boolean"?h.allowPrototypes:r.allowPrototypes,allowSparse:typeof h.allowSparse=="boolean"?h.allowSparse:r.allowSparse,arrayLimit:typeof h.arrayLimit=="number"?h.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:r.charsetSentinel,comma:typeof h.comma=="boolean"?h.comma:r.comma,decodeDotInKeys:typeof h.decodeDotInKeys=="boolean"?h.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof h.decoder=="function"?h.decoder:r.decoder,delimiter:typeof h.delimiter=="string"||e.isRegExp(h.delimiter)?h.delimiter:r.delimiter,depth:typeof h.depth=="number"||h.depth===!1?+h.depth:r.depth,duplicates:m,ignoreQueryPrefix:h.ignoreQueryPrefix===!0,interpretNumericEntities:typeof h.interpretNumericEntities=="boolean"?h.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof h.parameterLimit=="number"?h.parameterLimit:r.parameterLimit,parseArrays:h.parseArrays!==!1,plainObjects:typeof h.plainObjects=="boolean"?h.plainObjects:r.plainObjects,strictDepth:typeof h.strictDepth=="boolean"?!!h.strictDepth:r.strictDepth,strictMerge:typeof h.strictMerge=="boolean"?!!h.strictMerge:r.strictMerge,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof h.throwOnLimitExceeded=="boolean"?h.throwOnLimitExceeded:!1}};return Vh=function(p,h){var y=f(h);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)},Vh}var $h,PE;function bH(){if(PE)return $h;PE=1;var e=yH(),t=vH(),n=Nh();return $h={formats:n,parse:t,stringify:e},$h}var xH=bH(),Je;(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})(Je||(Je={}));var OE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(OE||(OE={}));const Ce=Je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ur=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=Je.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,Je.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 zh=(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,Je.jsonStringifyReplacer)}`;break;case ye.unrecognized_keys:n=`Unrecognized key(s) in object: ${Je.joinValues(e.keys,", ")}`;break;case ye.invalid_union:n="Invalid input";break;case ye.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Je.joinValues(e.options)}`;break;case ye.invalid_enum_value:n=`Invalid enum value. Expected ${Je.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}"`:Je.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,Je.assertNever(e)}return{message:n}};let wH=zh;function SH(){return wH}const TH=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=SH(),r=TH({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===zh?void 0:zh].filter(o=>!!o)});e.common.issues.push(r)}class vn{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 vn.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"}),Js=e=>({status:"dirty",value:e}),Cn=e=>({status:"valid",value:e}),_E=e=>e.status==="aborted",ME=e=>e.status==="dirty",_i=e=>e.status==="valid",wc=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 Gr{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 DE=(e,t)=>{if(_i(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 Ur(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new vn,ctx:{common:t.parent.common,data:t.data,parsedType:Ur(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(wc(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:Ur(t)},o=this._parseSync({data:t,path:r.path,parent:r});return DE(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ur(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return _i(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=>_i(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:Ur(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(wc(o)?o:Promise.resolve(o));return DE(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 Fi({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 Kr.create(this,this._def)}nullable(){return Li.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return lr.create(this)}promise(){return kc.create(this,this._def)}or(t){return Tc.create([this,t],this._def)}and(t){return Ec.create(this,t,this._def)}transform(t){return new Fi({...Ge(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Bh({...Ge(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new UH({typeName:Ve.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Hh({...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 Wh.create(this,t)}readonly(){return qh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const EH=/^c[^\s-]{8,}$/i,kH=/^[0-9a-z]+$/,CH=/^[0-9A-HJKMNP-TV-Z]{26}$/i,IH=/^[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,AH=/^[a-z0-9_-]{21}$/i,PH=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,OH=/^[-+]?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)?)??$/,_H=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,MH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let jh;const DH=/^(?:(?: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])$/,NH=/^(?:(?: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])$/,FH=/^(([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]))$/,LH=/^(([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])$/,VH=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$H=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,NE="((\\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])))",zH=new RegExp(`^${NE}$`);function FE(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 jH(e){return new RegExp(`^${FE(e)}$`)}function RH(e){let t=`${NE}T${FE(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 BH(e,t){return!!((t==="v4"||!t)&&DH.test(e)||(t==="v6"||!t)&&FH.test(e))}function HH(e,t){if(!PH.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 WH(e,t){return!!((t==="v4"||!t)&&NH.test(e)||(t==="v6"||!t)&&LH.test(e))}class Po 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 vn;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")_H.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")jh||(jh=new RegExp(MH,"u")),jh.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")IH.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")AH.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")EH.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")kH.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")CH.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"?RH(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"?zH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?jH(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"?OH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?BH(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"?HH(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"?WH(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"?VH.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?$H.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:ye.invalid_string,message:i.message}),r.dirty()):Je.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 Po({...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 Po({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Po({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Po({...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}}Po.create=e=>new Po({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ge(e)});function qH(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 Mi 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 vn;for(const i of this._def.checks)i.kind==="int"?Je.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"?qH(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()):Je.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 Mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new Mi({...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"&&Je.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)}}Mi.create=e=>new Mi({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ge(e)});class ea 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 vn;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()):Je.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 ea({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new ea({...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}}ea.create=e=>new ea({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ge(e)});class LE 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 Cn(t.data)}}LE.create=e=>new LE({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ge(e)});class Sc 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 vn;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()):Je.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Sc({...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}}Sc.create=e=>new Sc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ge(e)});class VE 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 Cn(t.data)}}VE.create=e=>new VE({typeName:Ve.ZodSymbol,...Ge(e)});class $E 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 Cn(t.data)}}$E.create=e=>new $E({typeName:Ve.ZodUndefined,...Ge(e)});class zE 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 Cn(t.data)}}zE.create=e=>new zE({typeName:Ve.ZodNull,...Ge(e)});class jE extends Ze{constructor(){super(...arguments),this._any=!0}_parse(t){return Cn(t.data)}}jE.create=e=>new jE({typeName:Ve.ZodAny,...Ge(e)});class RE extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Cn(t.data)}}RE.create=e=>new RE({typeName:Ve.ZodUnknown,...Ge(e)});class Yr extends Ze{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:Ce.never,received:n.parsedType}),Le}}Yr.create=e=>new Yr({typeName:Ve.ZodNever,...Ge(e)});class BE 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 Cn(t.data)}}BE.create=e=>new BE({typeName:Ve.ZodVoid,...Ge(e)});class lr 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 Gr(n,s,n.path,a)))).then(s=>vn.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Gr(n,s,n.path,a)));return vn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new lr({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new lr({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new lr({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}lr.create=(e,t)=>new lr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ge(t)});function Di(e){if(e instanceof Rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Kr.create(Di(r))}return new Rt({...e._def,shape:()=>t})}else return e instanceof lr?new lr({...e._def,type:Di(e.element)}):e instanceof Kr?Kr.create(Di(e.unwrap())):e instanceof Li?Li.create(Di(e.unwrap())):e instanceof Oo?Oo.create(e.items.map(t=>Di(t))):e}class Rt 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=Je.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 Yr&&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 Gr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Yr){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 Gr(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=>vn.mergeObjectSync(r,c)):vn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Rt({...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 Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({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 Rt({...this._def,catchall:t})}pick(t){const n={};for(const r of Je.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Rt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Je.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Rt({...this._def,shape:()=>n})}deepPartial(){return Di(this)}partial(t){const n={};for(const r of Je.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Rt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Je.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Kr;)i=i._def.innerType;n[r]=i}return new Rt({...this._def,shape:()=>n})}keyof(){return UE(Je.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Yr.create(),typeName:Ve.ZodObject,...Ge(t)}),Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Yr.create(),typeName:Ve.ZodObject,...Ge(t)}),Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Yr.create(),typeName:Ve.ZodObject,...Ge(t)});class Tc 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}}Tc.create=(e,t)=>new Tc({options:e,typeName:Ve.ZodUnion,...Ge(t)});function Rh(e,t){const n=Ur(e),r=Ur(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const o=Je.objectKeys(t),i=Je.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Rh(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=Rh(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 Ec extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(_E(i)||_E(s))return Le;const a=Rh(i.value,s.value);return a.valid?((ME(i)||ME(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}))}}Ec.create=(e,t,n)=>new Ec({left:e,right:t,typeName:Ve.ZodIntersection,...Ge(n)});class Oo 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 Gr(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>vn.mergeArray(n,s)):vn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Oo({...this._def,rest:t})}}Oo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Oo({items:e,typeName:Ve.ZodTuple,rest:null,...Ge(t)})};class HE 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 Gr(r,a,r.path,[c,"key"])),value:i._parse(new Gr(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}}}}HE.create=(e,t,n)=>new HE({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ge(n)});class ta 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 Gr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new ta({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new ta({...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)}}ta.create=(e,t)=>new ta({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ge(t)});class WE 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})}}WE.create=(e,t)=>new WE({getter:e,typeName:Ve.ZodLazy,...Ge(t)});class qE 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}}qE.create=(e,t)=>new qE({value:e,typeName:Ve.ZodLiteral,...Ge(t)});function UE(e,t){return new Ni({values:e,typeName:Ve.ZodEnum,...Ge(t)})}class Ni extends Ze{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:Je.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 Cn(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 Ni.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ni.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ni.create=UE;class GE extends Ze{_parse(t){const n=Je.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const o=Je.objectValues(n);return xe(r,{expected:Je.joinValues(o),received:r.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(Je.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Je.objectValues(n);return xe(r,{received:r.data,code:ye.invalid_enum_value,options:o}),Le}return Cn(t.data)}get enum(){return this._def.values}}GE.create=(e,t)=>new GE({values:e,typeName:Ve.ZodNativeEnum,...Ge(t)});class kc 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 Cn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}kc.create=(e,t)=>new kc({type:e,typeName:Ve.ZodPromise,...Ge(t)});class Fi 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"?Js(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"?Js(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(!_i(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=>_i(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):Le);Je.assertNever(o)}}Fi.create=(e,t,n)=>new Fi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ge(n)}),Fi.createWithPreprocess=(e,t,n)=>new Fi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ge(n)});class Kr extends Ze{_parse(t){return this._getType(t)===Ce.undefined?Cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Kr.create=(e,t)=>new Kr({innerType:e,typeName:Ve.ZodOptional,...Ge(t)});class Li extends Ze{_parse(t){return this._getType(t)===Ce.null?Cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Li.create=(e,t)=>new Li({innerType:e,typeName:Ve.ZodNullable,...Ge(t)});class Bh 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}}Bh.create=(e,t)=>new Bh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class Hh 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 wc(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}}Hh.create=(e,t)=>new Hh({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class YE 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}}}YE.create=e=>new YE({typeName:Ve.ZodNaN,...Ge(e)});class UH 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 Wh 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(),Js(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 Wh({in:t,out:n,typeName:Ve.ZodPipeline})}}class qh extends Ze{_parse(t){const n=this._def.innerType._parse(t),r=o=>(_i(o)&&(o.value=Object.freeze(o.value)),o);return wc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}qh.create=(e,t)=>new qh({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={})),Yr.create,lr.create,Tc.create,Ec.create,Oo.create,Ni.create,kc.create,Kr.create,Li.create;const GH=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},YH=(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]}}},KE=e=>e.replace(/\[(\d+)]/g,".$1").split("."),bn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):KE(t),o=structuredClone(e);return YH(o,r,n),o},KH=(e,t)=>e.localeCompare(t),Vi={},ZE=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return XE(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=ZE(e._def.innerType);return t==="ZodArray"?n??[]:n}},XE=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,ZE(n)])),QE=(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]=QE(i,o):n[r]=o||i)}return n},ZH={sort:KH,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},JE=e=>{const t=new FormData(e),n=new URLSearchParams(t);return xH.parse(n.toString(),ZH)},Zr=(e,t)=>KE(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Xr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Uh=e=>{const t=e.dataset.target;if(!t)return Xr(e);const n=document.querySelector(`[data-origin="${t}"]`);return Xr(n||e)},XH={state:{},loading:!1,useOnChange:!1},ek=e=>e.dataset.target||e.name,QH=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Hs.LocalStorage.get(t);return GH(n)?n:{}},clear:()=>{Hs.LocalStorage.delete(t)},set:n=>Hs.LocalStorage.set(t,n)}},JH=(e,t,n=XH)=>{const[r,o]=S.useState(null),i=S.useRef({}),[s,a]=S.useState(()=>Be.function(n?.state)?n.state():n?.state??XE(e)??{}),l=S.useCallback(x=>{const T=x.target,E=x.currentTarget;if(T.dataset.optional==="true")return;const w=ek(T),k=Uh(T)||(E?Xr(E):""),A=Zr(w,e);if(T.setAttribute("data-initialized","true"),A){const O=A.safeParse(k),N=O.success?void 0:O.error.issues[0]?.message??"";o(M=>bn(M??{},w,N))}},[e]),c=S.useCallback(x=>T=>{const E=T.currentTarget,I=Object.values(i.current).reduce((k,A)=>{const O=A.element,N=A.schema.safeParse(Xr(O));if(O.dataset.ignore==="ignore"||N.success)return k;const M=N.error.issues[0]?.message;O.setAttribute("data-initialized","true");const $=O.dataset.name||O.name||"";return bn(k,$,M)},{}),w=Be.empty(I)?null:I;o(w),console.error(w),x?.({form:E,errors:w||{}})},[]),u=(x,T=Vi)=>{const E=Zr(x,e),I=w=>{if(!ic(w))return;a(A=>bn(A,x,w.toISOString())),o(A=>bn(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:Be.string(s[x])?new Date(s[x]):s[x],required:T.required??!E.isOptional(),error:Rn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:E})}}},d=(x,T=Vi)=>{const E=Zr(x,e);return{...T,name:x,id:x,onChange:w=>{const k=w.target.value;a(A=>bn(A,x,k)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),value:Rn(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=Vi)=>{const E=Zr(x,e);return{...T,name:x,id:x,onChange:w=>{const k=w.target.checked;a(A=>bn(A??{},x,k)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(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=Vi)=>{const E=Zr(x,e),I=w=>{w.persist?.();const k=w.target.value;T?.onChange?.(w),a(A=>bn(A,x,k))};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),value:Rn(s,x,void 0)||T?.value||"",type:Be.instance(E,Mi)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:E}}},h=(x,T=Vi)=>{const E=Zr(x,e);return{...T,name:x,id:x,onChangeOptions:w=>{a(k=>bn(k,x,w))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),value:Rn(s,x,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:E})}},y=(x,T=Vi)=>{const E=Zr(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=>bn(O,x,A))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,x,void 0),required:T.required??!E.isOptional(),type:I?"number":T?.type??"text",value:Rn(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(Xr(I)),k=M=>{const $=ek(M.target);if(!$)return!1;const _=M.target,F=Uh(M.target)||(M.relatedTarget?Xr(M.relatedTarget):""),z=E.schema.safeParse(F);if(_.setAttribute("value",F),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(D=>{if(Be.null(D))return null;const C=bn(D,$,void 0);return Be.empty(D)||Be.nil(D)||Be.empty(C)?null:C}),!1;if(I.required){const D=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(D),o(C=>{if(Be.null(C))return null;const V=bn(C,$,D||void 0);return Be.empty(V)?null:V})}return!1},A=new AbortController,O=I.getAttribute("data-trigger")||"blur";I.addEventListener(O,k,{signal:A.signal});const N=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:N,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=JE(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(N=>{if(N.tagName==="SELECT"){const M=N;I=bn(I,M.name,M.value)}if(N.tagName==="INPUT"){const M=N,$=Uh(M)||(M?Xr(M):"");I=bn(I,M.dataset.target||M.name,$)}});const k=QE(I,s),A=e.safeParse(k),O=()=>{TE(E),n.interceptor?.clear()};if(A.success){const N=JSON.stringify(A.data);return E.setAttribute("data-json",N),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(N=>({message:N.message,path:N.path.map(M=>String(M))}))})},v=x=>fd(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:h,disabled:r!==null}},eW=e=>e?JSON.parse(e.getAttribute("data-json")):{},tW=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},tk={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},nk={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"},rk={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},nW={name:"dark",zIndex:rk,rounded:tk,spacing:nk,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%)"}}}},rW={rounded:tk,spacing:nk,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:rk,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%)"}}}},oW=nW,iW=rW,sW=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...va,...e.tweaks},parser:e.parser||ma.hsla,map:{...ya,...e.map}}),[e]);return g.jsx(to.Provider,{value:t,children:g.jsx(TS,{children:e.children})})};se.Alert=rz,se.AnimatedList=R$,se.AnimatedListItem=B$,se.Autocomplete=H4,se.Button=yr,se.Calendar=QS,se.Card=Ql,se.Checkbox=Xp,se.ColType=Ti,se.Collapse=pS,se.CommandPalette=mH,se.ComponentsProvider=sW,se.Context=to,se.DatePicker=pB,se.Description=Oz,se.Dict=zn,se.Dropdown=Si,se.Empty=J1,se.Expand=Nz,se.FileUpload=D4,se.Form=LC,se.Info=_z,se.Input=Ko,se.InputFeedback=bv,se.InputField=rs,se.Loading=Dz,se.Menu=mz,se.MenuItem=hz,se.Modal=Ws,se.ModalConfirmProvider=TS,se.MultiSelect=Z4,se.Notifications=iH,se.PageHeader=Mz,se.PageTitle=ES,se.Paragraph=Pz,se.Polymorph=cn,se.Progress=aB,se.Radiobox=gz,se.RenderOnView=t3,se.Select=co,se.Slider=p_,se.Spinner=kS,se.Stats=oz,se.StatsCard=z$,se.Step=K$,se.Steps=Z$,se.Switch=h_,se.Tab=ez,se.Table=$$,se.Tabs=Q$,se.Tag=la,se.TaskList=Az,se.Textarea=yz,se.Timeline=lB,se.TimelineItem=ac,se.Toolbar=cB,se.Tooltip=hd,se.TransferList=J4,se.Wizard=zz,se.createColumns=a$,se.createCssProperties=kI,se.createDesignTokens=Bg,se.createFormStorage=QH,se.createOptionCols=Hp,se.createStyles=SI,se.createTheme=EI,se.createTokenStyles=CI,se.css=Pe,se.defaultDarkTheme=oW,se.defaultLightTheme=iW,se.defaultTranslations=ya,se.defaultTweaks=va,se.dispatchInput=wg,se.formReset=TE,se.formToJson=JE,se.getCoords=MC,se.getJsonForm=eW,se.getModalScrollerRef=f$,se.getRemainingSize=Wi,se.getSchemaShape=Zr,se.hasVerticalScroll=Sg,se.initializeInputDataset=Hi,se.isChildVisible=Tg,se.isMobile=vv,se.isReactComponent=_C,se.isReactFC=Su,se.isSsr=Dr,se.mergeRefs=dr,se.negate=HP,se.noop=Yo,se.parsers=ma,se.path=fd,se.reduceTokens=kr,se.safeRegex=pd,se.splitInto=yv,se.useColorParser=oS,se.useConfirm=wz,se.useForm=JH,se.useLocale=ul,se.useNotification=tH,se.usePrevious=tW,se.useReactive=aS,se.useStableRef=Fr,se.useStepContext=sS,se.useSwipe=US,se.useTablePreferences=u$,se.useTranslations=At,se.uuid=Go,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})}));
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"})}));
28
28
  //# sourceMappingURL=index.umd.js.map