@g4rcez/components 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";var PS=Object.defineProperty;var AS=(e,t,n)=>t in e?PS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>AS(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),x=require("react/jsx-runtime"),ha=require("react-dom");function By(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 R=By(E),Qs=By(ha);function Hy(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=Hy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hy(e))&&(r&&(r+=" "),r+=t);return r}const Kp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yp=Wy,ei=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Yp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],d=i==null?void 0:i[l];if(u===null)return null;const p=Kp(u)||Kp(d);return o[l][p]}),s=n&&Object.entries(n).reduce((l,u)=>{let[d,p]=u;return p===void 0||(l[d]=p),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(h=>{let[g,m]=h;return Array.isArray(m)?m.includes({...i,...s}[g]):{...i,...s}[g]===m})?[...l,d,p]:l},[]);return Yp(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)};var Gp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function IS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var zl,Zp;function ti(){return Zp||(Zp=1,zl=TypeError),zl}const _S={},OS=Object.freeze(Object.defineProperty({__proto__:null,default:_S},Symbol.toStringTag,{value:"Module"})),MS=IS(OS);var Bl,Xp;function Js(){if(Xp)return Bl;Xp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,c=typeof WeakMap=="function"&&WeakMap.prototype,l=c?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,T=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,_=Object.prototype.propertyIsEnumerable,F=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function j(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||S.call(/e/,U))return U;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var et=W<0?-A(-W):A(W);if(et!==W){var at=String(et),Me=v.call(U,at.length+1);return b.call(at,ze,"$&_")+"."+b.call(b.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(U,ze,"$&_")}var B=MS,M=B.custom,$=Te(M)?M:null,J={__proto__:null,double:'"',single:"'"},X={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Bl=function W(U,ze,et,at){var Me=ze||{};if(se(Me,"quoteStyle")&&!se(J,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var nr=se(Me,"customInspect")?Me.customInspect:!0;if(typeof nr!="boolean"&&nr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Ar=Me.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return Oe(U,Me);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var Zt=String(U);return Ar?j(U,Zt):Zt}if(typeof U=="bigint"){var rr=String(U)+"n";return Ar?j(U,rr):rr}var Dl=typeof Me.depth>"u"?5:Me.depth;if(typeof et>"u"&&(et=0),et>=Dl&&Dl>0&&typeof U=="object")return G(U)?"[Array]":"[Object]";var uo=Jn(Me,et);if(typeof at>"u")at=[];else if(be(at,U)>=0)return"[Circular]";function pn(fo,_a,RS){if(_a&&(at=I.call(at),at.push(_a)),RS){var Up={depth:Me.depth};return se(Me,"quoteStyle")&&(Up.quoteStyle=Me.quoteStyle),W(fo,Up,et+1,at)}return W(fo,Me,et+1,at)}if(typeof U=="function"&&!z(U)){var Vp=le(U),$p=tr(U,pn);return"[Function"+(Vp?": "+Vp:" (anonymous)")+"]"+($p.length>0?" { "+k.call($p,", ")+" }":"")}if(Te(U)){var zp=P?b.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(U);return typeof U=="object"&&!P?Ye(zp):zp}if(me(U)){for(var bi="<"+w.call(String(U.nodeName)),jl=U.attributes||[],Ia=0;Ia<jl.length;Ia++)bi+=" "+jl[Ia].name+"="+Q(Z(jl[Ia].value),"double",Me);return bi+=">",U.childNodes&&U.childNodes.length&&(bi+="..."),bi+="</"+w.call(String(U.nodeName))+">",bi}if(G(U)){if(U.length===0)return"[]";var Nl=tr(U,pn);return uo&&!En(Nl)?"["+er(Nl,uo)+"]":"[ "+k.call(Nl,", ")+" ]"}if(K(U)){var Fl=tr(U,pn);return!("cause"in Error.prototype)&&"cause"in U&&!_.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+pn(U.cause),Fl),", ")+" }":Fl.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call(Fl,", ")+" }"}if(typeof U=="object"&&nr){if($&&typeof U[$]=="function"&&B)return B(U,{depth:Dl-et});if(nr!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(oe(U)){var Bp=[];return r&&r.call(U,function(fo,_a){Bp.push(pn(_a,U,!0)+" => "+pn(fo,U))}),fn("Map",n.call(U),Bp,uo)}if(q(U)){var Hp=[];return s&&s.call(U,function(fo){Hp.push(pn(fo,U))}),fn("Set",a.call(U),Hp,uo)}if(ue(U))return Ot("WeakMap");if(te(U))return Ot("WeakSet");if(ee(U))return Ot("WeakRef");if(H(U))return Ye(pn(Number(U)));if(Re(U))return Ye(pn(O.call(U)));if(ye(U))return Ye(h.call(U));if(ie(U))return Ye(pn(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Gp<"u"&&U===Gp)return"{ [object globalThis] }";if(!L(U)&&!z(U)){var Ll=tr(U,pn),Wp=F?F(U)===Object.prototype:U instanceof Object||U.constructor===Object,Vl=U instanceof Object?"":"null prototype",qp=!Wp&&D&&Object(U)===U&&D in U?v.call(xe(U),8,-1):Vl?"Object":"",kS=Wp||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",$l=kS+(qp||Vl?"["+k.call(C.call([],qp||[],Vl||[]),": ")+"] ":"");return Ll.length===0?$l+"{}":uo?$l+"{"+er(Ll,uo)+"}":$l+"{ "+k.call(Ll,", ")+" }"}return String(U)};function Q(W,U,ze){var et=ze.quoteStyle||U,at=J[et];return at+W+at}function Z(W){return b.call(String(W),/"/g,"&quot;")}function Y(W){return!D||!(typeof W=="object"&&(D in W||typeof W[D]<"u"))}function G(W){return xe(W)==="[object Array]"&&Y(W)}function L(W){return xe(W)==="[object Date]"&&Y(W)}function z(W){return xe(W)==="[object RegExp]"&&Y(W)}function K(W){return xe(W)==="[object Error]"&&Y(W)}function ie(W){return xe(W)==="[object String]"&&Y(W)}function H(W){return xe(W)==="[object Number]"&&Y(W)}function ye(W){return xe(W)==="[object Boolean]"&&Y(W)}function Te(W){if(P)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!V)return!1;try{return V.call(W),!0}catch{}return!1}function Re(W){if(!W||typeof W!="object"||!O)return!1;try{return O.call(W),!0}catch{}return!1}var $e=Object.prototype.hasOwnProperty||function(W){return W in this};function se(W,U){return $e.call(W,U)}function xe(W){return g.call(W)}function le(W){if(W.name)return W.name;var U=y.call(m.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function be(W,U){if(W.indexOf)return W.indexOf(U);for(var ze=0,et=W.length;ze<et;ze++)if(W[ze]===U)return ze;return-1}function oe(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!l||!W||typeof W!="object")return!1;try{l.call(W,l);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function ee(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function te(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{l.call(W,l)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function me(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function Oe(W,U){if(W.length>U.maxStringLength){var ze=W.length-U.maxStringLength,et="... "+ze+" more character"+(ze>1?"s":"");return Oe(v.call(W,0,U.maxStringLength),U)+et}var at=X[U.quoteStyle||"single"];at.lastIndex=0;var Me=b.call(b.call(W,at,"\\$1"),/[\x00-\x1f]/g,He);return Q(Me,"single",U)}function He(W){var U=W.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return ze?"\\"+ze:"\\x"+(U<16?"0":"")+T.call(U.toString(16))}function Ye(W){return"Object("+W+")"}function Ot(W){return W+" { ? }"}function fn(W,U,ze,et){var at=et?er(ze,et):k.call(ze,", ");return W+" ("+U+") {"+at+"}"}function En(W){for(var U=0;U<W.length;U++)if(be(W[U],`
1
+ "use strict";var PS=Object.defineProperty;var AS=(e,t,n)=>t in e?PS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var de=(e,t,n)=>AS(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),x=require("react/jsx-runtime"),ha=require("react-dom");function By(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 R=By(E),Qs=By(ha);function Hy(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=Hy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hy(e))&&(r&&(r+=" "),r+=t);return r}const Kp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yp=Wy,ei=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Yp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Kp(u)||Kp(d);return o[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(h=>{let[g,m]=h;return Array.isArray(m)?m.includes({...i,...s}[g]):{...i,...s}[g]===m})?[...c,d,p]:c},[]);return Yp(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};var Gp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function IS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var zl,Zp;function ti(){return Zp||(Zp=1,zl=TypeError),zl}const _S={},OS=Object.freeze(Object.defineProperty({__proto__:null,default:_S},Symbol.toStringTag,{value:"Module"})),MS=IS(OS);var Bl,Xp;function Js(){if(Xp)return Bl;Xp=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,f=p?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,S=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,I=Array.prototype.slice,A=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,P=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||!0)?Symbol.toStringTag:null,_=Object.prototype.propertyIsEnumerable,F=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function j(W,U){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||T.call(/e/,U))return U;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var et=W<0?-A(-W):A(W);if(et!==W){var at=String(et),Me=v.call(U,at.length+1);return b.call(at,ze,"$&_")+"."+b.call(b.call(Me,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(U,ze,"$&_")}var B=MS,M=B.custom,z=Te(M)?M:null,Q={__proto__:null,double:'"',single:"'"},X={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Bl=function W(U,ze,et,at){var Me=ze||{};if(se(Me,"quoteStyle")&&!se(Q,Me.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(Me,"maxStringLength")&&(typeof Me.maxStringLength=="number"?Me.maxStringLength<0&&Me.maxStringLength!==1/0:Me.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var nr=se(Me,"customInspect")?Me.customInspect:!0;if(typeof nr!="boolean"&&nr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(Me,"indent")&&Me.indent!==null&&Me.indent!==" "&&!(parseInt(Me.indent,10)===Me.indent&&Me.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(Me,"numericSeparator")&&typeof Me.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Ar=Me.numericSeparator;if(typeof U>"u")return"undefined";if(U===null)return"null";if(typeof U=="boolean")return U?"true":"false";if(typeof U=="string")return Oe(U,Me);if(typeof U=="number"){if(U===0)return 1/0/U>0?"0":"-0";var Zt=String(U);return Ar?j(U,Zt):Zt}if(typeof U=="bigint"){var rr=String(U)+"n";return Ar?j(U,rr):rr}var Dl=typeof Me.depth>"u"?5:Me.depth;if(typeof et>"u"&&(et=0),et>=Dl&&Dl>0&&typeof U=="object")return G(U)?"[Array]":"[Object]";var uo=Jn(Me,et);if(typeof at>"u")at=[];else if(be(at,U)>=0)return"[Circular]";function pn(fo,_a,RS){if(_a&&(at=I.call(at),at.push(_a)),RS){var Up={depth:Me.depth};return se(Me,"quoteStyle")&&(Up.quoteStyle=Me.quoteStyle),W(fo,Up,et+1,at)}return W(fo,Me,et+1,at)}if(typeof U=="function"&&!$(U)){var Vp=le(U),$p=tr(U,pn);return"[Function"+(Vp?": "+Vp:" (anonymous)")+"]"+($p.length>0?" { "+k.call($p,", ")+" }":"")}if(Te(U)){var zp=P?b.call(String(U),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(U);return typeof U=="object"&&!P?Ye(zp):zp}if(me(U)){for(var bi="<"+w.call(String(U.nodeName)),jl=U.attributes||[],Ia=0;Ia<jl.length;Ia++)bi+=" "+jl[Ia].name+"="+J(Z(jl[Ia].value),"double",Me);return bi+=">",U.childNodes&&U.childNodes.length&&(bi+="..."),bi+="</"+w.call(String(U.nodeName))+">",bi}if(G(U)){if(U.length===0)return"[]";var Nl=tr(U,pn);return uo&&!En(Nl)?"["+er(Nl,uo)+"]":"[ "+k.call(Nl,", ")+" ]"}if(K(U)){var Fl=tr(U,pn);return!("cause"in Error.prototype)&&"cause"in U&&!_.call(U,"cause")?"{ ["+String(U)+"] "+k.call(C.call("[cause]: "+pn(U.cause),Fl),", ")+" }":Fl.length===0?"["+String(U)+"]":"{ ["+String(U)+"] "+k.call(Fl,", ")+" }"}if(typeof U=="object"&&nr){if(z&&typeof U[z]=="function"&&B)return B(U,{depth:Dl-et});if(nr!=="symbol"&&typeof U.inspect=="function")return U.inspect()}if(oe(U)){var Bp=[];return r&&r.call(U,function(fo,_a){Bp.push(pn(_a,U,!0)+" => "+pn(fo,U))}),fn("Map",n.call(U),Bp,uo)}if(q(U)){var Hp=[];return s&&s.call(U,function(fo){Hp.push(pn(fo,U))}),fn("Set",a.call(U),Hp,uo)}if(ue(U))return Ot("WeakMap");if(te(U))return Ot("WeakSet");if(ee(U))return Ot("WeakRef");if(H(U))return Ye(pn(Number(U)));if(Re(U))return Ye(pn(O.call(U)));if(ye(U))return Ye(h.call(U));if(ie(U))return Ye(pn(String(U)));if(typeof window<"u"&&U===window)return"{ [object Window] }";if(typeof globalThis<"u"&&U===globalThis||typeof Gp<"u"&&U===Gp)return"{ [object globalThis] }";if(!L(U)&&!$(U)){var Ll=tr(U,pn),Wp=F?F(U)===Object.prototype:U instanceof Object||U.constructor===Object,Vl=U instanceof Object?"":"null prototype",qp=!Wp&&D&&Object(U)===U&&D in U?v.call(xe(U),8,-1):Vl?"Object":"",kS=Wp||typeof U.constructor!="function"?"":U.constructor.name?U.constructor.name+" ":"",$l=kS+(qp||Vl?"["+k.call(C.call([],qp||[],Vl||[]),": ")+"] ":"");return Ll.length===0?$l+"{}":uo?$l+"{"+er(Ll,uo)+"}":$l+"{ "+k.call(Ll,", ")+" }"}return String(U)};function J(W,U,ze){var et=ze.quoteStyle||U,at=Q[et];return at+W+at}function Z(W){return b.call(String(W),/"/g,"&quot;")}function Y(W){return!D||!(typeof W=="object"&&(D in W||typeof W[D]<"u"))}function G(W){return xe(W)==="[object Array]"&&Y(W)}function L(W){return xe(W)==="[object Date]"&&Y(W)}function $(W){return xe(W)==="[object RegExp]"&&Y(W)}function K(W){return xe(W)==="[object Error]"&&Y(W)}function ie(W){return xe(W)==="[object String]"&&Y(W)}function H(W){return xe(W)==="[object Number]"&&Y(W)}function ye(W){return xe(W)==="[object Boolean]"&&Y(W)}function Te(W){if(P)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!V)return!1;try{return V.call(W),!0}catch{}return!1}function Re(W){if(!W||typeof W!="object"||!O)return!1;try{return O.call(W),!0}catch{}return!1}var $e=Object.prototype.hasOwnProperty||function(W){return W in this};function se(W,U){return $e.call(W,U)}function xe(W){return g.call(W)}function le(W){if(W.name)return W.name;var U=y.call(m.call(W),/^function\s*([\w$]+)/);return U?U[1]:null}function be(W,U){if(W.indexOf)return W.indexOf(U);for(var ze=0,et=W.length;ze<et;ze++)if(W[ze]===U)return ze;return-1}function oe(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{a.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function ee(W){if(!f||!W||typeof W!="object")return!1;try{return f.call(W),!0}catch{}return!1}function q(W){if(!a||!W||typeof W!="object")return!1;try{a.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function te(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function me(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function Oe(W,U){if(W.length>U.maxStringLength){var ze=W.length-U.maxStringLength,et="... "+ze+" more character"+(ze>1?"s":"");return Oe(v.call(W,0,U.maxStringLength),U)+et}var at=X[U.quoteStyle||"single"];at.lastIndex=0;var Me=b.call(b.call(W,at,"\\$1"),/[\x00-\x1f]/g,He);return J(Me,"single",U)}function He(W){var U=W.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[U];return ze?"\\"+ze:"\\x"+(U<16?"0":"")+S.call(U.toString(16))}function Ye(W){return"Object("+W+")"}function Ot(W){return W+" { ? }"}function fn(W,U,ze,et){var at=et?er(ze,et):k.call(ze,", ");return W+" ("+U+") {"+at+"}"}function En(W){for(var U=0;U<W.length;U++)if(be(W[U],`
2
2
  `)>=0)return!1;return!0}function Jn(W,U){var ze;if(W.indent===" ")ze=" ";else if(typeof W.indent=="number"&&W.indent>0)ze=k.call(Array(W.indent+1)," ");else return null;return{base:ze,prev:k.call(Array(U+1),ze)}}function er(W,U){if(W.length===0)return"";var ze=`
3
3
  `+U.prev+U.base;return ze+k.call(W,","+ze)+`
4
- `+U.prev}function tr(W,U){var ze=G(W),et=[];if(ze){et.length=W.length;for(var at=0;at<W.length;at++)et[at]=se(W,at)?U(W[at],W):""}var Me=typeof N=="function"?N(W):[],nr;if(P){nr={};for(var Ar=0;Ar<Me.length;Ar++)nr["$"+Me[Ar]]=Me[Ar]}for(var Zt in W)se(W,Zt)&&(ze&&String(Number(Zt))===Zt&&Zt<W.length||P&&nr["$"+Zt]instanceof Symbol||(S.call(/[^\w$]/,Zt)?et.push(U(Zt,W)+": "+U(W[Zt],W)):et.push(Zt+": "+U(W[Zt],W))));if(typeof N=="function")for(var rr=0;rr<Me.length;rr++)_.call(W,Me[rr])&&et.push("["+U(Me[rr])+"]: "+U(W[Me[rr]],W));return et}return Bl}var Hl,Qp;function DS(){if(Qp)return Hl;Qp=1;var e=Js(),t=ti(),n=function(s,c,l){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===c)return u.next=d.next,l||(d.next=s.next,s.next=d),d},r=function(s,c){if(s){var l=n(s,c);return l&&l.value}},o=function(s,c,l){var u=n(s,c);u?u.value=l:s.next={key:c,next:s.next,value:l}},i=function(s,c){return s?!!n(s,c):!1},a=function(s,c){if(s)return n(s,c,!0)};return Hl=function(){var c,l={assert:function(u){if(!l.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=c&&c.next,p=a(c,u);return p&&d&&d===p&&(c=void 0),!!p},get:function(u){return r(c,u)},has:function(u){return i(c,u)},set:function(u,d){c||(c={next:void 0}),o(c,u,d)}};return l},Hl}var Wl,Jp;function Uy(){return Jp||(Jp=1,Wl=Object),Wl}var ql,em;function jS(){return em||(em=1,ql=Error),ql}var Ul,tm;function NS(){return tm||(tm=1,Ul=EvalError),Ul}var Kl,nm;function FS(){return nm||(nm=1,Kl=RangeError),Kl}var Yl,rm;function LS(){return rm||(rm=1,Yl=ReferenceError),Yl}var Gl,om;function VS(){return om||(om=1,Gl=SyntaxError),Gl}var Zl,im;function $S(){return im||(im=1,Zl=URIError),Zl}var Xl,am;function zS(){return am||(am=1,Xl=Math.abs),Xl}var Ql,sm;function BS(){return sm||(sm=1,Ql=Math.floor),Ql}var Jl,lm;function HS(){return lm||(lm=1,Jl=Math.max),Jl}var ec,cm;function WS(){return cm||(cm=1,ec=Math.min),ec}var tc,um;function qS(){return um||(um=1,tc=Math.pow),tc}var nc,dm;function US(){return dm||(dm=1,nc=Math.round),nc}var rc,fm;function KS(){return fm||(fm=1,rc=Number.isNaN||function(t){return t!==t}),rc}var oc,pm;function YS(){if(pm)return oc;pm=1;var e=KS();return oc=function(n){return e(n)||n===0?n:n<0?-1:1},oc}var ic,mm;function GS(){return mm||(mm=1,ic=Object.getOwnPropertyDescriptor),ic}var ac,hm;function Ky(){if(hm)return ac;hm=1;var e=GS();if(e)try{e([],"length")}catch{e=null}return ac=e,ac}var sc,gm;function ZS(){if(gm)return sc;gm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return sc=e,sc}var lc,vm;function XS(){return vm||(vm=1,lc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),lc}var cc,ym;function QS(){if(ym)return cc;ym=1;var e=typeof Symbol<"u"&&Symbol,t=XS();return cc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},cc}var uc,xm;function Yy(){return xm||(xm=1,uc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),uc}var dc,bm;function Gy(){if(bm)return dc;bm=1;var e=Uy();return dc=e.getPrototypeOf||null,dc}var fc,wm;function JS(){if(wm)return fc;wm=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(c,l){for(var u=[],d=0;d<c.length;d+=1)u[d]=c[d];for(var p=0;p<l.length;p+=1)u[p+c.length]=l[p];return u},i=function(c,l){for(var u=[],d=l,p=0;d<c.length;d+=1,p+=1)u[p]=c[d];return u},a=function(s,c){for(var l="",u=0;u<s.length;u+=1)l+=s[u],u+1<s.length&&(l+=c);return l};return fc=function(c){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(e+l);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var y=l.apply(this,o(u,arguments));return Object(y)===y?y:this}return l.apply(c,o(u,arguments))},f=n(0,l.length-u.length),h=[],g=0;g<f;g++)h[g]="$"+g;if(d=Function("binder","return function ("+a(h,",")+"){ return binder.apply(this,arguments); }")(p),l.prototype){var m=function(){};m.prototype=l.prototype,d.prototype=new m,m.prototype=null}return d},fc}var pc,Sm;function el(){if(Sm)return pc;Sm=1;var e=JS();return pc=Function.prototype.bind||e,pc}var mc,Tm;function Hd(){return Tm||(Tm=1,mc=Function.prototype.call),mc}var hc,Em;function Zy(){return Em||(Em=1,hc=Function.prototype.apply),hc}var gc,Cm;function eT(){return Cm||(Cm=1,gc=typeof Reflect<"u"&&Reflect&&Reflect.apply),gc}var vc,km;function tT(){if(km)return vc;km=1;var e=el(),t=Zy(),n=Hd(),r=eT();return vc=r||e.call(n,t),vc}var yc,Rm;function Xy(){if(Rm)return yc;Rm=1;var e=el(),t=ti(),n=Hd(),r=tT();return yc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},yc}var xc,Pm;function nT(){if(Pm)return xc;Pm=1;var e=Xy(),t=Ky(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return xc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,xc}var bc,Am;function rT(){if(Am)return bc;Am=1;var e=Yy(),t=Gy(),n=nT();return bc=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,bc}var wc,Im;function oT(){if(Im)return wc;Im=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=el();return wc=n.call(e,t),wc}var Sc,_m;function Wd(){if(_m)return Sc;_m=1;var e,t=Uy(),n=jS(),r=NS(),o=FS(),i=LS(),a=VS(),s=ti(),c=$S(),l=zS(),u=BS(),d=HS(),p=WS(),f=qS(),h=US(),g=YS(),m=Function,y=function(z){try{return m('"use strict"; return ('+z+").constructor;")()}catch{}},v=Ky(),b=ZS(),T=function(){throw new s},w=v?function(){try{return arguments.callee,T}catch{try{return v(arguments,"callee").get}catch{return T}}}():T,S=QS()(),C=rT(),k=Gy(),I=Yy(),A=Zy(),O=Hd(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":S&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":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%":S&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&C?C(""[Symbol.iterator]()):e,"%Symbol%":S?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":V,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":A,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":l,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch(z){var D=C(C(z));P["%Error.prototype%"]=D}var _=function z(K){var ie;if(K==="%AsyncFunction%")ie=y("async function () {}");else if(K==="%GeneratorFunction%")ie=y("function* () {}");else if(K==="%AsyncGeneratorFunction%")ie=y("async function* () {}");else if(K==="%AsyncGenerator%"){var H=z("%AsyncGeneratorFunction%");H&&(ie=H.prototype)}else if(K==="%AsyncIteratorPrototype%"){var ye=z("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return P[K]=ie,ie},F={__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"]},j=el(),B=oT(),M=j.call(O,Array.prototype.concat),$=j.call(A,Array.prototype.splice),J=j.call(O,String.prototype.replace),X=j.call(O,String.prototype.slice),Q=j.call(O,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,G=function(K){var ie=X(K,0,1),H=X(K,-1);if(ie==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return J(K,Z,function(Te,Re,$e,se){ye[ye.length]=$e?J(se,Y,"$1"):Re||Te}),ye},L=function(K,ie){var H=K,ye;if(B(F,H)&&(ye=F[H],H="%"+ye[0]+"%"),B(P,H)){var Te=P[H];if(Te===N&&(Te=_(H)),typeof Te>"u"&&!ie)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:ye,name:H,value:Te}}throw new a("intrinsic "+K+" does not exist!")};return Sc=function(K,ie){if(typeof K!="string"||K.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(Q(/^%?[^%]*%?$/,K)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=G(K),ye=H.length>0?H[0]:"",Te=L("%"+ye+"%",ie),Re=Te.name,$e=Te.value,se=!1,xe=Te.alias;xe&&(ye=xe[0],$(H,M([0,1],xe)));for(var le=1,be=!0;le<H.length;le+=1){var oe=H[le],ue=X(oe,0,1),ee=X(oe,-1);if((ue==='"'||ue==="'"||ue==="`"||ee==='"'||ee==="'"||ee==="`")&&ue!==ee)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!be)&&(se=!0),ye+="."+oe,Re="%"+ye+"%",B(P,Re))$e=P[Re];else if($e!=null){if(!(oe in $e)){if(!ie)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(v&&le+1>=H.length){var q=v($e,oe);be=!!q,be&&"get"in q&&!("originalValue"in q.get)?$e=q.get:$e=$e[oe]}else be=B($e,oe),$e=$e[oe];be&&!se&&(P[Re]=$e)}}return $e},Sc}var Tc,Om;function Qy(){if(Om)return Tc;Om=1;var e=Wd(),t=Xy(),n=t([e("%String.prototype.indexOf%")]);return Tc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},Tc}var Ec,Mm;function Jy(){if(Mm)return Ec;Mm=1;var e=Wd(),t=Qy(),n=Js(),r=ti(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),c=t("Map.prototype.delete",!0),l=t("Map.prototype.size",!0);return Ec=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var h=c(d,f);return l(d)===0&&(d=void 0),h}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,h){d||(d=new o),a(d,f,h)}};return p},Ec}var Cc,Dm;function iT(){if(Dm)return Cc;Dm=1;var e=Wd(),t=Qy(),n=Js(),r=Jy(),o=ti(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),l=t("WeakMap.prototype.delete",!0);return Cc=i?function(){var d,p,f={assert:function(h){if(!f.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return l(d,h)}else if(r&&p)return p.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?a(d,h):p&&p.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?c(d,h):!!p&&p.has(h)},set:function(h,g){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),s(d,h,g)):r&&(p||(p=r()),p.set(h,g))}};return f}:r,Cc}var kc,jm;function aT(){if(jm)return kc;jm=1;var e=ti(),t=Js(),n=DS(),r=Jy(),o=iT(),i=o||r||n;return kc=function(){var s,c={assert:function(l){if(!c.has(l))throw new e("Side channel does not contain "+t(l))},delete:function(l){return!!s&&s.delete(l)},get:function(l){return s&&s.get(l)},has:function(l){return!!s&&s.has(l)},set:function(l,u){s||(s=i()),s.set(l,u)}};return c},kc}var Nm=e=>Array.isArray(e),Rc=e=>e===void 0,Pc=e=>e===null,sT=Function.bind.call(Function.call,Object.prototype.toString),lT=e=>!!e&&sT(e)==="[object Error]"||e instanceof Error,ex=(e,t)=>e instanceof t,cT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},uT=e=>Object.prototype.toString.call(e)==="[object Date]"&&ex(e,Date),Ve={array:Nm,date:uT,empty:e=>Pc(e)||Rc(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:ex,isError:lT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Pc(e)||Rc(e),null:Pc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Nm(e)&&typeof e=="object",primitive:cT,string:e=>typeof e=="string",undefined:Rc},dT=e=>Object.keys(e),Ir=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},fT=e=>e.replace(/[^0-9]/g,"");const qd="-",pT=e=>{const t=hT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(qd);return s[0]===""&&s.length!==1&&s.shift(),tx(s,t)||mT(a)},getConflictingClassGroupIds:(a,s)=>{const c=n[a]||[];return s&&r[a]?[...c,...r[a]]:c}}},tx=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?tx(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(qd);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Fm=/^\[(.+)\]$/,mT=e=>{if(Fm.test(e)){const t=Fm.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},hT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ou(n[o],r,o,t);return r},Ou=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Lm(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(gT(o)){Ou(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Ou(a,Lm(t,i),n,r)})})},Lm=(e,t)=>{let n=e;return t.split(qd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},gT=e=>e.isThemeGetter,vT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Mu="!",Du=":",yT=Du.length,xT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,c=0,l;for(let h=0;h<o.length;h++){let g=o[h];if(a===0&&s===0){if(g===Du){i.push(o.slice(c,h)),c=h+yT;continue}if(g==="/"){l=h;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(c),d=bT(u),p=d!==u,f=l&&l>c?l-c:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Du,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},bT=e=>e.endsWith(Mu)?e.substring(0,e.length-1):e.startsWith(Mu)?e.substring(1):e,wT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},ST=e=>({cache:vT(e.cacheSize),parseClassName:xT(e),sortModifiers:wT(e),...pT(e)}),TT=/\s+/,ET=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(TT);let c="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}=n(u);if(d){c=u+(c.length>0?" "+c:c);continue}let m=!!g,y=r(m?h.substring(0,g):h);if(!y){if(!m){c=u+(c.length>0?" "+c:c);continue}if(y=r(h),!y){c=u+(c.length>0?" "+c:c);continue}m=!1}const v=i(p).join(":"),b=f?v+Mu:v,T=b+y;if(a.includes(T))continue;a.push(T);const w=o(y,m);for(let S=0;S<w.length;++S){const C=w[S];a.push(b+C)}c=u+(c.length>0?" "+c:c)}return c};function CT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=nx(t))&&(r&&(r+=" "),r+=n);return r}const nx=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=nx(e[r]))&&(n&&(n+=" "),n+=t);return n};function kT(e,...t){let n,r,o,i=a;function a(c){const l=t.reduce((u,d)=>d(u),e());return n=ST(l),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const l=r(c);if(l)return l;const u=ET(c,n);return o(c,u),u}return function(){return i(CT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},rx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ox=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RT=/^\d+\/\d+$/,PT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,IT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_T=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,po=e=>RT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),_r=e=>!!e&&Number.isInteger(Number(e)),Vm=e=>e.endsWith("%")&&Le(e.slice(0,-1)),or=e=>PT.test(e),MT=()=>!0,DT=e=>AT.test(e)&&!IT.test(e),Ud=()=>!1,jT=e=>_T.test(e),NT=e=>OT.test(e),FT=e=>!he(e)&&!ge(e),LT=e=>ni(e,sx,Ud),he=e=>rx.test(e),Or=e=>ni(e,lx,DT),Ac=e=>ni(e,GT,Le),VT=e=>ni(e,ix,Ud),$T=e=>ni(e,ax,NT),zT=e=>ni(e,Ud,jT),ge=e=>ox.test(e),Oa=e=>ri(e,lx),BT=e=>ri(e,ZT),HT=e=>ri(e,ix),WT=e=>ri(e,sx),qT=e=>ri(e,ax),UT=e=>ri(e,XT,!0),ni=(e,t,n)=>{const r=rx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ri=(e,t,n=!1)=>{const r=ox.exec(e);return r?r[1]?t(r[1]):n:!1},ix=e=>e==="position",KT=new Set(["image","url"]),ax=e=>KT.has(e),YT=new Set(["length","size","percentage"]),sx=e=>YT.has(e),lx=e=>e==="length",GT=e=>e==="number",ZT=e=>e==="family-name",XT=e=>e==="shadow",QT=()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),c=It("spacing"),l=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),h=It("perspective"),g=It("aspect"),m=It("ease"),y=It("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[ge,he,c],C=()=>[po,"full","auto",...S()],k=()=>[_r,"none","subgrid",ge,he],I=()=>["auto",{span:["full",_r,ge,he]},ge,he],A=()=>[_r,"auto",ge,he],O=()=>["auto","min","max","fr",ge,he],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],P=()=>["auto",...S()],D=()=>[po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],_=()=>[e,ge,he],F=()=>[Vm,Or],j=()=>["","none","full",l,ge,he],B=()=>["",Le,Oa,Or],M=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["","none",f,ge,he],X=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,he],Q=()=>["none",Le,ge,he],Z=()=>["none",Le,ge,he],Y=()=>[Le,ge,he],G=()=>[po,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[or],breakpoint:[or],color:[MT],container:[or],"drop-shadow":[or],ease:["in","out","in-out"],font:[FT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[or],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[or],shadow:[or],spacing:["px",Le],text:[or],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",po,he,ge,g]}],container:["container"],columns:[{columns:[Le,he,ge,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...b(),he,ge]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[_r,"auto",ge,he]}],basis:[{basis:[po,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,po,"auto","initial","none",he]}],grow:[{grow:["",Le,ge,he]}],shrink:[{shrink:["",Le,ge,he]}],order:[{order:[_r,"first","last","none",ge,he]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[s,"screen",...D()]}],"min-w":[{"min-w":[s,"screen","none",...D()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen",...D()]}],"min-h":[{"min-h":["screen","none",...D()]}],"max-h":[{"max-h":["screen",...D()]}],"font-size":[{text:["base",n,Oa,Or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vm,he]}],"font-family":[{font:[BT,he,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,he]}],"line-clamp":[{"line-clamp":[Le,"none",ge,Ac]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",ge,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ge,Or]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Le,"auto",ge,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),HT,VT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",WT,LT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_r,ge,he],radial:["",ge,he],conic:[_r,ge,he]},qT,$T]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ge,he]}],"outline-w":[{outline:["",Le,Oa,Or]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,UT,zT]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",ge,he,d]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Le,Or]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":_()}],opacity:[{opacity:[Le,ge,he]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none",ge,he]}],blur:[{blur:J()}],brightness:[{brightness:[Le,ge,he]}],contrast:[{contrast:[Le,ge,he]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,he]}],grayscale:[{grayscale:["",Le,ge,he]}],"hue-rotate":[{"hue-rotate":[Le,ge,he]}],invert:[{invert:["",Le,ge,he]}],saturate:[{saturate:[Le,ge,he]}],sepia:[{sepia:["",Le,ge,he]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,he]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ge,he]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ge,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ge,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ge,he]}],"backdrop-invert":[{"backdrop-invert":["",Le,ge,he]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ge,he]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ge,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ge,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ge,he]}],ease:[{ease:["linear","initial",m,ge,he]}],delay:[{delay:[Le,ge,he]}],animate:[{animate:["none",y,ge,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ge,he]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ge,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,he]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,he]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Le,Oa,Or,Ac]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},JT=kT(QT),qn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},eE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Kd=e=>Ve.function(e),Ie=(...e)=>JT(Wy(e)),cx=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},ga=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},ux=e=>e.scrollHeight>e.clientHeight,Ki=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},tE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},nE="span",cn=E.forwardRef(function(t,n){const r=t.as||nE;return x.jsx(r,{ref:n,...t,as:void 0})}),rE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},oE=ei("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:rE,defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Mo=E.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...c},l){const u=r||c.disabled;return x.jsxs(cn,{...c,ref:l,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:c.as??"button","aria-busy":u||r,onClick:u?void 0:c.onClick,className:Ie(oE({size:a,rounded:s,theme:o}),t),children:[n,c.children]})}),Ur=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function iE(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const aE=({children:e,...t})=>{const n=Ur(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:iE(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(c=>{var u;const l=c[0];return l.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>l.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},sE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},lE=ei("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),cE=ei("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:sE,defaultVariants:{theme:"primary",size:"default"}}),Yd=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},c){return x.jsxs(cn,{...s,ref:c,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Ie(cE({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:lE({theme:n})}):null,r,s.children]})}),Yi=E.createContext({});function wn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Gd=typeof window<"u",tl=Gd?E.useLayoutEffect:E.useEffect,nl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class uE extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function dE({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(Do);return E.useInsertionEffect(()=>{const{width:s,height:c,top:l,left:u,right:d}=i.current;if(t||!o.current||!s||!c)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
4
+ `+U.prev}function tr(W,U){var ze=G(W),et=[];if(ze){et.length=W.length;for(var at=0;at<W.length;at++)et[at]=se(W,at)?U(W[at],W):""}var Me=typeof N=="function"?N(W):[],nr;if(P){nr={};for(var Ar=0;Ar<Me.length;Ar++)nr["$"+Me[Ar]]=Me[Ar]}for(var Zt in W)se(W,Zt)&&(ze&&String(Number(Zt))===Zt&&Zt<W.length||P&&nr["$"+Zt]instanceof Symbol||(T.call(/[^\w$]/,Zt)?et.push(U(Zt,W)+": "+U(W[Zt],W)):et.push(Zt+": "+U(W[Zt],W))));if(typeof N=="function")for(var rr=0;rr<Me.length;rr++)_.call(W,Me[rr])&&et.push("["+U(Me[rr])+"]: "+U(W[Me[rr]],W));return et}return Bl}var Hl,Qp;function DS(){if(Qp)return Hl;Qp=1;var e=Js(),t=ti(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return Hl=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,p=a(l,u);return p&&d&&d===p&&(l=void 0),!!p},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Hl}var Wl,Jp;function Uy(){return Jp||(Jp=1,Wl=Object),Wl}var ql,em;function jS(){return em||(em=1,ql=Error),ql}var Ul,tm;function NS(){return tm||(tm=1,Ul=EvalError),Ul}var Kl,nm;function FS(){return nm||(nm=1,Kl=RangeError),Kl}var Yl,rm;function LS(){return rm||(rm=1,Yl=ReferenceError),Yl}var Gl,om;function VS(){return om||(om=1,Gl=SyntaxError),Gl}var Zl,im;function $S(){return im||(im=1,Zl=URIError),Zl}var Xl,am;function zS(){return am||(am=1,Xl=Math.abs),Xl}var Ql,sm;function BS(){return sm||(sm=1,Ql=Math.floor),Ql}var Jl,lm;function HS(){return lm||(lm=1,Jl=Math.max),Jl}var ec,cm;function WS(){return cm||(cm=1,ec=Math.min),ec}var tc,um;function qS(){return um||(um=1,tc=Math.pow),tc}var nc,dm;function US(){return dm||(dm=1,nc=Math.round),nc}var rc,fm;function KS(){return fm||(fm=1,rc=Number.isNaN||function(t){return t!==t}),rc}var oc,pm;function YS(){if(pm)return oc;pm=1;var e=KS();return oc=function(n){return e(n)||n===0?n:n<0?-1:1},oc}var ic,mm;function GS(){return mm||(mm=1,ic=Object.getOwnPropertyDescriptor),ic}var ac,hm;function Ky(){if(hm)return ac;hm=1;var e=GS();if(e)try{e([],"length")}catch{e=null}return ac=e,ac}var sc,gm;function ZS(){if(gm)return sc;gm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return sc=e,sc}var lc,vm;function XS(){return vm||(vm=1,lc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),lc}var cc,ym;function QS(){if(ym)return cc;ym=1;var e=typeof Symbol<"u"&&Symbol,t=XS();return cc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},cc}var uc,xm;function Yy(){return xm||(xm=1,uc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),uc}var dc,bm;function Gy(){if(bm)return dc;bm=1;var e=Uy();return dc=e.getPrototypeOf||null,dc}var fc,wm;function JS(){if(wm)return fc;wm=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var p=0;p<c.length;p+=1)u[p+l.length]=c[p];return u},i=function(l,c){for(var u=[],d=c,p=0;d<l.length;d+=1,p+=1)u[p]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return fc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,p=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},f=n(0,c.length-u.length),h=[],g=0;g<f;g++)h[g]="$"+g;if(d=Function("binder","return function ("+a(h,",")+"){ return binder.apply(this,arguments); }")(p),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},fc}var pc,Sm;function el(){if(Sm)return pc;Sm=1;var e=JS();return pc=Function.prototype.bind||e,pc}var mc,Tm;function Hd(){return Tm||(Tm=1,mc=Function.prototype.call),mc}var hc,Em;function Zy(){return Em||(Em=1,hc=Function.prototype.apply),hc}var gc,Cm;function eT(){return Cm||(Cm=1,gc=typeof Reflect<"u"&&Reflect&&Reflect.apply),gc}var vc,km;function tT(){if(km)return vc;km=1;var e=el(),t=Zy(),n=Hd(),r=eT();return vc=r||e.call(n,t),vc}var yc,Rm;function Xy(){if(Rm)return yc;Rm=1;var e=el(),t=ti(),n=Hd(),r=tT();return yc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},yc}var xc,Pm;function nT(){if(Pm)return xc;Pm=1;var e=Xy(),t=Ky(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return xc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,xc}var bc,Am;function rT(){if(Am)return bc;Am=1;var e=Yy(),t=Gy(),n=nT();return bc=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,bc}var wc,Im;function oT(){if(Im)return wc;Im=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=el();return wc=n.call(e,t),wc}var Sc,_m;function Wd(){if(_m)return Sc;_m=1;var e,t=Uy(),n=jS(),r=NS(),o=FS(),i=LS(),a=VS(),s=ti(),l=$S(),c=zS(),u=BS(),d=HS(),p=WS(),f=qS(),h=US(),g=YS(),m=Function,y=function($){try{return m('"use strict"; return ('+$+").constructor;")()}catch{}},v=Ky(),b=ZS(),S=function(){throw new s},w=v?function(){try{return arguments.callee,S}catch{try{return v(arguments,"callee").get}catch{return S}}}():S,T=QS()(),C=rT(),k=Gy(),I=Yy(),A=Zy(),O=Hd(),N={},V=typeof Uint8Array>"u"||!C?e:C(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":T&&C?C([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":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%":T&&C?C(C([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!C?e:C(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!C?e:C(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&C?C(""[Symbol.iterator]()):e,"%Symbol%":T?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":w,"%TypedArray%":V,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":A,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":g,"%Reflect.getPrototypeOf%":I};if(C)try{null.error}catch($){var D=C(C($));P["%Error.prototype%"]=D}var _=function $(K){var ie;if(K==="%AsyncFunction%")ie=y("async function () {}");else if(K==="%GeneratorFunction%")ie=y("function* () {}");else if(K==="%AsyncGeneratorFunction%")ie=y("async function* () {}");else if(K==="%AsyncGenerator%"){var H=$("%AsyncGeneratorFunction%");H&&(ie=H.prototype)}else if(K==="%AsyncIteratorPrototype%"){var ye=$("%AsyncGenerator%");ye&&C&&(ie=C(ye.prototype))}return P[K]=ie,ie},F={__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"]},j=el(),B=oT(),M=j.call(O,Array.prototype.concat),z=j.call(A,Array.prototype.splice),Q=j.call(O,String.prototype.replace),X=j.call(O,String.prototype.slice),J=j.call(O,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,G=function(K){var ie=X(K,0,1),H=X(K,-1);if(ie==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&ie!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ye=[];return Q(K,Z,function(Te,Re,$e,se){ye[ye.length]=$e?Q(se,Y,"$1"):Re||Te}),ye},L=function(K,ie){var H=K,ye;if(B(F,H)&&(ye=F[H],H="%"+ye[0]+"%"),B(P,H)){var Te=P[H];if(Te===N&&(Te=_(H)),typeof Te>"u"&&!ie)throw new s("intrinsic "+K+" exists, but is not available. Please file an issue!");return{alias:ye,name:H,value:Te}}throw new a("intrinsic "+K+" does not exist!")};return Sc=function(K,ie){if(typeof K!="string"||K.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,K)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=G(K),ye=H.length>0?H[0]:"",Te=L("%"+ye+"%",ie),Re=Te.name,$e=Te.value,se=!1,xe=Te.alias;xe&&(ye=xe[0],z(H,M([0,1],xe)));for(var le=1,be=!0;le<H.length;le+=1){var oe=H[le],ue=X(oe,0,1),ee=X(oe,-1);if((ue==='"'||ue==="'"||ue==="`"||ee==='"'||ee==="'"||ee==="`")&&ue!==ee)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!be)&&(se=!0),ye+="."+oe,Re="%"+ye+"%",B(P,Re))$e=P[Re];else if($e!=null){if(!(oe in $e)){if(!ie)throw new s("base intrinsic for "+K+" exists, but the property is not available.");return}if(v&&le+1>=H.length){var q=v($e,oe);be=!!q,be&&"get"in q&&!("originalValue"in q.get)?$e=q.get:$e=$e[oe]}else be=B($e,oe),$e=$e[oe];be&&!se&&(P[Re]=$e)}}return $e},Sc}var Tc,Om;function Qy(){if(Om)return Tc;Om=1;var e=Wd(),t=Xy(),n=t([e("%String.prototype.indexOf%")]);return Tc=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},Tc}var Ec,Mm;function Jy(){if(Mm)return Ec;Mm=1;var e=Wd(),t=Qy(),n=Js(),r=ti(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return Ec=!!o&&function(){var d,p={assert:function(f){if(!p.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(d){var h=l(d,f);return c(d)===0&&(d=void 0),h}return!1},get:function(f){if(d)return i(d,f)},has:function(f){return d?s(d,f):!1},set:function(f,h){d||(d=new o),a(d,f,h)}};return p},Ec}var Cc,Dm;function iT(){if(Dm)return Cc;Dm=1;var e=Wd(),t=Qy(),n=Js(),r=Jy(),o=ti(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return Cc=i?function(){var d,p,f={assert:function(h){if(!f.has(h))throw new o("Side channel does not contain "+n(h))},delete:function(h){if(i&&h&&(typeof h=="object"||typeof h=="function")){if(d)return c(d,h)}else if(r&&p)return p.delete(h);return!1},get:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?a(d,h):p&&p.get(h)},has:function(h){return i&&h&&(typeof h=="object"||typeof h=="function")&&d?l(d,h):!!p&&p.has(h)},set:function(h,g){i&&h&&(typeof h=="object"||typeof h=="function")?(d||(d=new i),s(d,h,g)):r&&(p||(p=r()),p.set(h,g))}};return f}:r,Cc}var kc,jm;function aT(){if(jm)return kc;jm=1;var e=ti(),t=Js(),n=DS(),r=Jy(),o=iT(),i=o||r||n;return kc=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},kc}var Nm=e=>Array.isArray(e),Rc=e=>e===void 0,Pc=e=>e===null,sT=Function.bind.call(Function.call,Object.prototype.toString),lT=e=>!!e&&sT(e)==="[object Error]"||e instanceof Error,ex=(e,t)=>e instanceof t,cT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},uT=e=>Object.prototype.toString.call(e)==="[object Date]"&&ex(e,Date),Ve={array:Nm,date:uT,empty:e=>Pc(e)||Rc(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:ex,isError:lT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Pc(e)||Rc(e),null:Pc,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Nm(e)&&typeof e=="object",primitive:cT,string:e=>typeof e=="string",undefined:Rc},dT=e=>Object.keys(e),Ir=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},fT=e=>e.replace(/[^0-9]/g,"");const qd="-",pT=e=>{const t=hT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(qd);return s[0]===""&&s.length!==1&&s.shift(),tx(s,t)||mT(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},tx=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?tx(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(qd);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Fm=/^\[(.+)\]$/,mT=e=>{if(Fm.test(e)){const t=Fm.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},hT=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ou(n[o],r,o,t);return r},Ou=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Lm(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(gT(o)){Ou(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Ou(a,Lm(t,i),n,r)})})},Lm=(e,t)=>{let n=e;return t.split(qd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},gT=e=>e.isThemeGetter,vT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Mu="!",Du=":",yT=Du.length,xT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;for(let h=0;h<o.length;h++){let g=o[h];if(a===0&&s===0){if(g===Du){i.push(o.slice(l,h)),l=h+yT;continue}if(g==="/"){c=h;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const u=i.length===0?o:o.substring(l),d=bT(u),p=d!==u,f=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const o=t+Du,i=r;r=a=>a.startsWith(o)?i(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},bT=e=>e.endsWith(Mu)?e.substring(0,e.length-1):e.startsWith(Mu)?e.substring(1):e,wT=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...i.sort(),a),i=[]):i.push(a)}),o.push(...i.sort()),o}},ST=e=>({cache:vT(e.cacheSize),parseClassName:xT(e),sortModifiers:wT(e),...pT(e)}),TT=/\s+/,ET=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(TT);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?h.substring(0,g):h);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(h),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const v=i(p).join(":"),b=f?v+Mu:v,S=b+y;if(a.includes(S))continue;a.push(S);const w=o(y,m);for(let T=0;T<w.length;++T){const C=w[T];a.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};function CT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=nx(t))&&(r&&(r+=" "),r+=n);return r}const nx=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=nx(e[r]))&&(n&&(n+=" "),n+=t);return n};function kT(e,...t){let n,r,o,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=ST(c),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=ET(l,n);return o(l,u),u}return function(){return i(CT.apply(null,arguments))}}const It=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},rx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ox=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RT=/^\d+\/\d+$/,PT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,IT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_T=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,po=e=>RT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),_r=e=>!!e&&Number.isInteger(Number(e)),Vm=e=>e.endsWith("%")&&Le(e.slice(0,-1)),or=e=>PT.test(e),MT=()=>!0,DT=e=>AT.test(e)&&!IT.test(e),Ud=()=>!1,jT=e=>_T.test(e),NT=e=>OT.test(e),FT=e=>!he(e)&&!ge(e),LT=e=>ni(e,sx,Ud),he=e=>rx.test(e),Or=e=>ni(e,lx,DT),Ac=e=>ni(e,GT,Le),VT=e=>ni(e,ix,Ud),$T=e=>ni(e,ax,NT),zT=e=>ni(e,Ud,jT),ge=e=>ox.test(e),Oa=e=>ri(e,lx),BT=e=>ri(e,ZT),HT=e=>ri(e,ix),WT=e=>ri(e,sx),qT=e=>ri(e,ax),UT=e=>ri(e,XT,!0),ni=(e,t,n)=>{const r=rx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ri=(e,t,n=!1)=>{const r=ox.exec(e);return r?r[1]?t(r[1]):n:!1},ix=e=>e==="position",KT=new Set(["image","url"]),ax=e=>KT.has(e),YT=new Set(["length","size","percentage"]),sx=e=>YT.has(e),lx=e=>e==="length",GT=e=>e==="number",ZT=e=>e==="family-name",XT=e=>e==="shadow",QT=()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),a=It("breakpoint"),s=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),d=It("inset-shadow"),p=It("drop-shadow"),f=It("blur"),h=It("perspective"),g=It("aspect"),m=It("ease"),y=It("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],T=()=>[ge,he,l],C=()=>[po,"full","auto",...T()],k=()=>[_r,"none","subgrid",ge,he],I=()=>["auto",{span:["full",_r,ge,he]},ge,he],A=()=>[_r,"auto",ge,he],O=()=>["auto","min","max","fr",ge,he],N=()=>["start","end","center","between","around","evenly","stretch","baseline"],V=()=>["start","end","center","stretch"],P=()=>["auto",...T()],D=()=>[po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],_=()=>[e,ge,he],F=()=>[Vm,Or],j=()=>["","none","full",c,ge,he],B=()=>["",Le,Oa,Or],M=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["","none",f,ge,he],X=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge,he],J=()=>["none",Le,ge,he],Z=()=>["none",Le,ge,he],Y=()=>[Le,ge,he],G=()=>[po,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[or],breakpoint:[or],color:[MT],container:[or],"drop-shadow":[or],ease:["in","out","in-out"],font:[FT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[or],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[or],shadow:[or],spacing:["px",Le],text:[or],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",po,he,ge,g]}],container:["container"],columns:[{columns:[Le,he,ge,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...b(),he,ge]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[_r,"auto",ge,he]}],basis:[{basis:[po,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,po,"auto","initial","none",he]}],grow:[{grow:["",Le,ge,he]}],shrink:[{shrink:["",Le,ge,he]}],order:[{order:[_r,"first","last","none",ge,he]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),"baseline"]}],"align-self":[{self:["auto",...V(),"baseline"]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[s,"screen",...D()]}],"min-w":[{"min-w":[s,"screen","none",...D()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen",...D()]}],"min-h":[{"min-h":["screen","none",...D()]}],"max-h":[{"max-h":["screen",...D()]}],"font-size":[{text:["base",n,Oa,Or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ge,Ac]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vm,he]}],"font-family":[{font:[BT,he,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,he]}],"line-clamp":[{"line-clamp":[Le,"none",ge,Ac]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ge,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ge,Or]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Le,"auto",ge,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b(),HT,VT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",WT,LT]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_r,ge,he],radial:["",ge,he],conic:[_r,ge,he]},qT,$T]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ge,he]}],"outline-w":[{outline:["",Le,Oa,Or]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,UT,zT]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",ge,he,d]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Le,Or]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":_()}],opacity:[{opacity:[Le,ge,he]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none",ge,he]}],blur:[{blur:Q()}],brightness:[{brightness:[Le,ge,he]}],contrast:[{contrast:[Le,ge,he]}],"drop-shadow":[{"drop-shadow":["","none",p,ge,he]}],grayscale:[{grayscale:["",Le,ge,he]}],"hue-rotate":[{"hue-rotate":[Le,ge,he]}],invert:[{invert:["",Le,ge,he]}],saturate:[{saturate:[Le,ge,he]}],sepia:[{sepia:["",Le,ge,he]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,he]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ge,he]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ge,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ge,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ge,he]}],"backdrop-invert":[{"backdrop-invert":["",Le,ge,he]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ge,he]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ge,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ge,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ge,he]}],ease:[{ease:["linear","initial",m,ge,he]}],delay:[{delay:[Le,ge,he]}],animate:[{animate:["none",y,ge,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ge,he]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[ge,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,he]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Le,Oa,Or,Ac]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},JT=kT(QT),qn=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},eE=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Kd=e=>Ve.function(e),Ie=(...e)=>JT(Wy(e)),cx=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},ga=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},ux=e=>e.scrollHeight>e.clientHeight,Ki=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},tE=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},nE="span",cn=E.forwardRef(function(t,n){const r=t.as||nE;return x.jsx(r,{ref:n,...t,as:void 0})}),rE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},oE=ei("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:rE,defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Mo=E.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return x.jsxs(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:Ie(oE({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),Ur=e=>{const t=E.useRef(e);return E.useEffect(()=>{t.current=e},[e]),t};function iE(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const aE=({children:e,...t})=>{const n=Ur(t.onIntersection),r=E.useRef(null),[o,i]=E.useState(()=>r.current===null?!1:iE(r.current));return E.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),i(d=>c.isIntersecting?!0:d)});return s.observe(a),()=>s.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},sE={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},lE=ei("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),cE=ei("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:sE,defaultVariants:{theme:"primary",size:"default"}}),Yd=E.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return x.jsxs(cn,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Ie(cE({size:a,theme:i}),t),children:[n?x.jsx("span",{"aria-hidden":"true",className:lE({theme:n})}):null,r,s.children]})}),Yi=E.createContext({});function wn(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Gd=typeof window<"u",tl=Gd?E.useLayoutEffect:E.useEffect,nl=E.createContext(null),Do=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class uE extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function dE({children:e,isPresent:t,anchorX:n}){const r=E.useId(),o=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(Do);return E.useInsertionEffect(()=>{const{width:s,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!s||!l)return;const p=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
5
5
  [data-motion-pop-id="${r}"] {
6
6
  position: absolute !important;
7
7
  width: ${s}px !important;
8
- height: ${c}px !important;
8
+ height: ${l}px !important;
9
9
  ${p}px !important;
10
- top: ${l}px !important;
10
+ top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(f)}},[t]),x.jsx(uE,{isPresent:t,childRef:o,sizeRef:i,children:R.cloneElement(e,{ref:o})})}const fE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const c=wn(pE),l=E.useId(),u=E.useCallback(p=>{c.set(p,!0);for(const f of c.values())if(!f)return;r&&r()},[c,r]),d=E.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(c.set(p,!1),()=>c.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{c.forEach((p,f)=>c.set(f,!1))},[n]),R.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),a==="popLayout"&&(e=x.jsx(dE,{isPresent:n,anchorX:s,children:e})),x.jsx(nl.Provider,{value:d,children:e})};function pE(){return new Map}function dx(e=!0){const t=E.useContext(nl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Ma=e=>e.key||"";function $m(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const xr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[c,l]=dx(a),u=E.useMemo(()=>$m(e),[e]),d=a&&!c?[]:u.map(Ma),p=E.useRef(!0),f=E.useRef(u),h=wn(()=>new Map),[g,m]=E.useState(u),[y,v]=E.useState(u);tl(()=>{p.current=!1,f.current=u;for(let w=0;w<y.length;w++){const S=Ma(y[w]);d.includes(S)?h.delete(S):h.get(S)!==!0&&h.set(S,!1)}},[y,d.length,d.join("-")]);const b=[];if(u!==g){let w=[...u];for(let S=0;S<y.length;S++){const C=y[S],k=Ma(C);d.includes(k)||(w.splice(S,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),v($m(w)),m(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=E.useContext(Yi);return x.jsx(x.Fragment,{children:y.map(w=>{const S=Ma(w),C=a&&!c?!1:u===y||d.includes(S),k=()=>{if(h.has(S))h.set(S,!0);else return;let I=!0;h.forEach(A=>{A||(I=!1)}),I&&(T==null||T(),v(f.current),a&&(l==null||l()),r&&r())};return x.jsx(fE,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:w},S)})})},mE=E.createContext(null),Kt=e=>e;let oi=Kt,dn=Kt;process.env.NODE_ENV!=="production"&&(oi=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const hE={useManualTiming:!1},Da=["read","resolveKeyframes","update","preRender","render","postRender"];function gE(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(u){a.has(u)&&(l.schedule(u),e()),u(s)}const l={schedule:(u,d=!1,p=!1)=>{const h=p&&o?n:r;return d&&a.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,i&&(i=!1,l.process(u))}};return l}const vE=40;function fx(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Da.reduce((y,v)=>(y[v]=gE(i),y),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:p}=a,f=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,vE),1),o.timestamp=y,o.isProcessing=!0,s.process(o),c.process(o),l.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},h=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Da.reduce((y,v)=>{const b=a[v];return y[v]=(T,w=!1,S=!1)=>(n||h(),b.schedule(T,w,S)),y},{}),cancel:y=>{for(let v=0;v<Da.length;v++)a[Da[v]].cancel(y)},state:o,steps:a}}const{schedule:nt,cancel:Un,state:Mt,steps:Ic}=fx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Kt,!0);function yE(){const e=E.useRef(!1);return tl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xE(){const e=yE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>nt.postRender(r),[r]),t]}const bE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function zm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(bE);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 px=e=>e===!0,wE=e=>px(e===!0)||e==="id",SE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Yi),o=E.useContext(mE),[i,a]=xE(),s=E.useRef(null),c=r.id||o;s.current===null&&(wE(n)&&c&&(t=t?c+"-"+t:c),s.current={id:t,group:px(n)&&r.group||zm()});const l=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(Yi.Provider,{value:l,children:e})},mx=E.createContext({strict:!1}),Bm={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"]},jo={};for(const e in Bm)jo[e]={isEnabled:t=>Bm[e].some(n=>!!t[n])};function TE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const EE=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function us(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||EE.has(e)}let hx=e=>!us(e);function gx(e){e&&(hx=t=>t.startsWith("on")?!us(t):e(t))}try{gx(require("@emotion/is-prop-valid").default)}catch{}function CE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(hx(o)||n===!0&&us(o)||!t&&!us(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function kE({children:e,isValidProp:t,...n}){t&&gx(t),n={...E.useContext(Do),...n},n.isStatic=wn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Do.Provider,{value:r,children:e})}const Hm=new Set;function rl(e,t,n){e||Hm.has(t)||(console.warn(t),Hm.add(t))}function RE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const ol=E.createContext({});function il(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gi(e){return typeof e=="string"||Array.isArray(e)}const Zd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xd=["initial",...Zd];function al(e){return il(e.animate)||Xd.some(t=>Gi(e[t]))}function vx(e){return!!(al(e)||e.variants)}function PE(e,t){if(al(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gi(n)?n:void 0,animate:Gi(r)?r:void 0}}return e.inherit!==!1?t:{}}function AE(e){const{initial:t,animate:n}=PE(e,E.useContext(ol));return E.useMemo(()=>({initial:t,animate:n}),[Wm(t),Wm(n)])}function Wm(e){return Array.isArray(e)?e.join(" "):e}const IE=Symbol.for("motionComponentSymbol");function bo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _E(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):bo(n)&&(n.current=r))},[t])}const{schedule:Qd}=fx(queueMicrotask,!1),Jd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OE="framerAppearId",yx="data-"+Jd(OE),xx=E.createContext({});function ME(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(ol),c=E.useContext(mx),l=E.useContext(nl),u=E.useContext(Do).reducedMotion,d=E.useRef(null);r=r||c.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(xx);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&DE(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,l)});const g=n[yx],m=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return tl(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Qd.render(p.render),m.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),m.current=!1))}),p}function DE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bx(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&bo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function bx(e){if(e)return e.options.allowProjection!==!1?e.projection:bx(e.parent)}function jE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&TE(e);function s(l,u){let d;const p={...E.useContext(Do),...l,layoutId:NE(l)},{isStatic:f}=p,h=AE(l),g=r(l,f);if(!f&&Gd){FE(p,e);const m=LE(p);d=m.MeasureLayout,h.visualElement=ME(o,g,p,t,m.ProjectionNode)}return x.jsxs(ol.Provider,{value:h,children:[d&&h.visualElement?x.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,l,_E(g,h.visualElement,u),g,f,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const c=E.forwardRef(s);return c[IE]=o,c}function NE({layoutId:e}){const t=E.useContext(Yi).id;return t&&e!==void 0?t+"-"+e:e}function FE(e,t){const n=E.useContext(mx).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):dn(!1,r)}}function LE(e){const{drag:t,layout:n}=jo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const wx=e=>t=>typeof t=="string"&&t.startsWith(e),ef=wx("--"),VE=wx("var(--"),tf=e=>VE(e)?$E.test(e.split("/*")[0].trim()):!1,$E=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zi={};function zE(e){for(const t in e)Zi[t]=e[t],ef(t)&&(Zi[t].isCSSVariable=!0)}const ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ro=new Set(ii);function Sx(e,{layout:t,layoutId:n}){return ro.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zi[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),Tx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Kn=(e,t,n)=>n>t?t:n<e?e:n,ai={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xi={...ai,transform:e=>Kn(0,1,e)},ja={...ai,default:1},va=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ar=va("deg"),On=va("%"),Se=va("px"),BE=va("vh"),HE=va("vw"),qm={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(e*100)},WE={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},qE={rotate:ar,rotateX:ar,rotateY:ar,rotateZ:ar,scale:ja,scaleX:ja,scaleY:ja,scaleZ:ja,skew:ar,skewX:ar,skewY:ar,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:Xi,originX:qm,originY:qm,originZ:Se},Um={...ai,transform:Math.round},nf={...WE,...qE,zIndex:Um,size:Se,fillOpacity:Xi,strokeOpacity:Xi,numOctaves:Um},UE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},KE=ii.length;function YE(e,t,n){let r="",o=!0;for(let i=0;i<KE;i++){const a=ii[i],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=Tx(s,nf[a]);if(!c){o=!1;const u=UE[a]||a;r+=`${u}(${l}) `}n&&(t[a]=l)}}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 a=!1,s=!1;for(const c in t){const l=t[c];if(ro.has(c)){a=!0;continue}else if(ef(c)){o[c]=l;continue}else{const u=Tx(l,nf[c]);c.startsWith("origin")?(s=!0,i[c]=u):r[c]=u}}if(t.transform||(a||n?r.transform=YE(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:u=0}=i;r.transformOrigin=`${c} ${l} ${u}`}}const of=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ex(e,t,n){for(const r in t)!Pt(t[r])&&!Sx(r,n)&&(e[r]=t[r])}function GE({transformTemplate:e},t){return E.useMemo(()=>{const n=of();return rf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZE(e,t){const n=e.style||{},r={};return Ex(r,n,e),Object.assign(r,GE(e,t)),r}function XE(e,t){const n={},r=ZE(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 QE=["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 af(e){return typeof e!="string"||e.includes("-")?!1:!!(QE.indexOf(e)>-1||/[A-Z]/u.test(e))}const JE={offset:"stroke-dashoffset",array:"stroke-dasharray"},eC={offset:"strokeDashoffset",array:"strokeDasharray"};function tC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?JE:eC;e[i.offset]=Se.transform(-r);const a=Se.transform(t),s=Se.transform(n);e[i.array]=`${a} ${s}`}function Km(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function nC(e,t,n){const r=Km(t,e.x,e.width),o=Km(n,e.y,e.height);return`${r} ${o}`}function sf(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(rf(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=nC(h,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&tC(p,a,s,c,!1)}const Cx=()=>({...of(),attrs:{}}),lf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function rC(e,t,n,r){const o=E.useMemo(()=>{const i=Cx();return sf(i,t,lf(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ex(i,e.style,e),o.style={...i,...o.style}}return o}function oC(e=!1){return(n,r,o,{latestValues:i},a)=>{const c=(af(n)?rC:XE)(r,i,a,n),l=CE(r,typeof n=="string",e),u=n!==E.Fragment?{...l,...c,ref:o}:{},{children:d}=r,p=E.useMemo(()=>Pt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Ym(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function cf(e,t,n,r){if(typeof t=="function"){const[o,i]=Ym(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]=Ym(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const ju=e=>Array.isArray(e),iC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),aC=e=>ju(e)?e[e.length-1]||0:e;function ts(e){const t=Pt(e)?e.get():e;return iC(t)?t.toValue():t}function sC({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:lC(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const kx=e=>(t,n)=>{const r=E.useContext(ol),o=E.useContext(nl),i=()=>sC(e,t,r,o);return n?i():wn(i)};function lC(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=ts(i[p]);let{initial:a,animate:s}=e;const c=al(e),l=vx(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!il(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=cf(e,p[f]);if(h){const{transitionEnd:g,transition:m,...y}=h;for(const v in y){let b=y[v];if(Array.isArray(b)){const T=u?b.length-1:0;b=b[T]}b!==null&&(o[v]=b)}for(const v in g)o[v]=g[v]}}}return o}function uf(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||Sx(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const cC={useVisualState:kx({scrapeMotionValuesFromProps:uf,createRenderState:of})};function Rx(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Px(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Ax=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ix(e,t,n,r){Px(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ax.has(o)?o:Jd(o),t.attrs[o])}function _x(e,t,n){const r=uf(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=ii.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Gm=["x","y","width","height","cx","cy","r"],uC={useVisualState:kx({scrapeMotionValuesFromProps:_x,createRenderState:Cx,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(ro.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Gm.length;s++){const c=Gm[s];e[c]!==t[c]&&(a=!0)}a&&nt.read(()=>{Rx(n,r),nt.render(()=>{sf(r,o,lf(n.tagName),e.transformTemplate),Ix(n,r)})})}})};function dC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...af(r)?uC:cC,preloadedFeatures:e,useRender:oC(o),createVisualElement:t,Component:r};return jE(a)}}function Qi(e,t,n){const r=e.getProps();return cf(r,t,n!==void 0?n:r.custom,e)}function df(e,t){return e?e[t]||e.default||e:void 0}const Ox=new Set(["width","height","top","left","right","bottom",...ii]);function ff(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function fC([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}class pf{constructor(){this.subscriptions=[]}add(t){return ff(this.subscriptions,t),()=>sl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Mx(e,t){return t?e*(1e3/t):0}let ns;function pC(){ns=void 0}const Mn={now:()=>(ns===void 0&&Mn.set(Mt.isProcessing||hE.useManualTiming?Mt.timestamp:performance.now()),ns),set:e=>{ns=e,queueMicrotask(pC)}},Zm=30,mC=e=>!isNaN(parseFloat(e)),Mi={current:void 0};class hC{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Mn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Mn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rl(!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 pf);const r=this.events[t].add(n);return t==="change"?()=>{r(),nt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Mi.current&&Mi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Mn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Zm);return Mx(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function No(e,t){return new hC(e,t)}function gC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function vC(e,t){const n=Qi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=aC(i[a]);gC(e,a,s)}}function yC(e){return!!(Pt(e)&&e.add)}function Nu(e,t){const n=e.getValue("willChange");if(yC(n))return n.add(t)}function Dx(e){return e.props[yx]}function mf(e){let t;return()=>(t===void 0&&(t=e()),t)}const xC=mf(()=>window.ScrollTimeline!==void 0);class bC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(xC()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class jx extends bC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const xn=e=>e*1e3,Dn=e=>e/1e3;function ll(e){return typeof e=="function"}function Xm(e,t){e.timeline=t,e.onfinish=null}const hf=e=>Array.isArray(e)&&typeof e[0]=="number",wC={linearEasing:void 0};function SC(e,t){const n=mf(e);return()=>{var r;return(r=wC[t])!==null&&r!==void 0?r:n()}}const ds=SC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Kr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Nx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Kr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Fx(e){return!!(typeof e=="function"&&ds()||!e||typeof e=="string"&&(e in Fu||ds())||hf(e)||Array.isArray(e)&&e.every(Fx))}const ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ki([0,.65,.55,1]),circOut:ki([.55,0,1,.45]),backIn:ki([.31,.01,.66,-.59]),backOut:ki([.33,1.53,.69,.99])};function Lx(e,t){if(e)return typeof e=="function"&&ds()?Nx(e,t):hf(e)?ki(e):Array.isArray(e)?e.map(n=>Lx(n,t)||Fu.easeOut):Fu[e]}const Vx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,TC=1e-7,EC=12;function CC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Vx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>TC&&++s<EC);return a}function ya(e,t,n,r){if(e===t&&n===r)return Kt;const o=i=>CC(i,0,1,e,n);return i=>i===0||i===1?i:Vx(o(i),t,r)}const $x=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zx=e=>t=>1-e(1-t),Bx=ya(.33,1.53,.69,.99),gf=zx(Bx),Hx=$x(gf),Wx=e=>(e*=2)<1?.5*gf(e):.5*(2-Math.pow(2,-10*(e-1))),vf=e=>1-Math.sin(Math.acos(e)),qx=zx(vf),Ux=$x(vf),Kx=e=>/^0[^.\s]+$/u.test(e);function kC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Kx(e):!0}const Di=e=>Math.round(e*1e5)/1e5,yf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function RC(e){return e==null}const PC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xf=(e,t)=>n=>!!(typeof n=="string"&&PC.test(n)&&n.startsWith(e)||t&&!RC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(yf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},AC=e=>Kn(0,255,e),_c={...ai,transform:e=>Math.round(AC(e))},zr={test:xf("rgb","red"),parse:Yx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_c.transform(e)+", "+_c.transform(t)+", "+_c.transform(n)+", "+Di(Xi.transform(r))+")"};function IC(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Lu={test:xf("#"),parse:IC,transform:zr.transform},wo={test:xf("hsl","hue"),parse:Yx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+On.transform(Di(t))+", "+On.transform(Di(n))+", "+Di(Xi.transform(r))+")"},Nt={test:e=>zr.test(e)||Lu.test(e)||wo.test(e),parse:e=>zr.test(e)?zr.parse(e):wo.test(e)?wo.parse(e):Lu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?zr.transform(e):wo.transform(e)},_C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function OC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(yf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(_C))===null||n===void 0?void 0:n.length)||0)>0}const Gx="number",Zx="color",MC="var",DC="var(",Qm="${}",jC=/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 Ji(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(jC,c=>(Nt.test(c)?(r.color.push(i),o.push(Zx),n.push(Nt.parse(c))):c.startsWith(DC)?(r.var.push(i),o.push(MC),n.push(c)):(r.number.push(i),o.push(Gx),n.push(parseFloat(c))),++i,Qm)).split(Qm);return{values:n,split:s,indexes:r,types:o}}function Xx(e){return Ji(e).values}function Qx(e){const{split:t,types:n}=Ji(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===Gx?i+=Di(o[a]):s===Zx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const NC=e=>typeof e=="number"?0:e;function FC(e){const t=Xx(e);return Qx(e)(t.map(NC))}const pr={test:OC,parse:Xx,createTransformer:Qx,getAnimatableNone:FC},LC=new Set(["brightness","contrast","saturate","opacity"]);function VC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(yf)||[];if(!r)return e;const o=n.replace(r,"");let i=LC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const $C=/\b([a-z-]*)\(.*?\)/gu,Vu={...pr,getAnimatableNone:e=>{const t=e.match($C);return t?t.map(VC).join(" "):e}},zC={...nf,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Vu,WebkitFilter:Vu},Jx=e=>zC[e];function eb(e,t){let n=Jx(e);return n!==Vu&&(n=pr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const BC=new Set(["auto","none","0"]);function HC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!BC.has(i)&&Ji(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=eb(n,o)}const Br=e=>e*180/Math.PI,$u=e=>{const t=Br(Math.atan2(e[1],e[0]));return zu(t)},WC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:$u,rotateZ:$u,skewX:e=>Br(Math.atan(e[1])),skewY:e=>Br(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zu=e=>(e=e%360,e<0&&(e+=360),e),Jm=$u,eh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),th=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eh,scaleY:th,scale:e=>(eh(e)+th(e))/2,rotateX:e=>zu(Br(Math.atan2(e[6],e[5]))),rotateY:e=>zu(Br(Math.atan2(-e[2],e[0]))),rotateZ:Jm,rotate:Jm,skewX:e=>Br(Math.atan(e[4])),skewY:e=>Br(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function nh(e){return e.includes("scale")?1:0}function Bu(e,t){if(!e||e==="none")return nh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=qC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=WC,o=s}if(!o)return nh(t);const i=r[t],a=o[1].split(",").map(KC);return typeof i=="function"?i(a):a[i]}const UC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Bu(n,t)};function KC(e){return parseFloat(e.trim())}const rh=e=>e===ai||e===Se,YC=new Set(["x","y","z"]),GC=ii.filter(e=>!YC.has(e));function ZC(e){const t=[];return GC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={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})=>Bu(t,"x"),y:(e,{transform:t})=>Bu(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Wr=new Set;let Hu=!1,Wu=!1;function tb(){if(Wu){const e=Array.from(Wr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=ZC(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Wu=!1,Hu=!1,Wr.forEach(e=>e.complete()),Wr.clear()}function nb(){Wr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Wu=!0)})}function XC(){nb(),tb()}class bf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Wr.add(this),Hu||(Hu=!0,nt.read(nb),nt.resolveKeyframes(tb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,s);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Wr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Wr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),QC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function JC(e){const t=QC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const ek=4;function ob(e,t,n=1){dn(n<=ek,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=JC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return rb(a)?parseFloat(a):a}return tf(o)?ob(o,t,n+1):o}const ib=e=>t=>t.test(e),tk={test:e=>e==="auto",parse:e=>e},ab=[ai,Se,On,ar,HE,BE,tk],oh=e=>ab.find(ib(e));class sb extends bf{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 c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),tf(l))){const u=ob(l,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Ox.has(r)||t.length!==2)return;const[o,i]=t,a=oh(o),s=oh(i);if(a!==s)if(rh(a)&&rh(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)kC(t[o])&&r.push(o);r.length&&HC(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=Fo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,l])=>{n.getValue(c).set(l)}),this.resolveNoneKeyframes()}}const ih=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(pr.test(e)||e==="0")&&!e.startsWith("url("));function nk(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 rk(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=ih(o,t),s=ih(i,t);return oi(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:nk(e)||(n==="spring"||ll(n))&&r}const ok=e=>e!==null;function cl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ok),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const ik=40;class lb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Mn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>ik?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&XC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Mn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:c,isGenerator:l}=this.options;if(!l&&!rk(t,r,o,i))if(a)this.options.duration=0;else{c&&c(cl(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const fs=2e4;function wf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<fs;)t+=n,r=e.next(t);return t>=fs?1/0:t}const st=(e,t,n)=>e+(t-e)*n;function Oc(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 ak({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;o=Oc(c,s,e+1/3),i=Oc(c,s,e),a=Oc(c,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function ps(e,t){return n=>n>0?t:e}const Mc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},sk=[Lu,zr,wo],lk=e=>sk.find(t=>t.test(e));function ah(e){const t=lk(e);if(oi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===wo&&(n=ak(n)),n}const sh=(e,t)=>{const n=ah(e),r=ah(t);if(!n||!r)return ps(e,t);const o={...n};return i=>(o.red=Mc(n.red,r.red,i),o.green=Mc(n.green,r.green,i),o.blue=Mc(n.blue,r.blue,i),o.alpha=st(n.alpha,r.alpha,i),zr.transform(o))},ck=(e,t)=>n=>t(e(n)),xa=(...e)=>e.reduce(ck),qu=new Set(["none","hidden"]);function uk(e,t){return qu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dk(e,t){return n=>st(e,t,n)}function Sf(e){return typeof e=="number"?dk:typeof e=="string"?tf(e)?ps:Nt.test(e)?sh:mk:Array.isArray(e)?cb:typeof e=="object"?Nt.test(e)?sh:fk:ps}function cb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Sf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function fk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Sf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function pk(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],c=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=c,o[a]++}return r}const mk=(e,t)=>{const n=pr.createTransformer(t),r=Ji(e),o=Ji(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?qu.has(e)&&!o.values.length||qu.has(t)&&!r.values.length?uk(e,t):xa(cb(pk(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.`),ps(e,t))};function ub(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?st(e,t,n):Sf(e)(e,t)}const hk=5;function db(e,t,n){const r=Math.max(t-hk,0);return Mx(n-e(r),t-r)}const ht={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},lh=.001;function gk({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;oi(e<=xn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Kn(ht.minDamping,ht.maxDamping,a),e=Kn(ht.minDuration,ht.maxDuration,Dn(e)),a<1?(o=l=>{const u=l*a,d=u*e,p=u-n,f=Uu(l,a),h=Math.exp(-d);return lh-p/f*h},i=l=>{const d=l*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(l,2)*e,h=Math.exp(-d),g=Uu(Math.pow(l,2),a);return(-o(l)+lh>0?-1:1)*((p-f)*h)/g}):(o=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-.001+u*d},i=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const s=5/e,c=yk(o,i,s);if(e=xn(e),isNaN(c))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const vk=12;function yk(e,t,n){let r=n;for(let o=1;o<vk;o++)r=r-e(r)/t(r);return r}function Uu(e,t){return e*Math.sqrt(1-t*t)}const xk=["duration","bounce"],bk=["stiffness","damping","mass"];function ch(e,t){return t.some(n=>e[n]!==void 0)}function wk(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!ch(e,bk)&&ch(e,xk))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ht.mass,stiffness:o,damping:i}}else{const n=gk(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Tf(e=ht.visualDuration,t=ht.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:c,damping:l,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=wk({...n,velocity:-Dn(n.velocity||0)}),h=p||0,g=l/(2*Math.sqrt(c*u)),m=a-i,y=Dn(Math.sqrt(c/u)),v=Math.abs(m)<5;r||(r=v?ht.restSpeed.granular:ht.restSpeed.default),o||(o=v?ht.restDelta.granular:ht.restDelta.default);let b;if(g<1){const w=Uu(y,g);b=S=>{const C=Math.exp(-g*y*S);return a-C*((h+g*y*m)/w*Math.sin(w*S)+m*Math.cos(w*S))}}else if(g===1)b=w=>a-Math.exp(-y*w)*(m+(h+y*m)*w);else{const w=y*Math.sqrt(g*g-1);b=S=>{const C=Math.exp(-g*y*S),k=Math.min(w*S,300);return a-C*((h+g*y*m)*Math.sinh(k)+w*m*Math.cosh(k))/w}}const T={calculatedDuration:f&&d||null,next:w=>{const S=b(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?xn(h):db(b,w,S));const k=Math.abs(C)<=r,I=Math.abs(a-S)<=o;s.done=k&&I}return s.value=s.done?a:S,s},toString:()=>{const w=Math.min(wf(T),fs),S=Nx(C=>T.next(w*C).value,w,30);return w+"ms "+S}};return T}function uh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=k=>s!==void 0&&k<s||c!==void 0&&k>c,h=k=>s===void 0?c:c===void 0||Math.abs(s-k)<Math.abs(c-k)?s:c;let g=n*t;const m=d+g,y=a===void 0?m:a(m);y!==m&&(g=y-d);const v=k=>-g*Math.exp(-k/r),b=k=>y+v(k),T=k=>{const I=v(k),A=b(k);p.done=Math.abs(I)<=l,p.value=p.done?y:A};let w,S;const C=k=>{f(p.value)&&(w=k,S=Tf({keyframes:[p.value,h(p.value)],velocity:db(b,k,p.value),damping:o,stiffness:i,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!S&&w===void 0&&(I=!0,T(k),C(k)),w!==void 0&&k>=w?S.next(k-w):(!I&&T(k),p)}}}const Sk=ya(.42,0,1,1),Tk=ya(0,0,.58,1),fb=ya(.42,0,.58,1),pb=e=>Array.isArray(e)&&typeof e[0]!="number",dh={linear:Kt,easeIn:Sk,easeInOut:fb,easeOut:Tk,circIn:vf,circInOut:Ux,circOut:qx,backIn:gf,backInOut:Hx,backOut:Bx,anticipate:Wx},Ku=e=>{if(hf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ya(t,n,r,o)}else if(typeof e=="string")return dn(dh[e]!==void 0,`Invalid easing type '${e}'`),dh[e];return e};function Ek(e,t,n){const r=[],o=n||ub,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Kt:t;s=xa(c,s)}r.push(s)}return r}function mb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Ek(t,r,o),c=s.length,l=u=>{if(a&&u<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Kr(e[d],e[d+1],u);return s[d](p)};return n?u=>l(Kn(e[0],e[i-1],u)):l}function hb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Kr(0,t,r);e.push(st(n,1,o))}}function gb(e){const t=[0];return hb(t,e.length-1),t}function Ck(e,t){return e.map(n=>n*t)}function kk(e,t){return e.map(()=>t||fb).splice(0,e.length-1)}function ji({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=pb(r)?r.map(Ku):Ku(r),i={done:!1,value:t[0]},a=Ck(n&&n.length===t.length?n:gb(t),e),s=mb(a,t,{ease:Array.isArray(o)?o:kk(t,o)});return{calculatedDuration:e,next:c=>(i.value=s(c),i.done=c>=e,i)}}const Rk=e=>{const t=({timestamp:n})=>e(n);return{start:()=>nt.update(t,!0),stop:()=>Un(t),now:()=>Mt.isProcessing?Mt.timestamp:Mn.now()}},Pk={decay:uh,inertia:uh,tween:ji,keyframes:ji,spring:Tf},Ak=e=>e/100;class Ef extends lb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||bf,s=(c,l)=>this.onKeyframesResolved(c,l);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=ll(n)?n:Pk[n]||ji;let c,l;process.env.NODE_ENV!=="production"&&s!==ji&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==ji&&typeof t[0]!="number"&&(c=xa(Ak,ub(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=wf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:c,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:c,calculatedDuration:l,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:h,repeatDelay:g,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-p*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,T=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(h==="reverse"?(A=1-A,g&&(A-=g/d)):h==="mirror"&&(T=a)),b=Kn(0,1,A)*d}const w=v?{done:!1,value:c[0]}:T.next(b);s&&(w.value=s(w.value));let{done:S}=w;!v&&l!==null&&(S=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&o!==void 0&&(w.value=cl(c,this.options,o)),m&&m(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Dn(t.calculatedDuration):0}get time(){return Dn(this.currentTime)}set time(t){t=xn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Dn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Rk,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ik=new Set(["opacity","clipPath","filter","transform"]);function _k(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:c}={}){const l={[t]:n};c&&(l.offset=c);const u=Lx(s,o);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const Ok=mf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ms=10,Mk=2e4;function Dk(e){return ll(e.type)||e.type==="spring"||!Fx(e.ease)}function jk(e,t){const n=new Ef({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Mk;)r=n.sample(i),o.push(r.value),i+=ms;return{times:void 0,keyframes:o,duration:i-ms,ease:"linear"}}const vb={anticipate:Wx,backInOut:Hx,circInOut:Ux};function Nk(e){return e in vb}class fh extends lb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new sb(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:c,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&ds()&&Nk(i)&&(i=vb[i]),Dk(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...g}=this.options,m=jk(t,g);t=m.keyframes,t.length===1&&(t[1]=t[0]),r=m.duration,o=m.times,i=m.ease,a="keyframes"}const u=_k(s.owner.current,c,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=l??this.calcStartTime(),this.pendingTimeline?(Xm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(cl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Dn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Dn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Kt;const{animation:r}=n;Xm(r,t)}return Kt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:u,onComplete:d,element:p,...f}=this.options,h=new Ef({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=xn(this.time);l.setWithVelocity(h.sample(g-ms).value,h.sample(g).value,ms)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=n.owner.getProps();return Ok()&&r&&Ik.has(r)&&(r!=="transform"||!l)&&!c&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const Fk={type:"spring",stiffness:500,damping:25,restSpeed:10},Lk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Vk={type:"keyframes",duration:.8},$k={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zk=(e,{keyframes:t})=>t.length>2?Vk:ro.has(e)?e.startsWith("scale")?Lk(t[1]):Fk:$k;function Bk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const Cf=(e,t,n,r={},o,i)=>a=>{const s=df(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-xn(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};Bk(s)||(u={...u,...zk(e,u)}),u.duration&&(u.duration=xn(u.duration)),u.repeatDelay&&(u.repeatDelay=xn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=cl(u.keyframes,s);if(p!==void 0)return nt.update(()=>{u.onUpdate(p),u.onComplete()}),new jx([])}return!i&&fh.supports(u)?new fh(u):new Ef(u)};function Hk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function kf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...c}=t;r&&(a=r);const l=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in c){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=c[d];if(f===void 0||u&&Hk(u,d))continue;const h={delay:n,...df(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Dx(e);if(y){const v=window.MotionHandoffAnimation(y,d,nt);v!==null&&(h.startTime=v,g=!0)}}Nu(e,d),p.start(Cf(d,p,f,e.shouldReduceMotion&&Ox.has(d)?{type:!1}:h,e,g));const m=p.animation;m&&l.push(m)}return s&&Promise.all(l).then(()=>{nt.update(()=>{s&&vC(e,s)})}),l}function Yu(e,t,n={}){var r;const o=Qi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(kf(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return Wk(e,t,u+l,d,p,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[l,u]=c==="beforeChildren"?[a,s]:[s,a];return l().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function Wk(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,c=o===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(qk).forEach((l,u)=>{l.notify("AnimationStart",t),a.push(Yu(l,t,{...i,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(a)}function qk(e,t){return e.sortNodePosition(t)}function Uk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Yu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Yu(e,t,n);else{const o=typeof t=="function"?Qi(e,t,n.custom):t;r=Promise.all(kf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function yb(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 Kk=Xd.length;function xb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kk;n++){const r=Xd[n],o=e.props[r];(Gi(o)||o===!1)&&(t[r]=o)}return t}const Yk=[...Zd].reverse(),Gk=Zd.length;function Zk(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Uk(e,n,r)))}function Xk(e){let t=Zk(e),n=ph(),r=!0;const o=c=>(l,u)=>{var d;const p=Qi(e,u,c==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:h,...g}=p;l={...l,...g,...h}}return l};function i(c){t=c(e)}function a(c){const{props:l}=e,u=xb(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let m=0;m<Gk;m++){const y=Yk[m],v=n[y],b=l[y]!==void 0?l[y]:u[y],T=Gi(b),w=y===c?v.isActive:null;w===!1&&(h=m);let S=b===u[y]&&b!==l[y]&&T;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),v.protectedKeys={...f},!v.isActive&&w===null||!b&&!v.prevProp||il(b)||typeof b=="boolean")continue;const C=Qk(v.prevProp,b);let k=C||y===c&&v.isActive&&!S&&T||m>h&&T,I=!1;const A=Array.isArray(b)?b:[b];let O=A.reduce(o(y),{});w===!1&&(O={});const{prevResolvedValues:N={}}=v,V={...N,...O},P=F=>{k=!0,p.has(F)&&(I=!0,p.delete(F)),v.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in V){const j=O[F],B=N[F];if(f.hasOwnProperty(F))continue;let M=!1;ju(j)&&ju(B)?M=!yb(j,B):M=j!==B,M?j!=null?P(F):p.add(F):j!==void 0&&p.has(F)?P(F):v.protectedKeys[F]=!0}v.prevProp=b,v.prevResolvedValues=O,v.isActive&&(f={...f,...O}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(S&&C)||I)&&d.push(...A.map(F=>({animation:F,options:{type:y}})))}if(p.size){const m={};if(typeof l.initial!="boolean"){const y=Qi(e,Array.isArray(l.initial)?l.initial[0]:l.initial);y&&y.transition&&(m.transition=y.transition)}p.forEach(y=>{const v=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),m[y]=v??null}),d.push({animation:m})}let g=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(c,l){var u;if(n[c].isActive===l)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(c,l)}),n[c].isActive=l;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=ph(),r=!0}}}function Qk(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yb(t,e):!1}function Mr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ph(){return{animate:Mr(!0),whileInView:Mr(),whileHover:Mr(),whileTap:Mr(),whileDrag:Mr(),whileFocus:Mr(),exit:Mr()}}class br{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Jk extends br{constructor(t){super(t),t.animationState||(t.animationState=Xk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();il(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let eR=0;class tR extends br{constructor(){super(...arguments),this.id=eR++}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 nR={animation:{Feature:Jk},exit:{Feature:tR}},hn={x:!1,y:!1};function bb(){return hn.x||hn.y}function rR(e){return e==="x"||e==="y"?hn[e]?null:(hn[e]=!0,()=>{hn[e]=!1}):hn.x||hn.y?null:(hn.x=hn.y=!0,()=>{hn.x=hn.y=!1})}function ea(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Rf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ba(e){return{point:{x:e.pageX,y:e.pageY}}}const oR=e=>t=>Rf(t)&&e(t,ba(t));function Ni(e,t,n,r){return ea(e,t,oR(n),r)}function wb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function iR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Sb=1e-4,sR=1-Sb,lR=1+Sb,Tb=.01,cR=0-Tb,uR=0+Tb;function zt(e){return e.max-e.min}function dR(e,t,n){return Math.abs(e-t)<=n}function mh(e,t,n,r=.5){e.origin=r,e.originPoint=st(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),e.translate=st(n.min,n.max,e.origin)-e.originPoint,(e.scale>=sR&&e.scale<=lR||isNaN(e.scale))&&(e.scale=1),(e.translate>=cR&&e.translate<=uR||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){mh(e.x,t.x,n.x,r?r.originX:void 0),mh(e.y,t.y,n.y,r?r.originY:void 0)}function hh(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function fR(e,t,n){hh(e.x,t.x,n.x),hh(e.y,t.y,n.y)}function gh(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function Li(e,t,n){gh(e.x,t.x,n.x),gh(e.y,t.y,n.y)}const vh=()=>({translate:0,scale:1,origin:0,originPoint:0}),So=()=>({x:vh(),y:vh()}),yh=()=>({min:0,max:0}),vt=()=>({x:yh(),y:yh()});function an(e){return[e("x"),e("y")]}function Dc(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!Dc(e)||!Dc(t)||!Dc(n)}function jr(e){return Gu(e)||Eb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Eb(e){return xh(e.x)||xh(e.y)}function xh(e){return e&&e!=="0%"}function hs(e,t,n){const r=e-n,o=t*r;return n+o}function bh(e,t,n,r,o){return o!==void 0&&(e=hs(e,o,r)),hs(e,n,r)+t}function Zu(e,t=0,n=1,r,o){e.min=bh(e.min,t,n,r,o),e.max=bh(e.max,t,n,r,o)}function Cb(e,{x:t,y:n}){Zu(e.x,t.translate,t.scale,t.originPoint),Zu(e.y,n.translate,n.scale,n.originPoint)}const wh=.999999999999,Sh=1.0000000000001;function pR(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Eo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Cb(e,a)),r&&jr(i.latestValues)&&Eo(e,i.latestValues))}t.x<Sh&&t.x>wh&&(t.x=1),t.y<Sh&&t.y>wh&&(t.y=1)}function To(e,t){e.min=e.min+t,e.max=e.max+t}function Th(e,t,n,r,o=.5){const i=st(e.min,e.max,o);Zu(e,t,n,i,r)}function Eo(e,t){Th(e.x,t.x,t.scaleX,t.scale,t.originX),Th(e.y,t.y,t.scaleY,t.scale,t.originY)}function kb(e,t){return wb(aR(e.getBoundingClientRect(),t))}function mR(e,t,n){const r=kb(e,n),{scroll:o}=t;return o&&(To(r.x,o.offset.x),To(r.y,o.offset.y)),r}const Rb=({current:e})=>e?e.ownerDocument.defaultView:null,Eh=(e,t)=>Math.abs(e-t);function hR(e,t){const n=Eh(e.x,t.x),r=Eh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Pb{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Nc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=hR(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:g}=Mt;this.history.push({...h,timestamp:g});const{onStart:m,onMove:y}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=jc(p,this.transformPagePoint),nt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Nc(d.type==="pointercancel"?this.lastMoveEventInfo:jc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),h&&h(d,m)},!Rf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=ba(t),s=jc(a,this.transformPagePoint),{point:c}=s,{timestamp:l}=Mt;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,Nc(s,this.history)),this.removeListeners=xa(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Un(this.updatePoint)}}function jc(e,t){return t?{point:t(e.point)}:e}function Ch(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nc({point:e},t){return{point:e,delta:Ch(e,Ab(t)),offset:Ch(e,gR(t)),velocity:vR(t,.1)}}function gR(e){return e[0]}function Ab(e){return e[e.length-1]}function vR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ab(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>xn(t)));)n--;if(!r)return{x:0,y:0};const i=Dn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?st(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?st(n,e,r.max):Math.min(e,n)),e}function kh(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 xR(e,{top:t,left:n,bottom:r,right:o}){return{x:kh(e.x,n,o),y:kh(e.y,t,r)}}function Rh(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 bR(e,t){return{x:Rh(e.x,t.x),y:Rh(e.y,t.y)}}function wR(e,t){let n=.5;const r=zt(e),o=zt(t);return o>r?n=Kr(t.min,t.max-r,e.min):r>o&&(n=Kr(e.min,e.max-o,t.min)),Kn(0,1,n)}function SR(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 Xu=.35;function TR(e=Xu){return e===!1?e=0:e===!0&&(e=Xu),{x:Ph(e,"left","right"),y:Ph(e,"top","bottom")}}function Ph(e,t,n){return{min:Ah(e,t),max:Ah(e,n)}}function Ah(e,t){return typeof e=="number"?e:e[t]||0}const ER=new WeakMap;class CR{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=vt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ba(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=rR(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(m=>{let y=this.getAxisMotionValue(m).get()||0;if(On.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[m];b&&(y=zt(b)*(parseFloat(y)/100))}}this.originPoint[m]=y}),h&&nt.postRender(()=>h(u,d)),Nu(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=kR(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,m),this.updateAxis("y",d.point,m),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),c=()=>an(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Pb(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:Rb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&nt.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Na(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=yR(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&bo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=xR(o.layoutBox,n):this.constraints=!1,this.elastic=TR(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=SR(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bo(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=mR(r,o.root,this.visualElement.getTransformPagePoint());let a=bR(o.layout.layoutBox,i);if(n){const s=n(iR(a));this.hasMutatedConstraints=!!s,s&&(a=wb(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=an(u=>{if(!Na(u,n,this.currentDirection))return;let d=c&&c[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Nu(this.visualElement,t),r.start(Cf(t,r,0,n,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){an(n=>{const{drag:r}=this.getProps();if(!Na(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-st(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!bo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const c=s.get();o[a]=wR({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),an(a=>{if(!Na(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(st(c,l,o[a]))})}addListeners(){if(!this.visualElement.current)return;ER.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();bo(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),nt.read(r);const a=ea(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(an(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Xu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Na(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class RR extends br{constructor(t){super(t),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new CR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ih=e=>(t,n)=>{e&&nt.postRender(()=>e(t,n))};class PR extends br{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(t){this.session=new Pb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Rb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ih(t),onStart:Ih(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&nt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const rs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _h(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=_h(e,t.target.x),r=_h(e,t.target.y);return`${n}% ${r}%`}},AR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=pr.parse(e);if(o.length>5)return r;const i=pr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=c;const l=st(s,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=l),typeof o[3+a]=="number"&&(o[3+a]/=l),i(o)}};class IR extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;zE(_R),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),rs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||nt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Qd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ib(e){const[t,n]=dx(),r=E.useContext(Yi);return x.jsx(IR,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(xx),isPresent:t,safeToRemove:n})}const _R={borderRadius:{...wi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wi,borderTopRightRadius:wi,borderBottomLeftRadius:wi,borderBottomRightRadius:wi,boxShadow:AR};function _b(e,t,n){const r=Pt(e)?e:No(e);return r.start(Cf("",r,t,n)),r.animation}function Ob(e){return e instanceof SVGElement&&e.tagName!=="svg"}const OR=(e,t)=>e.depth-t.depth;class MR{constructor(){this.children=[],this.isDirty=!1}add(t){ff(this.children,t),this.isDirty=!0}remove(t){sl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OR),this.isDirty=!1,this.children.forEach(t)}}function DR(e,t){const n=Mn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Un(r),e(i-t))};return nt.read(r,!0),()=>Un(r)}const Mb=["TopLeft","TopRight","BottomLeft","BottomRight"],jR=Mb.length,Oh=e=>typeof e=="string"?parseFloat(e):e,Mh=e=>typeof e=="number"||Se.test(e);function NR(e,t,n,r,o,i){o?(e.opacity=st(0,n.opacity!==void 0?n.opacity:1,FR(r)),e.opacityExit=st(t.opacity!==void 0?t.opacity:1,0,LR(r))):i&&(e.opacity=st(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<jR;a++){const s=`border${Mb[a]}Radius`;let c=Dh(t,s),l=Dh(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Mh(c)===Mh(l)?(e[s]=Math.max(st(Oh(c),Oh(l),r),0),(On.test(l)||On.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=st(t.rotate||0,n.rotate||0,r))}function Dh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const FR=Db(0,.5,qx),LR=Db(.5,.95,Kt);function Db(e,t,n){return r=>r<e?0:r>t?1:n(Kr(e,t,r))}function jh(e,t){e.min=t.min,e.max=t.max}function rn(e,t){jh(e.x,t.x),jh(e.y,t.y)}function Nh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Fh(e,t,n,r,o){return e-=t,e=hs(e,1/n,r),o!==void 0&&(e=hs(e,1/o,r)),e}function VR(e,t=0,n=1,r=.5,o,i=e,a=e){if(On.test(t)&&(t=parseFloat(t),t=st(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=st(i.min,i.max,r);e===i&&(s-=t),e.min=Fh(e.min,t,n,s,o),e.max=Fh(e.max,t,n,s,o)}function Lh(e,t,[n,r,o],i,a){VR(e,t[n],t[r],t[o],t.scale,i,a)}const $R=["x","scaleX","originX"],zR=["y","scaleY","originY"];function Vh(e,t,n,r){Lh(e.x,t,$R,n?n.x:void 0,r?r.x:void 0),Lh(e.y,t,zR,n?n.y:void 0,r?r.y:void 0)}function $h(e){return e.translate===0&&e.scale===1}function jb(e){return $h(e.x)&&$h(e.y)}function zh(e,t){return e.min===t.min&&e.max===t.max}function BR(e,t){return zh(e.x,t.x)&&zh(e.y,t.y)}function Bh(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Nb(e,t){return Bh(e.x,t.x)&&Bh(e.y,t.y)}function Hh(e){return zt(e.x)/zt(e.y)}function Wh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class HR{constructor(){this.members=[]}add(t){ff(this.members,t),t.scheduleRender()}remove(t){if(sl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function WR(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:h}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),h&&(r+=`skewY(${h}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Fc=["","X","Y","Z"],qR={visibility:"hidden"},qh=1e3;let UR=0;function Lc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Fb(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",nt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Fb(r)}function Lb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=UR++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(GR),this.nodes.forEach(eP),this.nodes.forEach(tP),this.nodes.forEach(ZR)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new MR)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new pf),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ob(a),this.instance=a;const{layoutId:c,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||c)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=DR(p,250),rs.hasAnimatedSinceResize&&(rs.hasAnimatedSinceResize=!1,this.nodes.forEach(Kh))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||aP,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Nb(this.targetLayout,h),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const T={...df(g,"layout"),onPlay:m,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else p||Kh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Un(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(nP),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Uh);return}this.isUpdating||this.nodes.forEach(QR),this.isUpdating=!1,this.nodes.forEach(JR),this.nodes.forEach(KR),this.nodes.forEach(YR),this.clearAllSnapshots();const s=Mn.now();Mt.delta=Kn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Ic.update.process(Mt),Ic.preRender.process(Mt),Ic.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(XR),this.sharedNodes.forEach(rP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){nt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!zt(this.snapshot.measuredBox.x)&&!zt(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=vt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!jb(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;a&&(s||jr(this.latestValues)||u)&&(o(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),sP(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return vt();const c=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(lP))){const{scroll:u}=this.root;u&&(To(c.x,u.offset.x),To(c.y,u.offset.y))}return c}removeElementScroll(a){var s;const c=vt();if(rn(c,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return c;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&rn(c,a),To(c.x,d.offset.x),To(c.y,d.offset.y))}return c}applyTransform(a,s=!1){const c=vt();rn(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Eo(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),jr(u.latestValues)&&Eo(c,u.latestValues)}return jr(this.latestValues)&&Eo(c,this.latestValues),c}removeTransform(a){const s=vt();rn(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!jr(l.latestValues))continue;Gu(l.latestValues)&&l.updateSnapshot();const u=vt(),d=l.measurePageBox();rn(u,d),Vh(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return jr(this.latestValues)&&Vh(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==c;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=vt(),this.targetWithTransforms=vt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Cb(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Li(this.relativeTargetOrigin,this.target,f.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Gu(this.parent.latestValues)||Eb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),c=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(l=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;pR(this.layoutCorrected,this.treeScale,this.path,c),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=vt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Nh(this.prevProjectionDelta.x,this.projectionDelta.x),Nh(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Wh(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=So(),this.projectionDelta=So(),this.projectionDeltaWithTransform=So()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},d=So();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=vt(),f=c?c.source:void 0,h=this.layout?this.layout.source:void 0,g=f!==h,m=this.getStack(),y=!m||m.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(iP));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const w=T/1e3;Yh(d.x,a.x,w),Yh(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oP(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&BR(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=vt()),rn(b,this.relativeTarget)),g&&(this.animationValues=u,NR(u,l,this.latestValues,w,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nt.update(()=>{rs.hasAnimatedSinceResize=!0,this.currentAnimation=_b(0,qh,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:u}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Vb(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||vt();const d=zt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+d;const p=zt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}rn(s,c),Eo(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new HR),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Lc("z",a,l,this.animationValues);for(let u=0;u<Fc.length;u++)Lc(`rotate${Fc[u]}`,a,l,this.animationValues),Lc(`skew${Fc[u]}`,a,l,this.animationValues);a.render();for(const u in l)a.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);a.scheduleRender()}getProjectionStyles(a){var s,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return qR;const l={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=ts(a==null?void 0:a.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=ts(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!jr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=WR(this.projectionDeltaWithTransform,this.treeScale,p),u&&(l.transform=u(p,l.transform));const{x:f,y:h}=this.projectionDelta;l.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,d.animationValues?l.opacity=d===this?(c=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:l.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Zi){if(p[g]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:v}=Zi[g],b=l.transform==="none"?p[g]:m(p[g],d);if(y){const T=y.length;for(let w=0;w<T;w++)l[y[w]]=b}else v?this.options.visualElement.renderState.vars[g]=b:l[g]=b}return this.options.layoutId&&(l.pointerEvents=d===this?ts(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Uh),this.root.sharedNodes.clear()}}}function KR(e){e.updateLayout()}function YR(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(p);p.min=r[d].min,p.max=p.min+f}):Vb(i,n.layoutBox,r)&&an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=So();Fi(s,r,n.layoutBox);const c=So();a?Fi(c,e.applyTransform(o,!0),n.measuredBox):Fi(c,r,n.layoutBox);const l=!jb(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const h=vt();Li(h,n.layoutBox,p.layoutBox);const g=vt();Li(g,r,f.layoutBox),Nb(h,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function GR(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 ZR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function XR(e){e.clearSnapshot()}function Uh(e){e.clearMeasurements()}function QR(e){e.isLayoutDirty=!1}function JR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Kh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function eP(e){e.resolveTargetDelta()}function tP(e){e.calcProjection()}function nP(e){e.resetSkewAndRotation()}function rP(e){e.removeLeadSnapshot()}function Yh(e,t,n){e.translate=st(t.translate,0,n),e.scale=st(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gh(e,t,n,r){e.min=st(t.min,n.min,r),e.max=st(t.max,n.max,r)}function oP(e,t,n,r){Gh(e.x,t.x,n.x,r),Gh(e.y,t.y,n.y,r)}function iP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aP={duration:.45,ease:[.4,0,.1,1]},Zh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xh=Zh("applewebkit/")&&!Zh("chrome/")?Math.round:Kt;function Qh(e){e.min=Xh(e.min),e.max=Xh(e.max)}function sP(e){Qh(e.x),Qh(e.y)}function Vb(e,t,n){return e==="position"||e==="preserve-aspect"&&!dR(Hh(t),Hh(n),.2)}function lP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const cP=Lb({attachResizeListener:(e,t)=>ea(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vc={current:void 0},$b=Lb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vc.current){const e=new cP({});e.mount(window),e.setOptions({layoutScroll:!0}),Vc.current=e}return Vc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),uP={pan:{Feature:PR},drag:{Feature:RR,ProjectionNode:$b,MeasureLayout:Ib}};function zb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Bb(e,t){const n=zb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Jh(e){return!(e.pointerType==="touch"||bb())}function dP(e,t,n={}){const[r,o,i]=Bb(e,n),a=s=>{if(!Jh(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const u=d=>{Jh(d)&&(l(d),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function eg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&nt.postRender(()=>i(t,ba(t)))}class fP extends br{mount(){const{current:t}=this.node;t&&(this.unmount=dP(t,(n,r)=>(eg(this.node,r,"Start"),o=>eg(this.node,o,"End"))))}unmount(){}}class pP extends br{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=xa(ea(this.node.current,"focus",()=>this.onFocus()),ea(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Hb=(e,t)=>t?e===t?!0:Hb(e,t.parentElement):!1,mP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hP(e){return mP.has(e.tagName)||e.tabIndex!==-1}const Ri=new WeakSet;function tg(e){return t=>{t.key==="Enter"&&e(t)}}function $c(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const gP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=tg(()=>{if(Ri.has(n))return;$c(n,"down");const o=tg(()=>{$c(n,"up")}),i=()=>$c(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 ng(e){return Rf(e)&&!bb()}function vP(e,t,n={}){const[r,o,i]=Bb(e,n),a=s=>{const c=s.currentTarget;if(!ng(s)||Ri.has(c))return;Ri.add(c);const l=t(c,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!ng(f)||!Ri.has(c))&&(Ri.delete(c),typeof l=="function"&&l(f,{success:h}))},d=f=>{u(f,c===window||c===document||n.useGlobalTarget||Hb(c,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",l=>gP(l,o)),!hP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function rg(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&nt.postRender(()=>i(t,ba(t)))}class yP extends br{mount(){const{current:t}=this.node;t&&(this.unmount=vP(t,(n,r)=>(rg(this.node,r,"Start"),(o,{success:i})=>rg(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Qu=new WeakMap,zc=new WeakMap,xP=e=>{const t=Qu.get(e.target);t&&t(e)},bP=e=>{e.forEach(xP)};function wP({root:e,...t}){const n=e||document;zc.has(n)||zc.set(n,{});const r=zc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(bP,{root:e,...t})),r[o]}function SP(e,t,n){const r=wP(t);return Qu.set(e,n),r.observe(e),()=>{Qu.delete(e),r.unobserve(e)}}const TP={some:0,all:1};class EP extends br{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:TP[o]},s=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),p=l?u:d;p&&p(c)};return SP(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(CP(t,n))&&this.startObserver()}unmount(){}}function CP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kP={inView:{Feature:EP},tap:{Feature:yP},focus:{Feature:pP},hover:{Feature:fP}},RP={layout:{ProjectionNode:$b,MeasureLayout:Ib}},Ju={current:null},Wb={current:!1};function PP(){if(Wb.current=!0,!!Gd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ju.current=e.matches;e.addListener(t),t()}else Ju.current=!1}const AP=[...ab,Nt,pr],IP=e=>AP.find(ib(e)),ta=new WeakMap;function _P(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rl(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,No(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,No(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const og=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class qb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Mn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,nt.render(this.render,!1,!0))};const{latestValues:c,renderState:l,onUpdate:u}=a;this.onUpdate=u,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=al(n),this.isVariantNode=vx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const h=p[f];c[f]!==void 0&&Pt(h)&&h.set(c[f],!1)}}mount(t){this.current=t,ta.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)),Wb.current||PP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ju.current,process.env.NODE_ENV!=="production"&&rl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Un(this.notifyUpdate),Un(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ro.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&nt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in jo){const n=jo[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):vt()}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<og.length;r++){const o=og[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=_P(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=No(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(rb(o)||Kx(o))?o=parseFloat(o):!IP(o)&&pr.test(n)&&(o=eb(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=cf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new pf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ub extends qb{constructor(){super(...arguments),this.KeyframeResolver=sb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function OP(e){return window.getComputedStyle(e)}class Kb extends Ub{constructor(){super(...arguments),this.type="html",this.renderInstance=Px}readValueFromInstance(t,n){if(ro.has(n))return UC(t,n);{const r=OP(t),o=(ef(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return kb(t,n)}build(t,n,r){rf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return uf(t,n,r)}}class Yb extends Ub{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Rx(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ro.has(n)){const r=Jx(n);return r&&r.default||0}return n=Ax.has(n)?n:Jd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return _x(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&nt.postRender(this.updateDimensions)}build(t,n,r){sf(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Ix(t,n,r,o)}mount(t){this.isSVGTag=lf(t.tagName),super.mount(t)}}const MP=(e,t)=>af(e)?new Yb(t):new Kb(t,{allowProjection:e!==E.Fragment}),DP=dC({...nR,...kP,...uP,...RP},MP),ft=RE(DP);function jP(e){return E.useEffect(()=>()=>e(),[])}function ul(e){const t=wn(()=>No(e)),{isStatic:n}=E.useContext(Do);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Gb(e,t){const n=ul(t()),r=()=>n.set(t());return r(),tl(()=>{const o=()=>nt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Un(r)}}),n}const NP=e=>e&&typeof e=="object"&&e.mix,FP=e=>NP(e)?e.mix:void 0;function LP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=mb(o,i,{mixer:FP(i[0]),...a});return t?s(r):s}function VP(e){Mi.current=[],e();const t=Gb(Mi.current,e);return Mi.current=void 0,t}function $P(e,t,n,r){if(typeof e=="function")return VP(e);const o=typeof t=="function"?t:LP(t,n,r);return Array.isArray(e)?ig(e,o):ig([e],([i])=>o(i))}function ig(e,t){const n=wn(()=>[]);return Gb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function zP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(wf(r),fs);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Dn(o)}}const BP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Zb(e,t){return pb(e)?e[BP(0,e.length,t)]:e}function Pf(e){return typeof e=="object"&&!Array.isArray(e)}function Xb(e,t,n,r){return typeof e=="string"&&Pf(t)?zb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function HP(e,t,n){return e*(t+1)}function ag(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function WP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(sl(e,o),r--)}}function qP(e,t,n,r,o,i){WP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:st(o,i,r[a]),easing:Zb(n,a)})}function UP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function KP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const YP="easeInOut",GP=20;function ZP(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,c={},l=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const h=e[f];if(typeof h=="string"){l.set(h,d);continue}else if(!Array.isArray(h)){l.set(h.name,ag(d,h.at,u,l));continue}let[g,m,y={}]=h;y.at!==void 0&&(d=ag(d,y.at,u,l));let v=0;const b=(T,w,S,C=0,k=0)=>{const I=XP(T),{delay:A=0,times:O=gb(I),type:N="keyframes",repeat:V,repeatType:P,repeatDelay:D=0,..._}=w;let{ease:F=t.ease||"easeOut",duration:j}=w;const B=typeof A=="function"?A(C,k):A,M=I.length,$=ll(N)?N:o==null?void 0:o[N];if(M<=2&&$){let Z=100;if(M===2&&eA(I)){const L=I[1]-I[0];Z=Math.abs(L)}const Y={..._};j!==void 0&&(Y.duration=xn(j));const G=zP(Y,Z,$);F=G.ease,j=G.duration}j??(j=i);const J=d+B;O.length===1&&O[0]===0&&(O[1]=1);const X=O.length-I.length;if(X>0&&hb(O,X),I.length===1&&I.unshift(null),V){dn(V<GP,"Repeat count too high, must be less than 20"),j=HP(j,V);const Z=[...I],Y=[...O];F=Array.isArray(F)?[...F]:[F];const G=[...F];for(let L=0;L<V;L++){I.push(...Z);for(let z=0;z<Z.length;z++)O.push(Y[z]+(L+1)),F.push(z===0?"linear":Zb(G,z-1))}UP(O,V)}const Q=J+j;qP(S,I,F,O,J,Q),v=Math.max(B+j,v),p=Math.max(Q,p)};if(Pt(g)){const T=sg(g,s);b(m,y,lg("default",T))}else{const T=Xb(g,m,r,c),w=T.length;for(let S=0;S<w;S++){m=m,y=y;const C=T[S],k=sg(C,s);for(const I in m)b(m[I],QP(y,I),lg(I,k),S,w)}}u=d,d+=v}return s.forEach((f,h)=>{for(const g in f){const m=f[g];m.sort(KP);const y=[],v=[],b=[];for(let w=0;w<m.length;w++){const{at:S,value:C,easing:k}=m[w];y.push(C),v.push(Kr(0,p,S)),b.push(k||"easeOut")}v[0]!==0&&(v.unshift(0),y.unshift(y[0]),b.unshift(YP)),v[v.length-1]!==1&&(v.push(1),y.push(null)),a.has(h)||a.set(h,{keyframes:{},transition:{}});const T=a.get(h);T.keyframes[g]=y,T.transition[g]={...t,duration:p,ease:b,times:v,...n}}}),a}function sg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function lg(e,t){return t[e]||(t[e]=[]),t[e]}function XP(e){return Array.isArray(e)?e:[e]}function QP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const JP=e=>typeof e=="number",eA=e=>e.every(JP);function tA(e,t){return e in t}class nA extends qb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(tA(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 vt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function rA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ob(e)?new Yb(t):new Kb(t);n.mount(e),ta.set(e,n)}function oA(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new nA(t);n.mount(e),ta.set(e,n)}function iA(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Pf(t)}function Qb(e,t,n,r){const o=[];if(iA(e,t))o.push(_b(e,Pf(t)&&t.default||t,n&&(n.default||n)));else{const i=Xb(e,t,r),a=i.length;dn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const c=i[s],l=c instanceof Element?rA:oA;ta.has(c)||l(c);const u=ta.get(c),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...kf(u,{...t,transition:d},{}))}}return o}function aA(e,t,n){const r=[];return ZP(e,t,n,{spring:Tf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Qb(s,i,a))}),r}function sA(e){return Array.isArray(e)&&e.some(Array.isArray)}function lA(e){function t(n,r,o){let i=[];sA(n)?i=aA(n,r,e):i=Qb(n,r,o,e);const a=new jx(i);return e&&e.animations.push(a),a}return t}function cA(){const e=wn(()=>({current:null,animations:[]})),t=wn(()=>lA(e));return jP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class uA{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const dA=()=>new uA;function fA(){return wn(dA)}function pA(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function mA(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:pA(n,i),s=Math.abs(a-o);let c=e*s;if(r){const l=i*e;c=Ku(r)(c/l)*l}return t+c}}const Jb=E.createContext(null);function hA(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],c=a.layout,l=st(c.min,c.max,.5);return i===1&&s.layout.max+n>l||i===-1&&s.layout.min+n<l?fC(e,o,o+i):e}function gA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=wn(()=>ft[t]),c=[],l=E.useRef(!1);dn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=c.findIndex(h=>d===h.value);f!==-1?c[f].layout=p[n]:c.push({value:d,layout:p[n]}),c.sort(yA)},updateOrder:(d,p,f)=>{if(l.current)return;const h=hA(c,d,p,f);c!==h&&(l.current=!0,r(h.map(vA).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{l.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(Jb.Provider,{value:u,children:e})})}const e0=E.forwardRef(gA);function vA(e){return e.value}function yA(e,t){return e.layout.min-t.layout.min}function cg(e,t=0){return Pt(e)?e:ul(t)}function xA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const c=wn(()=>ft[r]),l=E.useContext(Jb),u={x:cg(t.x),y:cg(t.y)},d=$P([u.x,u.y],([g,m])=>g||m?1:"unset");dn(!!l,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=l;return x.jsx(c,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,m)=>{const{velocity:y}=m;y[p]&&h(n,u[p].get(),y[p]),o&&o(g,m)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const t0=E.forwardRef(xA);/**
12
+ `),()=>{document.head.removeChild(f)}},[t]),x.jsx(uE,{isPresent:t,childRef:o,sizeRef:i,children:R.cloneElement(e,{ref:o})})}const fE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s})=>{const l=wn(pE),c=E.useId(),u=E.useCallback(p=>{l.set(p,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=E.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:p=>(l.set(p,!1),()=>l.delete(p))}),i?[Math.random(),u]:[n,u]);return E.useMemo(()=>{l.forEach((p,f)=>l.set(f,!1))},[n]),R.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=x.jsx(dE,{isPresent:n,anchorX:s,children:e})),x.jsx(nl.Provider,{value:d,children:e})};function pE(){return new Map}function dx(e=!0){const t=E.useContext(nl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=E.useId();E.useEffect(()=>{if(e)return o(i)},[e]);const a=E.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Ma=e=>e.key||"";function $m(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const xr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left"})=>{const[l,c]=dx(a),u=E.useMemo(()=>$m(e),[e]),d=a&&!l?[]:u.map(Ma),p=E.useRef(!0),f=E.useRef(u),h=wn(()=>new Map),[g,m]=E.useState(u),[y,v]=E.useState(u);tl(()=>{p.current=!1,f.current=u;for(let w=0;w<y.length;w++){const T=Ma(y[w]);d.includes(T)?h.delete(T):h.get(T)!==!0&&h.set(T,!1)}},[y,d.length,d.join("-")]);const b=[];if(u!==g){let w=[...u];for(let T=0;T<y.length;T++){const C=y[T],k=Ma(C);d.includes(k)||(w.splice(T,0,C),b.push(C))}return i==="wait"&&b.length&&(w=b),v($m(w)),m(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=E.useContext(Yi);return x.jsx(x.Fragment,{children:y.map(w=>{const T=Ma(w),C=a&&!l?!1:u===y||d.includes(T),k=()=>{if(h.has(T))h.set(T,!0);else return;let I=!0;h.forEach(A=>{A||(I=!1)}),I&&(S==null||S(),v(f.current),a&&(c==null||c()),r&&r())};return x.jsx(fE,{isPresent:C,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:C?void 0:k,anchorX:s,children:w},T)})})},mE=E.createContext(null),Kt=e=>e;let oi=Kt,dn=Kt;process.env.NODE_ENV!=="production"&&(oi=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},dn=(e,t)=>{if(!e)throw new Error(t)});const hE={useManualTiming:!1},Da=["read","resolveKeyframes","update","preRender","render","postRender"];function gE(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,p=!1)=>{const h=p&&o?n:r;return d&&a.add(u),h.has(u)||h.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const vE=40;function fx(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Da.reduce((y,v)=>(y[v]=gE(i),y),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,vE),1),o.timestamp=y,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},h=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Da.reduce((y,v)=>{const b=a[v];return y[v]=(S,w=!1,T=!1)=>(n||h(),b.schedule(S,w,T)),y},{}),cancel:y=>{for(let v=0;v<Da.length;v++)a[Da[v]].cancel(y)},state:o,steps:a}}const{schedule:nt,cancel:Un,state:Mt,steps:Ic}=fx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Kt,!0);function yE(){const e=E.useRef(!1);return tl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xE(){const e=yE(),[t,n]=E.useState(0),r=E.useCallback(()=>{e.current&&n(t+1)},[t]);return[E.useCallback(()=>nt.postRender(r),[r]),t]}const bE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function zm(){const e=new Set,t=new WeakMap,n=()=>e.forEach(bE);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 px=e=>e===!0,wE=e=>px(e===!0)||e==="id",SE=({children:e,id:t,inherit:n=!0})=>{const r=E.useContext(Yi),o=E.useContext(mE),[i,a]=xE(),s=E.useRef(null),l=r.id||o;s.current===null&&(wE(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:px(n)&&r.group||zm()});const c=E.useMemo(()=>({...s.current,forceRender:i}),[a]);return x.jsx(Yi.Provider,{value:c,children:e})},mx=E.createContext({strict:!1}),Bm={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"]},jo={};for(const e in Bm)jo[e]={isEnabled:t=>Bm[e].some(n=>!!t[n])};function TE(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const EE=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function us(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||EE.has(e)}let hx=e=>!us(e);function gx(e){e&&(hx=t=>t.startsWith("on")?!us(t):e(t))}try{gx(require("@emotion/is-prop-valid").default)}catch{}function CE(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(hx(o)||n===!0&&us(o)||!t&&!us(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function kE({children:e,isValidProp:t,...n}){t&&gx(t),n={...E.useContext(Do),...n},n.isStatic=wn(()=>n.isStatic);const r=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Do.Provider,{value:r,children:e})}const Hm=new Set;function rl(e,t,n){e||Hm.has(t)||(console.warn(t),Hm.add(t))}function RE(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const ol=E.createContext({});function il(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gi(e){return typeof e=="string"||Array.isArray(e)}const Zd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xd=["initial",...Zd];function al(e){return il(e.animate)||Xd.some(t=>Gi(e[t]))}function vx(e){return!!(al(e)||e.variants)}function PE(e,t){if(al(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gi(n)?n:void 0,animate:Gi(r)?r:void 0}}return e.inherit!==!1?t:{}}function AE(e){const{initial:t,animate:n}=PE(e,E.useContext(ol));return E.useMemo(()=>({initial:t,animate:n}),[Wm(t),Wm(n)])}function Wm(e){return Array.isArray(e)?e.join(" "):e}const IE=Symbol.for("motionComponentSymbol");function bo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _E(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):bo(n)&&(n.current=r))},[t])}const{schedule:Qd}=fx(queueMicrotask,!1),Jd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OE="framerAppearId",yx="data-"+Jd(OE),xx=E.createContext({});function ME(e,t,n,r,o){var i,a;const{visualElement:s}=E.useContext(ol),l=E.useContext(mx),c=E.useContext(nl),u=E.useContext(Do).reducedMotion,d=E.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const p=d.current,f=E.useContext(xx);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&DE(d.current,n,o,f);const h=E.useRef(!1);E.useInsertionEffect(()=>{p&&h.current&&p.update(n,c)});const g=n[yx],m=E.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return tl(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Qd.render(p.render),m.current&&p.animationState&&p.animationState.animateChanges())}),E.useEffect(()=>{p&&(!m.current&&p.animationState&&p.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),m.current=!1))}),p}function DE(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bx(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&bo(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function bx(e){if(e)return e.options.allowProjection!==!1?e.projection:bx(e.parent)}function jE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;e&&TE(e);function s(c,u){let d;const p={...E.useContext(Do),...c,layoutId:NE(c)},{isStatic:f}=p,h=AE(c),g=r(c,f);if(!f&&Gd){FE(p,e);const m=LE(p);d=m.MeasureLayout,h.visualElement=ME(o,g,p,t,m.ProjectionNode)}return x.jsxs(ol.Provider,{value:h,children:[d&&h.visualElement?x.jsx(d,{visualElement:h.visualElement,...p}):null,n(o,c,_E(g,h.visualElement,u),g,f,h.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(a=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&a!==void 0?a:""})`}`;const l=E.forwardRef(s);return l[IE]=o,l}function NE({layoutId:e}){const t=E.useContext(Yi).id;return t&&e!==void 0?t+"-"+e:e}function FE(e,t){const n=E.useContext(mx).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):dn(!1,r)}}function LE(e){const{drag:t,layout:n}=jo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const wx=e=>t=>typeof t=="string"&&t.startsWith(e),ef=wx("--"),VE=wx("var(--"),tf=e=>VE(e)?$E.test(e.split("/*")[0].trim()):!1,$E=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zi={};function zE(e){for(const t in e)Zi[t]=e[t],ef(t)&&(Zi[t].isCSSVariable=!0)}const ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ro=new Set(ii);function Sx(e,{layout:t,layoutId:n}){return ro.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zi[e]||e==="opacity")}const Pt=e=>!!(e&&e.getVelocity),Tx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Kn=(e,t,n)=>n>t?t:n<e?e:n,ai={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xi={...ai,transform:e=>Kn(0,1,e)},ja={...ai,default:1},va=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ar=va("deg"),On=va("%"),Se=va("px"),BE=va("vh"),HE=va("vw"),qm={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(e*100)},WE={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},qE={rotate:ar,rotateX:ar,rotateY:ar,rotateZ:ar,scale:ja,scaleX:ja,scaleY:ja,scaleZ:ja,skew:ar,skewX:ar,skewY:ar,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:Xi,originX:qm,originY:qm,originZ:Se},Um={...ai,transform:Math.round},nf={...WE,...qE,zIndex:Um,size:Se,fillOpacity:Xi,strokeOpacity:Xi,numOctaves:Um},UE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},KE=ii.length;function YE(e,t,n){let r="",o=!0;for(let i=0;i<KE;i++){const a=ii[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(a.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const c=Tx(s,nf[a]);if(!l){o=!1;const u=UE[a]||a;r+=`${u}(${c}) `}n&&(t[a]=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 a=!1,s=!1;for(const l in t){const c=t[l];if(ro.has(l)){a=!0;continue}else if(ef(l)){o[l]=c;continue}else{const u=Tx(c,nf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=YE(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const of=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ex(e,t,n){for(const r in t)!Pt(t[r])&&!Sx(r,n)&&(e[r]=t[r])}function GE({transformTemplate:e},t){return E.useMemo(()=>{const n=of();return rf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZE(e,t){const n=e.style||{},r={};return Ex(r,n,e),Object.assign(r,GE(e,t)),r}function XE(e,t){const n={},r=ZE(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 QE=["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 af(e){return typeof e!="string"||e.includes("-")?!1:!!(QE.indexOf(e)>-1||/[A-Z]/u.test(e))}const JE={offset:"stroke-dashoffset",array:"stroke-dasharray"},eC={offset:"strokeDashoffset",array:"strokeDasharray"};function tC(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?JE:eC;e[i.offset]=Se.transform(-r);const a=Se.transform(t),s=Se.transform(n);e[i.array]=`${a} ${s}`}function Km(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function nC(e,t,n){const r=Km(t,e.x,e.width),o=Km(n,e.y,e.height);return`${r} ${o}`}function sf(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(rf(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=nC(h,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&tC(p,a,s,l,!1)}const Cx=()=>({...of(),attrs:{}}),lf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function rC(e,t,n,r){const o=E.useMemo(()=>{const i=Cx();return sf(i,t,lf(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ex(i,e.style,e),o.style={...i,...o.style}}return o}function oC(e=!1){return(n,r,o,{latestValues:i},a)=>{const l=(af(n)?rC:XE)(r,i,a,n),c=CE(r,typeof n=="string",e),u=n!==E.Fragment?{...c,...l,ref:o}:{},{children:d}=r,p=E.useMemo(()=>Pt(d)?d.get():d,[d]);return E.createElement(n,{...u,children:p})}}function Ym(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function cf(e,t,n,r){if(typeof t=="function"){const[o,i]=Ym(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]=Ym(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const ju=e=>Array.isArray(e),iC=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),aC=e=>ju(e)?e[e.length-1]||0:e;function ts(e){const t=Pt(e)?e.get():e;return iC(t)?t.toValue():t}function sC({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:lC(r,o,i,e),renderState:t()};return n&&(a.onMount=s=>n({props:r,current:s,...a}),a.onUpdate=s=>n(s)),a}const kx=e=>(t,n)=>{const r=E.useContext(ol),o=E.useContext(nl),i=()=>sC(e,t,r,o);return n?i():wn(i)};function lC(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=ts(i[p]);let{initial:a,animate:s}=e;const l=al(e),c=vx(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!il(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const h=cf(e,p[f]);if(h){const{transitionEnd:g,transition:m,...y}=h;for(const v in y){let b=y[v];if(Array.isArray(b)){const S=u?b.length-1:0;b=b[S]}b!==null&&(o[v]=b)}for(const v in g)o[v]=g[v]}}}return o}function uf(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pt(o[a])||t.style&&Pt(t.style[a])||Sx(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=o[a]);return i}const cC={useVisualState:kx({scrapeMotionValuesFromProps:uf,createRenderState:of})};function Rx(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function Px(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Ax=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ix(e,t,n,r){Px(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ax.has(o)?o:Jd(o),t.attrs[o])}function _x(e,t,n){const r=uf(e,t,n);for(const o in e)if(Pt(e[o])||Pt(t[o])){const i=ii.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Gm=["x","y","width","height","cx","cy","r"],uC={useVisualState:kx({scrapeMotionValuesFromProps:_x,createRenderState:Cx,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const s in o)if(ro.has(s)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let s=0;s<Gm.length;s++){const l=Gm[s];e[l]!==t[l]&&(a=!0)}a&&nt.read(()=>{Rx(n,r),nt.render(()=>{sf(r,o,lf(n.tagName),e.transformTemplate),Ix(n,r)})})}})};function dC(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...af(r)?uC:cC,preloadedFeatures:e,useRender:oC(o),createVisualElement:t,Component:r};return jE(a)}}function Qi(e,t,n){const r=e.getProps();return cf(r,t,n!==void 0?n:r.custom,e)}function df(e,t){return e?e[t]||e.default||e:void 0}const Ox=new Set(["width","height","top","left","right","bottom",...ii]);function ff(e,t){e.indexOf(t)===-1&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function fC([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}class pf{constructor(){this.subscriptions=[]}add(t){return ff(this.subscriptions,t),()=>sl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Mx(e,t){return t?e*(1e3/t):0}let ns;function pC(){ns=void 0}const Mn={now:()=>(ns===void 0&&Mn.set(Mt.isProcessing||hE.useManualTiming?Mt.timestamp:performance.now()),ns),set:e=>{ns=e,queueMicrotask(pC)}},Zm=30,mC=e=>!isNaN(parseFloat(e)),Mi={current:void 0};class hC{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Mn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Mn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rl(!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 pf);const r=this.events[t].add(n);return t==="change"?()=>{r(),nt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Mi.current&&Mi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Mn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Zm);return Mx(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function No(e,t){return new hC(e,t)}function gC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function vC(e,t){const n=Qi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=aC(i[a]);gC(e,a,s)}}function yC(e){return!!(Pt(e)&&e.add)}function Nu(e,t){const n=e.getValue("willChange");if(yC(n))return n.add(t)}function Dx(e){return e.props[yx]}function mf(e){let t;return()=>(t===void 0&&(t=e()),t)}const xC=mf(()=>window.ScrollTimeline!==void 0);class bC{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(xC()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class jx extends bC{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const xn=e=>e*1e3,Dn=e=>e/1e3;function ll(e){return typeof e=="function"}function Xm(e,t){e.timeline=t,e.onfinish=null}const hf=e=>Array.isArray(e)&&typeof e[0]=="number",wC={linearEasing:void 0};function SC(e,t){const n=mf(e);return()=>{var r;return(r=wC[t])!==null&&r!==void 0?r:n()}}const ds=SC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Kr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Nx=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Kr(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Fx(e){return!!(typeof e=="function"&&ds()||!e||typeof e=="string"&&(e in Fu||ds())||hf(e)||Array.isArray(e)&&e.every(Fx))}const ki=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ki([0,.65,.55,1]),circOut:ki([.55,0,1,.45]),backIn:ki([.31,.01,.66,-.59]),backOut:ki([.33,1.53,.69,.99])};function Lx(e,t){if(e)return typeof e=="function"&&ds()?Nx(e,t):hf(e)?ki(e):Array.isArray(e)?e.map(n=>Lx(n,t)||Fu.easeOut):Fu[e]}const Vx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,TC=1e-7,EC=12;function CC(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=Vx(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>TC&&++s<EC);return a}function ya(e,t,n,r){if(e===t&&n===r)return Kt;const o=i=>CC(i,0,1,e,n);return i=>i===0||i===1?i:Vx(o(i),t,r)}const $x=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zx=e=>t=>1-e(1-t),Bx=ya(.33,1.53,.69,.99),gf=zx(Bx),Hx=$x(gf),Wx=e=>(e*=2)<1?.5*gf(e):.5*(2-Math.pow(2,-10*(e-1))),vf=e=>1-Math.sin(Math.acos(e)),qx=zx(vf),Ux=$x(vf),Kx=e=>/^0[^.\s]+$/u.test(e);function kC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Kx(e):!0}const Di=e=>Math.round(e*1e5)/1e5,yf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function RC(e){return e==null}const PC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xf=(e,t)=>n=>!!(typeof n=="string"&&PC.test(n)&&n.startsWith(e)||t&&!RC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(yf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},AC=e=>Kn(0,255,e),_c={...ai,transform:e=>Math.round(AC(e))},zr={test:xf("rgb","red"),parse:Yx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_c.transform(e)+", "+_c.transform(t)+", "+_c.transform(n)+", "+Di(Xi.transform(r))+")"};function IC(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Lu={test:xf("#"),parse:IC,transform:zr.transform},wo={test:xf("hsl","hue"),parse:Yx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+On.transform(Di(t))+", "+On.transform(Di(n))+", "+Di(Xi.transform(r))+")"},Nt={test:e=>zr.test(e)||Lu.test(e)||wo.test(e),parse:e=>zr.test(e)?zr.parse(e):wo.test(e)?wo.parse(e):Lu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?zr.transform(e):wo.transform(e)},_C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function OC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(yf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(_C))===null||n===void 0?void 0:n.length)||0)>0}const Gx="number",Zx="color",MC="var",DC="var(",Qm="${}",jC=/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 Ji(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(jC,l=>(Nt.test(l)?(r.color.push(i),o.push(Zx),n.push(Nt.parse(l))):l.startsWith(DC)?(r.var.push(i),o.push(MC),n.push(l)):(r.number.push(i),o.push(Gx),n.push(parseFloat(l))),++i,Qm)).split(Qm);return{values:n,split:s,indexes:r,types:o}}function Xx(e){return Ji(e).values}function Qx(e){const{split:t,types:n}=Ji(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===Gx?i+=Di(o[a]):s===Zx?i+=Nt.transform(o[a]):i+=o[a]}return i}}const NC=e=>typeof e=="number"?0:e;function FC(e){const t=Xx(e);return Qx(e)(t.map(NC))}const pr={test:OC,parse:Xx,createTransformer:Qx,getAnimatableNone:FC},LC=new Set(["brightness","contrast","saturate","opacity"]);function VC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(yf)||[];if(!r)return e;const o=n.replace(r,"");let i=LC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const $C=/\b([a-z-]*)\(.*?\)/gu,Vu={...pr,getAnimatableNone:e=>{const t=e.match($C);return t?t.map(VC).join(" "):e}},zC={...nf,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Vu,WebkitFilter:Vu},Jx=e=>zC[e];function eb(e,t){let n=Jx(e);return n!==Vu&&(n=pr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const BC=new Set(["auto","none","0"]);function HC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!BC.has(i)&&Ji(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=eb(n,o)}const Br=e=>e*180/Math.PI,$u=e=>{const t=Br(Math.atan2(e[1],e[0]));return zu(t)},WC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:$u,rotateZ:$u,skewX:e=>Br(Math.atan(e[1])),skewY:e=>Br(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zu=e=>(e=e%360,e<0&&(e+=360),e),Jm=$u,eh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),th=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eh,scaleY:th,scale:e=>(eh(e)+th(e))/2,rotateX:e=>zu(Br(Math.atan2(e[6],e[5]))),rotateY:e=>zu(Br(Math.atan2(-e[2],e[0]))),rotateZ:Jm,rotate:Jm,skewX:e=>Br(Math.atan(e[4])),skewY:e=>Br(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function nh(e){return e.includes("scale")?1:0}function Bu(e,t){if(!e||e==="none")return nh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=qC,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=WC,o=s}if(!o)return nh(t);const i=r[t],a=o[1].split(",").map(KC);return typeof i=="function"?i(a):a[i]}const UC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Bu(n,t)};function KC(e){return parseFloat(e.trim())}const rh=e=>e===ai||e===Se,YC=new Set(["x","y","z"]),GC=ii.filter(e=>!YC.has(e));function ZC(e){const t=[];return GC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Fo={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})=>Bu(t,"x"),y:(e,{transform:t})=>Bu(t,"y")};Fo.translateX=Fo.x;Fo.translateY=Fo.y;const Wr=new Set;let Hu=!1,Wu=!1;function tb(){if(Wu){const e=Array.from(Wr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=ZC(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var s;(s=r.getValue(i))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Wu=!1,Hu=!1,Wr.forEach(e=>e.complete()),Wr.clear()}function nb(){Wr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Wu=!0)})}function XC(){nb(),tb()}class bf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Wr.add(this),Hu||(Hu=!0,nt.read(nb),nt.resolveKeyframes(tb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Wr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Wr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),QC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function JC(e){const t=QC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const ek=4;function ob(e,t,n=1){dn(n<=ek,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=JC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return rb(a)?parseFloat(a):a}return tf(o)?ob(o,t,n+1):o}const ib=e=>t=>t.test(e),tk={test:e=>e==="auto",parse:e=>e},ab=[ai,Se,On,ar,HE,BE,tk],oh=e=>ab.find(ib(e));class sb extends bf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),tf(c))){const u=ob(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ox.has(r)||t.length!==2)return;const[o,i]=t,a=oh(o),s=oh(i);if(a!==s)if(rh(a)&&rh(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)kC(t[o])&&r.push(o);r.length&&HC(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=Fo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=Fo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const ih=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(pr.test(e)||e==="0")&&!e.startsWith("url("));function nk(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 rk(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=ih(o,t),s=ih(i,t);return oi(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!s?!1:nk(e)||(n==="spring"||ll(n))&&r}const ok=e=>e!==null;function cl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ok),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const ik=40;class lb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Mn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>ik?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&XC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Mn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!rk(t,r,o,i))if(a)this.options.duration=0;else{l&&l(cl(t,this.options,n)),s&&s(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const fs=2e4;function wf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<fs;)t+=n,r=e.next(t);return t>=fs?1/0:t}const st=(e,t,n)=>e+(t-e)*n;function Oc(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 ak({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=Oc(l,s,e+1/3),i=Oc(l,s,e),a=Oc(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function ps(e,t){return n=>n>0?t:e}const Mc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},sk=[Lu,zr,wo],lk=e=>sk.find(t=>t.test(e));function ah(e){const t=lk(e);if(oi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===wo&&(n=ak(n)),n}const sh=(e,t)=>{const n=ah(e),r=ah(t);if(!n||!r)return ps(e,t);const o={...n};return i=>(o.red=Mc(n.red,r.red,i),o.green=Mc(n.green,r.green,i),o.blue=Mc(n.blue,r.blue,i),o.alpha=st(n.alpha,r.alpha,i),zr.transform(o))},ck=(e,t)=>n=>t(e(n)),xa=(...e)=>e.reduce(ck),qu=new Set(["none","hidden"]);function uk(e,t){return qu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dk(e,t){return n=>st(e,t,n)}function Sf(e){return typeof e=="number"?dk:typeof e=="string"?tf(e)?ps:Nt.test(e)?sh:mk:Array.isArray(e)?cb:typeof e=="object"?Nt.test(e)?sh:fk:ps}function cb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>Sf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function fk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Sf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function pk(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=(n=e.values[s])!==null&&n!==void 0?n:0;r[i]=l,o[a]++}return r}const mk=(e,t)=>{const n=pr.createTransformer(t),r=Ji(e),o=Ji(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?qu.has(e)&&!o.values.length||qu.has(t)&&!r.values.length?uk(e,t):xa(cb(pk(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.`),ps(e,t))};function ub(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?st(e,t,n):Sf(e)(e,t)}const hk=5;function db(e,t,n){const r=Math.max(t-hk,0);return Mx(n-e(r),t-r)}const ht={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},lh=.001;function gk({duration:e=ht.duration,bounce:t=ht.bounce,velocity:n=ht.velocity,mass:r=ht.mass}){let o,i;oi(e<=xn(ht.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Kn(ht.minDamping,ht.maxDamping,a),e=Kn(ht.minDuration,ht.maxDuration,Dn(e)),a<1?(o=c=>{const u=c*a,d=u*e,p=u-n,f=Uu(c,a),h=Math.exp(-d);return lh-p/f*h},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-d),g=Uu(Math.pow(c,2),a);return(-o(c)+lh>0?-1:1)*((p-f)*h)/g}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=yk(o,i,s);if(e=xn(e),isNaN(l))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const vk=12;function yk(e,t,n){let r=n;for(let o=1;o<vk;o++)r=r-e(r)/t(r);return r}function Uu(e,t){return e*Math.sqrt(1-t*t)}const xk=["duration","bounce"],bk=["stiffness","damping","mass"];function ch(e,t){return t.some(n=>e[n]!==void 0)}function wk(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!ch(e,bk)&&ch(e,xk))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ht.mass,stiffness:o,damping:i}}else{const n=gk(e);t={...t,...n,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Tf(e=ht.visualDuration,t=ht.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=wk({...n,velocity:-Dn(n.velocity||0)}),h=p||0,g=c/(2*Math.sqrt(l*u)),m=a-i,y=Dn(Math.sqrt(l/u)),v=Math.abs(m)<5;r||(r=v?ht.restSpeed.granular:ht.restSpeed.default),o||(o=v?ht.restDelta.granular:ht.restDelta.default);let b;if(g<1){const w=Uu(y,g);b=T=>{const C=Math.exp(-g*y*T);return a-C*((h+g*y*m)/w*Math.sin(w*T)+m*Math.cos(w*T))}}else if(g===1)b=w=>a-Math.exp(-y*w)*(m+(h+y*m)*w);else{const w=y*Math.sqrt(g*g-1);b=T=>{const C=Math.exp(-g*y*T),k=Math.min(w*T,300);return a-C*((h+g*y*m)*Math.sinh(k)+w*m*Math.cosh(k))/w}}const S={calculatedDuration:f&&d||null,next:w=>{const T=b(w);if(f)s.done=w>=d;else{let C=0;g<1&&(C=w===0?xn(h):db(b,w,T));const k=Math.abs(C)<=r,I=Math.abs(a-T)<=o;s.done=k&&I}return s.value=s.done?a:T,s},toString:()=>{const w=Math.min(wf(S),fs),T=Nx(C=>S.next(w*C).value,w,30);return w+"ms "+T}};return S}function uh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=k=>s!==void 0&&k<s||l!==void 0&&k>l,h=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let g=n*t;const m=d+g,y=a===void 0?m:a(m);y!==m&&(g=y-d);const v=k=>-g*Math.exp(-k/r),b=k=>y+v(k),S=k=>{const I=v(k),A=b(k);p.done=Math.abs(I)<=c,p.value=p.done?y:A};let w,T;const C=k=>{f(p.value)&&(w=k,T=Tf({keyframes:[p.value,h(p.value)],velocity:db(b,k,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!T&&w===void 0&&(I=!0,S(k),C(k)),w!==void 0&&k>=w?T.next(k-w):(!I&&S(k),p)}}}const Sk=ya(.42,0,1,1),Tk=ya(0,0,.58,1),fb=ya(.42,0,.58,1),pb=e=>Array.isArray(e)&&typeof e[0]!="number",dh={linear:Kt,easeIn:Sk,easeInOut:fb,easeOut:Tk,circIn:vf,circInOut:Ux,circOut:qx,backIn:gf,backInOut:Hx,backOut:Bx,anticipate:Wx},Ku=e=>{if(hf(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ya(t,n,r,o)}else if(typeof e=="string")return dn(dh[e]!==void 0,`Invalid easing type '${e}'`),dh[e];return e};function Ek(e,t,n){const r=[],o=n||ub,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Kt:t;s=xa(l,s)}r.push(s)}return r}function mb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Ek(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Kr(e[d],e[d+1],u);return s[d](p)};return n?u=>c(Kn(e[0],e[i-1],u)):c}function hb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Kr(0,t,r);e.push(st(n,1,o))}}function gb(e){const t=[0];return hb(t,e.length-1),t}function Ck(e,t){return e.map(n=>n*t)}function kk(e,t){return e.map(()=>t||fb).splice(0,e.length-1)}function ji({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=pb(r)?r.map(Ku):Ku(r),i={done:!1,value:t[0]},a=Ck(n&&n.length===t.length?n:gb(t),e),s=mb(a,t,{ease:Array.isArray(o)?o:kk(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const Rk=e=>{const t=({timestamp:n})=>e(n);return{start:()=>nt.update(t,!0),stop:()=>Un(t),now:()=>Mt.isProcessing?Mt.timestamp:Mn.now()}},Pk={decay:uh,inertia:uh,tween:ji,keyframes:ji,spring:Tf},Ak=e=>e/100;class Ef extends lb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||bf,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(i,s,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,s=ll(n)?n:Pk[n]||ji;let l,c;process.env.NODE_ENV!=="production"&&s!==ji&&dn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),s!==ji&&typeof t[0]!="number"&&(l=xa(Ak,ub(t[0],t[1])),t=[0,100]);const u=s({...this.options,keyframes:t});i==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=wf(u));const{calculatedDuration:d}=u,p=d+o,f=p*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:f,repeatType:h,repeatDelay:g,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-p*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,S=i;if(f){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(h==="reverse"?(A=1-A,g&&(A-=g/d)):h==="mirror"&&(S=a)),b=Kn(0,1,A)*d}const w=v?{done:!1,value:l[0]}:S.next(b);s&&(w.value=s(w.value));let{done:T}=w;!v&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return C&&o!==void 0&&(w.value=cl(l,this.options,o)),m&&m(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Dn(t.calculatedDuration):0}get time(){return Dn(this.currentTime)}set time(t){t=xn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Dn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Rk,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ik=new Set(["opacity","clipPath","filter","transform"]);function _k(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Lx(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const Ok=mf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ms=10,Mk=2e4;function Dk(e){return ll(e.type)||e.type==="spring"||!Fx(e.ease)}function jk(e,t){const n=new Ef({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Mk;)r=n.sample(i),o.push(r.value),i+=ms;return{times:void 0,keyframes:o,duration:i-ms,ease:"linear"}}const vb={anticipate:Wx,backInOut:Hx,circInOut:Ux};function Nk(e){return e in vb}class fh extends lb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new sb(i,(a,s)=>this.onKeyframesResolved(a,s),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof i=="string"&&ds()&&Nk(i)&&(i=vb[i]),Dk(this.options)){const{onComplete:d,onUpdate:p,motionValue:f,element:h,...g}=this.options,m=jk(t,g);t=m.keyframes,t.length===1&&(t[1]=t[0]),r=m.duration,o=m.times,i=m.ease,a="keyframes"}const u=_k(s.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Xm(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;s.set(cl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Dn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Dn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Kt;const{animation:r}=n;Xm(r,t)}return Kt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:p,...f}=this.options,h=new Ef({...f,keyframes:r,duration:o,type:i,ease:a,times:s,isGenerator:!0}),g=xn(this.time);c.setWithVelocity(h.sample(g-ms).value,h.sample(g).value,ms)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:a,type:s}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Ok()&&r&&Ik.has(r)&&(r!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}}const Fk={type:"spring",stiffness:500,damping:25,restSpeed:10},Lk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Vk={type:"keyframes",duration:.8},$k={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zk=(e,{keyframes:t})=>t.length>2?Vk:ro.has(e)?e.startsWith("scale")?Lk(t[1]):Fk:$k;function Bk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Cf=(e,t,n,r={},o,i)=>a=>{const s=df(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};Bk(s)||(u={...u,...zk(e,u)}),u.duration&&(u.duration=xn(u.duration)),u.repeatDelay&&(u.repeatDelay=xn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=cl(u.keyframes,s);if(p!==void 0)return nt.update(()=>{u.onUpdate(p),u.onComplete()}),new jx([])}return!i&&fh.supports(u)?new fh(u):new Ef(u)};function Hk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function kf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const p=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&Hk(u,d))continue;const h={delay:n,...df(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Dx(e);if(y){const v=window.MotionHandoffAnimation(y,d,nt);v!==null&&(h.startTime=v,g=!0)}}Nu(e,d),p.start(Cf(d,p,f,e.shouldReduceMotion&&Ox.has(d)?{type:!1}:h,e,g));const m=p.animation;m&&c.push(m)}return s&&Promise.all(c).then(()=>{nt.update(()=>{s&&vC(e,s)})}),c}function Yu(e,t,n={}){var r;const o=Qi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(kf(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=i;return Wk(e,t,u+c,d,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function Wk(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(qk).forEach((c,u)=>{c.notify("AnimationStart",t),a.push(Yu(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function qk(e,t){return e.sortNodePosition(t)}function Uk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Yu(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Yu(e,t,n);else{const o=typeof t=="function"?Qi(e,t,n.custom):t;r=Promise.all(kf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function yb(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 Kk=Xd.length;function xb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kk;n++){const r=Xd[n],o=e.props[r];(Gi(o)||o===!1)&&(t[r]=o)}return t}const Yk=[...Zd].reverse(),Gk=Zd.length;function Zk(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Uk(e,n,r)))}function Xk(e){let t=Zk(e),n=ph(),r=!0;const o=l=>(c,u)=>{var d;const p=Qi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:f,transitionEnd:h,...g}=p;c={...c,...g,...h}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=xb(e.parent)||{},d=[],p=new Set;let f={},h=1/0;for(let m=0;m<Gk;m++){const y=Yk[m],v=n[y],b=c[y]!==void 0?c[y]:u[y],S=Gi(b),w=y===l?v.isActive:null;w===!1&&(h=m);let T=b===u[y]&&b!==c[y]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),v.protectedKeys={...f},!v.isActive&&w===null||!b&&!v.prevProp||il(b)||typeof b=="boolean")continue;const C=Qk(v.prevProp,b);let k=C||y===l&&v.isActive&&!T&&S||m>h&&S,I=!1;const A=Array.isArray(b)?b:[b];let O=A.reduce(o(y),{});w===!1&&(O={});const{prevResolvedValues:N={}}=v,V={...N,...O},P=F=>{k=!0,p.has(F)&&(I=!0,p.delete(F)),v.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)};for(const F in V){const j=O[F],B=N[F];if(f.hasOwnProperty(F))continue;let M=!1;ju(j)&&ju(B)?M=!yb(j,B):M=j!==B,M?j!=null?P(F):p.add(F):j!==void 0&&p.has(F)?P(F):v.protectedKeys[F]=!0}v.prevProp=b,v.prevResolvedValues=O,v.isActive&&(f={...f,...O}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(T&&C)||I)&&d.push(...A.map(F=>({animation:F,options:{type:y}})))}if(p.size){const m={};if(typeof c.initial!="boolean"){const y=Qi(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(m.transition=y.transition)}p.forEach(y=>{const v=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),m[y]=v??null}),d.push({animation:m})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(p=>{var f;return(f=p.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=ph(),r=!0}}}function Qk(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yb(t,e):!1}function Mr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ph(){return{animate:Mr(!0),whileInView:Mr(),whileHover:Mr(),whileTap:Mr(),whileDrag:Mr(),whileFocus:Mr(),exit:Mr()}}class br{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Jk extends br{constructor(t){super(t),t.animationState||(t.animationState=Xk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();il(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let eR=0;class tR extends br{constructor(){super(...arguments),this.id=eR++}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 nR={animation:{Feature:Jk},exit:{Feature:tR}},hn={x:!1,y:!1};function bb(){return hn.x||hn.y}function rR(e){return e==="x"||e==="y"?hn[e]?null:(hn[e]=!0,()=>{hn[e]=!1}):hn.x||hn.y?null:(hn.x=hn.y=!0,()=>{hn.x=hn.y=!1})}function ea(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Rf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ba(e){return{point:{x:e.pageX,y:e.pageY}}}const oR=e=>t=>Rf(t)&&e(t,ba(t));function Ni(e,t,n,r){return ea(e,t,oR(n),r)}function wb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function iR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Sb=1e-4,sR=1-Sb,lR=1+Sb,Tb=.01,cR=0-Tb,uR=0+Tb;function zt(e){return e.max-e.min}function dR(e,t,n){return Math.abs(e-t)<=n}function mh(e,t,n,r=.5){e.origin=r,e.originPoint=st(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),e.translate=st(n.min,n.max,e.origin)-e.originPoint,(e.scale>=sR&&e.scale<=lR||isNaN(e.scale))&&(e.scale=1),(e.translate>=cR&&e.translate<=uR||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){mh(e.x,t.x,n.x,r?r.originX:void 0),mh(e.y,t.y,n.y,r?r.originY:void 0)}function hh(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function fR(e,t,n){hh(e.x,t.x,n.x),hh(e.y,t.y,n.y)}function gh(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function Li(e,t,n){gh(e.x,t.x,n.x),gh(e.y,t.y,n.y)}const vh=()=>({translate:0,scale:1,origin:0,originPoint:0}),So=()=>({x:vh(),y:vh()}),yh=()=>({min:0,max:0}),vt=()=>({x:yh(),y:yh()});function an(e){return[e("x"),e("y")]}function Dc(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!Dc(e)||!Dc(t)||!Dc(n)}function jr(e){return Gu(e)||Eb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Eb(e){return xh(e.x)||xh(e.y)}function xh(e){return e&&e!=="0%"}function hs(e,t,n){const r=e-n,o=t*r;return n+o}function bh(e,t,n,r,o){return o!==void 0&&(e=hs(e,o,r)),hs(e,n,r)+t}function Zu(e,t=0,n=1,r,o){e.min=bh(e.min,t,n,r,o),e.max=bh(e.max,t,n,r,o)}function Cb(e,{x:t,y:n}){Zu(e.x,t.translate,t.scale,t.originPoint),Zu(e.y,n.translate,n.scale,n.originPoint)}const wh=.999999999999,Sh=1.0000000000001;function pR(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Eo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Cb(e,a)),r&&jr(i.latestValues)&&Eo(e,i.latestValues))}t.x<Sh&&t.x>wh&&(t.x=1),t.y<Sh&&t.y>wh&&(t.y=1)}function To(e,t){e.min=e.min+t,e.max=e.max+t}function Th(e,t,n,r,o=.5){const i=st(e.min,e.max,o);Zu(e,t,n,i,r)}function Eo(e,t){Th(e.x,t.x,t.scaleX,t.scale,t.originX),Th(e.y,t.y,t.scaleY,t.scale,t.originY)}function kb(e,t){return wb(aR(e.getBoundingClientRect(),t))}function mR(e,t,n){const r=kb(e,n),{scroll:o}=t;return o&&(To(r.x,o.offset.x),To(r.y,o.offset.y)),r}const Rb=({current:e})=>e?e.ownerDocument.defaultView:null,Eh=(e,t)=>Math.abs(e-t);function hR(e,t){const n=Eh(e.x,t.x),r=Eh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Pb{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Nc(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=hR(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:h}=d,{timestamp:g}=Mt;this.history.push({...h,timestamp:g});const{onStart:m,onMove:y}=this.handlers;p||(m&&m(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=jc(p,this.transformPagePoint),nt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Nc(d.type==="pointercancel"?this.lastMoveEventInfo:jc(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,m),h&&h(d,m)},!Rf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=ba(t),s=jc(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=Mt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Nc(s,this.history)),this.removeListeners=xa(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Un(this.updatePoint)}}function jc(e,t){return t?{point:t(e.point)}:e}function Ch(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nc({point:e},t){return{point:e,delta:Ch(e,Ab(t)),offset:Ch(e,gR(t)),velocity:vR(t,.1)}}function gR(e){return e[0]}function Ab(e){return e[e.length-1]}function vR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ab(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>xn(t)));)n--;if(!r)return{x:0,y:0};const i=Dn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?st(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?st(n,e,r.max):Math.min(e,n)),e}function kh(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 xR(e,{top:t,left:n,bottom:r,right:o}){return{x:kh(e.x,n,o),y:kh(e.y,t,r)}}function Rh(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 bR(e,t){return{x:Rh(e.x,t.x),y:Rh(e.y,t.y)}}function wR(e,t){let n=.5;const r=zt(e),o=zt(t);return o>r?n=Kr(t.min,t.max-r,e.min):r>o&&(n=Kr(e.min,e.max-o,t.min)),Kn(0,1,n)}function SR(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 Xu=.35;function TR(e=Xu){return e===!1?e=0:e===!0&&(e=Xu),{x:Ph(e,"left","right"),y:Ph(e,"top","bottom")}}function Ph(e,t,n){return{min:Ah(e,t),max:Ah(e,n)}}function Ah(e,t){return typeof e=="number"?e:e[t]||0}const ER=new WeakMap;class CR{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=vt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ba(u).point)},i=(u,d)=>{const{drag:p,dragPropagation:f,onDragStart:h}=this.getProps();if(p&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=rR(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(m=>{let y=this.getAxisMotionValue(m).get()||0;if(On.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[m];b&&(y=zt(b)*(parseFloat(y)/100))}}this.originPoint[m]=y}),h&&nt.postRender(()=>h(u,d)),Nu(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(u,d)=>{const{dragPropagation:p,dragDirectionLock:f,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=d;if(f&&this.currentDirection===null){this.currentDirection=kR(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,m),this.updateAxis("y",d.point,m),this.visualElement.render(),g&&g(u,d)},s=(u,d)=>this.stop(u,d),l=()=>an(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Pb(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Rb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&nt.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Na(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=yR(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&bo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=xR(o.layoutBox,n):this.constraints=!1,this.elastic=TR(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&an(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=SR(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bo(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=mR(r,o.root,this.visualElement.getTransformPagePoint());let a=bR(o.layout.layoutBox,i);if(n){const s=n(iR(a));this.hasMutatedConstraints=!!s,s&&(a=wb(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=an(u=>{if(!Na(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const p=o?200:1e6,f=o?40:1e7,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Nu(this.visualElement,t),r.start(Cf(t,r,0,n,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){an(n=>{const{drag:r}=this.getProps();if(!Na(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n];i.set(t[n]-st(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!bo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};an(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=wR({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),an(a=>{if(!Na(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(st(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;ER.set(this.visualElement,this);const t=this.visualElement.current,n=Ni(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();bo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),nt.read(r);const a=ea(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(an(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Xu,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Na(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class RR extends br{constructor(t){super(t),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new CR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ih=e=>(t,n)=>{e&&nt.postRender(()=>e(t,n))};class PR extends br{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(t){this.session=new Pb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Rb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ih(t),onStart:Ih(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&nt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ni(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const rs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _h(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=_h(e,t.target.x),r=_h(e,t.target.y);return`${n}% ${r}%`}},AR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=pr.parse(e);if(o.length>5)return r;const i=pr.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=st(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}};class IR extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;zE(_R),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),rs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||nt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Qd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ib(e){const[t,n]=dx(),r=E.useContext(Yi);return x.jsx(IR,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(xx),isPresent:t,safeToRemove:n})}const _R={borderRadius:{...wi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wi,borderTopRightRadius:wi,borderBottomLeftRadius:wi,borderBottomRightRadius:wi,boxShadow:AR};function _b(e,t,n){const r=Pt(e)?e:No(e);return r.start(Cf("",r,t,n)),r.animation}function Ob(e){return e instanceof SVGElement&&e.tagName!=="svg"}const OR=(e,t)=>e.depth-t.depth;class MR{constructor(){this.children=[],this.isDirty=!1}add(t){ff(this.children,t),this.isDirty=!0}remove(t){sl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OR),this.isDirty=!1,this.children.forEach(t)}}function DR(e,t){const n=Mn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Un(r),e(i-t))};return nt.read(r,!0),()=>Un(r)}const Mb=["TopLeft","TopRight","BottomLeft","BottomRight"],jR=Mb.length,Oh=e=>typeof e=="string"?parseFloat(e):e,Mh=e=>typeof e=="number"||Se.test(e);function NR(e,t,n,r,o,i){o?(e.opacity=st(0,n.opacity!==void 0?n.opacity:1,FR(r)),e.opacityExit=st(t.opacity!==void 0?t.opacity:1,0,LR(r))):i&&(e.opacity=st(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<jR;a++){const s=`border${Mb[a]}Radius`;let l=Dh(t,s),c=Dh(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Mh(l)===Mh(c)?(e[s]=Math.max(st(Oh(l),Oh(c),r),0),(On.test(c)||On.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=st(t.rotate||0,n.rotate||0,r))}function Dh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const FR=Db(0,.5,qx),LR=Db(.5,.95,Kt);function Db(e,t,n){return r=>r<e?0:r>t?1:n(Kr(e,t,r))}function jh(e,t){e.min=t.min,e.max=t.max}function rn(e,t){jh(e.x,t.x),jh(e.y,t.y)}function Nh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Fh(e,t,n,r,o){return e-=t,e=hs(e,1/n,r),o!==void 0&&(e=hs(e,1/o,r)),e}function VR(e,t=0,n=1,r=.5,o,i=e,a=e){if(On.test(t)&&(t=parseFloat(t),t=st(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=st(i.min,i.max,r);e===i&&(s-=t),e.min=Fh(e.min,t,n,s,o),e.max=Fh(e.max,t,n,s,o)}function Lh(e,t,[n,r,o],i,a){VR(e,t[n],t[r],t[o],t.scale,i,a)}const $R=["x","scaleX","originX"],zR=["y","scaleY","originY"];function Vh(e,t,n,r){Lh(e.x,t,$R,n?n.x:void 0,r?r.x:void 0),Lh(e.y,t,zR,n?n.y:void 0,r?r.y:void 0)}function $h(e){return e.translate===0&&e.scale===1}function jb(e){return $h(e.x)&&$h(e.y)}function zh(e,t){return e.min===t.min&&e.max===t.max}function BR(e,t){return zh(e.x,t.x)&&zh(e.y,t.y)}function Bh(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Nb(e,t){return Bh(e.x,t.x)&&Bh(e.y,t.y)}function Hh(e){return zt(e.x)/zt(e.y)}function Wh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class HR{constructor(){this.members=[]}add(t){ff(this.members,t),t.scheduleRender()}remove(t){if(sl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function WR(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),h&&(r+=`skewY(${h}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const Fc=["","X","Y","Z"],qR={visibility:"hidden"},qh=1e3;let UR=0;function Lc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Fb(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",nt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Fb(r)}function Lb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t==null?void 0:t()){this.id=UR++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(GR),this.nodes.forEach(eP),this.nodes.forEach(tP),this.nodes.forEach(ZR)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new MR)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new pf),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ob(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=DR(p,250),rs.hasAnimatedSinceResize&&(rs.hasAnimatedSinceResize=!1,this.nodes.forEach(Kh))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||aP,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Nb(this.targetLayout,h),b=!p&&f;if(this.options.layoutRoot||this.resumeFrom||b||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const S={...df(g,"layout"),onPlay:m,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||Kh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Un(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(nP),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Uh);return}this.isUpdating||this.nodes.forEach(QR),this.isUpdating=!1,this.nodes.forEach(JR),this.nodes.forEach(KR),this.nodes.forEach(YR),this.clearAllSnapshots();const s=Mn.now();Mt.delta=Kn(0,1e3/60,s-Mt.timestamp),Mt.timestamp=s,Mt.isProcessing=!0,Ic.update.process(Mt),Ic.preRender.process(Mt),Ic.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(XR),this.sharedNodes.forEach(rP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){nt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!zt(this.snapshot.measuredBox.x)&&!zt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=vt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!jb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&(s||jr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),sP(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:s}=this.options;if(!s)return vt();const l=s.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(lP))){const{scroll:u}=this.root;u&&(To(l.x,u.offset.x),To(l.y,u.offset.y))}return l}removeElementScroll(a){var s;const l=vt();if(rn(l,a),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&rn(l,a),To(l.x,d.offset.x),To(l.y,d.offset.y))}return l}applyTransform(a,s=!1){const l=vt();rn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Eo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),jr(u.latestValues)&&Eo(l,u.latestValues)}return jr(this.latestValues)&&Eo(l,this.latestValues),l}removeTransform(a){const s=vt();rn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!jr(c.latestValues))continue;Gu(c.latestValues)&&c.updateSnapshot();const u=vt(),d=c.measurePageBox();rn(u,d),Vh(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return jr(this.latestValues)&&Vh(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var s;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=Mt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Li(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=vt(),this.targetWithTransforms=vt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Cb(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),Li(this.relativeTargetOrigin,this.target,f.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Gu(this.parent.latestValues)||Eb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;pR(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=vt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Nh(this.prevProjectionDelta.x,this.projectionDelta.x),Nh(this.prevProjectionDelta.y,this.projectionDelta.y)),Fi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!Wh(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=So(),this.projectionDelta=So(),this.projectionDeltaWithTransform=So()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=So();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=vt(),f=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=f!==h,m=this.getStack(),y=!m||m.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(iP));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const w=S/1e3;Yh(d.x,a.x,w),Yh(d.y,a.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Li(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oP(this.relativeTarget,this.relativeTargetOrigin,p,w),b&&BR(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=vt()),rn(b,this.relativeTarget)),g&&(this.animationValues=u,NR(u,c,this.latestValues,w,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nt.update(()=>{rs.hasAnimatedSinceResize=!0,this.currentAnimation=_b(0,qh,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&Vb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||vt();const d=zt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=zt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}rn(s,l),Eo(s,u),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new HR),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Lc("z",a,c,this.animationValues);for(let u=0;u<Fc.length;u++)Lc(`rotate${Fc[u]}`,a,c,this.animationValues),Lc(`skew${Fc[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}getProjectionStyles(a){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return qR;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ts(a==null?void 0:a.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=ts(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!jr(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const p=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=WR(this.projectionDeltaWithTransform,this.treeScale,p),u&&(c.transform=u(p,c.transform));const{x:f,y:h}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=p.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Zi){if(p[g]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:v}=Zi[g],b=c.transform==="none"?p[g]:m(p[g],d);if(y){const S=y.length;for(let w=0;w<S;w++)c[y[w]]=b}else v?this.options.visualElement.renderState.vars[g]=b:c[g]=b}return this.options.layoutId&&(c.pointerEvents=d===this?ts(a==null?void 0:a.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Uh),this.root.sharedNodes.clear()}}}function KR(e){e.updateLayout()}function YR(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(p);p.min=r[d].min,p.max=p.min+f}):Vb(i,n.layoutBox,r)&&an(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],f=zt(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=So();Fi(s,r,n.layoutBox);const l=So();a?Fi(l,e.applyTransform(o,!0),n.measuredBox):Fi(l,r,n.layoutBox);const c=!jb(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const h=vt();Li(h,n.layoutBox,p.layoutBox);const g=vt();Li(g,r,f.layoutBox),Nb(h,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function GR(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 ZR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function XR(e){e.clearSnapshot()}function Uh(e){e.clearMeasurements()}function QR(e){e.isLayoutDirty=!1}function JR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Kh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function eP(e){e.resolveTargetDelta()}function tP(e){e.calcProjection()}function nP(e){e.resetSkewAndRotation()}function rP(e){e.removeLeadSnapshot()}function Yh(e,t,n){e.translate=st(t.translate,0,n),e.scale=st(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gh(e,t,n,r){e.min=st(t.min,n.min,r),e.max=st(t.max,n.max,r)}function oP(e,t,n,r){Gh(e.x,t.x,n.x,r),Gh(e.y,t.y,n.y,r)}function iP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aP={duration:.45,ease:[.4,0,.1,1]},Zh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xh=Zh("applewebkit/")&&!Zh("chrome/")?Math.round:Kt;function Qh(e){e.min=Xh(e.min),e.max=Xh(e.max)}function sP(e){Qh(e.x),Qh(e.y)}function Vb(e,t,n){return e==="position"||e==="preserve-aspect"&&!dR(Hh(t),Hh(n),.2)}function lP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const cP=Lb({attachResizeListener:(e,t)=>ea(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vc={current:void 0},$b=Lb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vc.current){const e=new cP({});e.mount(window),e.setOptions({layoutScroll:!0}),Vc.current=e}return Vc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),uP={pan:{Feature:PR},drag:{Feature:RR,ProjectionNode:$b,MeasureLayout:Ib}};function zb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Bb(e,t){const n=zb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Jh(e){return!(e.pointerType==="touch"||bb())}function dP(e,t,n={}){const[r,o,i]=Bb(e,n),a=s=>{if(!Jh(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{Jh(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}function eg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&nt.postRender(()=>i(t,ba(t)))}class fP extends br{mount(){const{current:t}=this.node;t&&(this.unmount=dP(t,(n,r)=>(eg(this.node,r,"Start"),o=>eg(this.node,o,"End"))))}unmount(){}}class pP extends br{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=xa(ea(this.node.current,"focus",()=>this.onFocus()),ea(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Hb=(e,t)=>t?e===t?!0:Hb(e,t.parentElement):!1,mP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hP(e){return mP.has(e.tagName)||e.tabIndex!==-1}const Ri=new WeakSet;function tg(e){return t=>{t.key==="Enter"&&e(t)}}function $c(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const gP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=tg(()=>{if(Ri.has(n))return;$c(n,"down");const o=tg(()=>{$c(n,"up")}),i=()=>$c(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 ng(e){return Rf(e)&&!bb()}function vP(e,t,n={}){const[r,o,i]=Bb(e,n),a=s=>{const l=s.currentTarget;if(!ng(s)||Ri.has(l))return;Ri.add(l);const c=t(l,s),u=(f,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),!(!ng(f)||!Ri.has(l))&&(Ri.delete(l),typeof c=="function"&&c(f,{success:h}))},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||Hb(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",p,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),s instanceof HTMLElement&&(s.addEventListener("focus",c=>gP(c,o)),!hP(s)&&s.tabIndex===null&&(s.tabIndex=0))}),i}function rg(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&nt.postRender(()=>i(t,ba(t)))}class yP extends br{mount(){const{current:t}=this.node;t&&(this.unmount=vP(t,(n,r)=>(rg(this.node,r,"Start"),(o,{success:i})=>rg(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Qu=new WeakMap,zc=new WeakMap,xP=e=>{const t=Qu.get(e.target);t&&t(e)},bP=e=>{e.forEach(xP)};function wP({root:e,...t}){const n=e||document;zc.has(n)||zc.set(n,{});const r=zc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(bP,{root:e,...t})),r[o]}function SP(e,t,n){const r=wP(t);return Qu.set(e,n),r.observe(e),()=>{Qu.delete(e),r.unobserve(e)}}const TP={some:0,all:1};class EP extends br{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:TP[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),p=c?u:d;p&&p(l)};return SP(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(CP(t,n))&&this.startObserver()}unmount(){}}function CP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kP={inView:{Feature:EP},tap:{Feature:yP},focus:{Feature:pP},hover:{Feature:fP}},RP={layout:{ProjectionNode:$b,MeasureLayout:Ib}},Ju={current:null},Wb={current:!1};function PP(){if(Wb.current=!0,!!Gd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ju.current=e.matches;e.addListener(t),t()}else Ju.current=!1}const AP=[...ab,Nt,pr],IP=e=>AP.find(ib(e)),ta=new WeakMap;function _P(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rl(o.version==="12.6.2",`Attempting to mix Motion versions ${o.version} with 12.6.2 may not work as expected.`);else if(Pt(i))e.addValue(r,No(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,No(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const og=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class qb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Mn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,nt.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=a;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=al(n),this.isVariantNode=vx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const h=p[f];l[f]!==void 0&&Pt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,ta.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)),Wb.current||PP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ju.current,process.env.NODE_ENV!=="production"&&rl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Un(this.notifyUpdate),Un(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ro.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&nt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in jo){const n=jo[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):vt()}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<og.length;r++){const o=og[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=_P(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=No(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(rb(o)||Kx(o))?o=parseFloat(o):!IP(o)&&pr.test(n)&&(o=eb(t,n)),this.setBaseTarget(t,Pt(o)?o.get():o)),Pt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const a=cf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Pt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new pf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ub extends qb{constructor(){super(...arguments),this.KeyframeResolver=sb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function OP(e){return window.getComputedStyle(e)}class Kb extends Ub{constructor(){super(...arguments),this.type="html",this.renderInstance=Px}readValueFromInstance(t,n){if(ro.has(n))return UC(t,n);{const r=OP(t),o=(ef(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return kb(t,n)}build(t,n,r){rf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return uf(t,n,r)}}class Yb extends Ub{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Rx(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ro.has(n)){const r=Jx(n);return r&&r.default||0}return n=Ax.has(n)?n:Jd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return _x(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&nt.postRender(this.updateDimensions)}build(t,n,r){sf(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Ix(t,n,r,o)}mount(t){this.isSVGTag=lf(t.tagName),super.mount(t)}}const MP=(e,t)=>af(e)?new Yb(t):new Kb(t,{allowProjection:e!==E.Fragment}),DP=dC({...nR,...kP,...uP,...RP},MP),ft=RE(DP);function jP(e){return E.useEffect(()=>()=>e(),[])}function ul(e){const t=wn(()=>No(e)),{isStatic:n}=E.useContext(Do);if(n){const[,r]=E.useState(e);E.useEffect(()=>t.on("change",r),[])}return t}function Gb(e,t){const n=ul(t()),r=()=>n.set(t());return r(),tl(()=>{const o=()=>nt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),Un(r)}}),n}const NP=e=>e&&typeof e=="object"&&e.mix,FP=e=>NP(e)?e.mix:void 0;function LP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=mb(o,i,{mixer:FP(i[0]),...a});return t?s(r):s}function VP(e){Mi.current=[],e();const t=Gb(Mi.current,e);return Mi.current=void 0,t}function $P(e,t,n,r){if(typeof e=="function")return VP(e);const o=typeof t=="function"?t:LP(t,n,r);return Array.isArray(e)?ig(e,o):ig([e],([i])=>o(i))}function ig(e,t){const n=wn(()=>[]);return Gb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function zP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(wf(r),fs);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Dn(o)}}const BP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Zb(e,t){return pb(e)?e[BP(0,e.length,t)]:e}function Pf(e){return typeof e=="object"&&!Array.isArray(e)}function Xb(e,t,n,r){return typeof e=="string"&&Pf(t)?zb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function HP(e,t,n){return e*(t+1)}function ag(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function WP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(sl(e,o),r--)}}function qP(e,t,n,r,o,i){WP(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:st(o,i,r[a]),easing:Zb(n,a)})}function UP(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function KP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const YP="easeInOut",GP=20;function ZP(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,p=0;for(let f=0;f<e.length;f++){const h=e[f];if(typeof h=="string"){c.set(h,d);continue}else if(!Array.isArray(h)){c.set(h.name,ag(d,h.at,u,c));continue}let[g,m,y={}]=h;y.at!==void 0&&(d=ag(d,y.at,u,c));let v=0;const b=(S,w,T,C=0,k=0)=>{const I=XP(S),{delay:A=0,times:O=gb(I),type:N="keyframes",repeat:V,repeatType:P,repeatDelay:D=0,..._}=w;let{ease:F=t.ease||"easeOut",duration:j}=w;const B=typeof A=="function"?A(C,k):A,M=I.length,z=ll(N)?N:o==null?void 0:o[N];if(M<=2&&z){let Z=100;if(M===2&&eA(I)){const L=I[1]-I[0];Z=Math.abs(L)}const Y={..._};j!==void 0&&(Y.duration=xn(j));const G=zP(Y,Z,z);F=G.ease,j=G.duration}j??(j=i);const Q=d+B;O.length===1&&O[0]===0&&(O[1]=1);const X=O.length-I.length;if(X>0&&hb(O,X),I.length===1&&I.unshift(null),V){dn(V<GP,"Repeat count too high, must be less than 20"),j=HP(j,V);const Z=[...I],Y=[...O];F=Array.isArray(F)?[...F]:[F];const G=[...F];for(let L=0;L<V;L++){I.push(...Z);for(let $=0;$<Z.length;$++)O.push(Y[$]+(L+1)),F.push($===0?"linear":Zb(G,$-1))}UP(O,V)}const J=Q+j;qP(T,I,F,O,Q,J),v=Math.max(B+j,v),p=Math.max(J,p)};if(Pt(g)){const S=sg(g,s);b(m,y,lg("default",S))}else{const S=Xb(g,m,r,l),w=S.length;for(let T=0;T<w;T++){m=m,y=y;const C=S[T],k=sg(C,s);for(const I in m)b(m[I],QP(y,I),lg(I,k),T,w)}}u=d,d+=v}return s.forEach((f,h)=>{for(const g in f){const m=f[g];m.sort(KP);const y=[],v=[],b=[];for(let w=0;w<m.length;w++){const{at:T,value:C,easing:k}=m[w];y.push(C),v.push(Kr(0,p,T)),b.push(k||"easeOut")}v[0]!==0&&(v.unshift(0),y.unshift(y[0]),b.unshift(YP)),v[v.length-1]!==1&&(v.push(1),y.push(null)),a.has(h)||a.set(h,{keyframes:{},transition:{}});const S=a.get(h);S.keyframes[g]=y,S.transition[g]={...t,duration:p,ease:b,times:v,...n}}}),a}function sg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function lg(e,t){return t[e]||(t[e]=[]),t[e]}function XP(e){return Array.isArray(e)?e:[e]}function QP(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const JP=e=>typeof e=="number",eA=e=>e.every(JP);function tA(e,t){return e in t}class nA extends qb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(tA(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 vt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function rA(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ob(e)?new Yb(t):new Kb(t);n.mount(e),ta.set(e,n)}function oA(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new nA(t);n.mount(e),ta.set(e,n)}function iA(e,t){return Pt(e)||typeof e=="number"||typeof e=="string"&&!Pf(t)}function Qb(e,t,n,r){const o=[];if(iA(e,t))o.push(_b(e,Pf(t)&&t.default||t,n&&(n.default||n)));else{const i=Xb(e,t,r),a=i.length;dn(!!a,"No valid elements provided.");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?rA:oA;ta.has(l)||c(l);const u=ta.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...kf(u,{...t,transition:d},{}))}}return o}function aA(e,t,n){const r=[];return ZP(e,t,n,{spring:Tf}).forEach(({keyframes:i,transition:a},s)=>{r.push(...Qb(s,i,a))}),r}function sA(e){return Array.isArray(e)&&e.some(Array.isArray)}function lA(e){function t(n,r,o){let i=[];sA(n)?i=aA(n,r,e):i=Qb(n,r,o,e);const a=new jx(i);return e&&e.animations.push(a),a}return t}function cA(){const e=wn(()=>({current:null,animations:[]})),t=wn(()=>lA(e));return jP(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class uA{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const dA=()=>new uA;function fA(){return wn(dA)}function pA(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function mA(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:pA(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Ku(r)(l/c)*c}return t+l}}const Jb=E.createContext(null);function hA(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=st(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?fC(e,o,o+i):e}function gA({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=wn(()=>ft[t]),l=[],c=E.useRef(!1);dn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,p)=>{const f=l.findIndex(h=>d===h.value);f!==-1?l[f].layout=p[n]:l.push({value:d,layout:p[n]}),l.sort(yA)},updateOrder:(d,p,f)=>{if(c.current)return;const h=hA(l,d,p,f);l!==h&&(c.current=!0,r(h.map(vA).filter(g=>o.indexOf(g)!==-1)))}};return E.useEffect(()=>{c.current=!1}),x.jsx(s,{...i,ref:a,ignoreStrict:!0,children:x.jsx(Jb.Provider,{value:u,children:e})})}const e0=E.forwardRef(gA);function vA(e){return e.value}function yA(e,t){return e.layout.min-t.layout.min}function cg(e,t=0){return Pt(e)?e:ul(t)}function xA({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...a},s){const l=wn(()=>ft[r]),c=E.useContext(Jb),u={x:cg(t.x),y:cg(t.y)},d=$P([u.x,u.y],([g,m])=>g||m?1:"unset");dn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:p,registerItem:f,updateOrder:h}=c;return x.jsx(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(g,m)=>{const{velocity:y}=m;y[p]&&h(n,u[p].get(),y[p]),o&&o(g,m)},onLayoutMeasure:g=>f(n,g),ref:s,ignoreStrict:!0,children:e})}const t0=E.forwardRef(xA);/**
13
13
  * @license lucide-react v0.485.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
@@ -24,7 +24,7 @@
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const TA=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},c)=>E.createElement("svg",{ref:c,...SA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:n0("lucide",o),...s},[...a.map(([l,u])=>E.createElement(l,u)),...Array.isArray(i)?i:[i]]));/**
27
+ */const TA=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...SA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:n0("lucide",o),...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
28
28
  * @license lucide-react v0.485.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
@@ -149,7 +149,7 @@
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const sI=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dl=pt("x",sI),fg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},lI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},s0=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:fg,exit:fg.false,transition:lI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ie("aria-hidden:pointer-events-none",e.className),children:e.children}),cI={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"}},uI=ei("p-4 w-full block border relative rounded-lg text-sm",{variants:cI,defaultVariants:{theme:"neutral"}}),dI=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const c=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ie("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(s0,{"data-open":!!i,open:!!i,children:x.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ie(uI({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(o0,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(a0,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(nI,{"aria-hidden":"true",size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?x.jsx("button",{type:"button",onClick:c,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(dl,{size:20})}):null]})})})}),l0=6048e5,fI=864e5,pI=6e4,mI=36e5,hI=1e3,pg=Symbol.for("constructDateFrom");function it(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&pg in e?e[pg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return it(t||e,e)}function fl(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(t)?it((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function c0(e,t,n){const r=Je(e,n==null?void 0:n.in);if(isNaN(t))return it(e,NaN);if(!t)return r;const o=r.getDate(),i=it(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Co(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:c=0,seconds:l=0}=t,u=Je(e,n==null?void 0:n.in),d=o||r?c0(u,o+r*12):u,p=a||i?fl(d,a+i*7):d,f=c+s*60,g=(l+f*60)*1e3;return it(e,+p+g)}let gI={};function oo(){return gI}function Nn(e,t){var s,c,l,u;const n=oo(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??0,o=Je(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Vo(e,t){return Nn(e,{...t,weekStartsOn:1})}function u0(e,t){const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=it(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Vo(o),a=it(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Vo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function gs(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 pl(e,...t){const n=it.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $o(e,t){const n=Je(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function vI(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t),i=$o(r),a=$o(o),s=+i-gs(i),c=+a-gs(a);return Math.round((s-c)/fI)}function yI(e,t){const n=u0(e,t),r=it(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Vo(r)}function xI(e){return it(e,Date.now())}function bI(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return+$o(r)==+$o(o)}function wI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function d0(e){return!(!wI(e)&&typeof e!="number"||isNaN(+Je(e)))}function SI(e,t){const[n,r]=pl(e,t.start,t.end);return{start:n,end:r}}function f0(e,t){const{start:n,end:r}=SI(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const c=[];for(;+a<=i;)c.push(it(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?c.reverse():c}function p0(e,t){const n=Je(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function TI(e,t){const n=Je(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function EI(e,t){var s,c;const n=oo(),r=n.weekStartsOn??((c=(s=n.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??0,o=Je(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const CI={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"}},kI=(e,t,n)=>{let r;const o=CI[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Bc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const RI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},AI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},II={date:Bc({formats:RI,defaultWidth:"full"}),time:Bc({formats:PI,defaultWidth:"full"}),dateTime:Bc({formats:AI,defaultWidth:"full"})},_I={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},OI=(e,t,n,r)=>_I[e];function Si(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const MI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},DI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jI={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"]},NI={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"]},FI={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"}},LI={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"}},VI=(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"},$I={ordinalNumber:VI,era:Si({values:MI,defaultWidth:"wide"}),quarter:Si({values:DI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Si({values:jI,defaultWidth:"wide"}),day:Si({values:NI,defaultWidth:"wide"}),dayPeriod:Si({values:FI,defaultWidth:"wide",formattingValues:LI,defaultFormattingWidth:"wide"})};function Ti(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?BI(s,d=>d.test(a)):zI(s,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(a.length);return{value:l,rest:u}}}function zI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function BI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function HI(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const WI=/^(\d+)(th|st|nd|rd)?/i,qI=/\d+/i,UI={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},KI={any:[/^b/i,/^(a|c)/i]},YI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},GI={any:[/1/i,/2/i,/3/i,/4/i]},ZI={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},XI={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]},QI={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},JI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},e_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},t_={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}},n_={ordinalNumber:HI({matchPattern:WI,parsePattern:qI,valueCallback:e=>parseInt(e,10)}),era:Ti({matchPatterns:UI,defaultMatchWidth:"wide",parsePatterns:KI,defaultParseWidth:"any"}),quarter:Ti({matchPatterns:YI,defaultMatchWidth:"wide",parsePatterns:GI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ti({matchPatterns:ZI,defaultMatchWidth:"wide",parsePatterns:XI,defaultParseWidth:"any"}),day:Ti({matchPatterns:QI,defaultMatchWidth:"wide",parsePatterns:JI,defaultParseWidth:"any"}),dayPeriod:Ti({matchPatterns:e_,defaultMatchWidth:"any",parsePatterns:t_,defaultParseWidth:"any"})},m0={code:"en-US",formatDistance:kI,formatLong:II,formatRelative:OI,localize:$I,match:n_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function r_(e,t){const n=Je(e,t==null?void 0:t.in);return vI(n,TI(n))+1}function h0(e,t){const n=Je(e,t==null?void 0:t.in),r=+Vo(n)-+yI(n);return Math.round(r/l0)+1}function Of(e,t){var u,d,p,f;const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=oo(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=it((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Nn(a,t),c=it((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const l=Nn(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function o_(e,t){var s,c,l,u;const n=oo(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.firstWeekContainsDate)??1,o=Of(e,t),i=it((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Nn(i,t)}function g0(e,t){const n=Je(e,t==null?void 0:t.in),r=+Nn(n,t)-+o_(n,t);return Math.round(r/l0)+1}function Xe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ir={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Xe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Xe(n+1,2)},d(e,t){return Xe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Xe(e.getHours()%12||12,t.length)},H(e,t){return Xe(e.getHours(),t.length)},m(e,t){return Xe(e.getMinutes(),t.length)},s(e,t){return Xe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Xe(o,t.length)}},mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ir.y(e,t)},Y:function(e,t,n,r){const o=Of(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Xe(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Xe(i,t.length)},R:function(e,t){const n=u0(e);return Xe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Xe(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 Xe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Xe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ir.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Xe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=g0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Xe(o,t.length)},I:function(e,t,n){const r=h0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Xe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ir.d(e,t)},D:function(e,t,n){const r=r_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Xe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Xe(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Xe(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Xe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=mo.noon:r===0?o=mo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=mo.evening:r>=12?o=mo.afternoon:r>=4?o=mo.morning:o=mo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ir.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ir.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Xe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Xe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ir.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ir.s(e,t)},S:function(e,t){return ir.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return gg(r);case"XXXX":case"XX":return Nr(r);case"XXXXX":case"XXX":default:return Nr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return gg(r);case"xxxx":case"xx":return Nr(r);case"xxxxx":case"xxx":default:return Nr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hg(r,":");case"OOOO":default:return"GMT"+Nr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hg(r,":");case"zzzz":default:return"GMT"+Nr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Xe(r,t.length)},T:function(e,t,n){return Xe(+e,t.length)}};function hg(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+Xe(i,2)}function gg(e,t){return e%60===0?(e>0?"-":"+")+Xe(Math.abs(e)/60,2):Nr(e,t)}function Nr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Xe(Math.trunc(r/60),2),i=Xe(r%60,2);return n+o+t+i}const vg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},v0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},i_=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return vg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",vg(r,t)).replace("{{time}}",v0(o,t))},ed={p:v0,P:i_},a_=/^D+$/,s_=/^Y+$/,l_=["D","DD","YY","YYYY"];function y0(e){return a_.test(e)}function x0(e){return s_.test(e)}function td(e,t,n){const r=c_(e,t,n);if(console.warn(r),l_.includes(e))throw new RangeError(r)}function c_(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 u_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,d_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,f_=/^'([^]*?)'?$/,p_=/''/g,m_=/[a-zA-Z]/;function h_(e,t,n){var u,d,p,f;const r=oo(),o=r.locale??m0,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Je(e,n==null?void 0:n.in);if(!d0(s))throw new RangeError("Invalid time value");let c=t.match(d_).map(h=>{const g=h[0];if(g==="p"||g==="P"){const m=ed[g];return m(h,o.formatLong)}return h}).join("").match(u_).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const g=h[0];if(g==="'")return{isToken:!1,value:g_(h)};if(mg[g])return{isToken:!0,value:h};if(g.match(m_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:h}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const l={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return c.map(h=>{if(!h.isToken)return h.value;const g=h.value;(x0(g)||y0(g))&&td(g,t,String(e));const m=mg[g[0]];return m(s,g,o.localize,l)}).join("")}function g_(e){const t=e.match(f_);return t?t[1].replace(p_,"'"):e}function v_(){return Object.assign({},oo())}function y_(e,t){const n=Je(e,t==null?void 0:t.in).getDay();return n===0?7:n}function x_(e,t){return+Je(e)>+Je(t)}function b_(e,t){return+Je(e)<+Je(t)}function w_(e,t){const n=S_(t)?new t(0):it(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function S_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const T_=10;class b0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class E_ extends b0{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 C_ extends b0{constructor(n,r){super();de(this,"priority",T_);de(this,"subPriority",-1);this.context=n||(o=>it(r,o))}set(n,r){return r.timestampIsSet?n:it(n,w_(n,this.context))}}class Ue{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new E_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class k_ extends Ue{constructor(){super(...arguments);de(this,"priority",140);de(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const St={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Rn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Tt(e,t){return e&&{value:t(e.value),rest:e.rest}}function gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Pn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*mI+i*pI+a*hI),rest:t.slice(n[0].length)}}function w0(e){return gt(St.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(St.singleDigit,t);case 2:return gt(St.twoDigits,t);case 3:return gt(St.threeDigits,t);case 4:return gt(St.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function vs(e,t){switch(e){case 1:return gt(St.singleDigitSigned,t);case 2:return gt(St.twoDigitsSigned,t);case 3:return gt(St.threeDigitsSigned,t);case 4:return gt(St.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Mf(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function S0(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function T0(e){return e%400===0||e%4===0&&e%100!==0}class R_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return Tt(bt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=S0(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class P_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Tt(bt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Of(n,i);if(o.isTwoDigitYear){const c=S0(o.year,a);return n.setFullYear(c,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Nn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Nn(n,i)}}class A_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return vs(r==="R"?4:r.length,n)}set(n,r,o){const i=it(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Vo(i)}}class I_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return vs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class __ extends Ue{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return bt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class O_ extends Ue{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return bt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class M_ extends Ue{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return Tt(gt(St.month,n),i);case"MM":return Tt(bt(2,n),i);case"Mo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class D_ extends Ue{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return Tt(gt(St.month,n),i);case"LL":return Tt(bt(2,n),i);case"Lo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function j_(e,t,n){const r=Je(e,n==null?void 0:n.in),o=g0(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n==null?void 0:n.in)}class N_ extends Ue{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return gt(St.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return Nn(j_(n,o,i),i)}}function F_(e,t,n){const r=Je(e,n==null?void 0:n.in),o=h0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class L_ extends Ue{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return gt(St.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Vo(F_(n,o))}}const V_=[31,28,31,30,31,30,31,31,30,31,30,31],$_=[31,29,31,30,31,30,31,31,30,31,30,31];class z_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return gt(St.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=T0(o),a=n.getMonth();return i?r>=1&&r<=$_[a]:r>=1&&r<=V_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class B_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return gt(St.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear();return T0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Df(e,t,n){var d,p,f,h;const r=oo(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,i=Je(e,n==null?void 0:n.in),a=i.getDay(),c=(t%7+7)%7,l=7-o,u=t<0||t>6?t-(a+l)%7:(c+l)%7-(a+l)%7;return fl(i,u,n)}class H_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Df(n,o,i),n.setHours(0,0,0,0),n}}class W_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const c=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+c};switch(r){case"e":case"ee":return Tt(bt(r.length,n),a);case"eo":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Df(n,o,i),n.setHours(0,0,0,0),n}}class q_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const c=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+c};switch(r){case"c":case"cc":return Tt(bt(r.length,n),a);case"co":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Df(n,o,i),n.setHours(0,0,0,0),n}}function U_(e,t,n){const r=Je(e,n==null?void 0:n.in),o=y_(r,n),i=t-o;return fl(r,i,n)}class K_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return bt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Tt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return Tt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Tt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Tt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=U_(n,o),n.setHours(0,0,0,0),n}}class Y_ extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Mf(o),0,0,0),n}}class G_ extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Mf(o),0,0,0),n}}class Z_ extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Mf(o),0,0,0),n}}class X_ extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return gt(St.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class Q_ extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return gt(St.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class J_ extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return gt(St.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class eO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return gt(St.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class tO extends Ue{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return gt(St.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class nO extends Ue{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return gt(St.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class rO extends Ue{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Tt(bt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class oO extends Ue{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Pn(Rn.basicOptionalMinutes,n);case"XX":return Pn(Rn.basic,n);case"XXXX":return Pn(Rn.basicOptionalSeconds,n);case"XXXXX":return Pn(Rn.extendedOptionalSeconds,n);case"XXX":default:return Pn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:it(n,n.getTime()-gs(n)-o)}}class iO extends Ue{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Pn(Rn.basicOptionalMinutes,n);case"xx":return Pn(Rn.basic,n);case"xxxx":return Pn(Rn.basicOptionalSeconds,n);case"xxxxx":return Pn(Rn.extendedOptionalSeconds,n);case"xxx":default:return Pn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:it(n,n.getTime()-gs(n)-o)}}class aO extends Ue{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return w0(n)}set(n,r,o){return[it(n,o*1e3),{timestampIsSet:!0}]}}class sO extends Ue{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return w0(n)}set(n,r,o){return[it(n,o),{timestampIsSet:!0}]}}const lO={G:new k_,y:new R_,Y:new P_,R:new A_,u:new I_,Q:new __,q:new O_,M:new M_,L:new D_,w:new N_,I:new L_,d:new z_,D:new B_,E:new H_,e:new W_,c:new q_,i:new K_,a:new Y_,b:new G_,B:new Z_,h:new X_,H:new Q_,K:new J_,k:new eO,m:new tO,s:new nO,S:new rO,X:new oO,x:new iO,t:new aO,T:new sO},cO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dO=/^'([^]*?)'?$/,fO=/''/g,pO=/\S/,mO=/[a-zA-Z]/;function hO(e,t,n,r){var m,y,v,b;const o=()=>it(n,NaN),i=v_(),a=i.locale??m0,s=i.firstWeekContainsDate??((y=(m=i.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,c=i.weekStartsOn??((b=(v=i.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():Je(n,r==null?void 0:r.in);const l={firstWeekContainsDate:s,weekStartsOn:c,locale:a},u=[new C_(r==null?void 0:r.in,n)],d=t.match(uO).map(T=>{const w=T[0];if(w in ed){const S=ed[w];return S(T,a.formatLong)}return T}).join("").match(cO),p=[];for(let T of d){x0(T)&&td(T,t,e),y0(T)&&td(T,t,e);const w=T[0],S=lO[w];if(S){const{incompatibleTokens:C}=S;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${T}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);p.push({token:w,fullToken:T});const k=S.run(e,T,a.match,l);if(!k)return o();u.push(k.setter),e=k.rest}else{if(w.match(mO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(T==="''"?T="'":w==="'"&&(T=gO(T)),e.indexOf(T)===0)e=e.slice(T.length);else return o()}}if(e.length>0&&pO.test(e))return o();const f=u.map(T=>T.priority).sort((T,w)=>w-T).filter((T,w,S)=>S.indexOf(T)===w).map(T=>u.filter(w=>w.priority===T).sort((w,S)=>S.subPriority-w.subPriority)).map(T=>T[0]);let h=Je(n,r==null?void 0:r.in);if(isNaN(+h))return o();const g={};for(const T of f){if(!T.validate(h,l))return o();const w=T.set(h,g,l);Array.isArray(w)?(h=w[0],Object.assign(g,w[1])):h=w}return h}function gO(e){return e.match(dO)[1].replace(fO,"'")}function vO(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function yO(e,t){return bI(it(e,e),xI(e))}function xO(e,t,n){return fl(e,-t,n)}function bO(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(+r)?it(e,NaN):(r.setFullYear(t),r)}function wO(e,t,n){return c0(e,-t,n)}function Pi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:c=0,seconds:l=0}=t,u=wO(e,o+r*12,n),d=xO(u,a+i*7,n),p=c+s*60,h=(l+p*60)*1e3;return it(e,+d-h)}var Et=function(){return Et=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Et.apply(this,arguments)};function jf(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 nd(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}var na=function(e){return e.replace(new RegExp(" ","g")," ")},E0=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)},SO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},C0=function(e,t,n){var r=e.length-2,o=SO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},k0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ys=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},TO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Hc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},EO=function(e){return e==="money"||e==="currency"},CO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Et(Et({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Fa=function(e,t){var n=E0(k0(e),t.fraction.length),r="".concat(t.currency).concat(C0(n,t.group,t.decimal));return na(r)},kO=E.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var c=e.onChange,l=jf(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=CO(r,i,s);return h.currency=na("".concat(h.currency.trim()," ")),h.literal=na(h.literal.trim()),h},[r,i]),p=function(h){var g=Fa(h.target.value,d),m=ys(g);h.target.value=g,h.target.setAttribute("data-number",m.toString()),c==null||c(h),m!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var g=Fa(h,d),m=ys(g);u.current.value=g,u.current.setAttribute("data-number",m.toString());var y=new InputEvent("change",{});c==null||c(Et(Et({},y),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=l.defaultValue?Fa(l.defaultValue,d):void 0;return E.createElement("input",Et({},l,{value:typeof l.value=="string"?Fa(l.value,d):l.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),RO=1,PO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},AO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Et(Et({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},La=function(e,t){var n=E0(k0(e),t.fraction.length),r="".concat(C0(n,t.group,t.decimal)," ").concat(t.percentSign);return na(r)},IO=E.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=jf(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),c=nd(E.useState(function(){var y,v;return(v=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&v!==void 0?v:""}),2),l=c[0],u=c[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var y,v=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(La(v,d))},[a.value]);var d=E.useMemo(function(){var y=AO(r);return y.percentSign=na("".concat(y.percentSign)),y},[r]),p=l.length-d.percentSign.length-RO,f=function(y){var v,b=s.current;b&&(b.setSelectionRange(p,p),y&&((v=a.onFocus)===null||v===void 0||v.call(a,y)))},h=function(y){var v=y.currentTarget;if(v.selectionStart!==null){var b=v.selectionStart,T=v.selectionEnd,w=b!==T,S=p<b;!w&&S&&f()}i==null||i(y)},g=function(y){var v=La(y.target.value,d),b=ys(v);u(v),y.target.value=v,y.target.setAttribute("data-number",b.toString()),o==null||o(y)};E.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var v=La(y,d),b=ys(v);u(v),s.current.value=v,s.current.setAttribute("data-number",b.toString());var T=new InputEvent("change",{});o==null||o(Et(Et({},T),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[l]);var m=a.defaultValue?La(a.defaultValue,d):void 0;return E.createElement("input",Et({},a,{defaultValue:m,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),Ai={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},_O=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=xs[i];a===void 0?r.push(i.replace(Ai.dots,"\\.").replace(Ai.openParenthesis,"\\(").replace(Ai.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ai.leadingBars,"\\")},Vi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return rd(o,n);var i=_O(o);return n?"^".concat(i,"$"):i},OO=function(e){return e.replace(Ai.escape,"\\$&")},rd=function(e,t){var n=e.map(function(r){return typeof r=="string"?OO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},xs={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]/}},MO=/\d/,yg="(dd) 9dddd-dddd",xg="(dd) dddd-dddd",bg="ddd.ddd.ddd-dd",wg="dd.ddd.ddd/dddd-dd",os=function(e){return e.replace(/\D/g,"")},DO=["2",/[0-3]/,":",/[0-5]/,/\d/],jO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:bg,isoDate:"dddd-dd-dd",cnpj:wg,telephone:xg,cellphone:yg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return os(e).length<=11?bg:wg},int:function(e){return e===void 0&&(e=""),MO.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=os(e);return t.length<11?xg:yg},time:function(e){var t=os(e),n=t[0];return n==="2"?DO:jO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),Et({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Vi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:os}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Sg(e,t,n,r){var o,i;r===void 0&&(r=xs);for(var a=n(e),s="",c=0,l=0;c<t.length&&l<a.length;){var u=t[c],d=u instanceof RegExp?u:r[u],p=a[l];if(d===void 0){s+=u,p===u&&(l+=1),c+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),l+=1,c+=1}return s}var Tg=function(e){return e},NO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Vi(e,n,t));return r.test(n)};function FO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var LO=E.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,c=e.pattern,l=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=jf(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var g=Hc(s),m=Hc(d),y=Hc(u),v=E.useRef(NO(u,i,f.value||f.defaultValue)),b=p??"input",T=nd(E.useState(""),2),w=T[0],S=T[1],C=FO(w),k=E.useCallback(function(D,_){var F,j,B=(F=D??_)!==null&&F!==void 0?F:"";if(u===void 0)return B;var M=(j=B==null?void 0:B.toString())!==null&&j!==void 0?j:"";return Sg(M,typeof u=="function"?u(M):u,a??Tg,l??xs)},[a,u,l]),I=nd(E.useState(function(){return k(f.value,f.defaultValue)}),2),A=I[0],O=I[1],N=k(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(c||u===void 0)return c;if(typeof u=="function"){var D=u(A);return Array.isArray(D)?rd(D,i):Vi(u,A,i)}return typeof u=="string"?Vi(u,A,i):rd(u,i)},[c,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var D=k(f.value,f.defaultValue);O(D),h.current!==null&&(h.current.value=D)}},[f.value,u,a,f.defaultValue]);var P=function(D){var _,F,j,B,M,$=D.currentTarget,J=D.target.value;if(y.current===void 0)return O(J),(_=m.current)===null||_===void 0||_.call(m,J),(F=g.current)===null||F===void 0||F.call(g,D),d==null?void 0:d(J);var X=new RegExp(Vi(y.current,J,i)),Q=(j=$.selectionEnd)!==null&&j!==void 0?j:0,Z=function(K,ie,H){if(K.type!=="number")return K.setSelectionRange(ie,H)};if(r&&v.current&&J.length>=A.length)return $.value=A,Z($,Q-1,Q-1);var Y=!1;J.length<C.length&&(v.current=!1,Y=!0),X.test(J)&&(v.current=!0);var G=Q,L=J[G-1],z=Sg(J,typeof y.current=="function"?y.current(J):y.current,a??Tg,l??xs);for($.value=z,O(z);G<z.length&&z.charAt(G-1)!==L;)G+=1;Y?Z($,Q,Q):Z($,G,G),D.target.value=z,S(z),(B=m.current)===null||B===void 0||B.call(m,z),(M=g.current)===null||M===void 0||M.call(g,D)};return E.createElement(b,Et({},f,{ref:h,pattern:V,onChange:P,defaultValue:Eg(f.defaultValue)?N:void 0,value:Eg(f.value)?k(f.value,f.value):f.value}))}),Eg=function(e){return typeof e=="string"},R0=E.forwardRef(function(e,t){return EO(e.mask)?E.createElement(kO,Et({},e,{mask:void 0,ref:t})):PO(e.mask)?E.createElement(IO,Et({},e,{mask:void 0,ref:t})):E.createElement(LO,Et({},e,{ref:t}))}),Gt=function(e){return function(t){return E.createElement(R0,Et({},e,t))}};Gt($t.cellTelephone);Gt($t.cellphone);Gt($t.cep);Gt($t.cnpj);Gt($t.color);Gt($t.cpf);Gt($t.cpfCnpj);Gt($t.creditCard);Gt($t.date);Gt($t.int);Gt($t.isoDate);Gt($t.telephone);Gt($t.time);Gt($t.uuid);var P0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&TO($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return E.createElement(R0,Et({},o,{ref:n}))}),Va={exports:{}},Wc={},$a={exports:{}},qc={};/**
152
+ */const sI=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dl=pt("x",sI),fg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},lI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},s0=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:fg,exit:fg.false,transition:lI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ie("aria-hidden:pointer-events-none",e.className),children:e.children}),cI={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"}},uI=ei("p-4 w-full block border relative rounded-lg text-sm",{variants:cI,defaultVariants:{theme:"neutral"}}),dI=E.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ie("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:x.jsx(s0,{"data-open":!!i,open:!!i,children:x.jsxs(cn,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Ie(uI({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(o0,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?x.jsx(a0,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?x.jsx(nI,{"aria-hidden":"true",size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:a.title})]}),a.children,o!==void 0&&i?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(dl,{size:20})}):null]})})})}),l0=6048e5,fI=864e5,pI=6e4,mI=36e5,hI=1e3,pg=Symbol.for("constructDateFrom");function it(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&pg in e?e[pg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return it(t||e,e)}function fl(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(t)?it((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function c0(e,t,n){const r=Je(e,n==null?void 0:n.in);if(isNaN(t))return it(e,NaN);if(!t)return r;const o=r.getDate(),i=it(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Co(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n==null?void 0:n.in),d=o||r?c0(u,o+r*12):u,p=a||i?fl(d,a+i*7):d,f=l+s*60,g=(c+f*60)*1e3;return it(e,+p+g)}let gI={};function oo(){return gI}function Nn(e,t){var s,l,c,u;const n=oo(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Je(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Vo(e,t){return Nn(e,{...t,weekStartsOn:1})}function u0(e,t){const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=it(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Vo(o),a=it(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Vo(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function gs(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 pl(e,...t){const n=it.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function $o(e,t){const n=Je(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function vI(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t),i=$o(r),a=$o(o),s=+i-gs(i),l=+a-gs(a);return Math.round((s-l)/fI)}function yI(e,t){const n=u0(e,t),r=it(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Vo(r)}function xI(e){return it(e,Date.now())}function bI(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return+$o(r)==+$o(o)}function wI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function d0(e){return!(!wI(e)&&typeof e!="number"||isNaN(+Je(e)))}function SI(e,t){const[n,r]=pl(e,t.start,t.end);return{start:n,end:r}}function f0(e,t){const{start:n,end:r}=SI(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(it(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function p0(e,t){const n=Je(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function TI(e,t){const n=Je(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function EI(e,t){var s,l;const n=oo(),r=n.weekStartsOn??((l=(s=n.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Je(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const CI={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"}},kI=(e,t,n)=>{let r;const o=CI[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Bc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const RI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},AI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},II={date:Bc({formats:RI,defaultWidth:"full"}),time:Bc({formats:PI,defaultWidth:"full"}),dateTime:Bc({formats:AI,defaultWidth:"full"})},_I={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},OI=(e,t,n,r)=>_I[e];function Si(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const MI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},DI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jI={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"]},NI={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"]},FI={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"}},LI={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"}},VI=(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"},$I={ordinalNumber:VI,era:Si({values:MI,defaultWidth:"wide"}),quarter:Si({values:DI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Si({values:jI,defaultWidth:"wide"}),day:Si({values:NI,defaultWidth:"wide"}),dayPeriod:Si({values:FI,defaultWidth:"wide",formattingValues:LI,defaultFormattingWidth:"wide"})};function Ti(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?BI(s,d=>d.test(a)):zI(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function zI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function BI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function HI(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const WI=/^(\d+)(th|st|nd|rd)?/i,qI=/\d+/i,UI={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},KI={any:[/^b/i,/^(a|c)/i]},YI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},GI={any:[/1/i,/2/i,/3/i,/4/i]},ZI={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},XI={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]},QI={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},JI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},e_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},t_={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}},n_={ordinalNumber:HI({matchPattern:WI,parsePattern:qI,valueCallback:e=>parseInt(e,10)}),era:Ti({matchPatterns:UI,defaultMatchWidth:"wide",parsePatterns:KI,defaultParseWidth:"any"}),quarter:Ti({matchPatterns:YI,defaultMatchWidth:"wide",parsePatterns:GI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ti({matchPatterns:ZI,defaultMatchWidth:"wide",parsePatterns:XI,defaultParseWidth:"any"}),day:Ti({matchPatterns:QI,defaultMatchWidth:"wide",parsePatterns:JI,defaultParseWidth:"any"}),dayPeriod:Ti({matchPatterns:e_,defaultMatchWidth:"any",parsePatterns:t_,defaultParseWidth:"any"})},m0={code:"en-US",formatDistance:kI,formatLong:II,formatRelative:OI,localize:$I,match:n_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function r_(e,t){const n=Je(e,t==null?void 0:t.in);return vI(n,TI(n))+1}function h0(e,t){const n=Je(e,t==null?void 0:t.in),r=+Vo(n)-+yI(n);return Math.round(r/l0)+1}function Of(e,t){var u,d,p,f;const n=Je(e,t==null?void 0:t.in),r=n.getFullYear(),o=oo(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(p=o.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,a=it((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Nn(a,t),l=it((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Nn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function o_(e,t){var s,l,c,u;const n=oo(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Of(e,t),i=it((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Nn(i,t)}function g0(e,t){const n=Je(e,t==null?void 0:t.in),r=+Nn(n,t)-+o_(n,t);return Math.round(r/l0)+1}function Xe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ir={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Xe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Xe(n+1,2)},d(e,t){return Xe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Xe(e.getHours()%12||12,t.length)},H(e,t){return Xe(e.getHours(),t.length)},m(e,t){return Xe(e.getMinutes(),t.length)},s(e,t){return Xe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Xe(o,t.length)}},mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ir.y(e,t)},Y:function(e,t,n,r){const o=Of(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return Xe(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Xe(i,t.length)},R:function(e,t){const n=u0(e);return Xe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Xe(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 Xe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Xe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ir.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Xe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=g0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Xe(o,t.length)},I:function(e,t,n){const r=h0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Xe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ir.d(e,t)},D:function(e,t,n){const r=r_(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Xe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Xe(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Xe(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Xe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=mo.noon:r===0?o=mo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=mo.evening:r>=12?o=mo.afternoon:r>=4?o=mo.morning:o=mo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ir.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ir.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Xe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Xe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ir.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ir.s(e,t)},S:function(e,t){return ir.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return gg(r);case"XXXX":case"XX":return Nr(r);case"XXXXX":case"XXX":default:return Nr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return gg(r);case"xxxx":case"xx":return Nr(r);case"xxxxx":case"xxx":default:return Nr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hg(r,":");case"OOOO":default:return"GMT"+Nr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hg(r,":");case"zzzz":default:return"GMT"+Nr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Xe(r,t.length)},T:function(e,t,n){return Xe(+e,t.length)}};function hg(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+Xe(i,2)}function gg(e,t){return e%60===0?(e>0?"-":"+")+Xe(Math.abs(e)/60,2):Nr(e,t)}function Nr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Xe(Math.trunc(r/60),2),i=Xe(r%60,2);return n+o+t+i}const vg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},v0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},i_=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return vg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",vg(r,t)).replace("{{time}}",v0(o,t))},ed={p:v0,P:i_},a_=/^D+$/,s_=/^Y+$/,l_=["D","DD","YY","YYYY"];function y0(e){return a_.test(e)}function x0(e){return s_.test(e)}function td(e,t,n){const r=c_(e,t,n);if(console.warn(r),l_.includes(e))throw new RangeError(r)}function c_(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 u_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,d_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,f_=/^'([^]*?)'?$/,p_=/''/g,m_=/[a-zA-Z]/;function h_(e,t,n){var u,d,p,f;const r=oo(),o=r.locale??m0,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(p=r.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,s=Je(e,n==null?void 0:n.in);if(!d0(s))throw new RangeError("Invalid time value");let l=t.match(d_).map(h=>{const g=h[0];if(g==="p"||g==="P"){const m=ed[g];return m(h,o.formatLong)}return h}).join("").match(u_).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const g=h[0];if(g==="'")return{isToken:!1,value:g_(h)};if(mg[g])return{isToken:!0,value:h};if(g.match(m_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:h}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(h=>{if(!h.isToken)return h.value;const g=h.value;(x0(g)||y0(g))&&td(g,t,String(e));const m=mg[g[0]];return m(s,g,o.localize,c)}).join("")}function g_(e){const t=e.match(f_);return t?t[1].replace(p_,"'"):e}function v_(){return Object.assign({},oo())}function y_(e,t){const n=Je(e,t==null?void 0:t.in).getDay();return n===0?7:n}function x_(e,t){return+Je(e)>+Je(t)}function b_(e,t){return+Je(e)<+Je(t)}function w_(e,t){const n=S_(t)?new t(0):it(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function S_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const T_=10;class b0{constructor(){de(this,"subPriority",0)}validate(t,n){return!0}}class E_ extends b0{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 C_ extends b0{constructor(n,r){super();de(this,"priority",T_);de(this,"subPriority",-1);this.context=n||(o=>it(r,o))}set(n,r){return r.timestampIsSet?n:it(n,w_(n,this.context))}}class Ue{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new E_(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class k_ extends Ue{constructor(){super(...arguments);de(this,"priority",140);de(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const St={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Rn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Tt(e,t){return e&&{value:t(e.value),rest:e.rest}}function gt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Pn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*mI+i*pI+a*hI),rest:t.slice(n[0].length)}}function w0(e){return gt(St.anyDigitsSigned,e)}function bt(e,t){switch(e){case 1:return gt(St.singleDigit,t);case 2:return gt(St.twoDigits,t);case 3:return gt(St.threeDigits,t);case 4:return gt(St.fourDigits,t);default:return gt(new RegExp("^\\d{1,"+e+"}"),t)}}function vs(e,t){switch(e){case 1:return gt(St.singleDigitSigned,t);case 2:return gt(St.twoDigitsSigned,t);case 3:return gt(St.threeDigitsSigned,t);case 4:return gt(St.fourDigitsSigned,t);default:return gt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Mf(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function S0(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function T0(e){return e%400===0||e%4===0&&e%100!==0}class R_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="yy"});switch(r){case"y":return Tt(bt(4,n),i);case"yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const s=S0(o.year,i);return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class P_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=a=>({year:a,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Tt(bt(4,n),i);case"Yo":return Tt(o.ordinalNumber(n,{unit:"year"}),i);default:return Tt(bt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const a=Of(n,i);if(o.isTwoDigitYear){const l=S0(o.year,a);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Nn(n,i)}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Nn(n,i)}}class A_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return vs(r==="R"?4:r.length,n)}set(n,r,o){const i=it(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Vo(i)}}class I_ extends Ue{constructor(){super(...arguments);de(this,"priority",130);de(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return vs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class __ extends Ue{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return bt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class O_ extends Ue{constructor(){super(...arguments);de(this,"priority",120);de(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return bt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class M_ extends Ue{constructor(){super(...arguments);de(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);de(this,"priority",110)}parse(n,r,o){const i=a=>a-1;switch(r){case"M":return Tt(gt(St.month,n),i);case"MM":return Tt(bt(2,n),i);case"Mo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class D_ extends Ue{constructor(){super(...arguments);de(this,"priority",110);de(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=a=>a-1;switch(r){case"L":return Tt(gt(St.month,n),i);case"LL":return Tt(bt(2,n),i);case"Lo":return Tt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function j_(e,t,n){const r=Je(e,n==null?void 0:n.in),o=g0(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n==null?void 0:n.in)}class N_ extends Ue{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return gt(St.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return Nn(j_(n,o,i),i)}}function F_(e,t,n){const r=Je(e,n==null?void 0:n.in),o=h0(r,n)-t;return r.setDate(r.getDate()-o*7),r}class L_ extends Ue{constructor(){super(...arguments);de(this,"priority",100);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return gt(St.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Vo(F_(n,o))}}const V_=[31,28,31,30,31,30,31,31,30,31,30,31],$_=[31,29,31,30,31,30,31,31,30,31,30,31];class z_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"subPriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return gt(St.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=T0(o),a=n.getMonth();return i?r>=1&&r<=$_[a]:r>=1&&r<=V_[a]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class B_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"subpriority",1);de(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return gt(St.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return bt(r.length,n)}}validate(n,r){const o=n.getFullYear();return T0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Df(e,t,n){var d,p,f,h;const r=oo(),o=(n==null?void 0:n.weekStartsOn)??((p=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,i=Je(e,n==null?void 0:n.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return fl(i,u,n)}class H_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Df(n,o,i),n.setHours(0,0,0,0),n}}class W_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Tt(bt(r.length,n),a);case"eo":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Df(n,o,i),n.setHours(0,0,0,0),n}}class q_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const a=s=>{const l=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Tt(bt(r.length,n),a);case"co":return Tt(o.ordinalNumber(n,{unit:"day"}),a);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Df(n,o,i),n.setHours(0,0,0,0),n}}function U_(e,t,n){const r=Je(e,n==null?void 0:n.in),o=y_(r,n),i=t-o;return fl(r,i,n)}class K_ extends Ue{constructor(){super(...arguments);de(this,"priority",90);de(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=a=>a===0?7:a;switch(r){case"i":case"ii":return bt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return Tt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return Tt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Tt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Tt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=U_(n,o),n.setHours(0,0,0,0),n}}class Y_ extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Mf(o),0,0,0),n}}class G_ extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Mf(o),0,0,0),n}}class Z_ extends Ue{constructor(){super(...arguments);de(this,"priority",80);de(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Mf(o),0,0,0),n}}class X_ extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return gt(St.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class Q_ extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return gt(St.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class J_ extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return gt(St.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class eO extends Ue{constructor(){super(...arguments);de(this,"priority",70);de(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return gt(St.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return bt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class tO extends Ue{constructor(){super(...arguments);de(this,"priority",60);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return gt(St.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class nO extends Ue{constructor(){super(...arguments);de(this,"priority",50);de(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return gt(St.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return bt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class rO extends Ue{constructor(){super(...arguments);de(this,"priority",30);de(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Tt(bt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class oO extends Ue{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Pn(Rn.basicOptionalMinutes,n);case"XX":return Pn(Rn.basic,n);case"XXXX":return Pn(Rn.basicOptionalSeconds,n);case"XXXXX":return Pn(Rn.extendedOptionalSeconds,n);case"XXX":default:return Pn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:it(n,n.getTime()-gs(n)-o)}}class iO extends Ue{constructor(){super(...arguments);de(this,"priority",10);de(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Pn(Rn.basicOptionalMinutes,n);case"xx":return Pn(Rn.basic,n);case"xxxx":return Pn(Rn.basicOptionalSeconds,n);case"xxxxx":return Pn(Rn.extendedOptionalSeconds,n);case"xxx":default:return Pn(Rn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:it(n,n.getTime()-gs(n)-o)}}class aO extends Ue{constructor(){super(...arguments);de(this,"priority",40);de(this,"incompatibleTokens","*")}parse(n){return w0(n)}set(n,r,o){return[it(n,o*1e3),{timestampIsSet:!0}]}}class sO extends Ue{constructor(){super(...arguments);de(this,"priority",20);de(this,"incompatibleTokens","*")}parse(n){return w0(n)}set(n,r,o){return[it(n,o),{timestampIsSet:!0}]}}const lO={G:new k_,y:new R_,Y:new P_,R:new A_,u:new I_,Q:new __,q:new O_,M:new M_,L:new D_,w:new N_,I:new L_,d:new z_,D:new B_,E:new H_,e:new W_,c:new q_,i:new K_,a:new Y_,b:new G_,B:new Z_,h:new X_,H:new Q_,K:new J_,k:new eO,m:new tO,s:new nO,S:new rO,X:new oO,x:new iO,t:new aO,T:new sO},cO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dO=/^'([^]*?)'?$/,fO=/''/g,pO=/\S/,mO=/[a-zA-Z]/;function hO(e,t,n,r){var m,y,v,b;const o=()=>it(n,NaN),i=v_(),a=i.locale??m0,s=i.firstWeekContainsDate??((y=(m=i.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,l=i.weekStartsOn??((b=(v=i.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(!t)return e?o():Je(n,r==null?void 0:r.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new C_(r==null?void 0:r.in,n)],d=t.match(uO).map(S=>{const w=S[0];if(w in ed){const T=ed[w];return T(S,a.formatLong)}return S}).join("").match(cO),p=[];for(let S of d){x0(S)&&td(S,t,e),y0(S)&&td(S,t,e);const w=S[0],T=lO[w];if(T){const{incompatibleTokens:C}=T;if(Array.isArray(C)){const I=p.find(A=>C.includes(A.token)||A.token===w);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${S}\` at the same time`)}else if(T.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);p.push({token:w,fullToken:S});const k=T.run(e,S,a.match,c);if(!k)return o();u.push(k.setter),e=k.rest}else{if(w.match(mO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(S==="''"?S="'":w==="'"&&(S=gO(S)),e.indexOf(S)===0)e=e.slice(S.length);else return o()}}if(e.length>0&&pO.test(e))return o();const f=u.map(S=>S.priority).sort((S,w)=>w-S).filter((S,w,T)=>T.indexOf(S)===w).map(S=>u.filter(w=>w.priority===S).sort((w,T)=>T.subPriority-w.subPriority)).map(S=>S[0]);let h=Je(n,r==null?void 0:r.in);if(isNaN(+h))return o();const g={};for(const S of f){if(!S.validate(h,c))return o();const w=S.set(h,g,c);Array.isArray(w)?(h=w[0],Object.assign(g,w[1])):h=w}return h}function gO(e){return e.match(dO)[1].replace(fO,"'")}function vO(e,t,n){const[r,o]=pl(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function yO(e,t){return bI(it(e,e),xI(e))}function xO(e,t,n){return fl(e,-t,n)}function bO(e,t,n){const r=Je(e,n==null?void 0:n.in);return isNaN(+r)?it(e,NaN):(r.setFullYear(t),r)}function wO(e,t,n){return c0(e,-t,n)}function Pi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=wO(e,o+r*12,n),d=xO(u,a+i*7,n),p=l+s*60,h=(c+p*60)*1e3;return it(e,+d-h)}var Et=function(){return Et=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Et.apply(this,arguments)};function jf(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 nd(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}var na=function(e){return e.replace(new RegExp(" ","g")," ")},E0=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)},SO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},C0=function(e,t,n){var r=e.length-2,o=SO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},k0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ys=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},TO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Hc=function(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t},EO=function(e){return e==="money"||e==="currency"},CO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Et(Et({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Fa=function(e,t){var n=E0(k0(e),t.fraction.length),r="".concat(t.currency).concat(C0(n,t.group,t.decimal));return na(r)},kO=E.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=jf(e,["locale","currency","currencyDisplay","mask","onChange"]),u=E.useRef(null);E.useImperativeHandle(t,function(){return u.current});var d=E.useMemo(function(){var h=CO(r,i,s);return h.currency=na("".concat(h.currency.trim()," ")),h.literal=na(h.literal.trim()),h},[r,i]),p=function(h){var g=Fa(h.target.value,d),m=ys(g);h.target.value=g,h.target.setAttribute("data-number",m.toString()),l==null||l(h),m!==0&&(u.current.selectionEnd=g.length)};E.useEffect(function(){if(u.current!==null){var h=u.current.value;if(h!==""){var g=Fa(h,d),m=ys(g);u.current.value=g,u.current.setAttribute("data-number",m.toString());var y=new InputEvent("change",{});l==null||l(Et(Et({},y),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=g.length)}}},[d]);var f=c.defaultValue?Fa(c.defaultValue,d):void 0;return E.createElement("input",Et({},c,{value:typeof c.value=="string"?Fa(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:p,inputMode:"decimal"}))}),RO=1,PO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},AO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Et(Et({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},La=function(e,t){var n=E0(k0(e),t.fraction.length),r="".concat(C0(n,t.group,t.decimal)," ").concat(t.percentSign);return na(r)},IO=E.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=jf(e,["locale","mask","onChange","onKeyUp"]),s=E.useRef(null),l=nd(E.useState(function(){var y,v;return(v=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&v!==void 0?v:""}),2),c=l[0],u=l[1];E.useImperativeHandle(t,function(){return s.current}),E.useEffect(function(){var y,v=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(La(v,d))},[a.value]);var d=E.useMemo(function(){var y=AO(r);return y.percentSign=na("".concat(y.percentSign)),y},[r]),p=c.length-d.percentSign.length-RO,f=function(y){var v,b=s.current;b&&(b.setSelectionRange(p,p),y&&((v=a.onFocus)===null||v===void 0||v.call(a,y)))},h=function(y){var v=y.currentTarget;if(v.selectionStart!==null){var b=v.selectionStart,S=v.selectionEnd,w=b!==S,T=p<b;!w&&T&&f()}i==null||i(y)},g=function(y){var v=La(y.target.value,d),b=ys(v);u(v),y.target.value=v,y.target.setAttribute("data-number",b.toString()),o==null||o(y)};E.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var v=La(y,d),b=ys(v);u(v),s.current.value=v,s.current.setAttribute("data-number",b.toString());var S=new InputEvent("change",{});o==null||o(Et(Et({},S),{target:s.current,currentTarget:s.current}))}}},[]),E.useEffect(function(){return f()},[c]);var m=a.defaultValue?La(a.defaultValue,d):void 0;return E.createElement("input",Et({},a,{defaultValue:m,inputMode:"decimal",onChange:g,onFocus:f,onKeyUp:h,ref:s,type:"text"}))}),Ai={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},_O=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=xs[i];a===void 0?r.push(i.replace(Ai.dots,"\\.").replace(Ai.openParenthesis,"\\(").replace(Ai.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ai.leadingBars,"\\")},Vi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return rd(o,n);var i=_O(o);return n?"^".concat(i,"$"):i},OO=function(e){return e.replace(Ai.escape,"\\$&")},rd=function(e,t){var n=e.map(function(r){return typeof r=="string"?OO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},xs={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]/}},MO=/\d/,yg="(dd) 9dddd-dddd",xg="(dd) dddd-dddd",bg="ddd.ddd.ddd-dd",wg="dd.ddd.ddd/dddd-dd",os=function(e){return e.replace(/\D/g,"")},DO=["2",/[0-3]/,":",/[0-5]/,/\d/],jO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],qt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:bg,isoDate:"dddd-dd-dd",cnpj:wg,telephone:xg,cellphone:yg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return os(e).length<=11?bg:wg},int:function(e){return e===void 0&&(e=""),MO.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=os(e);return t.length<11?xg:yg},time:function(e){var t=os(e),n=t[0];return n==="2"?DO:jO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),Et({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Vi(e,"",!0),infinity:n.infinity},n)},$t={cellTelephone:Ut(qt.cellTelephone,"tel"),cellphone:Ut(qt.cellphone,"tel"),cep:Ut(qt.cep,"decimal"),cnpj:Ut(qt.cnpj,"decimal"),color:Ut(qt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(qt.cpf,"decimal"),cpfCnpj:Ut(qt.cpfCnpj,"decimal",{transform:os}),creditCard:Ut(qt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(qt.date,"decimal"),int:Ut(qt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(qt.isoDate,"decimal"),telephone:Ut(qt.telephone,"tel"),time:Ut(qt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(qt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Sg(e,t,n,r){var o,i;r===void 0&&(r=xs);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],p=a[c];if(d===void 0){s+=u,p===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(p)&&(s+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,p))!==null&&i!==void 0?i:p),c+=1,l+=1}return s}var Tg=function(e){return e},NO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Vi(e,n,t));return r.test(n)};function FO(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e},[e]),t.current}var LO=E.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,p=e.as,f=jf(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),h=E.useRef(null);E.useImperativeHandle(t,function(){return h.current});var g=Hc(s),m=Hc(d),y=Hc(u),v=E.useRef(NO(u,i,f.value||f.defaultValue)),b=p??"input",S=nd(E.useState(""),2),w=S[0],T=S[1],C=FO(w),k=E.useCallback(function(D,_){var F,j,B=(F=D??_)!==null&&F!==void 0?F:"";if(u===void 0)return B;var M=(j=B==null?void 0:B.toString())!==null&&j!==void 0?j:"";return Sg(M,typeof u=="function"?u(M):u,a??Tg,c??xs)},[a,u,c]),I=nd(E.useState(function(){return k(f.value,f.defaultValue)}),2),A=I[0],O=I[1],N=k(f.defaultValue,f.defaultValue),V=E.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(A);return Array.isArray(D)?rd(D,i):Vi(u,A,i)}return typeof u=="string"?Vi(u,A,i):rd(u,i)},[l,A,i,u]);E.useEffect(function(){if(f.value!==void 0){var D=k(f.value,f.defaultValue);O(D),h.current!==null&&(h.current.value=D)}},[f.value,u,a,f.defaultValue]);var P=function(D){var _,F,j,B,M,z=D.currentTarget,Q=D.target.value;if(y.current===void 0)return O(Q),(_=m.current)===null||_===void 0||_.call(m,Q),(F=g.current)===null||F===void 0||F.call(g,D),d==null?void 0:d(Q);var X=new RegExp(Vi(y.current,Q,i)),J=(j=z.selectionEnd)!==null&&j!==void 0?j:0,Z=function(K,ie,H){if(K.type!=="number")return K.setSelectionRange(ie,H)};if(r&&v.current&&Q.length>=A.length)return z.value=A,Z(z,J-1,J-1);var Y=!1;Q.length<C.length&&(v.current=!1,Y=!0),X.test(Q)&&(v.current=!0);var G=J,L=Q[G-1],$=Sg(Q,typeof y.current=="function"?y.current(Q):y.current,a??Tg,c??xs);for(z.value=$,O($);G<$.length&&$.charAt(G-1)!==L;)G+=1;Y?Z(z,J,J):Z(z,G,G),D.target.value=$,T($),(B=m.current)===null||B===void 0||B.call(m,$),(M=g.current)===null||M===void 0||M.call(g,D)};return E.createElement(b,Et({},f,{ref:h,pattern:V,onChange:P,defaultValue:Eg(f.defaultValue)?N:void 0,value:Eg(f.value)?k(f.value,f.value):f.value}))}),Eg=function(e){return typeof e=="string"},R0=E.forwardRef(function(e,t){return EO(e.mask)?E.createElement(kO,Et({},e,{mask:void 0,ref:t})):PO(e.mask)?E.createElement(IO,Et({},e,{mask:void 0,ref:t})):E.createElement(LO,Et({},e,{ref:t}))}),Gt=function(e){return function(t){return E.createElement(R0,Et({},e,t))}};Gt($t.cellTelephone);Gt($t.cellphone);Gt($t.cep);Gt($t.cnpj);Gt($t.color);Gt($t.cpf);Gt($t.cpfCnpj);Gt($t.creditCard);Gt($t.date);Gt($t.int);Gt($t.isoDate);Gt($t.telephone);Gt($t.time);Gt($t.uuid);var P0=E.forwardRef(function(t,n){var r=E.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&TO($t,t.mask)?$t[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return E.createElement(R0,Et({},o,{ref:n}))}),Va={exports:{}},Wc={},$a={exports:{}},qc={};/**
153
153
  * @license React
154
154
  * use-sync-external-store-shim.production.js
155
155
  *
@@ -157,7 +157,7 @@
157
157
  *
158
158
  * This source code is licensed under the MIT license found in the
159
159
  * LICENSE file in the root directory of this source tree.
160
- */var Cg;function VO(){if(Cg)return qc;Cg=1;var e=E;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),h=r({inst:{value:f,getSnapshot:p}}),g=h[0].inst,m=h[1];return i(function(){g.value=f,g.getSnapshot=p,c(g)&&m({inst:g})},[d,f,p]),o(function(){return c(g)&&m({inst:g}),d(function(){c(g)&&m({inst:g})})},[d]),a(f),f}function c(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function l(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return qc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qc}var Uc={};/**
160
+ */var Cg;function VO(){if(Cg)return qc;Cg=1;var e=E;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var f=p(),h=r({inst:{value:f,getSnapshot:p}}),g=h[0].inst,m=h[1];return i(function(){g.value=f,g.getSnapshot=p,l(g)&&m({inst:g})},[d,f,p]),o(function(){return l(g)&&m({inst:g}),d(function(){l(g)&&m({inst:g})})},[d]),a(f),f}function l(d){var p=d.getSnapshot;d=d.value;try{var f=p();return!n(d,f)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return qc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qc}var Uc={};/**
161
161
  * @license React
162
162
  * use-sync-external-store-shim.development.js
163
163
  *
@@ -165,7 +165,7 @@
165
165
  *
166
166
  * This source code is licensed under the MIT license found in the
167
167
  * LICENSE file in the root directory of this source tree.
168
- */var kg;function $O(){return kg||(kg=1,process.env.NODE_ENV!=="production"&&function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}function t(f,h){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=h();if(!d){var m=h();i(g,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:g,getSnapshot:h}});var y=m[0].inst,v=m[1];return c(function(){y.value=g,y.getSnapshot=h,n(y)&&v({inst:y})},[f,g,h]),s(function(){return n(y)&&v({inst:y}),f(function(){n(y)&&v({inst:y})})},[f]),l(g),g}function n(f){var h=f.getSnapshot;f=f.value;try{var g=h();return!i(f,g)}catch{return!0}}function r(f,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,c=o.useLayoutEffect,l=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Uc.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Uc}var Rg;function A0(){return Rg||(Rg=1,process.env.NODE_ENV==="production"?$a.exports=VO():$a.exports=$O()),$a.exports}/**
168
+ */var kg;function $O(){return kg||(kg=1,process.env.NODE_ENV!=="production"&&function(){function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}function t(f,h){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=h();if(!d){var m=h();i(g,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:g,getSnapshot:h}});var y=m[0].inst,v=m[1];return l(function(){y.value=g,y.getSnapshot=h,n(y)&&v({inst:y})},[f,g,h]),s(function(){return n(y)&&v({inst:y}),f(function(){n(y)&&v({inst:y})})},[f]),c(g),g}function n(f){var h=f.getSnapshot;f=f.value;try{var g=h();return!i(f,g)}catch{return!0}}function r(f,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Uc.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Uc}var Rg;function A0(){return Rg||(Rg=1,process.env.NODE_ENV==="production"?$a.exports=VO():$a.exports=$O()),$a.exports}/**
169
169
  * @license React
170
170
  * use-sync-external-store-shim/with-selector.production.js
171
171
  *
@@ -173,7 +173,7 @@
173
173
  *
174
174
  * This source code is licensed under the MIT license found in the
175
175
  * LICENSE file in the root directory of this source tree.
176
- */var Pg;function zO(){if(Pg)return Wc;Pg=1;var e=E,t=A0();function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;return Wc.useSyncExternalStoreWithSelector=function(l,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(S){if(!v){if(v=!0,b=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(b,S))return C;var k=p(S);return f!==void 0&&f(C,k)?(b=S,C):(b=S,T=k)}var v=!1,b,T,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var m=o(l,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),c(m),m},Wc}var Kc={};/**
176
+ */var Pg;function zO(){if(Pg)return Wc;Pg=1;var e=E,t=A0();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Wc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(T){if(!v){if(v=!0,b=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(b,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(b=T,C):(b=T,S=k)}var v=!1,b,S,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},Wc}var Kc={};/**
177
177
  * @license React
178
178
  * use-sync-external-store-shim/with-selector.development.js
179
179
  *
@@ -181,32 +181,32 @@
181
181
  *
182
182
  * This source code is licensed under the MIT license found in the
183
183
  * LICENSE file in the root directory of this source tree.
184
- */var Ag;function BO(){return Ag||(Ag=1,process.env.NODE_ENV!=="production"&&function(){function e(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=E,n=A0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,c=t.useDebugValue;Kc.useSyncExternalStoreWithSelector=function(l,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(S){if(!v){if(v=!0,b=S,S=p(S),f!==void 0&&g.hasValue){var C=g.value;if(f(C,S))return T=C}return T=S}if(C=T,r(b,S))return C;var k=p(S);return f!==void 0&&f(C,k)?(b=S,C):(b=S,T=k)}var v=!1,b,T,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var m=o(l,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),c(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Kc}var Ig;function HO(){return Ig||(Ig=1,process.env.NODE_ENV==="production"?Va.exports=zO():Va.exports=BO()),Va.exports}HO();var zo=function(){return zo=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},zo.apply(this,arguments)};function $i(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function I0(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))}var ho=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},WO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},qO=function(e){return Object.entries(e)},_0=function(e){return e instanceof Promise},O0=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)},zo(zo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},UO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var c=performance.now(),l=t.apply(void 0,I0([],$i(a),!1)),u=function(d,p){return n(function(f){return O0(d,f,i,p)})};return _0(l)?l.then(function(d){o.current={method:e,props:r(),time:performance.now()-c},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-c},void u(l,o.current))}},KO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var c=t.apply(void 0,I0([],$i(a),!1)),l=function(u){return n(function(d){return O0(u,d,i,o.current)})};return _0(c)?c.then(function(u){return l(u)}):l(c)}},Nf=function(e,t,n){var r,o,i,a=$i(E.useState(function(){return e}),2),s=a[0],c=a[1],l=ho(s),u=ho((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=ho(t),p=ho((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=ho((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),g=WO(s),m=ho(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var T=y.current;p.current.forEach(function(w){w(s,g,T)})}},[s,p,g]);var v=$i(E.useState(function(){var T=function(){return u.current},w=d.current({props:T,state:function(){return l.current},initialState:h.current,previousState:function(){return m.current}});return qO(w).reduce(function(S,C){var k,I=$i(C,2),A=I[0],O=I[1];return zo(zo({},S),(k={},k[A]=n!=null&&n.debug?UO(A,O,c,T,y,f.current):KO(A,O,c,T,y,f.current),k))},{})}),1),b=v[0];return[s,b,u.current]};const YO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function GO(e,t){return E.useRef(YO(e,t)).current}const ml={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>)`},Vr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const c=r===""?`${n}${i}`:i;return o.concat(t(a,c,s))}return o.concat(Vr(a,t,n,s))},[]),M0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const c=r===""?`${n}${i}`:i;return{...o,[c]:t(a,i,s)}}return{...o,[i]:M0(a,t,n,s)}},{}),_g={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},bs=(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)},ZO={default:e=>bs(e,{result:_g.default}),dark:e=>bs(e,{result:_g.dark})},Ei=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},XO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Ff=(e,t)=>{const n=Vr(e.colors,Ei(t==null?void 0:t.colors)),r=Vr(e.spacing,Ei(t==null?void 0:t.spacing)),o=Vr(e.rounded,Ei(t==null?void 0:t.rounded)),i=Vr(e.zIndex,Ei((t==null?void 0:t.zIndex)??XO)),a=e.custom?Vr(e.custom,Ei(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},QO=(e,t)=>bs(Ff(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),JO=(e,t)=>Ff(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),eM=(e,t)=>bs(Ff(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),hl={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>x.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type"},gl={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},si=E.createContext({tweaks:gl,parser:ml.hsla,map:hl,locale:void 0}),Lf=e=>{const t=E.useContext(si);if(e)return e;if(t)return t.locale||e};function tM(e,t){const n=E.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const At=()=>{const e=E.useContext(si);return e?e.map:hl},on=(e,t=2)=>e.toString(16).padStart(t,"0"),li=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${on(t,4)+on(n,3)}-${on(r[0])+on(r[1])}-${on(r[2])+on(r[3])}-${on(r[4])+on(r[5])}-${on(r[6])+on(r[7])+on(r[8])+on(r[9])}`},Og=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Mg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Vf=(e,t)=>{const n=Og(t,Mg.basic,e)||Og(t,Mg.extend,e);return n===void 0||n===e?void 0:n},Yr=()=>typeof window>"u",od=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),D0=(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},nM=e=>!e,$f=()=>{},j0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},rM={type:"spring",bounce:.3,duration:.6},Dg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),N0={enter:Dg(1),exit:Dg(-1),middle:{x:"0%",opacity:1}},jg={exit:{visibility:"hidden"}},oM=e=>{const t=Nn(p0(e));return f0({start:t,end:Co(t,{days:41})})},F0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),iM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=p0(new Date(1970,o,1).setMonth(o)),a=F0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Yc={ArrowLeft:(e,t)=>t==="days"?Pi(e,{days:1}):Pi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Co(e,{days:1}):Co(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Pi(e,{weeks:1}):Pi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Co(e,{weeks:1}):Co(e,{years:1})},Ng=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Dr=e=>e.getFullYear().toString().padStart(4,"0"),aM=(e,t,n)=>e===void 0||n===void 0?!1:x_(t,e)&&b_(t,n),sM=e=>{var n;const t=At();return x.jsx(ft.tbody,{layout:!0,variants:N0,custom:e.direction,onKeyDown:e.onKeyDown,className:Ie((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,c;const i=Ve.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(c=e.styles)==null?void 0:c.week;return x.jsx("tr",{className:i,children:r.map(l=>{var y,v,b,T,w,S,C,k,I,A,O,N,V,P,D,_,F,j;const u=l.toISOString(),d=e.rangeMode?u===((v=(y=e.range)==null?void 0:y.to)==null?void 0:v.toISOString())||u===((T=(b=e.range)==null?void 0:b.from)==null?void 0:T.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=yO(l)&&e.markToday,f=((S=e.disabledDate)==null?void 0:S.call(e,l))||!1,h=vO(l,e.stateDate),g=!h||f,m=e.rangeMode?aM((C=e.range)==null?void 0:C.from,l,(k=e.range)==null?void 0:k.to):!1;return x.jsxs("td",{align:"center",className:Ie("relative",Ve.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(l):(O=e.styles)==null?void 0:O.dayFrame),children:[x.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":h,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Ie(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,m&&e.markRange?"size-10 border border-dashed border-card-border":"",Ve.function((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(l):(P=e.styles)==null?void 0:P.day),children:[l.getDate(),d&&((D=e.stateRange.from)==null?void 0:D.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((_=e.labelRange)==null?void 0:_.from)??t.calendarFromDate})}):null,d&&((F=e.stateRange.to)==null?void 0:F.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:l}):null]},u)})},`week-${r.length}-${o}`)})})},lM=()=>$o(new Date),L0=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:c=!1,onChange:l,styles:u,markRange:d=!0,...p})=>{const f=E.useRef(li()),h=At(),g=Lf(o),m=E.useRef(null),{date:y,range:v}=p,b=y||new Date,T=E.useRef(null),[w,S]=Nf({date:b,isAnimating:!1,year:Dr(b),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:iM(f.current,b,g),selectMode:c?"from":void 0,week:f0({start:Nn(b),end:EI(b)})},P=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(Ng(T.current||null,m,P.state().date,200),T.current=null,{isAnimating:!1}),date:D=>{const _=D(P.state().date);return{date:_,year:Dr(_)}},nextMonth:D=>{D&&(T.current=D.currentTarget);const _=P.state();if(_.isAnimating)return _;const F=Co(_.date,{months:1});return{date:F,isAnimating:!0,direction:1,year:Dr(F)}},previousMonth:D=>{D&&(T.current=D.currentTarget);const _=P.state();if(_.isAnimating)return _;const F=Pi(_.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Dr(F)}},onSelectDate:D=>{const _=P.state(),F=D.currentTarget.dataset.range==="true",j=D.currentTarget.dataset.date||"",B=new Date(j);return{date:B,year:Dr(B),selectMode:_.selectMode===void 0?void 0:_.selectMode==="from"?"to":"from",range:F?{from:_.selectMode==="from"?B:_.range.from,to:_.selectMode==="to"?B:_.range.to}:_.range}},onChangeMonth:D=>{const _=D.target.value,j=Array.from(D.target.options).find(M=>M.value===_),B=P.state();if(j){const M=j.dataset.index||"",$=new Date(P.state().date);return $.setMonth(+M),{...B,date:$,year:Dr($)}}return B},onKeyDown:D=>{const _=D.key,F=P.state();if(_ in Yc){(_==="ArrowUp"||_==="ArrowDown")&&D.preventDefault();const j=P.state().date,B=Ve.keyof(Yc,_)?Yc[_](j,D.shiftKey?"month":"days"):null;if(B!==null)return Ng(D.target,m,B),{...F,date:B,year:Dr(B)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,D,_)=>{var j,B;return(_.method==="onChangeMonth"||_.method==="previousMonth"||_.method==="nextMonth")&&((B=(j=_.props).onChangeMonth)==null||B.call(j,P.date)),P},(P,D,_)=>{var j,B;return _.method==="onChangeYear"&&((B=(j=_.props).onChangeYear)==null||B.call(j,P.date)),P},(P,D,_)=>{const F=_.method==="onSelectDate"||_.method==="setToday"||_.method==="onKeyDown";return c&&F&&t?(l==null||l(P.range),P):(F&&t&&(l==null||l(P.date)),P)}]}),C=oM(w.date),k=D0(C,7),I=w.date.toISOString(),A=F0(w.date,g);E.useEffect(()=>{t||l==null||l(w.date)},[I,t]);const O=GO(P=>S.date(D=>bO(new Date(D),+P)),1200),N=P=>{const D=P.currentTarget.value;S.onChangeYear(D),s==null||s(new Date(D)),O(D)},V=tM((P,D)=>(P.preventDefault(),D==="right"?S.previousMonth():S.nextMonth()),10);return x.jsx(kE,{transition:rM,children:x.jsxs("div",{ref:m,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:Ie("relative overflow-hidden",Ve.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(xr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:S.onExitComplete,children:x.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:jg,onClick:S.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(MA,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:N0,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{value:A,onChange:S.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),x.jsx(P0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:jg,onClick:S.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(If,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:w.week.map(P=>x.jsx("th",{role:"columnheader",className:Ie("py-2 text-sm font-medium capitalize",Ve.function(u==null?void 0:u.weekDay)?u.weekDay(P):u==null?void 0:u.weekDay),children:P.toLocaleDateString(g,{weekday:"short"})},P.toString()))})}),x.jsx(sM,{zip:k,range:v,styles:u,date:y||null,dispatch:S,markRange:d,markToday:i,rangeMode:c,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:S.onKeyDown})]})]},A)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{type:"button",onClick:()=>S.date(lM),className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},zf=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>x.jsxs(cn,{...s,as:r,"data-component":"card",className:Ie("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{"data-component":"card-title",className:Ie("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,x.jsx("div",{"data-component":"card-body",className:Ie("min-w-full px-4 lg:px-8",a),children:e})]});zf.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return x.jsxs(i,{...o,title:Ve.string(o.title)?o.title:void 0,className:Ie("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[x.jsx(a,{className:"font-semibold",children:o.title}),r?x.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const V0=e=>{const t=e.Icon??i0,n=At();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Fg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Fg(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():Fg(e[o],null)}}}}function Gr(...e){return R.useCallback($0(...e),e)}function z0(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),c=n.length;n=[...n,a];const l=d=>{var y;const{scope:p,children:f,...h}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[c])||s,m=R.useMemo(()=>h,Object.values(h));return x.jsx(g.Provider,{value:m,children:f})};l.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,h=R.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,cM(o,...t)]}function cM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Bo=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),i=o.find(dM);if(i){const a=i.props.children,s=o.map(c=>c===i?R.Children.count(a)>1?R.Children.only(null):R.isValidElement(a)?a.props.children:null:c);return x.jsx(id,{...r,ref:t,children:R.isValidElement(a)?R.cloneElement(a,void 0,s):null})}return x.jsx(id,{...r,ref:t,children:n})});Bo.displayName="Slot";var id=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=pM(n),i=fM(r,n.props);return n.type!==R.Fragment&&(i.ref=t?$0(t,o):o),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});id.displayName="SlotClone";var uM=({children:e})=>x.jsx(x.Fragment,{children:e});function dM(e){return R.isValidElement(e)&&e.type===uM}function fM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function pM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function mM(e){const t=e+"CollectionProvider",[n,r]=z0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:g}=f,m=E.useRef(null),y=E.useRef(new Map).current;return x.jsx(o,{scope:h,itemMap:y,collectionRef:m,children:g})};a.displayName=t;const s=e+"CollectionSlot",c=E.forwardRef((f,h)=>{const{scope:g,children:m}=f,y=i(s,g),v=Gr(h,y.collectionRef);return x.jsx(Bo,{ref:v,children:m})});c.displayName=s;const l=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:g,children:m,...y}=f,v=E.useRef(null),b=Gr(h,v),T=i(l,g);return E.useEffect(()=>(T.itemMap.set(v,{ref:v,...y}),()=>void T.itemMap.delete(v))),x.jsx(Bo,{[u]:"",ref:b,children:m})});d.displayName=l;function p(f){const h=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const m=h.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((T,w)=>y.indexOf(T.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:c,ItemSlot:d},p,r]}var hM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$n=hM.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Bo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function B0(e,t){e&&Qs.flushSync(()=>e.dispatchEvent(t))}function Yn(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function gM(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e);R.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var vM="DismissableLayer",ad="dismissableLayer.update",yM="dismissableLayer.pointerDownOutside",xM="dismissableLayer.focusOutside",Lg,H0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),W0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...c}=e,l=R.useContext(H0),[u,d]=R.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=R.useState({}),h=Gr(t,C=>d(C)),g=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(m),v=u?g.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,T=v>=y,w=wM(C=>{const k=C.target,I=[...l.branches].some(A=>A.contains(k));!T||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),S=SM(C=>{const k=C.target;[...l.branches].some(A=>A.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return gM(C=>{v===l.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),R.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Lg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Vg(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Lg)}},[u,p,n,l]),R.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Vg())},[u,l]),R.useEffect(()=>{const C=()=>f({});return document.addEventListener(ad,C),()=>document.removeEventListener(ad,C)},[]),x.jsx($n.div,{...c,ref:h,style:{pointerEvents:b?T?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,w.onPointerDownCapture)})});W0.displayName=vM;var bM="DismissableLayerBranch",q0=R.forwardRef((e,t)=>{const n=R.useContext(H0),r=R.useRef(null),o=Gr(t,r);return R.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx($n.div,{...e,ref:o})});q0.displayName=bM;function wM(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=R.useRef(!1),o=R.useRef(()=>{});return R.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){U0(yM,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function SM(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=R.useRef(!1);return R.useEffect(()=>{const o=i=>{i.target&&!r.current&&U0(xM,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Vg(){const e=new CustomEvent(ad);document.dispatchEvent(e)}function U0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?B0(o,i):o.dispatchEvent(i)}var TM=W0,EM=q0,ws=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},CM="Portal",K0=R.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=R.useState(!1);ws(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ha.createPortal(x.jsx($n.div,{...r,ref:t}),a):null});K0.displayName=CM;function kM(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var Y0=e=>{const{present:t,children:n}=e,r=RM(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),i=Gr(r.ref,PM(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:i}):null};Y0.displayName="Presence";function RM(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),i=R.useRef("none"),a=e?"mounted":"unmounted",[s,c]=kM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const l=za(r.current);i.current=s==="mounted"?l:"none"},[s]),ws(()=>{const l=r.current,u=o.current;if(u!==e){const p=i.current,f=za(l);e?c("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ws(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=f=>{const g=za(r.current).includes(f.animationName);if(f.target===t&&g&&(c("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=f=>{f.target===t&&(i.current=za(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:R.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function za(e){return(e==null?void 0:e.animationName)||"none"}function PM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function AM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=IM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Yn(n),c=R.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else o(l)},[i,e,o,s]);return[a,c]}function IM({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=Yn(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var _M="VisuallyHidden",Bf=R.forwardRef((e,t)=>x.jsx($n.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Bf.displayName=_M;var Hf="ToastProvider",[Wf,OM,MM]=mM("Toast"),[G0,Pz]=z0("Toast",[MM]),[DM,vl]=G0(Hf),Z0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,c]=R.useState(null),[l,u]=R.useState(0),d=R.useRef(!1),p=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Hf}\`. Expected non-empty \`string\`.`),x.jsx(Wf.Provider,{scope:t,children:x.jsx(DM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:R.useCallback(()=>u(f=>f+1),[]),onToastRemove:R.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Z0.displayName=Hf;var X0="ToastViewport",jM=["F8"],sd="toast.viewportPause",ld="toast.viewportResume",Q0=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=jM,label:o="Notifications ({hotkey})",...i}=e,a=vl(X0,n),s=OM(n),c=R.useRef(null),l=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=Gr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;R.useEffect(()=>{const m=y=>{var b;r.length!==0&&r.every(T=>y[T]||y.code===T)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),R.useEffect(()=>{const m=c.current,y=d.current;if(h&&m&&y){const v=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(sd);y.dispatchEvent(S),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(ld);y.dispatchEvent(S),a.isClosePausedRef.current=!1}},T=S=>{!m.contains(S.relatedTarget)&&b()},w=()=>{m.contains(document.activeElement)||b()};return m.addEventListener("focusin",v),m.addEventListener("focusout",T),m.addEventListener("pointermove",v),m.addEventListener("pointerleave",w),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{m.removeEventListener("focusin",v),m.removeEventListener("focusout",T),m.removeEventListener("pointermove",v),m.removeEventListener("pointerleave",w),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[h,a.isClosePausedRef]);const g=R.useCallback(({tabbingDirection:m})=>{const v=s().map(b=>{const T=b.ref.current,w=[T,...GM(T)];return m==="forwards"?w:w.reverse()});return(m==="forwards"?v.reverse():v).flat()},[s]);return R.useEffect(()=>{const m=d.current;if(m){const y=v=>{var w,S,C;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const k=document.activeElement,I=v.shiftKey;if(v.target===m&&I){(w=l.current)==null||w.focus();return}const N=g({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(P=>P===k);Gc(N.slice(V+1))?v.preventDefault():I?(S=l.current)==null||S.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",y),()=>m.removeEventListener("keydown",y)}},[s,g]),x.jsxs(EM,{ref:c,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&x.jsx(cd,{ref:l,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});Gc(m)}}),x.jsx(Wf.Slot,{scope:n,children:x.jsx($n.ol,{tabIndex:-1,...i,ref:p})}),h&&x.jsx(cd,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});Gc(m)}})]})});Q0.displayName=X0;var J0="ToastFocusProxy",cd=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vl(J0,n);return x.jsx(Bf,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var l;const s=a.relatedTarget;!((l=i.viewport)!=null&&l.contains(s))&&r()}})});cd.displayName=J0;var yl="Toast",NM="toast.swipeStart",FM="toast.swipeMove",LM="toast.swipeCancel",VM="toast.swipeEnd",ew=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=AM({prop:r,defaultProp:o,onChange:i});return x.jsx(Y0,{present:n||s,children:x.jsx(BM,{open:s,...a,ref:t,onClose:()=>c(!1),onPause:Yn(e.onPause),onResume:Yn(e.onResume),onSwipeStart:Qt(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qt(e.onSwipeMove,l=>{const{x:u,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Qt(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Qt(e.onSwipeEnd,l=>{const{x:u,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})})});ew.displayName=yl;var[$M,zM]=G0(yl,{onClose(){}}),BM=R.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...h}=e,g=vl(yl,n),[m,y]=R.useState(null),v=Gr(t,P=>y(P)),b=R.useRef(null),T=R.useRef(null),w=o||g.duration,S=R.useRef(0),C=R.useRef(w),k=R.useRef(0),{onToastAdd:I,onToastRemove:A}=g,O=Yn(()=>{var D;(m==null?void 0:m.contains(document.activeElement))&&((D=g.viewport)==null||D.focus()),a()}),N=R.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),S.current=new Date().getTime(),k.current=window.setTimeout(O,P))},[O]);R.useEffect(()=>{const P=g.viewport;if(P){const D=()=>{N(C.current),l==null||l()},_=()=>{const F=new Date().getTime()-S.current;C.current=C.current-F,window.clearTimeout(k.current),c==null||c()};return P.addEventListener(sd,_),P.addEventListener(ld,D),()=>{P.removeEventListener(sd,_),P.removeEventListener(ld,D)}}},[g.viewport,w,c,l,N]),R.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),R.useEffect(()=>(I(),()=>A()),[I,A]);const V=R.useMemo(()=>m?aw(m):null,[m]);return g.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(HM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx($M,{scope:n,onClose:O,children:Qs.createPortal(x.jsx(Wf.ItemSlot,{scope:n,children:x.jsx(TM,{asChild:!0,onEscapeKeyDown:Qt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx($n.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...h,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:Qt(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:Qt(e.onPointerMove,P=>{if(!b.current)return;const D=P.clientX-b.current.x,_=P.clientY-b.current.y,F=!!T.current,j=["left","right"].includes(g.swipeDirection),B=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=j?B(0,D):0,$=j?0:B(0,_),J=P.pointerType==="touch"?10:2,X={x:M,y:$},Q={originalEvent:P,delta:X};F?(T.current=X,Ba(FM,d,Q,{discrete:!1})):$g(X,g.swipeDirection,J)?(T.current=X,Ba(NM,u,Q,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(D)>J||Math.abs(_)>J)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,P=>{const D=T.current,_=P.target;if(_.hasPointerCapture(P.pointerId)&&_.releasePointerCapture(P.pointerId),T.current=null,b.current=null,D){const F=P.currentTarget,j={originalEvent:P,delta:D};$g(D,g.swipeDirection,g.swipeThreshold)?Ba(VM,f,j,{discrete:!0}):Ba(LM,p,j,{discrete:!0}),F.addEventListener("click",B=>B.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),HM=e=>{const{__scopeToast:t,children:n,...r}=e,o=vl(yl,t),[i,a]=R.useState(!1),[s,c]=R.useState(!1);return KM(()=>a(!0)),R.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),s?null:x.jsx(K0,{asChild:!0,children:x.jsx(Bf,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},WM="ToastTitle",tw=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx($n.div,{...r,ref:t})});tw.displayName=WM;var qM="ToastDescription",nw=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx($n.div,{...r,ref:t})});nw.displayName=qM;var rw="ToastAction",UM=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(iw,{altText:n,asChild:!0,children:x.jsx(qf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${rw}\`. Expected non-empty \`string\`.`),null)});UM.displayName=rw;var ow="ToastClose",qf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=zM(ow,n);return x.jsx(iw,{asChild:!0,children:x.jsx($n.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});qf.displayName=ow;var iw=R.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx($n.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function aw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),YM(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...aw(r))}}),t}function Ba(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?B0(o,i):o.dispatchEvent(i)}var $g=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function KM(e=()=>{}){const t=Yn(e);ws(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function YM(e){return e.nodeType===e.ELEMENT_NODE}function GM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Gc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var ZM=Z0,XM=Q0,QM=ew,JM=tw,eD=nw,tD=qf;const nD=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},rD=ei("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),sw=E.createContext(()=>{throw new Error("Not implemented")}),oD=()=>E.useContext(sw),zg={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},iD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=rD({theme:t.theme||"default"});return x.jsx(QM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:zg[t.reversedIndex]||zg.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:a,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(JM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(eD,{className:"select-text truncate",children:t.text})]}),r?x.jsx(tD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(dl,{className:"h-5 w-5"})}):null]})})})});function aD({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=nD(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const c=E.useCallback((l,u)=>{const d=window.crypto.randomUUID();return a(f=>{const h=[...f,{...u,id:d,text:l}];return h.length>t?h.slice(h.length-t,h.length+1):h}),{clear:s,close:()=>a(f=>f.filter(h=>h.id!==d))}},[t]);return x.jsxs(ZM,{duration:n,swipeThreshold:150,children:[x.jsx(sw.Provider,{value:c,children:e}),x.jsx(xr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((l,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==l.id));return E.createElement(iD,{...l,key:l.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(XM,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const sD=e=>x.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[x.jsxs("header",{className:"flex items-start gap-4 p-6",children:[x.jsx("div",{className:Ie("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),lw=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Bg={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},cw=E.createContext(""),lD=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",ud=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!lD(a))return a}return n==="backward"?ud(e,e.length-1,"backward"):ud(e,-1,"forward")},Hg=(e,t)=>{var i;const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(a=>a.dataset.active==="true");if(r===-1)return null;const o=ud(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Wg={[Bg.ArrowLeft]:(e,t)=>Hg(t,"backward"),[Bg.ArrowRight]:(e,t)=>Hg(t,"forward")},cD=e=>{const[t,n]=lw(e.active),r=E.useRef(null),o=Ur(e.onChange);E.useEffect(()=>{const c=r.current;if(c===null)return;let l=c.querySelector("li[data-active=true]");if(l===null){l=c.querySelector("li[data-id]");const u=l.getAttribute("data-id")||"";n(u)}},[e.active,n]),E.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=E.Children.toArray(e.children),a=c=>{const l=c.currentTarget;n(l.dataset.id||"")},s=c=>{if(r.current===null)return;const l=c.key;if(Ve.keyof(Wg,l)){const u=Wg[l],d=u(c,r.current);if(d===null)return;n(d)}};return x.jsx(cw.Provider,{value:t,children:x.jsx(zf,{className:e.className,container:Ie("pt-0 max-w-full w-full min-w-0",e.container),header:x.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[x.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(c=>{const l=c.props,u=t===l.id;return x.jsx("li",{"data-id":l.id,"data-active":u,"aria-disabled":l.disabled,className:Ie("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",l.disabled?"aria-disabled:text-disabled":""),children:x.jsx(cn,{as:"button",type:"button","data-id":l.id,"aria-current":"page",disabled:l.disabled,onClick:l.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:l.title})},`tab-header-${l.id}`)})})})]}),children:e.children})})},uD=()=>E.useContext(cw),dD=e=>{const t=uD();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},xl=e=>x.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[x.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),x.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});xl.Icon=function(t){return x.jsx("header",{...t,className:Ie("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};xl.Body=function(t){return x.jsx(cn,{...t,className:Ie("min-w-0 flex-1",t.className),children:t.children})};xl.Right=function(t){return x.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:x.jsx(cn,{...t,type:"button"})})};const fD=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function bl(){return typeof window<"u"}function wr(e){return uw(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qn(e){var t;return(t=(uw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uw(e){return bl()?e instanceof Node||e instanceof Bt(e).Node:!1}function tt(e){return bl()?e instanceof Element||e instanceof Bt(e).Element:!1}function wt(e){return bl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function dd(e){return!bl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function wa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function pD(e){return["table","td","th"].includes(wr(e))}function wl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Uf(e){const t=Kf(),n=tt(e)?nn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mD(e){let t=Gn(e);for(;wt(t)&&!mr(t);){if(Uf(t))return t;if(wl(t))return null;t=Gn(t)}return null}function Kf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mr(e){return["html","body","#document"].includes(wr(e))}function nn(e){return Bt(e).getComputedStyle(e)}function Sl(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gn(e){if(wr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dd(e)&&e.host||Qn(e);return dd(t)?t.host:t}function dw(e){const t=Gn(e);return mr(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&wa(t)?t:dw(t)}function dr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=dw(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=fd(a);return t.concat(a,a.visualViewport||[],wa(o)?o:[],s&&n?dr(s):[])}return t.concat(o,dr(o,[],n))}function fd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function yt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&dd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Yf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function fw(){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 pw(e){return e.mozInputSource===0&&e.isTrusted?!0:pd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Gf(e){return hD()?!1:!pd()&&e.width===0&&e.height===0||pd()&&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 Zf(){return/apple/i.test(navigator.vendor)}function pd(){const e=/android/i;return e.test(Yf())||e.test(fw())}function mw(){return Yf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function hD(){return fw().includes("jsdom/")}function Ho(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function gD(e){return"nativeEvent"in e}function vD(e){return e.matches("html,body")}function _t(e){return(e==null?void 0:e.ownerDocument)||document}function Zc(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 An(e){return"composedPath"in e?e.composedPath()[0]:e.target}const yD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Xf(e){return wt(e)&&e.matches(yD)}function Dt(e){e.preventDefault(),e.stopPropagation()}function hw(e){return e?e.getAttribute("role")==="combobox"&&Xf(e):!1}const In=Math.min,Xt=Math.max,Ss=Math.round,ko=Math.floor,hr=e=>({x:e,y:e}),xD={left:"right",right:"left",bottom:"top",top:"bottom"},bD={start:"end",end:"start"};function md(e,t,n){return Xt(e,In(t,n))}function ci(e,t){return typeof e=="function"?e(t):e}function gr(e){return e.split("-")[0]}function ui(e){return e.split("-")[1]}function gw(e){return e==="x"?"y":"x"}function Qf(e){return e==="y"?"height":"width"}function Zr(e){return["top","bottom"].includes(gr(e))?"y":"x"}function Jf(e){return gw(Zr(e))}function wD(e,t,n){n===void 0&&(n=!1);const r=ui(e),o=Jf(e),i=Qf(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ts(a)),[a,Ts(a)]}function SD(e){const t=Ts(e);return[hd(e),t,hd(t)]}function hd(e){return e.replace(/start|end/g,t=>bD[t])}function TD(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function ED(e,t,n,r){const o=ui(e);let i=TD(gr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(hd)))),i}function Ts(e){return e.replace(/left|right|bottom|top/g,t=>xD[t])}function CD(e){return{top:0,right:0,bottom:0,left:0,...e}}function vw(e){return typeof e!="number"?CD(e):{top:e,right:e,bottom:e,left:e}}function Es(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}}/*!
184
+ */var Ag;function BO(){return Ag||(Ag=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=E,n=A0(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Kc.useSyncExternalStoreWithSelector=function(c,u,d,p,f){var h=i(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(T){if(!v){if(v=!0,b=T,T=p(T),f!==void 0&&g.hasValue){var C=g.value;if(f(C,T))return S=C}return S=T}if(C=S,r(b,T))return C;var k=p(T);return f!==void 0&&f(C,k)?(b=T,C):(b=T,S=k)}var v=!1,b,S,w=d===void 0?null:d;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,d,p,f]);var m=o(c,h[0],h[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Kc}var Ig;function HO(){return Ig||(Ig=1,process.env.NODE_ENV==="production"?Va.exports=zO():Va.exports=BO()),Va.exports}HO();var zo=function(){return zo=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},zo.apply(this,arguments)};function $i(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function I0(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))}var ho=function(e){var t=E.useRef(e??{});return E.useEffect(function(){return void(t.current=e)},[e]),t},WO=function(e){var t=E.useRef(void 0);return E.useEffect(function(){t.current=e},[e]),t.current},qO=function(e){return Object.entries(e)},_0=function(e){return e instanceof Promise},O0=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)},zo(zo({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},UO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,I0([],$i(a),!1)),u=function(d,p){return n(function(f){return O0(d,f,i,p)})};return _0(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))}},KO=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,I0([],$i(a),!1)),c=function(u){return n(function(d){return O0(u,d,i,o.current)})};return _0(l)?l.then(function(u){return c(u)}):c(l)}},Nf=function(e,t,n){var r,o,i,a=$i(E.useState(function(){return e}),2),s=a[0],l=a[1],c=ho(s),u=ho((r=n==null?void 0:n.props)!==null&&r!==void 0?r:{}),d=ho(t),p=ho((o=n==null?void 0:n.postMiddleware)!==null&&o!==void 0?o:[]),f=ho((i=n==null?void 0:n.interceptor)!==null&&i!==void 0?i:[]),h=E.useRef(e),g=WO(s),m=ho(g),y=E.useRef(null);E.useEffect(function(){if(y.current!==null){var S=y.current;p.current.forEach(function(w){w(s,g,S)})}},[s,p,g]);var v=$i(E.useState(function(){var S=function(){return u.current},w=d.current({props:S,state:function(){return c.current},initialState:h.current,previousState:function(){return m.current}});return qO(w).reduce(function(T,C){var k,I=$i(C,2),A=I[0],O=I[1];return zo(zo({},T),(k={},k[A]=n!=null&&n.debug?UO(A,O,l,S,y,f.current):KO(A,O,l,S,y,f.current),k))},{})}),1),b=v[0];return[s,b,u.current]};const YO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function GO(e,t){return E.useRef(YO(e,t)).current}const ml={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>)`},Vr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(Vr(a,t,n,s))},[]),M0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:M0(a,t,n,s)}},{}),_g={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},bs=(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)},ZO={default:e=>bs(e,{result:_g.default}),dark:e=>bs(e,{result:_g.dark})},Ei=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},XO=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Ff=(e,t)=>{const n=Vr(e.colors,Ei(t==null?void 0:t.colors)),r=Vr(e.spacing,Ei(t==null?void 0:t.spacing)),o=Vr(e.rounded,Ei(t==null?void 0:t.rounded)),i=Vr(e.zIndex,Ei((t==null?void 0:t.zIndex)??XO)),a=e.custom?Vr(e.custom,Ei(t==null?void 0:t.customTokens)):[];return n.concat(r,o,a,i)},QO=(e,t)=>bs(Ff(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),JO=(e,t)=>Ff(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),eM=(e,t)=>bs(Ff(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),hl={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>x.jsxs(E.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type"},gl={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0}},si=E.createContext({tweaks:gl,parser:ml.hsla,map:hl,locale:void 0}),Lf=e=>{const t=E.useContext(si);if(e)return e;if(t)return t.locale||e};function tM(e,t){const n=E.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const At=()=>{const e=E.useContext(si);return e?e.map:hl},on=(e,t=2)=>e.toString(16).padStart(t,"0"),li=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${on(t,4)+on(n,3)}-${on(r[0])+on(r[1])}-${on(r[2])+on(r[3])}-${on(r[4])+on(r[5])}-${on(r[6])+on(r[7])+on(r[8])+on(r[9])}`},Og=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Mg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Vf=(e,t)=>{const n=Og(t,Mg.basic,e)||Og(t,Mg.extend,e);return n===void 0||n===e?void 0:n},Yr=()=>typeof window>"u",od=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),D0=(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},nM=e=>!e,$f=()=>{},j0=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},rM={type:"spring",bounce:.3,duration:.6},Dg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),N0={enter:Dg(1),exit:Dg(-1),middle:{x:"0%",opacity:1}},jg={exit:{visibility:"hidden"}},oM=e=>{const t=Nn(p0(e));return f0({start:t,end:Co(t,{days:41})})},F0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),iM=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=p0(new Date(1970,o,1).setMonth(o)),a=F0(i,n);return x.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Yc={ArrowLeft:(e,t)=>t==="days"?Pi(e,{days:1}):Pi(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Co(e,{days:1}):Co(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Pi(e,{weeks:1}):Pi(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Co(e,{weeks:1}):Co(e,{years:1})},Ng=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var a;if(e!=null&&e.dataset.focustrap){const s=(a=t.current)==null?void 0:a.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>s==null?void 0:s.focus({preventScroll:!1}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Dr=e=>e.getFullYear().toString().padStart(4,"0"),aM=(e,t,n)=>e===void 0||n===void 0?!1:x_(t,e)&&b_(t,n),sM=e=>{var n;const t=At();return x.jsx(ft.tbody,{layout:!0,variants:N0,custom:e.direction,onKeyDown:e.onKeyDown,className:Ie((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var a,s,l;const i=Ve.function((a=e.styles)==null?void 0:a.week)?(s=e.styles)==null?void 0:s.week(r):(l=e.styles)==null?void 0:l.week;return x.jsx("tr",{className:i,children:r.map(c=>{var y,v,b,S,w,T,C,k,I,A,O,N,V,P,D,_,F,j;const u=c.toISOString(),d=e.rangeMode?u===((v=(y=e.range)==null?void 0:y.to)==null?void 0:v.toISOString())||u===((S=(b=e.range)==null?void 0:b.from)==null?void 0:S.toISOString()):u===((w=e.date)==null?void 0:w.toISOString()),p=yO(c)&&e.markToday,f=((T=e.disabledDate)==null?void 0:T.call(e,c))||!1,h=vO(c,e.stateDate),g=!h||f,m=e.rangeMode?aM((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return x.jsxs("td",{align:"center",className:Ie("relative",Ve.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(O=e.styles)==null?void 0:O.dayFrame),children:[x.jsxs("button",{type:"button","data-date":u,disabled:f,"data-samemonth":h,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Ie(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${p?"text-emphasis":""} ${g?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,m&&e.markRange?"size-10 border border-dashed border-card-border":"",Ve.function((N=e.styles)==null?void 0:N.day)?(V=e.styles)==null?void 0:V.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((D=e.stateRange.from)==null?void 0:D.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((_=e.labelRange)==null?void 0:_.from)??t.calendarFromDate})}):null,d&&((F=e.stateRange.to)==null?void 0:F.toISOString())===u?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},lM=()=>$o(new Date),L0=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...p})=>{const f=E.useRef(li()),h=At(),g=Lf(o),m=E.useRef(null),{date:y,range:v}=p,b=y||new Date,S=E.useRef(null),[w,T]=Nf({date:b,isAnimating:!1,year:Dr(b),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:iM(f.current,b,g),selectMode:l?"from":void 0,week:f0({start:Nn(b),end:EI(b)})},P=>({onChangeYear:D=>({year:D}),onExitComplete:()=>(Ng(S.current||null,m,P.state().date,200),S.current=null,{isAnimating:!1}),date:D=>{const _=D(P.state().date);return{date:_,year:Dr(_)}},nextMonth:D=>{D&&(S.current=D.currentTarget);const _=P.state();if(_.isAnimating)return _;const F=Co(_.date,{months:1});return{date:F,isAnimating:!0,direction:1,year:Dr(F)}},previousMonth:D=>{D&&(S.current=D.currentTarget);const _=P.state();if(_.isAnimating)return _;const F=Pi(_.date,{months:1});return{date:F,isAnimating:!0,direction:-1,year:Dr(F)}},onSelectDate:D=>{const _=P.state(),F=D.currentTarget.dataset.range==="true",j=D.currentTarget.dataset.date||"",B=new Date(j);return{date:B,year:Dr(B),selectMode:_.selectMode===void 0?void 0:_.selectMode==="from"?"to":"from",range:F?{from:_.selectMode==="from"?B:_.range.from,to:_.selectMode==="to"?B:_.range.to}:_.range}},onChangeMonth:D=>{const _=D.target.value,j=Array.from(D.target.options).find(M=>M.value===_),B=P.state();if(j){const M=j.dataset.index||"",z=new Date(P.state().date);return z.setMonth(+M),{...B,date:z,year:Dr(z)}}return B},onKeyDown:D=>{const _=D.key,F=P.state();if(_ in Yc){(_==="ArrowUp"||_==="ArrowDown")&&D.preventDefault();const j=P.state().date,B=Ve.keyof(Yc,_)?Yc[_](j,D.shiftKey?"month":"days"):null;if(B!==null)return Ng(D.target,m,B),{...F,date:B,year:Dr(B)}}return P.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(P,D,_)=>{var j,B;return(_.method==="onChangeMonth"||_.method==="previousMonth"||_.method==="nextMonth")&&((B=(j=_.props).onChangeMonth)==null||B.call(j,P.date)),P},(P,D,_)=>{var j,B;return _.method==="onChangeYear"&&((B=(j=_.props).onChangeYear)==null||B.call(j,P.date)),P},(P,D,_)=>{const F=_.method==="onSelectDate"||_.method==="setToday"||_.method==="onKeyDown";return l&&F&&t?(c==null||c(P.range),P):(F&&t&&(c==null||c(P.date)),P)}]}),C=oM(w.date),k=D0(C,7),I=w.date.toISOString(),A=F0(w.date,g);E.useEffect(()=>{t||c==null||c(w.date)},[I,t]);const O=GO(P=>T.date(D=>bO(new Date(D),+P)),1200),N=P=>{const D=P.currentTarget.value;T.onChangeYear(D),s==null||s(new Date(D)),O(D)},V=tM((P,D)=>(P.preventDefault(),D==="right"?T.previousMonth():T.nextMonth()),10);return x.jsx(kE,{transition:rM,children:x.jsxs("div",{ref:m,"data-component":"calendar",onTouchEnd:V.onTouchEnd,onTouchStart:V.onTouchStart,className:Ie("relative overflow-hidden",Ve.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(xr,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:T.onExitComplete,children:x.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"prev",variants:jg,onClick:T.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(MA,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:N0,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{value:A,onChange:T.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),x.jsx(P0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:N,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(ft.button,{layout:!0,type:"button","data-focustrap":"next",variants:jg,onClick:T.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:x.jsx(If,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:w.week.map(P=>x.jsx("th",{role:"columnheader",className:Ie("py-2 text-sm font-medium capitalize",Ve.function(u==null?void 0:u.weekDay)?u.weekDay(P):u==null?void 0:u.weekDay),children:P.toLocaleDateString(g,{weekday:"short"})},P.toString()))})}),x.jsx(sM,{zip:k,range:v,styles:u,date:y||null,dispatch:T,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:T.onKeyDown})]})]},A)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{type:"button",onClick:()=>T.date(lM),className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},zf=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:i=null,className:a="",...s})=>x.jsxs(cn,{...s,as:r,"data-component":"card",className:Ie("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{"data-component":"card-title",className:Ie("mb-2 w-full border-b border-card-border px-4 pb-4 text-xl font-medium lg:px-8",n),children:t}):i,x.jsx("div",{"data-component":"card-body",className:Ie("min-w-full px-4 lg:px-8",a),children:e})]});zf.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return x.jsxs(i,{...o,title:Ve.string(o.title)?o.title:void 0,className:Ie("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[x.jsx(a,{className:"font-semibold",children:o.title}),r?x.jsx(s,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const V0=e=>{const t=e.Icon??i0,n=At();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Fg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Fg(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():Fg(e[o],null)}}}}function Gr(...e){return R.useCallback($0(...e),e)}function z0(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...h}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,m=R.useMemo(()=>h,Object.values(h));return x.jsx(g.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,h=R.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,cM(o,...t)]}function cM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Bo=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),i=o.find(dM);if(i){const a=i.props.children,s=o.map(l=>l===i?R.Children.count(a)>1?R.Children.only(null):R.isValidElement(a)?a.props.children:null:l);return x.jsx(id,{...r,ref:t,children:R.isValidElement(a)?R.cloneElement(a,void 0,s):null})}return x.jsx(id,{...r,ref:t,children:n})});Bo.displayName="Slot";var id=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=pM(n),i=fM(r,n.props);return n.type!==R.Fragment&&(i.ref=t?$0(t,o):o),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});id.displayName="SlotClone";var uM=({children:e})=>x.jsx(x.Fragment,{children:e});function dM(e){return R.isValidElement(e)&&e.type===uM}function fM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function pM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function mM(e){const t=e+"CollectionProvider",[n,r]=z0(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:h,children:g}=f,m=E.useRef(null),y=E.useRef(new Map).current;return x.jsx(o,{scope:h,itemMap:y,collectionRef:m,children:g})};a.displayName=t;const s=e+"CollectionSlot",l=E.forwardRef((f,h)=>{const{scope:g,children:m}=f,y=i(s,g),v=Gr(h,y.collectionRef);return x.jsx(Bo,{ref:v,children:m})});l.displayName=s;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=E.forwardRef((f,h)=>{const{scope:g,children:m,...y}=f,v=E.useRef(null),b=Gr(h,v),S=i(c,g);return E.useEffect(()=>(S.itemMap.set(v,{ref:v,...y}),()=>void S.itemMap.delete(v))),x.jsx(Bo,{[u]:"",ref:b,children:m})});d.displayName=c;function p(f){const h=i(e+"CollectionConsumer",f);return E.useCallback(()=>{const m=h.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((S,w)=>y.indexOf(S.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,r]}var hM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$n=hM.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Bo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function B0(e,t){e&&Qs.flushSync(()=>e.dispatchEvent(t))}function Yn(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function gM(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e);R.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var vM="DismissableLayer",ad="dismissableLayer.update",yM="dismissableLayer.pointerDownOutside",xM="dismissableLayer.focusOutside",Lg,H0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),W0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=R.useContext(H0),[u,d]=R.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=R.useState({}),h=Gr(t,C=>d(C)),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(m),v=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,w=wM(C=>{const k=C.target,I=[...c.branches].some(A=>A.contains(k));!S||I||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())},p),T=SM(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())},p);return gM(C=>{v===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),R.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Lg=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Vg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Lg)}},[u,p,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Vg())},[u,c]),R.useEffect(()=>{const C=()=>f({});return document.addEventListener(ad,C),()=>document.removeEventListener(ad,C)},[]),x.jsx($n.div,{...l,ref:h,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,w.onPointerDownCapture)})});W0.displayName=vM;var bM="DismissableLayerBranch",q0=R.forwardRef((e,t)=>{const n=R.useContext(H0),r=R.useRef(null),o=Gr(t,r);return R.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx($n.div,{...e,ref:o})});q0.displayName=bM;function wM(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=R.useRef(!1),o=R.useRef(()=>{});return R.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){U0(yM,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function SM(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=R.useRef(!1);return R.useEffect(()=>{const o=i=>{i.target&&!r.current&&U0(xM,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Vg(){const e=new CustomEvent(ad);document.dispatchEvent(e)}function U0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?B0(o,i):o.dispatchEvent(i)}var TM=W0,EM=q0,ws=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},CM="Portal",K0=R.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=R.useState(!1);ws(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ha.createPortal(x.jsx($n.div,{...r,ref:t}),a):null});K0.displayName=CM;function kM(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var Y0=e=>{const{present:t,children:n}=e,r=RM(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),i=Gr(r.ref,PM(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:i}):null};Y0.displayName="Presence";function RM(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),i=R.useRef("none"),a=e?"mounted":"unmounted",[s,l]=kM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=za(r.current);i.current=s==="mounted"?c:"none"},[s]),ws(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,f=za(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ws(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=za(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=f=>{f.target===t&&(i.current=za(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function za(e){return(e==null?void 0:e.animationName)||"none"}function PM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function AM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=IM({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Yn(n),l=R.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function IM({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=Yn(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var _M="VisuallyHidden",Bf=R.forwardRef((e,t)=>x.jsx($n.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Bf.displayName=_M;var Hf="ToastProvider",[Wf,OM,MM]=mM("Toast"),[G0,Pz]=z0("Toast",[MM]),[DM,vl]=G0(Hf),Z0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=R.useState(null),[c,u]=R.useState(0),d=R.useRef(!1),p=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Hf}\`. Expected non-empty \`string\`.`),x.jsx(Wf.Provider,{scope:t,children:x.jsx(DM,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:R.useCallback(()=>u(f=>f+1),[]),onToastRemove:R.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};Z0.displayName=Hf;var X0="ToastViewport",jM=["F8"],sd="toast.viewportPause",ld="toast.viewportResume",Q0=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=jM,label:o="Notifications ({hotkey})",...i}=e,a=vl(X0,n),s=OM(n),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=Gr(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;R.useEffect(()=>{const m=y=>{var b;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),R.useEffect(()=>{const m=l.current,y=d.current;if(h&&m&&y){const v=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(sd);y.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(ld);y.dispatchEvent(T),a.isClosePausedRef.current=!1}},S=T=>{!m.contains(T.relatedTarget)&&b()},w=()=>{m.contains(document.activeElement)||b()};return m.addEventListener("focusin",v),m.addEventListener("focusout",S),m.addEventListener("pointermove",v),m.addEventListener("pointerleave",w),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{m.removeEventListener("focusin",v),m.removeEventListener("focusout",S),m.removeEventListener("pointermove",v),m.removeEventListener("pointerleave",w),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[h,a.isClosePausedRef]);const g=R.useCallback(({tabbingDirection:m})=>{const v=s().map(b=>{const S=b.ref.current,w=[S,...GM(S)];return m==="forwards"?w:w.reverse()});return(m==="forwards"?v.reverse():v).flat()},[s]);return R.useEffect(()=>{const m=d.current;if(m){const y=v=>{var w,T,C;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const k=document.activeElement,I=v.shiftKey;if(v.target===m&&I){(w=c.current)==null||w.focus();return}const N=g({tabbingDirection:I?"backwards":"forwards"}),V=N.findIndex(P=>P===k);Gc(N.slice(V+1))?v.preventDefault():I?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",y),()=>m.removeEventListener("keydown",y)}},[s,g]),x.jsxs(EM,{ref:l,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&x.jsx(cd,{ref:c,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});Gc(m)}}),x.jsx(Wf.Slot,{scope:n,children:x.jsx($n.ol,{tabIndex:-1,...i,ref:p})}),h&&x.jsx(cd,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});Gc(m)}})]})});Q0.displayName=X0;var J0="ToastFocusProxy",cd=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vl(J0,n);return x.jsx(Bf,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});cd.displayName=J0;var yl="Toast",NM="toast.swipeStart",FM="toast.swipeMove",LM="toast.swipeCancel",VM="toast.swipeEnd",ew=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,l]=AM({prop:r,defaultProp:o,onChange:i});return x.jsx(Y0,{present:n||s,children:x.jsx(BM,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:Yn(e.onPause),onResume:Yn(e.onResume),onSwipeStart:Qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});ew.displayName=yl;var[$M,zM]=G0(yl,{onClose(){}}),BM=R.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...h}=e,g=vl(yl,n),[m,y]=R.useState(null),v=Gr(t,P=>y(P)),b=R.useRef(null),S=R.useRef(null),w=o||g.duration,T=R.useRef(0),C=R.useRef(w),k=R.useRef(0),{onToastAdd:I,onToastRemove:A}=g,O=Yn(()=>{var D;(m==null?void 0:m.contains(document.activeElement))&&((D=g.viewport)==null||D.focus()),a()}),N=R.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),T.current=new Date().getTime(),k.current=window.setTimeout(O,P))},[O]);R.useEffect(()=>{const P=g.viewport;if(P){const D=()=>{N(C.current),c==null||c()},_=()=>{const F=new Date().getTime()-T.current;C.current=C.current-F,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(sd,_),P.addEventListener(ld,D),()=>{P.removeEventListener(sd,_),P.removeEventListener(ld,D)}}},[g.viewport,w,l,c,N]),R.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(w)},[i,w,g.isClosePausedRef,N]),R.useEffect(()=>(I(),()=>A()),[I,A]);const V=R.useMemo(()=>m?aw(m):null,[m]);return g.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(HM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx($M,{scope:n,onClose:O,children:Qs.createPortal(x.jsx(Wf.ItemSlot,{scope:n,children:x.jsx(TM,{asChild:!0,onEscapeKeyDown:Qt(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx($n.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...h,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qt(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:Qt(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:Qt(e.onPointerMove,P=>{if(!b.current)return;const D=P.clientX-b.current.x,_=P.clientY-b.current.y,F=!!S.current,j=["left","right"].includes(g.swipeDirection),B=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=j?B(0,D):0,z=j?0:B(0,_),Q=P.pointerType==="touch"?10:2,X={x:M,y:z},J={originalEvent:P,delta:X};F?(S.current=X,Ba(FM,d,J,{discrete:!1})):$g(X,g.swipeDirection,Q)?(S.current=X,Ba(NM,u,J,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(D)>Q||Math.abs(_)>Q)&&(b.current=null)}),onPointerUp:Qt(e.onPointerUp,P=>{const D=S.current,_=P.target;if(_.hasPointerCapture(P.pointerId)&&_.releasePointerCapture(P.pointerId),S.current=null,b.current=null,D){const F=P.currentTarget,j={originalEvent:P,delta:D};$g(D,g.swipeDirection,g.swipeThreshold)?Ba(VM,f,j,{discrete:!0}):Ba(LM,p,j,{discrete:!0}),F.addEventListener("click",B=>B.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),HM=e=>{const{__scopeToast:t,children:n,...r}=e,o=vl(yl,t),[i,a]=R.useState(!1),[s,l]=R.useState(!1);return KM(()=>a(!0)),R.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:x.jsx(K0,{asChild:!0,children:x.jsx(Bf,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},WM="ToastTitle",tw=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx($n.div,{...r,ref:t})});tw.displayName=WM;var qM="ToastDescription",nw=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx($n.div,{...r,ref:t})});nw.displayName=qM;var rw="ToastAction",UM=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(iw,{altText:n,asChild:!0,children:x.jsx(qf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${rw}\`. Expected non-empty \`string\`.`),null)});UM.displayName=rw;var ow="ToastClose",qf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=zM(ow,n);return x.jsx(iw,{asChild:!0,children:x.jsx($n.button,{type:"button",...r,ref:t,onClick:Qt(e.onClick,o.onClose)})})});qf.displayName=ow;var iw=R.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx($n.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function aw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),YM(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...aw(r))}}),t}function Ba(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?B0(o,i):o.dispatchEvent(i)}var $g=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function KM(e=()=>{}){const t=Yn(e);ws(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function YM(e){return e.nodeType===e.ELEMENT_NODE}function GM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Gc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var ZM=Z0,XM=Q0,QM=ew,JM=tw,eD=nw,tD=qf;const nD=e=>{const[t,n]=E.useState(!1),r=()=>n(!0),o=()=>n(!1);return E.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},rD=ei("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),sw=E.createContext(()=>{throw new Error("Not implemented")}),oD=()=>E.useContext(sw),zg={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},iD=E.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,i=t.hover?"hover":t.isLast?"isLast":"other",a=rD({theme:t.theme||"default"});return x.jsx(QM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:i,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:zg[t.reversedIndex]||zg.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:a,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(JM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(eD,{className:"select-text truncate",children:t.text})]}),r?x.jsx(tD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(dl,{className:"h-5 w-5"})}):null]})})})});function aD({children:e,max:t=5,duration:n=5e3}){const r=E.useRef(null),o=nD(r),[i,a]=E.useState([]),s=E.useCallback(()=>a([]),[]);E.useEffect(()=>s,[s]);const l=E.useCallback((c,u)=>{const d=window.crypto.randomUUID();return a(f=>{const h=[...f,{...u,id:d,text:c}];return h.length>t?h.slice(h.length-t,h.length+1):h}),{clear:s,close:()=>a(f=>f.filter(h=>h.id!==d))}},[t]);return x.jsxs(ZM,{duration:n,swipeThreshold:150,children:[x.jsx(sw.Provider,{value:l,children:e}),x.jsx(xr,{presenceAffectsLayout:!0,mode:"popLayout",children:i.map((c,u,d)=>{const p=()=>a(f=>f.filter(h=>h.id!==c.id));return E.createElement(iD,{...c,key:c.id,hover:o,index:u,onClose:p,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(XM,{ref:r,"data-items":i.length,style:{justifyContent:"start",height:`${(o?i.length:Math.min(1,i.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const sD=e=>x.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow",children:[x.jsxs("header",{className:"flex items-start gap-4 p-6",children:[x.jsx("div",{className:Ie("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),lw=(e,t)=>{const[n,r]=E.useState(()=>t||e);return E.useEffect(()=>{r(e)},[e]),[n,r]},Bg={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},cw=E.createContext(""),lD=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",ud=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!lD(a))return a}return n==="backward"?ud(e,e.length-1,"backward"):ud(e,-1,"forward")},Hg=(e,t)=>{var i;const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(a=>a.dataset.active==="true");if(r===-1)return null;const o=ud(n,r,t);return o===null?null:((i=o.querySelector("button"))==null||i.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},Wg={[Bg.ArrowLeft]:(e,t)=>Hg(t,"backward"),[Bg.ArrowRight]:(e,t)=>Hg(t,"forward")},cD=e=>{const[t,n]=lw(e.active),r=E.useRef(null),o=Ur(e.onChange);E.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),E.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=E.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(Ve.keyof(Wg,c)){const u=Wg[c],d=u(l,r.current);if(d===null)return;n(d)}};return x.jsx(cw.Provider,{value:t,children:x.jsx(zf,{className:e.className,container:Ie("pt-0 max-w-full w-full min-w-0",e.container),header:x.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[x.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{onKeyDown:s,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return x.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Ie("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:x.jsx(cn,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},uD=()=>E.useContext(cw),dD=e=>{const t=uD();return x.jsx(E.Fragment,{children:e.id===t?e.children:null})},xl=e=>x.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[x.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),x.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});xl.Icon=function(t){return x.jsx("header",{...t,className:Ie("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})};xl.Body=function(t){return x.jsx(cn,{...t,className:Ie("min-w-0 flex-1",t.className),children:t.children})};xl.Right=function(t){return x.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:x.jsx(cn,{...t,type:"button"})})};const fD=e=>x.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children});function bl(){return typeof window<"u"}function wr(e){return uw(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qn(e){var t;return(t=(uw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uw(e){return bl()?e instanceof Node||e instanceof Bt(e).Node:!1}function tt(e){return bl()?e instanceof Element||e instanceof Bt(e).Element:!1}function wt(e){return bl()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function dd(e){return!bl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function wa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function pD(e){return["table","td","th"].includes(wr(e))}function wl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Uf(e){const t=Kf(),n=tt(e)?nn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mD(e){let t=Gn(e);for(;wt(t)&&!mr(t);){if(Uf(t))return t;if(wl(t))return null;t=Gn(t)}return null}function Kf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function mr(e){return["html","body","#document"].includes(wr(e))}function nn(e){return Bt(e).getComputedStyle(e)}function Sl(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gn(e){if(wr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dd(e)&&e.host||Qn(e);return dd(t)?t.host:t}function dw(e){const t=Gn(e);return mr(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&wa(t)?t:dw(t)}function dr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=dw(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Bt(o);if(i){const s=fd(a);return t.concat(a,a.visualViewport||[],wa(o)?o:[],s&&n?dr(s):[])}return t.concat(o,dr(o,[],n))}function fd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function yt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&dd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Yf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function fw(){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 pw(e){return e.mozInputSource===0&&e.isTrusted?!0:pd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Gf(e){return hD()?!1:!pd()&&e.width===0&&e.height===0||pd()&&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 Zf(){return/apple/i.test(navigator.vendor)}function pd(){const e=/android/i;return e.test(Yf())||e.test(fw())}function mw(){return Yf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function hD(){return fw().includes("jsdom/")}function Ho(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function gD(e){return"nativeEvent"in e}function vD(e){return e.matches("html,body")}function _t(e){return(e==null?void 0:e.ownerDocument)||document}function Zc(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 An(e){return"composedPath"in e?e.composedPath()[0]:e.target}const yD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Xf(e){return wt(e)&&e.matches(yD)}function Dt(e){e.preventDefault(),e.stopPropagation()}function hw(e){return e?e.getAttribute("role")==="combobox"&&Xf(e):!1}const In=Math.min,Xt=Math.max,Ss=Math.round,ko=Math.floor,hr=e=>({x:e,y:e}),xD={left:"right",right:"left",bottom:"top",top:"bottom"},bD={start:"end",end:"start"};function md(e,t,n){return Xt(e,In(t,n))}function ci(e,t){return typeof e=="function"?e(t):e}function gr(e){return e.split("-")[0]}function ui(e){return e.split("-")[1]}function gw(e){return e==="x"?"y":"x"}function Qf(e){return e==="y"?"height":"width"}function Zr(e){return["top","bottom"].includes(gr(e))?"y":"x"}function Jf(e){return gw(Zr(e))}function wD(e,t,n){n===void 0&&(n=!1);const r=ui(e),o=Jf(e),i=Qf(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ts(a)),[a,Ts(a)]}function SD(e){const t=Ts(e);return[hd(e),t,hd(t)]}function hd(e){return e.replace(/start|end/g,t=>bD[t])}function TD(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function ED(e,t,n,r){const o=ui(e);let i=TD(gr(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(hd)))),i}function Ts(e){return e.replace(/left|right|bottom|top/g,t=>xD[t])}function CD(e){return{top:0,right:0,bottom:0,left:0,...e}}function vw(e){return typeof e!="number"?CD(e):{top:e,right:e,bottom:e,left:e}}function Es(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}}/*!
185
185
  * tabbable 6.2.0
186
186
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
187
- */var kD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Cs=kD.join(","),yw=typeof Element>"u",Wo=yw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ks=!yw&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Rs=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},RD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},PD=function(t,n,r){if(Rs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Cs));return n&&Wo.call(t,Cs)&&o.unshift(t),o=o.filter(r),o},AD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Rs(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=Wo.call(a,Cs);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Rs(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},xw=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||RD(t))&&!xw(t)?0:t.tabIndex},ID=function(t,n){var r=bw(t);return r<0&&n&&!xw(t)?0:r},_D=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ww=function(t){return t.tagName==="INPUT"},OD=function(t){return ww(t)&&t.type==="hidden"},MD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},DD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},jD=function(t){if(!t.name)return!0;var n=t.form||ks(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=DD(o,t.form);return!i||i===t},ND=function(t){return ww(t)&&t.type==="radio"},FD=function(t){return ND(t)&&!jD(t)},LD=function(t){var n,r=t&&ks(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,d;r=ks(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},qg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},VD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Wo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Wo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=ks(t);if(c&&!c.shadowRoot&&o(c)===!0)return qg(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(LD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return qg(t);return!1},$D=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 Wo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},zD=function(t,n){return!(n.disabled||Rs(n)||OD(n)||VD(n,t)||MD(n)||$D(n))},gd=function(t,n){return!(FD(n)||bw(n)<0||!zD(t,n))},BD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},HD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=ID(s,a),l=a?e(o.candidates):s;c===0?a?n.push.apply(n,l):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),r.sort(_D).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ra=function(t,n){n=n||{};var r;return n.getShadowRoot?r=AD([t],n.includeContainer,{filter:gd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:BD}):r=PD(t,n.includeContainer,gd.bind(null,n)),HD(r)},WD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wo.call(t,Cs)===!1?!1:gd(n,t)};function Ug(e,t,n){let{reference:r,floating:o}=e;const i=Zr(t),a=Jf(t),s=Qf(a),c=gr(t),l=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(c){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(ui(t)){case"start":f[a]-=p*(n&&l?-1:1);break;case"end":f[a]+=p*(n&&l?-1:1);break}return f}const qD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ug(l,r,c),p=r,f={},h=0;for(let g=0;g<s.length;g++){const{name:m,fn:y}=s[g],{x:v,y:b,data:T,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:e,floating:t}});u=v??u,d=b??d,f={...f,[m]:{...f[m],...T}},w&&h<=50&&(h++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(l=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Ug(l,p,c)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function ep(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ci(t,e),h=vw(f),m=s[p?d==="floating"?"reference":"floating":d],y=Es(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),v=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=Es(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:c}):v);return{top:(y.top-w.top+h.top)/T.y,bottom:(w.bottom-y.bottom+h.bottom)/T.y,left:(y.left-w.left+h.left)/T.x,right:(w.right-y.right+h.right)/T.x}}const UD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ci(e,t)||{};if(l==null)return{};const d=vw(u),p={x:n,y:r},f=Jf(o),h=Qf(f),g=await a.getDimensions(l),m=f==="y",y=m?"top":"left",v=m?"bottom":"right",b=m?"clientHeight":"clientWidth",T=i.reference[h]+i.reference[f]-p[f]-i.floating[h],w=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let C=S?S[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(S)))&&(C=s.floating[b]||i.floating[h]);const k=T/2-w/2,I=C/2-g[h]/2-1,A=In(d[y],I),O=In(d[v],I),N=A,V=C-g[h]-O,P=C/2-g[h]/2+k,D=md(N,P,V),_=!c.arrow&&ui(o)!=null&&P!==D&&i.reference[h]/2-(P<N?A:O)-g[h]/2<0,F=_?P<N?P-N:P-V:0;return{[f]:p[f]+F,data:{[f]:D,centerOffset:P-D-F,..._&&{alignmentOffset:F}},reset:_}}}),KD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=ci(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=gr(o),v=Zr(s),b=gr(s)===s,T=await(c.isRTL==null?void 0:c.isRTL(l.floating)),w=p||(b||!g?[Ts(s)]:SD(s)),S=h!=="none";!p&&S&&w.push(...ED(s,g,h,T));const C=[s,...w],k=await ep(t,m),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),d){const P=wD(o,a,T);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var O,N;const P=(((O=i.flip)==null?void 0:O.index)||0)+1,D=C[P];if(D)return{data:{index:P,overflows:A},reset:{placement:D}};let _=(N=A.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!_)switch(f){case"bestFit":{var V;const F=(V=A.filter(j=>{if(S){const B=Zr(j.placement);return B===v||B==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(B=>B>0).reduce((B,M)=>B+M,0)]).sort((j,B)=>j[1]-B[1])[0])==null?void 0:V[0];F&&(_=F);break}case"initialPlacement":_=s;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function YD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=gr(n),s=ui(n),c=Zr(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d=ci(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),c?{x:f*u,y:p*l}:{x:p*l,y:f*u}}const GD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await YD(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},ZD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:m=>{let{x:y,y:v}=m;return{x:y,y:v}}},...c}=ci(e,t),l={x:n,y:r},u=await ep(t,c),d=Zr(gr(o)),p=gw(d);let f=l[p],h=l[d];if(i){const m=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=f+u[m],b=f-u[y];f=md(v,f,b)}if(a){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=h+u[m],b=h-u[y];h=md(v,h,b)}const g=s.fn({...t,[p]:f,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},XD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ci(e,t),c=await ep(t,s),l=gr(n),u=ui(n),d=Zr(n)==="y",{width:p,height:f}=r.floating;let h,g;l==="top"||l==="bottom"?(h=l,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=l,h=u==="end"?"top":"bottom");const m=f-c.top-c.bottom,y=p-c.left-c.right,v=In(f-c[h],m),b=In(p-c[g],y),T=!t.middlewareData.shift;let w=v,S=b;if(d?S=u||T?In(b,y):y:w=u||T?In(v,m):m,T&&!u){const k=Xt(c.left,0),I=Xt(c.right,0),A=Xt(c.top,0),O=Xt(c.bottom,0);d?S=p-2*(k!==0||I!==0?k+I:Xt(c.left,c.right)):w=f-2*(A!==0||O!==0?A+O:Xt(c.top,c.bottom))}await a({...t,availableWidth:S,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function Sw(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ss(n)!==i||Ss(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function tp(e){return tt(e)?e:e.contextElement}function Po(e){const t=tp(e);if(!wt(t))return hr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Sw(t);let a=(i?Ss(n.width):n.width)/r,s=(i?Ss(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const QD=hr(0);function Tw(e){const t=Bt(e);return!Kf()||!t.visualViewport?QD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Xr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=tp(e);let a=hr(1);t&&(r?tt(r)&&(a=Po(r)):a=Po(e));const s=JD(i,n,r)?Tw(i):hr(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Bt(i),f=r&&tt(r)?Bt(r):r;let h=p,g=fd(h);for(;g&&r&&f!==h;){const m=Po(g),y=g.getBoundingClientRect(),v=nn(g),b=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,T=y.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,d*=m.y,c+=b,l+=T,h=Bt(g),g=fd(h)}}return Es({width:u,height:d,x:c,y:l})}function ej(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Qn(r),s=t?wl(t.floating):!1;if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=hr(1);const u=hr(0),d=wt(r);if((d||!d&&!i)&&((wr(r)!=="body"||wa(a))&&(c=Sl(r)),wt(r))){const p=Xr(r);l=Po(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function tj(e){return Array.from(e.getClientRects())}function Ew(e){return Xr(Qn(e)).left+Sl(e).scrollLeft}function nj(e){const t=Qn(e),n=Sl(e),r=e.ownerDocument.body,o=Xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ew(e);const s=-n.scrollTop;return nn(r).direction==="rtl"&&(a+=Xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function rj(e,t){const n=Bt(e),r=Qn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Kf();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function oj(e,t){const n=Xr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wt(e)?Po(e):hr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function Kg(e,t,n){let r;if(t==="viewport")r=rj(e,n);else if(t==="document")r=nj(Qn(e));else if(tt(t))r=oj(t,n);else{const o=Tw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Es(r)}function Cw(e,t){const n=Gn(e);return n===t||!tt(n)||mr(n)?!1:nn(n).position==="fixed"||Cw(n,t)}function ij(e,t){const n=t.get(e);if(n)return n;let r=dr(e,[],!1).filter(s=>tt(s)&&wr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Gn(e):e;for(;tt(a)&&!mr(a);){const s=nn(a),c=Uf(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||wa(a)&&!c&&Cw(e,a))?r=r.filter(u=>u!==a):o=s,a=Gn(a)}return t.set(e,r),r}function aj(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?wl(t)?[]:ij(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{const d=Kg(t,u,o);return l.top=Xt(d.top,l.top),l.right=In(d.right,l.right),l.bottom=In(d.bottom,l.bottom),l.left=Xt(d.left,l.left),l},Kg(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function sj(e){const{width:t,height:n}=Sw(e);return{width:t,height:n}}function lj(e,t,n){const r=wt(t),o=Qn(t),i=n==="fixed",a=Xr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=hr(0);if(r||!r&&!i)if((wr(t)!=="body"||wa(o))&&(s=Sl(t)),r){const d=Xr(t,!0,i,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else o&&(c.x=Ew(o));const l=a.left+s.scrollLeft-c.x,u=a.top+s.scrollTop-c.y;return{x:l,y:u,width:a.width,height:a.height}}function Xc(e){return nn(e).position==="static"}function Yg(e,t){return!wt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function kw(e,t){const n=Bt(e);if(wl(e))return n;if(!wt(e)){let o=Gn(e);for(;o&&!mr(o);){if(tt(o)&&!Xc(o))return o;o=Gn(o)}return n}let r=Yg(e,t);for(;r&&pD(r)&&Xc(r);)r=Yg(r,t);return r&&mr(r)&&Xc(r)&&!Uf(r)?n:r||mD(e)||n}const cj=async function(e){const t=this.getOffsetParent||kw,n=this.getDimensions,r=await n(e.floating);return{reference:lj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uj(e){return nn(e).direction==="rtl"}const dj={convertOffsetParentRelativeRectToViewportRelativeRect:ej,getDocumentElement:Qn,getClippingRect:aj,getOffsetParent:kw,getElementRects:cj,getClientRects:tj,getDimensions:sj,getScale:Po,isElement:tt,isRTL:uj};function fj(e,t){let n=null,r;const o=Qn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=ko(u),h=ko(o.clientWidth-(l+d)),g=ko(o.clientHeight-(u+p)),m=ko(l),v={rootMargin:-f+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Xt(0,In(1,c))||1};let b=!0;function T(w){const S=w[0].intersectionRatio;if(S!==c){if(!b)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(T,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,v)}n.observe(e)}return a(!0),i}function di(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=tp(e),u=o||i?[...l?dr(l):[],...dr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=l&&s?fj(l,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[v]=y;v&&v.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),l&&!c&&f.observe(l),f.observe(t));let h,g=c?Xr(e):null;c&&m();function m(){const y=Xr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(m)}return n(),()=>{var y;u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,c&&cancelAnimationFrame(h)}}const pj=GD,mj=ZD,hj=KD,gj=XD,Gg=UD,vj=(e,t,n)=>{const r=new Map,o={platform:dj,...n},i={...o.platform,_c:r};return qD(e,t,{...o,platform:i})};var is=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ps(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(!Ps(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)&&!Ps(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Rw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zg(e,t){const n=Rw(e);return Math.round(t*n)/n}function Qc(e){const t=R.useRef(e);return is(()=>{t.current=e}),t}function yj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=R.useState(r);Ps(p,r)||f(r);const[h,g]=R.useState(null),[m,y]=R.useState(null),v=R.useCallback(j=>{j!==S.current&&(S.current=j,g(j))},[]),b=R.useCallback(j=>{j!==C.current&&(C.current=j,y(j))},[]),T=i||h,w=a||m,S=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=c!=null,A=Qc(c),O=Qc(o),N=Qc(l),V=R.useCallback(()=>{if(!S.current||!C.current)return;const j={placement:t,strategy:n,middleware:p};O.current&&(j.platform=O.current),vj(S.current,C.current,j).then(B=>{const M={...B,isPositioned:N.current!==!1};P.current&&!Ps(k.current,M)&&(k.current=M,Qs.flushSync(()=>{d(M)}))})},[p,t,n,O,N]);is(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[l]);const P=R.useRef(!1);is(()=>(P.current=!0,()=>{P.current=!1}),[]),is(()=>{if(T&&(S.current=T),w&&(C.current=w),T&&w){if(A.current)return A.current(T,w,V);V()}},[T,w,V,A,I]);const D=R.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:b}),[v,b]),_=R.useMemo(()=>({reference:T,floating:w}),[T,w]),F=R.useMemo(()=>{const j={position:n,left:0,top:0};if(!_.floating)return j;const B=Zg(_.floating,u.x),M=Zg(_.floating,u.y);return s?{...j,transform:"translate("+B+"px, "+M+"px)",...Rw(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:M}},[n,s,_.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:V,refs:D,elements:_,floatingStyles:F}),[u,V,D,_,F])}const xj=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?Gg({element:r.current,padding:o}).fn(n):{}:r?Gg({element:r,padding:o}).fn(n):{}}}},Sa=(e,t)=>({...pj(e),options:[e,t]}),np=(e,t)=>({...mj(e),options:[e,t]}),rp=(e,t)=>({...hj(e),options:[e,t]}),Pw=(e,t)=>({...gj(e),options:[e,t]}),Aw=(e,t)=>({...xj(e),options:[e,t]}),Iw={...R},bj=Iw.useInsertionEffect,wj=bj||(e=>e());function kt(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wj(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const op="ArrowUp",Ta="ArrowDown",qo="ArrowLeft",fi="ArrowRight";function Ha(e,t,n){return Math.floor(e/t)!==n}function zi(e,t){return t<0||t>=e.current.length}function Jc(e,t){return Ft(e,{disabledIndices:t})}function Xg(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&as(a,s,o));return s}function Sj(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,d=l;if(n.key===op){if(u&&Dt(n),l===-1)d=c;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(l-i<s||d<0)){const p=l%i,f=c%i,h=c-(f-p);f===p?d=c:d=f>p?h:h-i}zi(e,d)&&(d=l)}if(n.key===Ta&&(u&&Dt(n),l===-1?d=s:(d=Ft(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(d=Ft(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),zi(e,d)&&(d=l)),r==="both"){const p=ko(l/i);n.key===fi&&(u&&Dt(n),l%i!==i-1?(d=Ft(e,{startingIndex:l,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:l-l%i-1,disabledIndices:a})),Ha(d,i,p)&&(d=l)),n.key===qo&&(u&&Dt(n),l%i!==0?(d=Ft(e,{startingIndex:l,decrement:!0,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),Ha(d,i,p)&&(d=l));const f=ko(c/i)===p;zi(e,d)&&(o&&f?d=n.key===qo?c:Ft(e,{startingIndex:l-l%i-1,disabledIndices:a}):d=l)}return d}function Tj(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:c}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let l=!1;for(n&&(o=0);!l;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<c;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),l=!0):o++}}),[...r]}function Ej(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function Cj(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function as(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Qg=0;function sr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Qg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Qg=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function kj(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 Rj(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const _w=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Pj(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=R.useState(()=>new Map),a=R.useCallback(c=>{i(l=>new Map(l).set(c,null))},[]),s=R.useCallback(c=>{i(l=>{const u=new Map(l);return u.delete(c),u})},[]);return We(()=>{const c=new Map(o);Array.from(c.keys()).sort(kj).forEach((u,d)=>{c.set(u,d)}),Rj(o,c)||i(c)},[o]),R.createElement(_w.Provider,{value:R.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function Ow(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=R.useContext(_w),[s,c]=R.useState(null),l=R.useRef(null),u=R.useCallback(d=>{if(l.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return We(()=>{const d=l.current;if(d)return n(d),()=>{r(d)}},[n,r]),We(()=>{const d=l.current?o.get(l.current):null;d!=null&&c(d)},[o]),R.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(this,arguments)}let Jg=!1,Aj=0;const ev=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Aj++;function Ij(){const[e,t]=R.useState(()=>Jg?ev():void 0);return We(()=>{e==null&&t(ev())},[]),R.useEffect(()=>{Jg=!0},[]),e}const _j=Iw.useId,pi=_j||Ij;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function ss(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function Oj(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const Mw=R.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:c=0,strokeWidth:l=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...h}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||ss("The `ref` prop is required for `FloatingArrow`."));const m=pi(),[y,v]=R.useState(!1);if(We(()=>{if(!o)return;nn(o).direction==="rtl"&&v(!0)},[o]),!o)return null;const b=l*2,T=b/2,w=a/2*(c/-8+1),S=s/2*c/4,[C,k]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",O=u&&k==="end"?"bottom":"top";let N=u&&k==="end"?"right":"left";u&&y&&(N=k==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-S))+(" Q"+a/2+","+s+" "+w+","+(s-S))+" Z",_={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",Uo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[O]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+_+(f??""),...h}}),b>0&&R.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:D}),R.createElement("path",{stroke:b&&!p?g.fill:"none",d:D}),R.createElement("clipPath",{id:m},R.createElement("rect",{x:-T,y:T*(I?-1:1),width:a+b,height:a})))});function Dw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const jw=R.createContext(null),Nw=R.createContext(null),Sr=()=>{var e;return((e=R.useContext(jw))==null?void 0:e.id)||null},Tr=()=>R.useContext(Nw);function Mj(e){const t=pi(),n=Tr(),o=Sr();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function Dj(e){const{children:t,id:n}=e,r=Sr();return R.createElement(jw.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function jj(e){const{children:t}=e,n=R.useRef([]),r=R.useCallback(a=>{n.current=[...n.current,a]},[]),o=R.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=R.useState(()=>Dw())[0];return R.createElement(Nw.Provider,{value:R.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function vr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const tv=vr("safe-polygon");function eu(e,t,n){return n&&!Ho(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Fw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=Tr(),h=Sr(),g=jt(l),m=jt(c),y=jt(n),v=R.useRef(),b=R.useRef(-1),T=R.useRef(),w=R.useRef(-1),S=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),I=R.useCallback(()=>{var D;const _=(D=o.current.openEvent)==null?void 0:D.type;return(_==null?void 0:_.includes("mouse"))&&_!=="mousedown"},[o]);R.useEffect(()=>{if(!s)return;function D(_){let{open:F}=_;F||(clearTimeout(b.current),clearTimeout(w.current),S.current=!0)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[s,i]),R.useEffect(()=>{if(!s||!g.current||!n)return;function D(F){I()&&r(!1,F,"hover")}const _=_t(a.floating).documentElement;return _.addEventListener("mouseleave",D),()=>{_.removeEventListener("mouseleave",D)}},[a.floating,n,r,s,g,I]);const A=R.useCallback(function(D,_,F){_===void 0&&(_=!0),F===void 0&&(F="hover");const j=eu(m.current,"close",v.current);j&&!T.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,D,F),j)):_&&(clearTimeout(b.current),r(!1,D,F))},[m,r]),O=kt(()=>{k.current(),T.current=void 0}),N=kt(()=>{if(C.current){const D=_t(a.floating).body;D.style.pointerEvents="",D.removeAttribute(tv),C.current=!1}});R.useEffect(()=>{if(!s)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function _(M){if(clearTimeout(b.current),S.current=!1,u&&!Ho(v.current)||d>0&&!eu(m.current,"open"))return;const $=eu(m.current,"open",v.current);$?b.current=window.setTimeout(()=>{y.current||r(!0,M,"hover")},$):r(!0,M,"hover")}function F(M){if(D())return;k.current();const $=_t(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),T.current=g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M,!0,"safe-polygon")}});const X=T.current;$.addEventListener("mousemove",X),k.current=()=>{$.removeEventListener("mousemove",X)};return}(v.current==="touch"?!yt(a.floating,M.relatedTarget):!0)&&A(M)}function j(M){D()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M)}})(M))}if(tt(a.domReference)){var B;const M=a.domReference;return n&&M.addEventListener("mouseleave",j),(B=a.floating)==null||B.addEventListener("mouseleave",j),p&&M.addEventListener("mousemove",_,{once:!0}),M.addEventListener("mouseenter",_),M.addEventListener("mouseleave",F),()=>{var $;n&&M.removeEventListener("mouseleave",j),($=a.floating)==null||$.removeEventListener("mouseleave",j),p&&M.removeEventListener("mousemove",_),M.removeEventListener("mouseenter",_),M.removeEventListener("mouseleave",F)}}},[a,s,e,u,d,p,A,O,N,r,n,y,f,m,g,o]),We(()=>{var D;if(s&&n&&(D=g.current)!=null&&D.__options.blockPointerEvents&&I()){const F=_t(a.floating).body;F.setAttribute(tv,""),F.style.pointerEvents="none",C.current=!0;const j=a.floating;if(tt(a.domReference)&&j){var _;const B=a.domReference,M=f==null||(_=f.nodesRef.current.find($=>$.id===h))==null||(_=_.context)==null?void 0:_.elements.floating;return M&&(M.style.pointerEvents=""),B.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{B.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,h,a,f,g,I]),We(()=>{n||(v.current=void 0,O(),N())},[n,O,N]),R.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(w.current),N()},[s,a.domReference,O,N]);const V=R.useMemo(()=>{function D(_){v.current=_.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(_){const{nativeEvent:F}=_;function j(){!S.current&&!y.current&&r(!0,F,"hover")}u&&!Ho(v.current)||n||d===0||(clearTimeout(w.current),v.current==="touch"?j():w.current=window.setTimeout(j,d))}}},[u,r,n,y,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(D){A(D.nativeEvent,!1)}}),[A]);return R.useMemo(()=>s?{reference:V,floating:P}:{},[s,V,P])}function Nj(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function qr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function Fj(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),qr(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let go=new WeakMap,Wa=new WeakSet,qa={},tu=0;const Lj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Lw=e=>e&&(e.host||Lw(e.parentNode)),Vj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Lw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function $j(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=Vj(t,e),s=new Set,c=new Set(a),l=[];qa[o]||(qa[o]=new WeakMap);const u=qa[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||c.has(f)||[].forEach.call(f.children,h=>{if(wr(h)!=="script")if(s.has(h))p(h);else{const g=i?h.getAttribute(i):null,m=g!==null&&g!=="false",y=(go.get(h)||0)+1,v=(u.get(h)||0)+1;go.set(h,y),u.set(h,v),l.push(h),y===1&&m&&Wa.add(h),v===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return tu++,()=>{l.forEach(f=>{const h=(go.get(f)||0)-1,g=(u.get(f)||0)-1;go.set(f,h),u.set(f,g),h||(!Wa.has(f)&&i&&f.removeAttribute(i),Wa.delete(f)),g||f.removeAttribute(o)}),tu--,tu||(go=new WeakMap,go=new WeakMap,Wa=new WeakSet,qa={})}}function nv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=_t(e[0]).body;return $j(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ko=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Vw(e,t){const n=ra(e,Ko());t==="prev"&&n.reverse();const r=n.indexOf(gn(_t(e)));return n.slice(r+1)[0]}function $w(){return Vw(document.body,"next")}function zw(){return Vw(document.body,"prev")}function Bi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function zj(e){ra(e,Ko()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Bj(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 Hj(e,t,n){const r=e.indexOf(t);function o(a){const s=vr("focus-guard");let c=r+(a?1:0),l=e[c];for(;l&&(!l.isConnected||l.hasAttribute(s)||yt(n,l));)a?c++:c--,l=e[c];return l}const i=o(!0);return i||o(!1)}const ip={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let Wj;function rv(e){e.key==="Tab"&&(e.target,clearTimeout(Wj))}const As=R.forwardRef(function(t,n){const[r,o]=R.useState();We(()=>(Zf()&&o("button"),document.addEventListener("keydown",rv),()=>{document.removeEventListener("keydown",rv)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[vr("focus-guard")]:"",style:ip};return R.createElement("span",Uo({},t,i))}),Bw=R.createContext(null),ov=vr("portal");function qj(e){e===void 0&&(e={});const{id:t,root:n}=e,r=pi(),o=Hw(),[i,a]=R.useState(null),s=R.useRef(null);return We(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),We(()=>{if(!r||s.current)return;const c=t?document.getElementById(t):null;if(!c)return;const l=document.createElement("div");l.id=r,l.setAttribute(ov,""),c.appendChild(l),s.current=l,a(l)},[t,r]),We(()=>{if(!r||s.current)return;let c=n||(o==null?void 0:o.portalNode);c&&!tt(c)&&(c=c.current),c=c||document.body;let l=null;t&&(l=document.createElement("div"),l.id=t,c.appendChild(l));const u=document.createElement("div");u.id=r,u.setAttribute(ov,""),c=l||c,c.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function io(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=qj({id:n,root:r}),[a,s]=R.useState(null),c=R.useRef(null),l=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return R.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&Bi(h)&&(h.type==="focusin"?Bj:zj)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),R.createElement(Bw.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&R.createElement(As,{"data-type":"outside",ref:c,onFocus:f=>{if(Bi(f,i)){var h;(h=u.current)==null||h.focus()}else{const g=zw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&R.createElement("span",{"aria-owns":i.id,style:ip}),i&&Qs.createPortal(t,i),p&&i&&R.createElement(As,{"data-type":"outside",ref:l,onFocus:f=>{if(Bi(f,i)){var h;(h=d.current)==null||h.focus()}else{const g=$w()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Hw=()=>R.useContext(Bw),Uj=20;let Fr=[];function nu(e){Fr=Fr.filter(n=>n.isConnected);let t=e;if(!(!t||wr(t)==="body")){if(!WD(t,Ko())){const n=ra(t,Ko())[0];n&&(t=n)}Fr.push(t),Fr.length>Uj&&(Fr=Fr.slice(-20))}}function iv(){return Fr.slice().reverse().find(e=>e.isConnected)}const Kj=R.forwardRef(function(t,n){return R.createElement("button",Uo({},t,{type:"button",ref:n,tabIndex:-1,style:ip}))});function mi(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:h,onOpenChange:g,events:m,dataRef:y,floatingId:v,elements:{domReference:b,floating:T}}=t,w=typeof a=="number"&&a<0,S=hw(b)&&w,C=Lj()?i:!0,k=jt(o),I=jt(a),A=jt(s),O=Tr(),N=Hw(),V=R.useRef(null),P=R.useRef(null),D=R.useRef(!1),_=R.useRef(!1),F=R.useRef(-1),j=N!=null,B=T==null?void 0:T.firstElementChild,M=(B==null?void 0:B.id)===v?B:T,$=kt(function(Z){return Z===void 0&&(Z=M),Z?ra(Z,Ko()):[]}),J=kt(Z=>{const Y=$(Z);return k.current.map(G=>b&&G==="reference"?b:M&&G==="floating"?M:Y).filter(Boolean).flat()});R.useEffect(()=>{if(r||!l)return;function Z(G){if(G.key==="Tab"){yt(M,gn(_t(M)))&&$().length===0&&!S&&Dt(G);const L=J(),z=An(G);k.current[0]==="reference"&&z===b&&(Dt(G),G.shiftKey?sr(L[L.length-1]):sr(L[1])),k.current[1]==="floating"&&z===M&&G.shiftKey&&(Dt(G),sr(L[0]))}}const Y=_t(M);return Y.addEventListener("keydown",Z),()=>{Y.removeEventListener("keydown",Z)}},[r,b,M,l,k,S,$,J]),R.useEffect(()=>{if(r||!T)return;function Z(Y){const G=An(Y),z=$().indexOf(G);z!==-1&&(F.current=z)}return T.addEventListener("focusin",Z),()=>{T.removeEventListener("focusin",Z)}},[r,T,$]),R.useEffect(()=>{if(r||!d)return;function Z(){_.current=!0,setTimeout(()=>{_.current=!1})}function Y(G){const L=G.relatedTarget;queueMicrotask(()=>{const z=!(yt(b,L)||yt(T,L)||yt(L,T)||yt(N==null?void 0:N.portalNode,L)||L!=null&&L.hasAttribute(vr("focus-guard"))||O&&(qr(O.nodesRef.current,h).find(K=>{var ie,H;return yt((ie=K.context)==null?void 0:ie.elements.floating,L)||yt((H=K.context)==null?void 0:H.elements.domReference,L)})||Nj(O.nodesRef.current,h).find(K=>{var ie,H;return((ie=K.context)==null?void 0:ie.elements.floating)===L||((H=K.context)==null?void 0:H.elements.domReference)===L})));if(c&&z&&gn(_t(M))===_t(M).body){wt(M)&&(M==null||M.focus());const K=F.current,ie=$(),H=ie[K]||ie[ie.length-1]||M;wt(H)&&H.focus()}(S||!l)&&L&&z&&!_.current&&L!==iv()&&(D.current=!0,g(!1,G))})}if(T&&wt(b))return b.addEventListener("focusout",Y),b.addEventListener("pointerdown",Z),T.addEventListener("focusout",Y),()=>{b.removeEventListener("focusout",Y),b.removeEventListener("pointerdown",Z),T.removeEventListener("focusout",Y)}},[r,b,T,M,l,h,O,N,g,d,c,$,S]),R.useEffect(()=>{var Z;if(r)return;const Y=Array.from((N==null||(Z=N.portalNode)==null?void 0:Z.querySelectorAll("["+vr("portal")+"]"))||[]);if(T){const G=[T,...Y,V.current,P.current,k.current.includes("reference")||S?b:null].filter(z=>z!=null),L=l||S?nv(G,C,!C):nv(G);return()=>{L()}}},[r,b,T,l,k,N,S,C]),We(()=>{if(r||!wt(M))return;const Z=_t(M),Y=gn(Z);queueMicrotask(()=>{const G=J(M),L=I.current,z=(typeof L=="number"?G[L]:L.current)||M,K=yt(M,Y);!w&&!K&&p&&sr(z,{preventScroll:z===M})})},[r,p,M,w,J,I]),We(()=>{if(r||!M)return;let Z=!1;const Y=_t(M),G=gn(Y);let z=y.current.openEvent;const K=f.domReference.current;nu(G);function ie(H){let{open:ye,reason:Te,event:Re,nested:$e}=H;ye&&(z=Re),Te==="escape-key"&&f.domReference.current&&nu(f.domReference.current),Te==="hover"&&Re.type==="mouseleave"&&(D.current=!0),Te==="outside-press"&&($e?(D.current=!1,Z=!0):D.current=!(pw(Re)||Gf(Re)))}return m.on("openchange",ie),()=>{m.off("openchange",ie);const H=gn(Y),ye=yt(T,H)||O&&qr(O.nodesRef.current,h).some(se=>{var xe;return yt((xe=se.context)==null?void 0:xe.elements.floating,H)});(ye||z&&["click","mousedown"].includes(z.type))&&f.domReference.current&&nu(f.domReference.current);const Re=K||G,$e=ra(_t(Re).body,Ko());queueMicrotask(()=>{let se=iv();!se&&wt(Re)&&T&&(se=Hj($e,Re,T)),A.current&&!D.current&&wt(se)&&(!(se!==H&&H!==Y.body)||ye)&&se.focus({preventScroll:Z})})}},[r,T,M,A,y,f,m,O,h]),We(()=>{if(!r&&N)return N.setFocusManagerState({modal:l,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,l,p,g,f,d]),We(()=>{if(r||!M||typeof MutationObserver!="function"||w)return;const Z=()=>{const G=M.getAttribute("tabindex"),L=$(),z=gn(_t(T)),K=L.indexOf(z);K!==-1&&(F.current=K),k.current.includes("floating")||z!==f.domReference.current&&L.length===0?G!=="0"&&M.setAttribute("tabindex","0"):G!=="-1"&&M.setAttribute("tabindex","-1")};Z();const Y=new MutationObserver(Z);return Y.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,T,M,f,k,$,w]);function X(Z){return r||!u||!l?null:R.createElement(Kj,{ref:Z==="start"?V:P,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&C&&(l?!S:!0)&&(j||l);return R.createElement(R.Fragment,null,Q&&R.createElement(As,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:Z=>{if(l){const G=J();sr(o[0]==="reference"?G[0]:G[G.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(D.current=!1,Bi(Z,N.portalNode)){const G=$w()||b;G==null||G.focus()}else{var Y;(Y=N.beforeOutsideRef.current)==null||Y.focus()}}}),!S&&X("start"),n,X("end"),Q&&R.createElement(As,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:Z=>{if(l)sr(J()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(D.current=!0),Bi(Z,N.portalNode)){const G=zw()||b;G==null||G.focus()}else{var Y;(Y=N.afterOutsideRef.current)==null||Y.focus()}}}))}const ru=new Set,Yj=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=pi();return We(()=>{if(!r)return;ru.add(i);const a=/iP(hone|ad|od)|iOS/.test(Yf()),s=document.body.style,l=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[l]=u+"px"),a){var f,h;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,m=((h=window.visualViewport)==null?void 0:h.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(m))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{ru.delete(i),ru.size===0&&(Object.assign(s,{overflow:"",[l]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),R.createElement("div",Uo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function av(e){return wt(e.target)&&e.target.tagName==="BUTTON"}function sv(e){return Xf(e)}function Ea(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,d=R.useRef(),p=R.useRef(!1),f=R.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const g=d.current;h.button===0&&s!=="click"&&(Ho(g,!0)&&l||(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Ho(g,!0)&&l||(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!u||av(h))&&(h.key===" "&&!sv(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&c),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||av(h)||sv(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&c),h.nativeEvent,"click"))}}),[o,i,s,l,u,r,n,c]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}function Gj(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||l?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=c&&t.y!=null?t.y:f):o&&!l&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function lv(e){return e!=null&&e.clientX!=null}function Zj(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:c="both",x:l=null,y:u=null}=t,d=R.useRef(!1),p=R.useRef(null),[f,h]=R.useState(),[g,m]=R.useState([]),y=kt((S,C)=>{d.current||r.current.openEvent&&!lv(r.current.openEvent)||a.setPositionReference(Gj(i,{x:S,y:C,axis:c,dataRef:r,pointerType:f}))}),v=kt(S=>{l!=null||u!=null||(n?p.current||m([]):y(S.clientX,S.clientY))}),b=Ho(f)?o:n,T=R.useCallback(()=>{if(!b||!s||l!=null||u!=null)return;const S=Bt(o);function C(k){const I=An(k);yt(o,I)?(S.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||lv(r.current.openEvent)){S.addEventListener("mousemove",C);const k=()=>{S.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,l,u,o,r,a,i,y]);R.useEffect(()=>T(),[T,g]),R.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),R.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(l!=null||u!=null)&&(d.current=!1,y(l,u))},[s,l,u,y]);const w=R.useMemo(()=>{function S(C){let{pointerType:k}=C;h(k)}return{onPointerDown:S,onPointerEnter:S,onMouseMove:v,onMouseEnter:v}},[v]);return R.useMemo(()=>s?{reference:w}:{},[s,w])}const Xj={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Qj={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},cv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function ao(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:h}=t,g=Tr(),m=kt(typeof c=="function"?c:()=>!1),y=typeof c=="function"?m:c,v=R.useRef(!1),b=R.useRef(!1),{escapeKey:T,outsidePress:w}=cv(f),{escapeKey:S,outsidePress:C}=cv(h),k=kt(P=>{var D;if(!n||!a||!s||P.key!=="Escape")return;const _=(D=i.current.floatingContext)==null?void 0:D.nodeId,F=g?qr(g.nodesRef.current,_):[];if(!T&&(P.stopPropagation(),F.length>0)){let j=!0;if(F.forEach(B=>{var M;if((M=B.context)!=null&&M.open&&!B.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,gD(P)?P.nativeEvent:P,"escape-key")}),I=kt(P=>{var D;const _=()=>{var F;k(P),(F=An(P))==null||F.removeEventListener("keydown",_)};(D=An(P))==null||D.addEventListener("keydown",_)}),A=kt(P=>{var D;const _=v.current;v.current=!1;const F=b.current;if(b.current=!1,l==="click"&&F||_||typeof y=="function"&&!y(P))return;const j=An(P),B="["+vr("inert")+"]",M=_t(o.floating).querySelectorAll(B);let $=tt(j)?j:null;for(;$&&!mr($);){const Z=Gn($);if(mr(Z)||!tt(Z))break;$=Z}if(M.length&&tt(j)&&!vD(j)&&!yt(j,o.floating)&&Array.from(M).every(Z=>!yt($,Z)))return;if(wt(j)&&V){const Z=j.clientWidth>0&&j.scrollWidth>j.clientWidth,Y=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let G=Y&&P.offsetX>j.clientWidth;if(Y&&nn(j).direction==="rtl"&&(G=P.offsetX<=j.offsetWidth-j.clientWidth),G||Z&&P.offsetY>j.clientHeight)return}const J=(D=i.current.floatingContext)==null?void 0:D.nodeId,X=g&&qr(g.nodesRef.current,J).some(Z=>{var Y;return Zc(P,(Y=Z.context)==null?void 0:Y.elements.floating)});if(Zc(P,o.floating)||Zc(P,o.domReference)||X)return;const Q=g?qr(g.nodesRef.current,J):[];if(Q.length>0){let Z=!0;if(Q.forEach(Y=>{var G;if((G=Y.context)!=null&&G.open&&!Y.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,P,"outside-press")}),O=kt(P=>{var D;const _=()=>{var F;A(P),(F=An(P))==null||F.removeEventListener(l,_)};(D=An(P))==null||D.addEventListener(l,_)});R.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=w;function P(F){r(!1,F,"ancestor-scroll")}const D=_t(o.floating);s&&D.addEventListener("keydown",S?I:k,S),y&&D.addEventListener(l,C?O:A,C);let _=[];return p&&(tt(o.domReference)&&(_=dr(o.domReference)),tt(o.floating)&&(_=_.concat(dr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(_=_.concat(dr(o.reference.contextElement)))),_=_.filter(F=>{var j;return F!==((j=D.defaultView)==null?void 0:j.visualViewport)}),_.forEach(F=>{F.addEventListener("scroll",P,{passive:!0})}),()=>{s&&D.removeEventListener("keydown",S?I:k,S),y&&D.removeEventListener(l,C?O:A,C),_.forEach(F=>{F.removeEventListener("scroll",P)})}},[i,o,s,y,l,n,r,p,a,T,w,k,S,I,A,C,O]),R.useEffect(()=>{v.current=!1},[y,l]);const N=R.useMemo(()=>({onKeyDown:k,[Xj[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),V=R.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Qj[l]]:()=>{v.current=!0}}),[k,l]);return R.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function Jj(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=pi(),i=R.useRef({}),[a]=R.useState(()=>Dw()),s=Sr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!tt(f)&&Oj("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=R.useState(r.reference),u=kt((f,h,g)=>{i.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:g,nested:s}),n==null||n(f,h,g)}),d=R.useMemo(()=>({setPositionReference:l}),[]),p=R.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return R.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function Er(e){e===void 0&&(e={});const{nodeId:t}=e,n=Jj({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=R.useState(null),[s,c]=R.useState(null),u=(o==null?void 0:o.reference)||i,d=R.useRef(null),p=Tr();We(()=>{u&&(d.current=u)},[u]);const f=yj({...e,elements:{...o,...s&&{reference:s}}}),h=R.useCallback(b=>{const T=tt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;c(T),f.refs.setReference(T)},[f.refs]),g=R.useCallback(b=>{(tt(b)||b===null)&&(d.current=b,a(b)),(tt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!tt(b))&&f.refs.setReference(b)},[f.refs]),m=R.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:d}),[f.refs,g,h]),y=R.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),v=R.useMemo(()=>({...f,...r,refs:m,elements:y,nodeId:t}),[f,m,y,t,r]);return We(()=>{r.dataRef.current.floatingContext=v;const b=p==null?void 0:p.nodesRef.current.find(T=>T.id===t);b&&(b.context=v)}),R.useMemo(()=>({...f,context:v,refs:m,elements:y}),[f,m,y,v])}function eN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=R.useRef(!1),u=R.useRef(),d=R.useRef(!0);R.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function h(){!n&&wt(a.domReference)&&a.domReference===gn(_t(a.domReference))&&(l.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),R.useEffect(()=>{if(!s)return;function f(h){let{reason:g}=h;(g==="reference-press"||g==="escape-key")&&(l.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=R.useMemo(()=>({onPointerDown(f){Gf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){l.current=!1},onFocus(f){if(l.current)return;const h=An(f.nativeEvent);if(c&&tt(h))try{if(Zf()&&mw())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Xf(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){l.current=!1;const h=f.relatedTarget,g=f.nativeEvent,m=tt(h)&&h.hasAttribute(vr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const v=gn(a.domReference?a.domReference.ownerDocument:document);!h&&v===a.domReference||yt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,v)||yt(a.domReference,v)||m||r(!1,g,"focus")})}}),[i,a.domReference,r,c]);return R.useMemo(()=>s?{reference:p}:{},[s,p])}const uv="active",dv="selected";function ou(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[uv]:a,[dv]:s,...c}=e;i=c}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(c=>{let[l,u]=c;if(!(o&&[uv,dv].includes(l)))if(l.indexOf("on")===0){if(r.has(l)||r.set(l,[]),typeof u=="function"){var d;(d=r.get(l))==null||d.push(u),a[l]=function(){for(var p,f=arguments.length,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return(p=r.get(l))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[l]=u}),a),{})}}function Cr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=R.useCallback(s=>ou(s,e,"reference"),t),i=R.useCallback(s=>ou(s,e,"floating"),n),a=R.useCallback(s=>ou(s,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let fv=!1;function Tl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function pv(e,t){return Tl(t,e===op||e===Ta,e===qo||e===fi)}function iu(e,t,n){return Tl(t,e===Ta,n?e===qo:e===fi)||e==="Enter"||e===" "||e===""}function tN(e,t,n){return Tl(t,n?e===qo:e===fi,e===Ta)}function mv(e,t,n){return Tl(t,n?e===fi:e===qo,e===op)}function El(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:c=!0,selectedIndex:l=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:h=!1,focusItemOnOpen:g="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:y=!0,disabledIndices:v=void 0,orientation:b="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:S,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||ss("`useListNavigation` looping must be enabled to allow escaping."),h||ss("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&T>1&&ss("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=Sr(),A=Tr(),O=kt(s),N=R.useRef(g),V=R.useRef(l??-1),P=R.useRef(null),D=R.useRef(!0),_=R.useRef(O),F=R.useRef(!!o.floating),j=R.useRef(n),B=R.useRef(!1),M=R.useRef(!1),$=jt(v),J=jt(n),X=jt(w),Q=jt(o.floating),Z=jt(l),[Y,G]=R.useState(),[L,z]=R.useState(),K=kt(function(se,xe,le){le===void 0&&(le=!1);function be(ue){h?(G(ue.id),A==null||A.events.emit("virtualfocus",ue),S&&(S.current=ue)):sr(ue,{preventScroll:!0,sync:mw()&&Zf()?fv||B.current:!1})}const oe=se.current[xe.current];oe&&be(oe),requestAnimationFrame(()=>{const ue=se.current[xe.current]||oe;if(!ue)return;oe||be(ue);const ee=X.current;ee&&H&&(le||!D.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});We(()=>{document.createElement("div").focus({get preventScroll(){return fv=!0,!1}})},[]),We(()=>{c&&(n&&o.floating?N.current&&l!=null&&(M.current=!0,V.current=l,O(l)):F.current&&(V.current=-1,_.current(null)))},[c,n,o.floating,l,O]),We(()=>{if(c&&n&&o.floating)if(a==null){if(B.current=!1,Z.current!=null)return;if(F.current&&(V.current=-1,K(i,V)),(!j.current||!F.current)&&N.current&&(P.current!=null||N.current===!0&&P.current==null)){let se=0;const xe=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(xe),se++):(V.current=P.current==null||iu(P.current,b,f)||p?Jc(i,$.current):Xg(i,$.current),P.current=null,O(V.current))};xe()}}else zi(i,a)||(V.current=a,K(i,V,M.current),M.current=!1)},[c,n,o.floating,a,Z,p,i,b,f,O,K,$]),We(()=>{var se;if(!c||o.floating||!A||h||!F.current)return;const xe=A.nodesRef.current,le=(se=xe.find(ue=>ue.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,be=gn(_t(o.floating)),oe=xe.some(ue=>ue.context&&yt(ue.context.elements.floating,be));le&&!oe&&D.current&&le.focus({preventScroll:!0})},[c,o.floating,A,I,h]),We(()=>{if(!c||!A||!h||I)return;function se(xe){z(xe.id),S&&(S.current=xe)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[c,A,h,I,S]),We(()=>{_.current=O,F.current=!!o.floating}),We(()=>{n||(P.current=null)},[n]),We(()=>{j.current=n},[n]);const ie=a!=null,H=R.useMemo(()=>{function se(le){if(!n)return;const be=i.current.indexOf(le);be!==-1&&O(be)}return{onFocus(le){let{currentTarget:be}=le;se(be)},onClick:le=>{let{currentTarget:be}=le;return be.focus({preventScroll:!0})},...m&&{onMouseMove(le){let{currentTarget:be}=le;se(be)},onPointerLeave(le){let{pointerType:be}=le;!D.current||be==="touch"||(V.current=-1,K(i,V),O(null),h||sr(Q.current,{preventScroll:!0}))}}}},[n,Q,K,m,i,O,h]),ye=kt(se=>{if(D.current=!1,B.current=!0,!J.current&&se.currentTarget===Q.current)return;if(p&&mv(se.key,b,f)){Dt(se),r(!1,se.nativeEvent,"list-navigation"),wt(o.domReference)&&!h&&o.domReference.focus();return}const xe=V.current,le=Jc(i,v),be=Xg(i,v);if(se.key==="Home"&&(Dt(se),V.current=le,O(V.current)),se.key==="End"&&(Dt(se),V.current=be,O(V.current)),T>1){const oe=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ue=Tj(oe,T,k),ee=ue.findIndex(te=>te!=null&&!as(i.current,te,v)),q=ue.reduce((te,me,Oe)=>me!=null&&!as(i.current,me,v)?Oe:te,-1);if(V.current=ue[Sj({current:ue.map(te=>te!=null?i.current[te]:null)},{event:se,orientation:b,loop:d,cols:T,disabledIndices:Cj([...v||i.current.map((te,me)=>as(i.current,me)?me:void 0),void 0],ue),minIndex:ee,maxIndex:q,prevIndex:Ej(V.current>be?le:V.current,oe,ue,T,se.key===Ta?"bl":se.key===fi?"tr":"tl"),stopEvent:!0})],O(V.current),b==="both")return}if(pv(se.key,b)){if(Dt(se),n&&!h&&gn(se.currentTarget.ownerDocument)===se.currentTarget){V.current=iu(se.key,b,f)?le:be,O(V.current);return}iu(se.key,b,f)?d?V.current=xe>=be?u&&xe!==i.current.length?-1:le:Ft(i,{startingIndex:xe,disabledIndices:v}):V.current=Math.min(be,Ft(i,{startingIndex:xe,disabledIndices:v})):d?V.current=xe<=le?u&&xe!==-1?i.current.length:be:Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:v}):V.current=Math.max(le,Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:v})),zi(i,V.current)?O(null):O(V.current)}}),Te=R.useMemo(()=>h&&n&&ie&&{"aria-activedescendant":L||Y},[h,n,ie,L,Y]),Re=R.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!hw(o.domReference)&&Te,onKeyDown:ye,onPointerMove(){D.current=!0}}),[Te,ye,o.domReference,b]),$e=R.useMemo(()=>{function se(le){g==="auto"&&pw(le.nativeEvent)&&(N.current=!0)}function xe(le){N.current=g,g==="auto"&&Gf(le.nativeEvent)&&(N.current=!0)}return{...Te,onKeyDown(le){D.current=!1;const be=le.key.indexOf("Arrow")===0,oe=tN(le.key,b,f),ue=mv(le.key,b,f),ee=pv(le.key,b),q=(p?oe:ee)||le.key==="Enter"||le.key.trim()==="";if(h&&n){const He=A==null?void 0:A.nodesRef.current.find(Ot=>Ot.parentId==null),Ye=A&&He?Fj(A.nodesRef.current,He.id):null;if(be&&Ye&&S){const Ot=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(oe||ue){var te,me;const fn=((te=Ye.context)==null?void 0:te.elements.domReference)===le.currentTarget,En=ue&&!fn?(me=Ye.context)==null?void 0:me.elements.domReference:oe?i.current.find(Jn=>(Jn==null?void 0:Jn.id)===Y):null;En&&(Dt(le),En.dispatchEvent(Ot),z(void 0))}if(ee&&Ye.context&&Ye.context.open&&Ye.parentId&&le.currentTarget!==Ye.context.elements.domReference){var Oe;Dt(le),(Oe=Ye.context.elements.domReference)==null||Oe.dispatchEvent(Ot);return}}return ye(le)}if(!(!n&&!y&&be)){if(q&&(P.current=p&&ee?null:le.key),p){oe&&(Dt(le),n?(V.current=Jc(i,$.current),O(V.current)):r(!0,le.nativeEvent,"list-navigation"));return}ee&&(l!=null&&(V.current=l),Dt(le),!n&&y?r(!0,le.nativeEvent,"list-navigation"):ye(le),n&&O(V.current))}},onFocus(){n&&!h&&O(null)},onPointerDown:xe,onMouseDown:se,onClick:se}},[Y,Te,ye,$,g,i,p,O,r,n,y,b,f,l,A,h,S]);return R.useMemo(()=>c?{reference:$e,floating:Re,item:H}:{},[c,$e,Re,H])}const nN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function so(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=nN.get(a))!=null?n:a,c=pi(),u=Sr()!=null,d=R.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:c},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,c,a]),p=R.useMemo(()=>{const h={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?h:{...h,...s==="menu"&&{"aria-labelledby":c}}},[s,o,c,a]),f=R.useCallback(h=>{let{active:g,selected:m}=h;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&m};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return R.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const hv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function vo(e,t){return typeof e=="function"?e(t):e}function rN(e,t){const[n,r]=R.useState(e);return e&&!n&&r(!0),R.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function oN(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,c]=R.useState("unmounted"),l=rN(n,a);return!l&&s==="close"&&c("unmounted"),We(()=>{if(r){if(n){c("initial");const u=requestAnimationFrame(()=>{c("open")});return()=>{cancelAnimationFrame(u)}}c("close")}},[n,r]),{isMounted:l,status:s}}function Ww(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,c=s.split("-")[0],l=R.useMemo(()=>({side:c,placement:s}),[c,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,h]=R.useState(()=>({...vo(i,l),...vo(n,l)})),{isMounted:g,status:m}=oN(e,{duration:a}),y=jt(n),v=jt(r),b=jt(o),T=jt(i);return We(()=>{const w=vo(y.current,l),S=vo(b.current,l),C=vo(T.current,l),k=vo(v.current,l)||Object.keys(w).reduce((I,A)=>(I[A]="",I),{});if(m==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...w})),m==="open"&&h({transitionProperty:Object.keys(k).map(hv).join(","),transitionDuration:d+"ms",...C,...k}),m==="close"){const I=S||w;h({transitionProperty:Object.keys(I).map(hv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,y,v,T,d,m,l]),{isMounted:g,styles:f}}function iN(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=R.useRef(),g=R.useRef(""),m=R.useRef((n=f??a)!=null?n:-1),y=R.useRef(null),v=kt(s),b=kt(c),T=jt(u),w=jt(p);We(()=>{r&&(clearTimeout(h.current),y.current=null,g.current="")},[r]),We(()=>{if(r&&g.current===""){var A;m.current=(A=f??a)!=null?A:-1}},[r,f,a]);const S=kt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=kt(A=>{function O(_,F,j){const B=T.current?T.current(F,j):F.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return B?_.indexOf(B):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(O(N,N,g.current)===-1?S(!1):A.key===" "&&Dt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Dt(A),S(!0)),N.every(_=>{var F,j;return _?((F=_[0])==null?void 0:F.toLocaleLowerCase())!==((j=_[1])==null?void 0:j.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",m.current=y.current),g.current+=A.key,clearTimeout(h.current),h.current=setTimeout(()=>{g.current="",m.current=y.current,S(!1)},d);const P=m.current,D=O(N,[...N.slice((P||0)+1),...N.slice(0,(P||0)+1)],g.current);D!==-1?(v(D),y.current=D):A.key!==" "&&(g.current="",S(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),I=R.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&S(!1)}}),[C,S]);return R.useMemo(()=>l?{reference:k,floating:I}:{},[l,k,I])}function gv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[c,l]=t[a]||[0,0],[u,d]=t[s]||[0,0];l>=r!=d>=r&&n<=(u-c)*(r-l)/(d-l)+c&&(o=!o)}return o}function aN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,c=performance.now();function l(d,p){const f=performance.now(),h=f-c;if(a===null||s===null||h===0)return a=d,s=p,c=f,null;const g=d-a,m=p-s,v=Math.sqrt(g*g+m*m)/h;return a=d,s=p,c=f,v}const u=d=>{let{x:p,y:f,placement:h,elements:g,onClose:m,nodeId:y,tree:v}=d;return function(T){function w(){clearTimeout(o),m()}if(clearTimeout(o),!g.domReference||!g.floating||h==null||p==null||f==null)return;const{clientX:S,clientY:C}=T,k=[S,C],I=An(T),A=T.type==="mouseleave",O=yt(g.floating,I),N=yt(g.domReference,I),V=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),D=h.split("-")[0],_=p>P.right-P.width/2,F=f>P.bottom-P.height/2,j=aN(k,V),B=P.width>V.width,M=P.height>V.height,$=(B?V:P).left,J=(B?V:P).right,X=(M?V:P).top,Q=(M?V:P).bottom;if(O&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&tt(T.relatedTarget)&&yt(g.floating,T.relatedTarget)||v&&qr(v.nodesRef.current,y).some(G=>{let{context:L}=G;return L==null?void 0:L.open}))return;if(D==="top"&&f>=V.bottom-1||D==="bottom"&&f<=V.top+1||D==="left"&&p>=V.right-1||D==="right"&&p<=V.left+1)return w();let Z=[];switch(D){case"top":Z=[[$,V.top+1],[$,P.bottom-1],[J,P.bottom-1],[J,V.top+1]];break;case"bottom":Z=[[$,P.top+1],[$,V.bottom-1],[J,V.bottom-1],[J,P.top+1]];break;case"left":Z=[[P.right-1,Q],[P.right-1,X],[V.left+1,X],[V.left+1,Q]];break;case"right":Z=[[V.right-1,Q],[V.right-1,X],[P.left+1,X],[P.left+1,Q]];break}function Y(G){let[L,z]=G;switch(D){case"top":{const K=[B?L+t/2:_?L+t*4:L-t*4,z+t+1],ie=[B?L-t/2:_?L+t*4:L-t*4,z+t+1],H=[[P.left,_||B?P.bottom-t:P.top],[P.right,_?B?P.bottom-t:P.top:P.bottom-t]];return[K,ie,...H]}case"bottom":{const K=[B?L+t/2:_?L+t*4:L-t*4,z-t],ie=[B?L-t/2:_?L+t*4:L-t*4,z-t],H=[[P.left,_||B?P.top+t:P.bottom],[P.right,_?B?P.top+t:P.bottom:P.top+t]];return[K,ie,...H]}case"left":{const K=[L+t+1,M?z+t/2:F?z+t*4:z-t*4],ie=[L+t+1,M?z-t/2:F?z+t*4:z-t*4];return[...[[F||M?P.right-t:P.left,P.top],[F?M?P.right-t:P.left:P.right-t,P.bottom]],K,ie]}case"right":{const K=[L-t,M?z+t/2:F?z+t*4:z-t*4],ie=[L-t,M?z-t/2:F?z+t*4:z-t*4],H=[[F||M?P.left+t:P.right,P.top],[F?M?P.left+t:P.right:P.left+t,P.bottom]];return[K,ie,...H]}}}if(!gv([S,C],Z)){if(i&&!j)return w();if(!A&&r){const G=l(T.clientX,T.clientY);if(G!==null&&G<.1)return w()}gv([S,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const sN=/Mac|iPod|iPhone|iPad/,Is=()=>sN.test(navigator.userAgent),lN=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Is()?"Meta":"Control":n==="Hyper"?Is()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),vv=e=>e.map(t=>t.trim()).join("+");class cN{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=vv(lN(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=vv(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class yn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof yn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new yn(this);return t?t(n):n}static from(t,n){return new yn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(yn.from(t,n).values())}toArray(){return Array.from(this.values())}}const uN=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const c=[a];for(let l=1;l<t.length;l++){const u=t[l];if(s=e.indexOf(u,s),s===-1)return;c.push(s),s++}o.push(c)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const c=a[a.length-1]-a[0],l=s[s.length-1]-s[0];return c-l})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},yv=(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},xv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},bv=(e,t)=>{const n=yv(t,xv.basic,e);return n!==void 0&&n!==e?n:yv(t,xv.extend,e)},wv=e=>e.replace(/[^0-9]/g,""),Ua=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),Sv=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?wv(e).includes(wv(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?uN(e,t)!==null:!1,dN=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>Sv(e,o,n,r)):Sv(e,t,n,r),ap=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Ve.array(i.value)?i.value.map(Ua):Ua(`${i.value}`)}));return e.forEach(i=>{const a=bv(i,t);o.forEach(s=>{const c=bv(i,s.key);if(!c)return;const l=Ua(`${s.value}`.toLocaleLowerCase()).trim(),u=Ua(`${c}`.toLocaleLowerCase()).trim();if(dN(u,l,s.score,s.match))return void r.set(a,i);Ve.function(s.ifNotMatch)&&s.ifNotMatch(l,u)&&r.set(a,i)})}),Array.from(r.values())},fN=e=>(e=e.trim(),e==="Alt"?Is()?x.jsx(YA,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Is()?x.jsx(VA,{"aria-label":"Command",size:14}):"Ctrl":e),pN=e=>{const t=e.value.trim().split("+");return x.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return x.jsxs(E.Fragment,{children:[x.jsx("kbd",{"aria-label":n,children:fN(n)}),o?null:x.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},sp=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),mN=(e,t)=>Yr()?t:window.matchMedia(e).matches,hN=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(mN(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},Tv=()=>window.matchMedia("@media (pointer: coarse)"),gN=()=>{var r;const e=E.useRef(Yr()?null:Tv()),[t,n]=E.useState(Yr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?Tv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},lp=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=gN(),o=E.useRef(Yr()?"":document.documentElement.style.overflowY);return E.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||j0())return;document.documentElement.style.padding=ux(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),E.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=c=>{const l=n.current;if(l&&l.contains(c.target)){const u=l.getBoundingClientRect(),d=l.style.height?Number(fT(l.style.height)):null,p=Ve.number(d)?d:u.height,f=l.scrollHeight<=p;return p===l.scrollHeight?e?c.preventDefault():void 0:f?void 0:e?c.preventDefault():void 0}return c.currentTarget===document.documentElement,e?c.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},vn="500ms",vN={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},yN={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},au={drawer:e=>e==="left"?vN:yN,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:vn},initial:{opacity:.5,scale:.95,animationDuration:vn,type:"spring"},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},xN=ei("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Uw={top:0,left:0,right:0,bottom:0},Kw=e=>e*.65,bN=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const l=e.parent.current,u=e.value.get()||l.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),c=Kw(window.outerHeight);return s>=c?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return x.jsx(ft.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:Uw,whileDrag:{cursor:"grabbing"},className:Ie("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Ka={drawer:"right",sheet:"none",dialog:"none"},wN=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ka.drawer:Ka[o]:t?Ka[o]:Ka.sheet},SN=[],Yw=E.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:c,bodyClassName:l,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:h=void 0,overlayClassName:g="",type:m="dialog",position:y,overlayClickClose:v=!1,role:b="dialog",interactions:T=SN,...w},S)=>{const C=d?ft.div:"div",k=lp(e,"block-only"),I=E.useId(),A=E.useId(),O=hN("(min-width: 64rem)"),N=m!=="dialog",V=wN(O,f,m,y),P=O||f?au[m]:au.sheet,D=typeof P=="function"?P(V):P,_=O||f?m:"sheet",F=Er({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),j=Ea(F.context),B=so(F.context,{role:b}),M=ao(F.context,{escapeKey:!0,referencePress:!0,outsidePress:v}),$=Cr([j,B,M].concat(T)),J=o,X=ul(void 0);E.useEffect(()=>{X.set(void 0)},[X,_]);const Q=()=>a(!1);E.useImperativeHandle(S,()=>({context:F.context,floating:k.current}),[F.context,k]);const Y=d&&_==="sheet"?{layout:!0,exit:"exit",dragListener:!0,dragMomentum:!0,animate:"enter",dragElastic:0,dragPropagation:!0,onDrag:(G,L)=>{const z=F.refs.floating;if(z.current&&_==="sheet"){const ie=z.current.getBoundingClientRect(),H=X.get()||ie.height,ye=Math.abs(H-L.delta.y),Te=Kw(window.outerHeight);return ye<Te?(Q(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(ye)}},dragSnapToOrigin:!0,dragDirectionLock:!0,initial:"initial",layoutId:h,variants:D,drag:_==="sheet"?"y":"x",draggable:_==="sheet",dragConstraints:Uw}:{};return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Bo,{ref:F.refs.setReference,...$.getReferenceProps({layoutId:h}),children:J}):x.jsx(ft.button,{ref:F.refs.setReference,...$.getReferenceProps(),layoutId:h,type:"button",children:J})}):null,x.jsx(io,{children:x.jsx(xr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(Yj,{lockScroll:!0,className:Ie(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${_==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:x.jsx(mi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:F.context,children:x.jsxs(C,{...w,...Y,...t?{"aria-labelledby":I,"aria-describedby":A}:{"aria-label":s},...$.getFloatingProps({"aria-modal":e,ref:qn(F.refs.setFloating,k),className:Ie(xN({position:V,type:_}),c,"overscroll-contain")}),"data-component":"modal",style:_==="drawer"?{width:X}:{height:X},children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:I,className:"px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,x.jsx("section",{className:Ie("flex-1 overflow-y-auto px-8 select-text py-1",l),children:i}),n?x.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?x.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:x.jsx("button",{type:"button",onClick:Q,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:x.jsx(dl,{})})}):null,N&&u?x.jsx(bN,{onChange:a,parent:F.refs.floating,position:V,sheet:_==="sheet",value:X}):null]})})}):null})})]})}),TN=e=>x.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Kd(e.item.title)?x.jsx(e.item.title,{text:e.text}):e.item.title}),EN=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?x.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:x.jsx(TN,{text:e.text,item:o})}):o.type!=="shortcut"?x.jsx(E.Fragment,{}):x.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[x.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,x.jsx("span",{children:Kd(o.title)?x.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?x.jsx(pN,{value:o.shortcut}):null]})}),CN=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Ve.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,c)=>{const l=Ve.function(c.enabled)?c.enabled({text:t}):c.enabled??!0;return l&&s.push({...c,enabled:l}),s},[]),i=ap(o,"title",n),a=r.filter(s=>Ve.function(s.enabled)?s.enabled({text:t}):!1);return yn.unique(i.concat(a),s=>s.title)},kN=[0,0,0,0,0],RN=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=At(),[o,i]=E.useState(""),a=Ur(o),s=E.useId(),c=E.useRef(null),[l,u]=E.useState(null),d=Er({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:di}),p=El(d.context,{listRef:n,loop:!0,activeIndex:l,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:v=>u(b=>Ve.number(v)?v:e.open?b??0:null)}),{getItemProps:f}=Cr([p]),h=e.commands.flatMap(v=>v.type==="group"?[v,...v.items]:[v]),g=CN(h,o),m=o===""?h:[{type:"group",title:"Results",items:[]},...g.filter(v=>v.type!=="group")];E.useEffect(()=>{const v=new cN;return v.add(t,()=>{var b;return(b=e.onChangeVisibility)==null?void 0:b.call(e,!0)}),h.forEach(b=>{b.type!=="group"&&b.type==="shortcut"&&b.shortcut!==void 0&&v.add(b.shortcut,T=>b.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),v.register()},[t]);const y=e.Icon??dg;return x.jsx(E.Fragment,{children:x.jsxs(Yw,{ref:c,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[x.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[x.jsx("div",{className:"flex size-10 items-center justify-center",children:x.jsx(y,{Default:dg,text:o,size:16})}),x.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:v=>i(v.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:v=>{var b;if((v.key==="ArrowDown"||v.key==="ArrowUp")&&l!==null&&((b=n.current[l])==null||b.scrollIntoView({block:"start",inline:"start"})),v.key==="Enter"){if(l!==null&&m[l]){v.preventDefault();const T=m[l],w=v.currentTarget.value;if(T.type==="shortcut")return T.action({event:v,setOpen:e.onChangeVisibility,text:w})}if(m.length===1){v.preventDefault();const T=m[0],w=v.currentTarget.value;if(T.type==="shortcut")return T.action({event:v,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?x.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:[x.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),kN.map((v,b)=>x.jsx("li",{className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:sp},`${s}-${b}-skeleton-index`))]}):x.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[x.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[m.map((v,b)=>E.createElement(EN,{...f({onMouseEnter:()=>u(b),ref(T){n.current[b]=T},onClick(T){var w;T.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),v.type==="shortcut"&&v.action({event:T,setOpen:e.onChangeVisibility,text:o})}}),item:v,text:o,active:l===b,key:`${s}-${v.type}-${b}`})),m.length===1?x.jsx("div",{className:Ie("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Ve.number(l)?x.jsx(e.Preview,{command:m[l],text:o}):null]}),e.footer?x.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},hi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Sa(10),rp({fallbackAxisSideDirection:"end"}),np(),Aw({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:c}=Er({open:n,middleware:i,transform:!0,whileElementsMounted:di,onOpenChange:(h,g)=>{var y;const m=g==null?void 0:g.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),(y=e.onChange)==null||y.call(e,h))}}),l=Ea(c),u=ao(c),d=so(c,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=Cr([l,u,d]);return x.jsxs(E.Fragment,{children:[x.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(io,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(mi,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:c,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[x.jsx(Mw,{ref:o,context:c,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},PN=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:c}=Er({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),l=Ea(s,{enabled:e.disabled??!0}),u=so(s,{role:"tooltip"}),d=ao(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Cr([l,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Mo,{...f(e),as:ft.button,layoutId:r,ref:c.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(ft.span,{layoutId:o,children:e.trigger})}),x.jsx(xr,{children:i?x.jsx(io,{root:t,children:x.jsx(mi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(ft.div,{...p(),ref:c.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Gw=200,AN=500,Zw=(e="")=>Ie("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),vd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Ev=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:i="",label:a,...s},c)=>{const[l,u]=E.useState(r??!1),[d,p]=E.useState(!1),[f,h]=E.useState(null),g=E.useRef([]),m=E.useRef([]),y=E.useContext(vd),v=Sr(),b=Tr(),T=Mj(),w=Ow(),S=v!==null,{floatingStyles:C,refs:k,context:I}=Er({nodeId:T,open:l,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:di,placement:S?"right":"bottom-start",middleware:[Sa({mainAxis:S?0:4,alignmentAxis:S?-4:0}),rp(),np()]}),A=so(I,{role:"menu"}),O=ao(I,{bubbles:!0}),N=Fw(I,{move:!1,enabled:n,delay:{open:Gw},handleClose:qw({blockPointerEvents:!0})}),V=Ea(I,{toggle:!S,event:"mousedown",ignoreMouse:S,keyboardHandlers:!0}),P=El(I,{loop:!0,activeIndex:f,nested:S,listRef:g,onNavigate:h}),D=iN(I,{activeIndex:f,listRef:m,resetMs:AN,onMatch:l?h:void 0}),{getReferenceProps:_,getFloatingProps:F,getItemProps:j}=Cr([N,V,A,O,P,D]);E.useEffect(()=>{if(!b)return;const M=()=>u(!1),$=J=>{J.nodeId!==T&&J.parentId===v&&u(!1)};return b.events.on("click",M),b.events.on("menuopen",$),()=>{b.events.off("click",M),b.events.off("menuopen",$)}},[b,T,v]),E.useEffect(()=>{l&&b&&b.events.emit("menuopen",{parentId:v,nodeId:T})},[b,l,T,v]);const B=o?s.className:Ie(Zw(s.className));return x.jsxs(Dj,{id:T,children:[x.jsx(E.Fragment,{children:s.asChild?x.jsx(Bo,{..._(y.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),y.setHasFocusInside(!0)}})),children:a,className:B,"data-open":l?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:qn(k.setReference,w.ref,c),tabIndex:S?y.activeIndex===w.index?0:-1:void 0}):x.jsxs("button",{type:"button",className:B,"data-open":l?"":void 0,"data-nested":S?"":void 0,role:S?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:qn(k.setReference,w.ref,c),tabIndex:S?y.activeIndex===w.index?0:-1:void 0,..._(y.getItemProps({...s,onFocus(M){var $;($=s.onFocus)==null||$.call(s,M),p(!1),y.setHasFocusInside(!0)}})),children:[a,S&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(If,{size:14})]})]})}),x.jsx(vd.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:j,setHasFocusInside:p,isOpen:l},children:x.jsx(Pj,{elementsRef:g,labelsRef:m,children:l&&x.jsx(io,{preserveTabOrder:!0,children:x.jsx(mi,{context:I,modal:!1,initialFocus:S?-1:0,returnFocus:!S,children:x.jsx(t,{...F(),ref:k.setFloating,style:{...s.style,...C},className:Ie("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",i),children:e})})})})})]})}),IN=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(vd),s=Ow({label:n?null:e}),c=Tr(),l=s.index===a.activeIndex;return x.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":l,"data-open":a.isOpen,tabIndex:l?0:-1,ref:qn(s.ref,i),className:Zw(`${o.className??""} ${l?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),c==null||c.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?x.jsx(t,{size:16}):null]})}),_N=E.forwardRef((e,t)=>Sr()!==null?x.jsx(Ev,{...e,isParent:!1,ref:t}):x.jsx(jj,{children:x.jsx(Ev,{...e,isParent:!0,ref:t})})),ON=e=>x.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),cp=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:c=!0,popover:l=!0,followCursor:u=!1,onChange:d=$f,...p},f){const[h,g]=E.useState(i??!1),m=E.useRef(null),y=t||"span",v=P=>{g(P),d==null||d(P)},{refs:b,floatingStyles:T,context:w}=Er({open:h,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:di,onOpenChange:i?void 0:v,middleware:[np(),Sa(5),rp({fallbackAxisSideDirection:"start"}),Aw({padding:5,element:m})]}),S=Fw(w,{move:!0,delay:{open:Gw},enabled:c?s:!1,handleClose:l?qw():null}),C=eN(w,{enabled:c?a:!1}),k=Ea(w,{enabled:c?l:!1}),I=ao(w,{enabled:c}),A=so(w,{role:"tooltip",enabled:c}),O=Zj(w,{enabled:!!c&&!!u}),{getReferenceProps:N,getFloatingProps:V}=Cr([A,I,O,a?C:void 0,s?S:void 0,l?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),x.jsxs(E.Fragment,{children:[x.jsx(y,{...N(p),ref:qn(b.setReference,f),children:n}),h&&x.jsx(io,{preserveTabOrder:!0,children:x.jsxs(cn,{...V(),ref:b.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(Mw,{ref:m,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Cl=0,kr=1,gi=2,Xw=4;function Cv(e){return()=>e}function MN(e){e()}function ia(e,t){return n=>e(t(n))}function kv(e,t){return()=>e(t)}function Qw(e,t){return n=>e(t,n)}function up(e){return e!==void 0}function DN(...e){return()=>{e.map(MN)}}function vi(){}function kl(e,t){return t(e),e}function jN(e,t){return t(e)}function ut(...e){return e}function Qe(e,t){return e(kr,t)}function De(e,t){e(Cl,t)}function dp(e){e(gi)}function Lt(e){return e(Xw)}function we(e,t){return Qe(e,Qw(t,Cl))}function Fn(e,t){const n=e(kr,r=>{n(),t(r)});return n}function Rv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Jw(e,t){return e===t}function lt(e=Jw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>ia(t,e)}function kn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=NN(...t);return(r,o)=>{switch(r){case gi:dp(e);return;case kr:return Qe(e,n(o))}}}function _n(e,t){return n=>r=>{n(t=e(t,r))}}function Yo(e){return t=>n=>{e>0?e--:t(n)}}function ur(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ne(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,c=>{const l=n;n=n|s,t[a]=c,l!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function NN(...e){return t=>e.reduceRight(jN,t)}function FN(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case kr:return i?n===i?void 0:(r(),n=i,t=Qe(e,i),t):(r(),vi);case gi:r(),n=null;return}}}function ae(e){let t=e;const n=Be();return(r,o)=>{switch(r){case Cl:t=o;break;case kr:{o(t);break}case Xw:return t}return n(r,o)}}function Vt(e,t){return kl(ae(t),n=>we(e,n))}function Be(){const e=[];return(t,n)=>{switch(t){case Cl:e.slice().forEach(r=>{r(n)});return;case gi:e.splice(0,e.length);return;case kr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return kl(Be(),t=>we(e,t))}function Ke(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:LN(),singleton:n}}const LN=()=>Symbol();function VN(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(c=>n(c)));return a&&t.set(i,s),s};return n(e)}function Rt(...e){const t=Be(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,c=>{n[a]=c,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case gi:{dp(t);return}case kr:return r===o&&a(n),Qe(t,a)}}}function Pe(e,t=Jw){return ne(e,lt(t))}function Pv(...e){return function(t,n){switch(t){case gi:return;case kr:return DN(...e.map(r=>Qe(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const $N={0:"debug",3:"error",1:"log",2:"warn"},zN=()=>typeof globalThis>"u"?window:globalThis,Rr=Ke(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=zN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[$N[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Ln(e,t,n){return fp(e,t,n).callbackRef}function fp(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const c=a[0].target;c.offsetParent!==null&&e(c)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function e1(e,t,n,r,o,i,a,s,c){const l=E.useCallback(u=>{const d=BN(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let h;f&&(h=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:f?s?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:f?s?h.innerWidth:h.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:y}),i==null||i(s?Av("column-gap",getComputedStyle(u).columnGap,o):Av("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return fp(l,n,c)}function BN(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const c=parseInt(s.dataset.index),l=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},tn.ERROR),u===l)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==c-1?i.push({endIndex:c,size:u,startIndex:c}):i[i.length-1].endIndex++}return i}function Av(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function pp(e,t,n){const r=E.useRef(null),o=E.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,p;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;p=f.height-Math.max(0,h),d=h+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,l.top),d=l.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=fp(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var c;if(t){t.addEventListener("scroll",s);const l=new ResizeObserver(()=>{requestAnimationFrame(s)});return l.observe(t),()=>{t.removeEventListener("scroll",s),l.unobserve(t)}}else{const l=(c=a.current)==null?void 0:c.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",s),l==null||l.addEventListener("resize",s),()=>{l==null||l.removeEventListener("scroll",s),l==null||l.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ke(()=>{const e=Be(),t=Be(),n=ae(0),r=Be(),o=ae(0),i=Be(),a=Be(),s=ae(0),c=ae(0),l=ae(0),u=ae(0),d=Be(),p=Be(),f=ae(!1),h=ae(!1),g=ae(!1);return we(ne(e,pe(({scrollTop:m})=>m)),t),we(ne(e,pe(({scrollHeight:m})=>m)),a),we(t,o),{deviation:n,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:h,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),aa={lvl:0};function t1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:c}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=c}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===aa}function sa(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?sa(e.l,t):sa(e.r,t)}function Sn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Sn(e.l,t,n)}function Jt(e,t,n){return ot(e)?o1(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?Iv(Ct(e,{l:Jt(e.l,t,n)})):Iv(Ct(e,{r:Jt(e.r,t,n)}))}function Ao(){return aa}function Rl(e,t,n){if(ot(e))return[];const r=Sn(e,t)[0];return HN(xd(e,r,n))}function yd(e,t){if(ot(e))return aa;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=r1(r);return ls(Ct(e,{k:i,l:n1(r),v:a}))}}else return t<n?ls(Ct(e,{l:yd(r,t)})):ls(Ct(e,{r:yd(o,t)}))}function Hr(e){return ot(e)?[]:[...Hr(e.l),{k:e.k,v:e.v},...Hr(e.r)]}function xd(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(xd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(xd(i,t,n))),s}function ls(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(su(t))return i1(Ct(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return Ct(t.r,{l:Ct(t,{r:t.r.l}),lvl:n,r:Ct(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(su(e))return bd(Ct(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=su(o)?r.lvl-1:r.lvl;return Ct(o,{l:Ct(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:bd(Ct(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ct(e,t){return o1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function n1(e){return ot(e.r)?e.l:ls(Ct(e,{r:n1(e.r)}))}function su(e){return ot(e)||e.lvl>e.r.lvl}function r1(e){return ot(e.r)?[e.k,e.v]:r1(e.r)}function o1(e,t,n,r=aa,o=aa){return{k:e,l:r,lvl:n,r:o,v:t}}function Iv(e){return bd(i1(e))}function i1(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function bd(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function HN(e){return t1(e,({k:t,v:n})=>({index:t,value:n}))}function a1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function la(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const mp=Ke(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function s1(e,t,n){return e[_s(e,t,n)]}function _s(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function WN(e,t,n,r){const o=_s(e,t,r),i=_s(e,n,r,o);return e.slice(o,i+1)}function Tn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Pl(e){return!ot(e.groupOffsetTree)}function hp({index:e},t){return t===e?0:t<e?-1:1}function qN(){return{groupIndices:[],groupOffsetTree:Ao(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Ao()}}function UN(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=Jt(e,0,i);continue}const s=Rl(e,a-1,o+1);if(s.some(JN(r)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:p}of s)c?(o>=d||i===p)&&(e=yd(e,d)):(l=p!==i,c=!0),u>o&&o>=d&&p!==i&&(e=Jt(e,o+1,p));l&&(e=Jt(e,a,i))}return[e,n]}function KN(e){return typeof e.groupIndex<"u"}function YN({offset:e},t){return t===e?0:t<e?-1:1}function ca(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=s1(t,e,hp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function l1(e,t){if(!Pl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function c1(e,t,n){if(KN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=l1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function GN(e,t,n,r=0){return r>0&&(t=Math.max(t,s1(e,r,hp).offset)),t1(WN(e,t,n,YN),QN)}function ZN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((h,g)=>Jt(Jt(h,g,p),g+1,f),a)}else[a,s]=UN(a,t);if(a===i)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=wd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>Jt(p,f,ca(f,d,o)),Ao()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:a}}function XN(e){return Hr(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 _v(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 wd(e,t,n,r){let o=e,i=0,a=0,s=0,c=0;if(t!==0){c=_s(o,t-1,hp),s=o[c].offset;const l=Sn(n,t-1);i=l[0],a=l[1],o.length&&o[c].size===Sn(n,t)[1]&&(c-=1),o=o.slice(0,c+1)}else o=[];for(const{start:l,value:u}of Rl(n,t,1/0)){const d=l-i,p=d*a+s+d*r;o.push({index:l,offset:p,size:u}),i=l,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function QN(e){return{index:e.index,value:e}}function JN(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 e2={offsetHeight:"height",offsetWidth:"width"},zn=Ke(([{log:e},{recalcInProgress:t}])=>{const n=Be(),r=Be(),o=Vt(r,0),i=Be(),a=Be(),s=ae(0),c=ae([]),l=ae(void 0),u=ae(void 0),d=ae((w,S)=>Tn(w,e2[S])),p=ae(void 0),f=ae(0),h=qN(),g=Vt(ne(n,Ne(c,e,f),_n(ZN,h),lt()),h),m=Vt(ne(c,lt(),_n((w,S)=>({current:S,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);we(ne(c,Ce(w=>w.length>0),Ne(g,f),pe(([w,S,C])=>{const k=w.reduce((I,A,O)=>Jt(I,A,ca(A,S.offsetTree,C)||O),Ao());return{...S,groupIndices:w,groupOffsetTree:k}})),g),we(ne(r,Ne(g),Ce(([w,{lastIndex:S}])=>w<S),pe(([w,{lastIndex:S,lastSize:C}])=>[{endIndex:S,size:C,startIndex:w}])),n),we(l,u);const y=Vt(ne(l,pe(w=>w===void 0)),!0);we(ne(u,Ce(w=>w!==void 0&&ot(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const v=en(ne(n,Ne(g),_n(({sizes:w},[S,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:h}),pe(w=>w.changed)));Qe(ne(s,_n((w,S)=>({diff:w.prev-S,prev:S}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:S}=Lt(g);if(w>0)De(t,!0),De(i,w+_v(w,S));else if(w<0){const C=Lt(m);C.length>0&&(w-=_v(-w,C)),De(a,w)}}),Qe(ne(s,Ne(e)),([w,S])=>{w<0&&S("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},tn.ERROR)});const b=en(i);we(ne(i,Ne(g),pe(([w,S])=>{const C=S.groupIndices.length>0,k=[],I=S.lastSize;if(C){const A=sa(S.sizeTree,0);let O=0,N=0;for(;O<w;){const P=S.groupIndices[N],D=S.groupIndices.length===N+1?1/0:S.groupIndices[N+1]-P-1;k.push({endIndex:P,size:A,startIndex:P}),k.push({endIndex:P+1+D-1,size:I,startIndex:P+1}),N++,O+=D+1}const V=Hr(S.sizeTree);return O!==w&&V.shift(),V.reduce((P,{k:D,v:_})=>{let F=P.ranges;return P.prevSize!==0&&(F=[...P.ranges,{endIndex:D+w-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:D+w,prevSize:_,ranges:F}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return Hr(S.sizeTree).reduce((A,{k:O,v:N})=>({prevIndex:O+w,prevSize:N,ranges:[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const T=en(ne(a,Ne(g,f),pe(([w,{offsetTree:S},C])=>{const k=-w;return ca(k,S,C)})));return we(ne(a,Ne(g,f),pe(([w,S,C])=>{if(S.groupIndices.length>0){if(ot(S.sizeTree))return S;let k=Ao();const I=Lt(m);let A=0,O=0,N=0;for(;A<-w;){N=I[O];const V=I[O+1]-N-1;O++,A+=V+1}if(k=Hr(S.sizeTree).reduce((V,{k:P,v:D})=>Jt(V,Math.max(0,P+w),D),k),A!==-w){const V=sa(S.sizeTree,N);k=Jt(k,0,V);const P=Sn(S.sizeTree,-w+1)[1];k=Jt(k,1,P)}return{...S,sizeTree:k,...wd(S.offsetTree,0,k,C)}}else{const k=Hr(S.sizeTree).reduce((I,{k:A,v:O})=>Jt(I,Math.max(0,A+w),O),Ao());return{...S,sizeTree:k,...wd(S.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:l,gap:f,groupIndices:c,itemSize:d,listRefresh:v,shiftWith:a,shiftWithOffset:T,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},ut(Rr,mp),{singleton:!0});function t2(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const u1=Ke(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Be(),a=Be(),s=en(ne(i,pe(t2)));return we(ne(s,pe(c=>c.totalCount)),n),we(ne(s,pe(c=>c.groupIndices)),e),we(ne(Rt(o,t,r),Ce(([c,l])=>Pl(l)),pe(([c,l,u])=>Sn(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),lt(),pe(c=>[c])),a),{groupCounts:i,topItemsIndexes:a}},ut(zn,Wt)),Pr=Ke(([{log:e}])=>{const t=ae(!1),n=en(ne(t,Ce(r=>r),lt()));return Qe(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},ut(Rr),{singleton:!0}),n2=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function d1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!n2)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ca=Ke(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=Be(),h=Be(),g=ae(0);let m=null,y=null,v=null;function b(){m&&(m(),m=null),v&&(v(),v=null),y&&(clearTimeout(y),y=null),De(c,!1)}return we(ne(f,Ne(n,d,r,g,s,a,p),Ne(e,i,o),pe(([[T,w,S,C,k,I,A,O],N,V,P])=>{const D=d1(T),{align:_,behavior:F,offset:j}=D,B=C-1,M=c1(D,w,B);let $=ca(M,w.offsetTree,N)+I;_==="end"?($+=V+Sn(w.sizeTree,M)[1]-S+P,M===B&&($+=A)):_==="center"?$+=(V+Sn(w.sizeTree,M)[1]-S+P)/2:$-=k,j&&($+=j);const J=X=>{b(),X?(O("retrying to scroll to",{location:T},tn.DEBUG),De(f,T)):(De(h,!0),O("list did not change, scroll successful",{},tn.DEBUG))};if(b(),F==="smooth"){let X=!1;v=Qe(t,Q=>{X=X||Q}),m=Fn(u,()=>{J(X)})}else m=Fn(ne(t,r2(150)),J);return y=setTimeout(()=>{b()},1200),De(c,!0),O("scrolling from index to",{behavior:F,index:M,top:$},tn.DEBUG),{behavior:F,top:$}})),l),{scrollTargetReached:h,scrollToIndex:f,topListHeight:g}},ut(zn,Wt,Rr),{singleton:!0});function r2(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function gp(e,t){e==0?t():requestAnimationFrame(()=>{gp(e-1,t)})}function vp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ka=Ke(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),c=ae(0),l=ae(!0);return we(ne(a,Ne(c),Ce(([u,d])=>!!d),kn(!1)),s),we(ne(a,Ne(c),Ce(([u,d])=>!!d),kn(!1)),l),Qe(ne(Rt(t,a),Ne(s,n,e,l),Ce(([[,u],d,{sizeTree:p},f,h])=>u&&(!ot(p)||up(f))&&!d&&!h),Ne(c)),([,u])=>{Fn(o,()=>{De(l,!0)}),gp(4,()=>{Fn(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},ut(zn,Wt,Ca,Pr),{singleton:!0});function f1(e,t){return Math.abs(e-t)<1.01}const ua="up",Hi="down",o2="none",i2={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},a2=0,Ra=Ke(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),c=Be(),l=Be(),u=ae(4),d=ae(a2),p=Vt(ne(Pv(ne(Pe(o),Yo(1),kn(!0)),ne(Pe(o),Yo(1),kn(!1),Rv(100))),lt()),!1),f=Vt(ne(Pv(ne(n,kn(!0)),ne(n,kn(!1),Rv(200))),lt()),!1);we(ne(Rt(Pe(o),Pe(d)),pe(([v,b])=>v<=b),lt()),s),we(ne(s,ur(50)),l);const h=en(ne(Rt(r,Pe(i),Pe(t),Pe(e),Pe(u)),_n((v,[{scrollHeight:b,scrollTop:T},w,S,C,k])=>{const I=T+w-b>-k,A={scrollHeight:b,scrollTop:T,viewportHeight:w};if(I){let N,V;return T>v.state.scrollTop?(N="SCROLLED_DOWN",V=v.state.scrollTop-T):(N="SIZE_DECREASED",V=v.state.scrollTop-T||v.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:A}}let O;return A.scrollHeight>v.state.scrollHeight?O="SIZE_INCREASED":w<v.state.viewportHeight?O="VIEWPORT_HEIGHT_DECREASING":T<v.state.scrollTop?O="SCROLLING_UPWARDS":O="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:O,state:A}},i2),lt((v,b)=>v&&v.atBottom===b.atBottom))),g=Vt(ne(r,_n((v,{scrollHeight:b,scrollTop:T,viewportHeight:w})=>{if(f1(v.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:T};{const S=b-(T+w)<1;return v.scrollTop!==T&&S?{changed:!0,jump:v.scrollTop-T,scrollHeight:b,scrollTop:T}:{changed:!0,jump:0,scrollHeight:b,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(v=>v.changed),pe(v=>v.jump)),0);we(ne(h,pe(v=>v.atBottom)),a),we(ne(a,ur(50)),c);const m=ae(Hi);we(ne(r,pe(({scrollTop:v})=>v),lt(),_n((v,b)=>Lt(f)?{direction:v.direction,prevScrollTop:b}:{direction:b<v.prevScrollTop?ua:Hi,prevScrollTop:b},{direction:Hi,prevScrollTop:0}),pe(v=>v.direction)),m),we(ne(r,ur(50),kn(o2)),m);const y=ae(0);return we(ne(p,Ce(v=>!v),kn(0)),y),we(ne(o,ur(100),Ne(p),Ce(([v,b])=>!!b),_n(([v,b],[T])=>[b,T],[0,0]),pe(([v,b])=>b-v)),y),{atBottomState:h,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:y}},ut(Wt)),Os="top",Ms="bottom",Ov="none";function Mv(e,t,n){return typeof e=="number"?n===ua&&t===Os||n===Hi&&t===Ms?e:0:n===ua?t===Os?e.main:e.reverse:t===Ms?e.main:e.reverse}function Dv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const yp=Ke(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Be(),a=ae(0),s=ae(0),c=ae(0),l=Vt(ne(Rt(Pe(r),Pe(o),Pe(n),Pe(i,la),Pe(c),Pe(a),Pe(t),Pe(e),Pe(s)),pe(([u,d,p,[f,h],g,m,y,v,b])=>{const T=u-v,w=m+y,S=Math.max(p-T,0);let C=Ov;const k=Dv(b,Os),I=Dv(b,Ms);return f-=v,f+=p+y,h+=p+y,h-=v,f>u+w-k&&(C=ua),h<u-S+d+I&&(C=Hi),C!==Ov?[Math.max(T-p-Mv(g,Os,C)-k,0),T-S-y+d+Mv(g,Ms,C)+I]:null}),Ce(u=>u!=null),lt(la)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:c,topListHeight:a,visibleRange:l}},ut(Wt),{singleton:!0});function s2(e,t,n){if(Pl(t)){const r=l1(e,t);return[{index:Sn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const lu={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function cs(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:c}=o;let l=0,u=0;if(e.length>0){l=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*c+(d-1)*r,f=l,h=p-u;return{bottom:u,firstItemIndex:i,items:jv(e,o,i),offsetBottom:h,offsetTop:l,top:f,topItems:jv(t,o,i),topListHeight:t.reduce((g,m)=>m.size+g,0),totalCount:n}}function p1(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,c=vp(t,s),l=Array.from({length:s}).map((u,d)=>({data:i[d+c],index:d+c,offset:0,size:0}));return cs(l,[],s,o,n,r)}function jv(e,t,n){if(e.length===0)return[];if(!Pl(t))return e.map(l=>({...l,index:l.index+n,originalIndex:l.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Rl(t.groupOffsetTree,r,o);let s,c=0;for(const l of e){(!s||s.end<l.index)&&(s=a.shift(),c=t.groupIndices.indexOf(s.start));let u;l.index===s.start?u={index:c,type:"group"}:u={groupIndex:c,index:l.index-(c+1)+n},i.push({...u,data:l.data,offset:l.offset,originalIndex:l.index,size:l.size})}return i}const lo=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:h}])=>{const g=ae([]),m=ae(0),y=Be();we(i.topItemsIndexes,g);const v=Vt(ne(Rt(f,h,Pe(c,la),Pe(o),Pe(r),Pe(l),u,Pe(g),Pe(t),Pe(n),e),Ce(([S,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return S&&!C&&!A}),pe(([,,[S,C],k,I,A,O,N,V,P,D])=>{const _=I,{offsetTree:F,sizeTree:j}=_,B=Lt(m);if(k===0)return{...lu,totalCount:k};if(S===0&&C===0)return B===0?{...lu,totalCount:k}:p1(B,A,I,V,P,D||[]);if(ot(j))return B>0?null:cs(s2(vp(A,k),_,D),[],k,P,_,V);const M=[];if(N.length>0){const Z=N[0],Y=N[N.length-1];let G=0;for(const L of Rl(j,Z,Y)){const z=L.value,K=Math.max(L.start,Z),ie=Math.min(L.end,Y);for(let H=K;H<=ie;H++)M.push({data:D==null?void 0:D[H],index:H,offset:G,size:z}),G+=z}}if(!O)return cs([],M,k,P,_,V);const $=N.length>0?N[N.length-1]+1:0,J=GN(F,S,C,$);if(J.length===0)return null;const X=k-1,Q=kl([],Z=>{for(const Y of J){const G=Y.value;let L=G.offset,z=Y.start;const K=G.size;if(G.offset<S){z+=Math.floor((S-G.offset+P)/(K+P));const H=z-Y.start;L+=H*K+H*P}z<$&&(L+=($-z)*K,z=$);const ie=Math.min(Y.end,X);for(let H=z;H<=ie&&!(L>=C);H++)Z.push({data:D==null?void 0:D[H],index:H,offset:L,size:K}),L+=K+P}});return cs(Q,M,k,P,_,V)}),Ce(S=>S!==null),lt()),lu);we(ne(e,Ce(up),pe(S=>S==null?void 0:S.length)),o),we(ne(v,pe(S=>S.topListHeight)),d),we(d,s),we(ne(v,pe(S=>[S.top,S.bottom])),a),we(ne(v,pe(S=>S.items)),y);const b=en(ne(v,Ce(({items:S})=>S.length>0),Ne(o,e),Ce(([{items:S},C])=>S[S.length-1].originalIndex===C-1),pe(([,S,C])=>[S-1,C]),lt(la),pe(([S])=>S))),T=en(ne(v,ur(200),Ce(({items:S,topItems:C})=>S.length>0&&S[0].originalIndex===C.length),pe(({items:S})=>S[0].index),lt())),w=en(ne(v,Ce(({items:S})=>S.length>0),pe(({items:S})=>{let C=0,k=S.length-1;for(;S[C].type==="group"&&C<k;)C++;for(;S[k].type==="group"&&k>C;)k--;return{endIndex:S[k].index,startIndex:S[C].index}}),lt(a1)));return{endReached:b,initialItemCount:m,itemsRendered:y,listState:v,rangeChanged:w,startReached:T,topItemsIndexes:g,...p}},ut(zn,u1,yp,ka,Ca,Ra,Pr,mp),{singleton:!0}),m1=Ke(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Be(),a=Vt(ne(Rt(n,e,r,t,o),pe(([s,c,l,u,d])=>s+c+l+u+d.offsetBottom+d.bottom)),0);return we(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},ut(Wt,lo),{singleton:!0}),l2=Ke(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Vt(ne(Rt(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),ur(0),lt()),0);return{alignToBottom:n,paddingTopAddition:r}},ut(Wt,m1),{singleton:!0});function Nv(e){return e?e==="smooth"?"smooth":"auto":!1}const c2=(e,t)=>typeof e=="function"?Nv(e(t)):t&&Nv(e),u2=Ke(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:c},{scrollingInProgress:l}])=>{const u=ae(!1),d=Be();let p=null;function f(g){De(o,{align:"end",behavior:g,index:"LAST"})}Qe(ne(Rt(ne(Pe(t),Yo(1)),a),Ne(Pe(u),r,i,l),pe(([[g,m],y,v,b,T])=>{let w=m&&b,S="auto";return w&&(S=c2(y,v||T),w=w&&!!S),{followOutputBehavior:S,shouldFollow:w,totalCount:g}}),Ce(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:m})=>{p&&(p(),p=null),p=Fn(e,()=>{Lt(c)("following output to ",{totalCount:m},tn.DEBUG),f(g),p=null})});function h(g){const m=Fn(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(c)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(m,100)}return Qe(ne(Rt(Pe(u),t,s),Ce(([g,,m])=>g&&m),_n(({value:g},[,m])=>({refreshed:g===m,value:m}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),Ne(u,t)),([,g])=>{Lt(i)&&h(g!==!1)}),Qe(d,()=>{h(Lt(u)!==!1)}),Qe(Rt(Pe(u),n),([g,m])=>{g&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ut(zn,Ra,Ca,ka,Pr,Rr,Wt)),d2=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(we(ne(s,Ne(i),Ce(([,c])=>c!==0),Ne(o,r,t,n,e),pe(([[,c],l,u,d,p,f=[]])=>p1(c,l,u,d,p,f))),a),{}),ut(zn,ka,lo,Pr),{singleton:!0}),f2=Ke(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Qe(ne(e,Ne(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Fn(ne(n,Yo(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},ut(Pr,Wt,lo),{singleton:!0}),p2=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,m2=Ke(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{const u=Be();return we(ne(u,Ne(t,c,n,i,o,r,s),Ne(e),pe(([[d,p,f,h,g,m,y,v],b])=>{const{align:T,behavior:w,calculateViewLocation:S=p2,done:C,...k}=d,I=c1(d,p,h-1),A=ca(I,p.offsetTree,b)+g+m,O=A+Sn(p.sizeTree,I)[1],N=v+m,V=v+f-y,P=S({itemBottom:O,itemTop:A,locationParams:{align:T,behavior:w,...k},viewportBottom:V,viewportTop:N});return P?C&&Fn(ne(a,Ce(D=>!D),Yo(Lt(a)?1:2)),C):C&&C(),P}),Ce(d=>d!==null)),l),{scrollIntoView:u}},ut(zn,Wt,Ca,lo,Rr),{singleton:!0}),h1=Ke(([{scrollVelocity:e}])=>{const t=ae(!1),n=Be(),r=ae(!1);return we(ne(e,Ne(r,t,n),Ce(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:c,exit:l}=i;if(a){if(l(o,s))return!1}else if(c(o,s))return!0;return a}),lt()),t),Qe(ne(Rt(t,e,n),Ne(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ut(Ra),{singleton:!0}),xp=Ke(([{scrollContainerState:e,scrollTo:t}])=>{const n=Be(),r=Be(),o=Be(),i=ae(!1),a=ae(void 0);return we(ne(Rt(n,r),pe(([{scrollHeight:s,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),we(ne(t,Ne(r),pe(([s,{offsetTop:c}])=>({...s,top:s.top+c}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ut(Wt)),h2=Ke(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:c}])=>{const l=Be(),u=ae(void 0),d=ae(null),p=ae(null);return we(s,d),we(c,p),Qe(ne(l,Ne(t,r,a,d,p,n)),([f,h,g,m,y,v,b])=>{const T=XN(h.sizeTree);m&&y!==null&&v!==null&&(g=y.scrollTop-v.offsetTop),g-=b,f({ranges:T,scrollTop:g})}),we(ne(u,Ce(up),pe(g2)),o),we(ne(i,Ne(u),Ce(([,f])=>f!==void 0),lt(),pe(([,f])=>f.ranges)),e),{getState:l,restoreStateFrom:u}},ut(zn,Wt,ka,Pr,xp));function g2(e){return{align:"start",index:0,offset:e.scrollTop}}const v2=Ke(([{topItemsIndexes:e}])=>{const t=ae(0);return we(ne(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ut(lo));function g1(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const y2=g1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),x2=Ke(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:h}])=>{const g=en(ne(c,Ne(a),_n(([,y,v,b],[{bottom:T,items:w,offsetBottom:S,totalCount:C},k])=>{const I=T+S;let A=0;return v===C&&y.length>0&&w.length>0&&(w[0].originalIndex===0&&y[0].originalIndex===0||(A=I-b,A!==0&&(A+=k))),[A,w,C,I]},[0,[],0,0]),Ce(([y])=>y!==0),Ne(r,s,n,o,f,h),Ce(([,y,v,b,,,T])=>!T&&!b&&y!==0&&v===ua),pe(([[y],,,,,v])=>(v("Upward scrolling compensation",{amount:y},tn.DEBUG),y))));function m(y){y>0?(De(t,{behavior:"auto",top:-y}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-y}))}return Qe(ne(g,Ne(e,i)),([y,v,b])=>{b&&y2()?De(e,v-y):m(-y)}),Qe(ne(Rt(Vt(i,!1),e,h),Ce(([y,v,b])=>!y&&!b&&v!==0),pe(([y,v])=>v),ur(1)),m),we(ne(d,pe(y=>({top:-y}))),t),Qe(ne(l,Ne(p,u),pe(([y,{groupIndices:v,lastSize:b,sizeTree:T},w])=>{function S(C){return C*(b+w)}if(v.length===0)return S(y);{let C=0;const k=sa(T,0);let I=0,A=0;for(;I<y;){I++,C+=k;let O=v.length===A+1?1/0:v[A+1]-v[A]-1;I+O>y&&(C-=k,O=y-I+1),I+=O,C+=S(O),A++}return C}})),y=>{De(e,y),requestAnimationFrame(()=>{De(t,{top:y}),requestAnimationFrame(()=>{De(e,0),De(h,!1)})})}),{deviation:e}},ut(Wt,Ra,lo,zn,Rr,mp)),b2=Ke(([e,t,n,r,o,i,a,s,c,l])=>({...e,...t,...n,...r,...o,...i,...a,...s,...c,...l}),ut(yp,d2,Pr,h1,m1,f2,l2,xp,m2,Rr)),v1=Ke(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:c,statefulTotalCount:l,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h},g,m,y,{listState:v,topItemsIndexes:b,...T},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:k},I])=>(we(T.rangeChanged,I.scrollSeekRangeChanged),we(ne(I.windowViewportRect,pe(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...y,groupIndices:i,itemSize:a,listState:v,scrollToIndex:w,statefulTotalCount:l,trackItemSizes:d,...T,...I,...g,sizes:c,...m}),ut(zn,ka,Wt,h2,u2,lo,Ca,x2,v2,u1,b2));function w2(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const Ya=typeof document<"u"?E.useLayoutEffect:E.useEffect;function bp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function c(m,y){m.propsReady&&De(m.propsReady,!1);for(const v of r){const b=m[t.required[v]];De(b,y[v])}for(const v of o)if(v in y){const b=m[t.optional[v]];De(b,y[v])}m.propsReady&&De(m.propsReady,!0)}function l(m){return i.reduce((y,v)=>(y[v]=b=>{const T=m[t.methods[v]];De(T,b)},y),{})}function u(m){return a.reduce((y,v)=>(y[v]=FN(m[t.events[v]]),y),{})}const d=E.forwardRef((m,y)=>{const{children:v,...b}=m,[T]=E.useState(()=>kl(VN(e),C=>{c(C,b)})),[w]=E.useState(kv(u,T));Ya(()=>{for(const C of a)C in b&&Qe(w[C],b[C]);return()=>{Object.values(w).map(dp)}},[b,w,T]),Ya(()=>{c(T,b)}),E.useImperativeHandle(y,Cv(l(T)));const S=n;return x.jsx(s.Provider,{value:T,children:n?x.jsx(S,{...w2([...r,...o,...a],b),children:v}):v})}),p=m=>E.useCallback(Qw(De,E.useContext(s)[m]),[m]),f=m=>{const y=E.useContext(s)[m],v=E.useCallback(b=>Qe(y,b),[y]);return E.useSyncExternalStore(v,()=>Lt(y),()=>Lt(y))},h=m=>{const y=E.useContext(s)[m],[v,b]=E.useState(kv(Lt,y));return Ya(()=>Qe(y,T=>{T!==v&&b(Cv(T))}),[y,v]),v},g=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(m,y)=>{const v=E.useContext(s)[m];Ya(()=>Qe(v,y),[y,v])},useEmitterValue:g,usePublisher:p}}const Al=E.createContext(void 0),y1=E.createContext(void 0),x1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function cu(e){return"self"in e}function S2(e){return"body"in e}function b1(e,t,n,r=vi,o,i){const a=E.useRef(null),s=E.useRef(null),c=E.useRef(null),l=E.useCallback(p=>{let f,h,g;const m=p.target;if(S2(m)||cu(m)){const v=cu(m)?m:m.defaultView;g=i?v.scrollX:v.scrollY,f=i?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight,h=i?v.innerWidth:v.innerHeight}else g=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:h})};p.suppressFlushSync?y():ha.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===f-h)&&(s.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),l({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",l,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",l)}},[a,l,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const h=p.behavior==="smooth";let g,m,y;cu(f)?(m=Math.max(Tn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,y=i?window.scrollX:window.scrollY):(m=f[i?"scrollWidth":"scrollHeight"],g=Tn(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const v=m-g;if(p.top=Math.ceil(Math.max(Math.min(v,p.top),0)),f1(g,m)||p.top===y){e({scrollHeight:m,scrollTop:y,viewportHeight:g}),h&&t(!0);return}h?(s.current=p.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const uu="-webkit-sticky",Fv="sticky",w1=g1(()=>{if(typeof document>"u")return Fv;const e=document.createElement("div");return e.style.position=uu,e.style.position===uu?uu:Fv});function wp(e){return e}const T2=Ke(()=>{const e=ae(c=>`Item ${c}`),t=ae(null),n=ae(c=>`Group ${c}`),r=ae({}),o=ae(wp),i=ae("div"),a=ae(vi),s=(c,l=null)=>Vt(ne(r,pe(u=>u[c]),lt()),l);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),E2=Ke(([e,t])=>({...e,...t}),ut(v1,T2)),C2=({height:e})=>x.jsx("div",{style:{height:e}}),k2={overflowAnchor:"none",position:w1(),zIndex:1},S1={overflowAnchor:"none"},R2={...S1,display:"inline-block",height:"100%"},Lv=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=sn("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,c=Ae("itemContent"),l=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),h=sn("gap"),g=Ae("horizontalDirection"),{callbackRef:m}=e1(n,p,d,e?vi:s,f,h,o,g,Ae("skipAnimationFrameInResizeObserver")),[y,v]=E.useState(0);Ep("deviation",P=>{y!==P&&v(P)});const b=Ae("EmptyPlaceholder"),T=Ae("ScrollSeekPlaceholder")||C2,w=Ae("ListComponent"),S=Ae("ItemComponent"),C=Ae("GroupComponent"),k=Ae("computeItemKey"),I=Ae("isSeeking"),A=Ae("groupIndices").length>0,O=Ae("alignToBottom"),N=Ae("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:O?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:O?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...ct(b,l)}):x.jsx(w,{...ct(w,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:V,children:(e?t.topItems:t.items).map(P=>{const D=P.originalIndex,_=k(D+t.firstItemIndex,P.data,l);return I?E.createElement(T,{...ct(T,l),height:P.size,index:P.index,key:_,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...ct(C,l),"data-index":D,"data-item-index":P.index,"data-known-size":P.size,key:_,style:k2},u(P.index,l)):E.createElement(S,{...ct(S,l),...T1(S,P.data),"data-index":D,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:_,style:g?R2:S1},A?c(P.index,P.groupIndex,P.data,l):c(P.index,P.data,l))})})}),P2={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},A2={outline:"none",overflowX:"auto",position:"relative"},yi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),I2={position:w1(),top:0,width:"100%",zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function T1(e,t){return{item:typeof e=="string"?void 0:t}}const _2=E.memo(function(){const e=Ae("HeaderComponent"),t=sn("headerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),O2=E.memo(function(){const e=Ae("FooterComponent"),t=sn("footerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null});function Sp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),l=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:h}=b1(a,c,s,l,void 0,d);return e("scrollTo",h),e("scrollBy",p),x.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?A2:P2,...o},tabIndex:0,...i,...ct(s,u),children:r})})}function Tp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),l=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),h=t("scrollerRef"),{scrollByCallback:g,scrollerRef:m,scrollToCallback:y}=b1(a,c,s,h,d);return x1(()=>{var v;return m.current=d||((v=f.current)==null?void 0:v.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",y),e("scrollBy",g),x.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...l!==0?{height:l+u}:{}},...i,...ct(s,p),children:r})})}const M2=({children:e})=>{const t=E.useContext(Al),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>ia(n,c=>Tn(c,i?"width":"height")),[n,i]),s=Ln(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:yi(o),children:e})},D2=({children:e})=>{const t=E.useContext(Al),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Ae("customScrollParent"),i=pp(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(a),children:e})},j2=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...I2,marginTop:`${n}px`},o=Ae("context");return x.jsx(t,{style:r,...ct(t,o),children:e})},N2=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?V2:L2,a=r||t?D2:M2;return x.jsxs(i,{...e,...ct(i,o),children:[n&&x.jsx(j2,{children:x.jsx(Lv,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(_2,{}),x.jsx(Lv,{}),x.jsx(O2,{})]})]})}),{Component:F2,useEmitter:Ep,useEmitterValue:Ae,usePublisher:sn}=bp(E2,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},N2),L2=Sp({useEmitter:Ep,useEmitterValue:Ae,usePublisher:sn}),V2=Tp({useEmitter:Ep,useEmitterValue:Ae,usePublisher:sn}),Cp=F2,$2=Ke(()=>{const e=ae(c=>x.jsxs("td",{children:["Item $",c]})),t=ae(null),n=ae(null),r=ae(null),o=ae({}),i=ae(wp),a=ae(vi),s=(c,l=null)=>Vt(ne(o,pe(u=>u[c]),lt()),l);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),z2=Ke(([e,t])=>({...e,...t}),ut(v1,$2)),B2=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),H2=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),W2={overflowAnchor:"none"},Vv=E.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("isSeeking"),i=je("ScrollSeekPlaceholder")||B2,a=je("context"),s=je("TableRowComponent"),c=je("fixedHeaderHeight"),l=je("itemContent"),u=(e?t.topItems:[]).reduce((p,f,h)=>(h===0?p.push(f.size):p.push(p[h-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,h=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...ct(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...ct(s,a),...T1(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:h,style:e?{overflowAnchor:"none",position:"sticky",top:c+g,zIndex:2}:W2},l(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),q2=E.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=bn("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=bn("windowScrollContainerState"),a=bn("scrollContainerState"),s=o||r?i:a,c=je("trackItemSizes"),l=je("itemSize"),u=je("log"),{callbackRef:d,ref:p}=e1(n,l,c,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);kp("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,h(A))});const g=je("EmptyPlaceholder"),m=je("FillerRow")||H2,y=je("TableBodyComponent"),v=je("paddingTopAddition"),b=je("statefulTotalCount"),T=je("context");if(b===0&&g)return x.jsx(g,{...ct(g,T)});const w=(t?e.topItems:[]).reduce((A,O)=>A+O.size,0),S=e.offsetTop+v+f-w,C=e.offsetBottom,k=S>0?x.jsx(m,{context:T,height:S},"padding-top"):null,I=C>0?x.jsx(m,{context:T,height:C},"padding-bottom"):null;return x.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...ct(y,T),children:[k,t&&x.jsx(Vv,{showTopList:!0}),x.jsx(Vv,{}),I]})}),U2=({children:e})=>{const t=E.useContext(Al),n=bn("viewportHeight"),r=bn("fixedItemHeight"),o=Ln(E.useMemo(()=>ia(n,i=>Tn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:yi(!1),children:e})},K2=({children:e})=>{const t=E.useContext(Al),n=bn("windowViewportRect"),r=bn("fixedItemHeight"),o=je("customScrollParent"),i=pp(n,o,je("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(!1),children:e})},Y2=E.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=bn("fixedHeaderHeight"),o=bn("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),c=Ln(E.useMemo(()=>ia(r,y=>Tn(y,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),l=Ln(E.useMemo(()=>ia(o,y=>Tn(y,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?X2:Z2,d=n||t?K2:U2,p=je("TableComponent"),f=je("TableHeadComponent"),h=je("TableFooterComponent"),g=i?x.jsx(f,{ref:c,style:{position:"sticky",top:0,zIndex:2},...ct(f,s),children:i()},"TableHead"):null,m=a?x.jsx(h,{ref:l,style:{bottom:0,position:"sticky",zIndex:1},...ct(h,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...ct(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(p,s),children:[g,x.jsx(q2,{},"TableBody"),m]})})})}),{Component:G2,useEmitter:kp,useEmitterValue:je,usePublisher:bn}=bp(z2,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},Y2),Z2=Sp({useEmitter:kp,useEmitterValue:je,usePublisher:bn}),X2=Tp({useEmitter:kp,useEmitterValue:je,usePublisher:bn}),Q2=G2,$v={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},J2={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:zv,floor:Ds,max:Wi,min:du,round:Bv}=Math;function Hv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function eF(e){return{...J2,items:e}}function Ga(e,t){return e&&e.width===t.width&&e.height===t.height}function tF(e,t){return e&&e.column===t.column&&e.row===t.row}const nF=Ke(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:h,propsReady:g},{customScrollParent:m,useWindowScroll:y,windowScrollContainerState:v,windowScrollTo:b,windowViewportRect:T},w])=>{const S=ae(0),C=ae(0),k=ae($v),I=ae({height:0,width:0}),A=ae({height:0,width:0}),O=Be(),N=Be(),V=ae(0),P=ae(null),D=ae({column:0,row:0}),_=Be(),F=Be(),j=ae(!1),B=ae(0),M=ae(!0),$=ae(!1),J=ae(!1);Qe(ne(h,Ne(B),Ce(([L,z])=>!!z)),()=>{De(M,!1)}),Qe(ne(Rt(h,M,A,I,B,$),Ce(([L,z,K,ie,,H])=>L&&!z&&K.height!==0&&ie.height!==0&&!H)),([,,,,L])=>{De($,!0),gp(1,()=>{De(O,L)}),Fn(ne(l),()=>{De(t,[0,0]),De(M,!0)})}),we(ne(F,Ce(L=>L!=null&&L.scrollTop>0),kn(0)),C),Qe(ne(h,Ne(F),Ce(([,L])=>L!=null)),([,L])=>{L&&(De(I,L.viewport),De(A,L.item),De(D,L.gap),L.scrollTop>0&&(De(j,!0),Fn(ne(l,Yo(1)),z=>{De(j,!1)}),De(c,{top:L.scrollTop})))}),we(ne(I,pe(({height:L})=>L)),d),we(ne(Rt(Pe(I,Ga),Pe(A,Ga),Pe(D,(L,z)=>L&&L.column===z.column&&L.row===z.row),Pe(l)),pe(([L,z,K,ie])=>({gap:K,item:z,scrollTop:ie,viewport:L}))),_),we(ne(Rt(Pe(S),r,Pe(D,tF),Pe(A,Ga),Pe(I,Ga),Pe(P),Pe(C),Pe(j),Pe(M),Pe(B)),Ce(([,,,,,,,L])=>!L),pe(([L,[z,K],ie,H,ye,Te,Re,,$e,se])=>{const{column:xe,row:le}=ie,{height:be,width:oe}=H,{width:ue}=ye;if(Re===0&&(L===0||ue===0))return $v;if(oe===0){const fn=vp(se,L),En=fn+Math.max(Re-1,0);return eF(Hv(fn,En,Te))}const ee=E1(ue,oe,xe);let q,te;$e?z===0&&K===0&&Re>0?(q=0,te=Re-1):(q=ee*Ds((z+le)/(be+le)),te=ee*zv((K+le)/(be+le))-1,te=du(L-1,Wi(te,ee-1)),q=du(te,Wi(0,q))):(q=0,te=-1);const me=Hv(q,te,Te),{bottom:Oe,top:He}=Wv(ye,ie,H,me),Ye=zv(L/ee),Ot=Ye*be+(Ye-1)*le-Oe;return{bottom:Oe,itemHeight:be,items:me,itemWidth:oe,offsetBottom:Ot,offsetTop:He,top:He}})),k),we(ne(P,Ce(L=>L!==null),pe(L=>L.length)),S),we(ne(Rt(I,A,k,D),Ce(([L,z,{items:K}])=>K.length>0&&z.height!==0&&L.height!==0),pe(([L,z,{items:K},ie])=>{const{bottom:H,top:ye}=Wv(L,ie,z,K);return[ye,H]}),lt(la)),t);const X=ae(!1);we(ne(l,Ne(X),pe(([L,z])=>z||L!==0)),X);const Q=en(ne(Rt(k,S),Ce(([{items:L}])=>L.length>0),Ne(X),Ce(([[L,z],K])=>{const ie=L.items[L.items.length-1].index===z-1;return(K||L.bottom>0&&L.itemHeight>0&&L.offsetBottom===0&&L.items.length===z)&&ie}),pe(([[,L]])=>L-1),lt())),Z=en(ne(Pe(k),Ce(({items:L})=>L.length>0&&L[0].index===0),kn(0),lt())),Y=en(ne(Pe(k),Ne(j),Ce(([{items:L},z])=>L.length>0&&!z),pe(([{items:L}])=>({endIndex:L[L.length-1].index,startIndex:L[0].index})),lt(a1),ur(0)));we(Y,f.scrollSeekRangeChanged),we(ne(O,Ne(I,A,S,D),pe(([L,z,K,ie,H])=>{const ye=d1(L),{align:Te,behavior:Re,offset:$e}=ye;let se=ye.index;se==="LAST"&&(se=ie-1),se=Wi(0,se,du(ie-1,se));let xe=Sd(z,H,K,se);return Te==="end"?xe=Bv(xe-z.height+K.height):Te==="center"&&(xe=Bv(xe-z.height/2+K.height/2)),$e&&(xe+=$e),{behavior:Re,top:xe}})),c);const G=Vt(ne(k,pe(L=>L.offsetBottom+L.bottom)),0);return we(ne(T,pe(L=>({height:L.visibleHeight,width:L.visibleWidth}))),I),{customScrollParent:m,data:P,deviation:V,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:F,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:c,scrollToIndex:O,scrollTop:l,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:y,viewportDimensions:I,windowScrollContainerState:v,windowScrollTo:b,windowViewportRect:T,...f,gridState:k,horizontalDirection:J,initialTopMostItemIndex:B,totalListHeight:G,...p,endReached:Q,propsReady:g,rangeChanged:Y,startReached:Z,stateChanged:_,stateRestoreInProgress:j,...w}},ut(yp,Wt,Ra,h1,Pr,xp,Rr));function E1(e,t,n){return Wi(1,Ds((e+n)/(Ds(t)+n)))}function Wv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Sd(e,t,n,r[0].index);return{bottom:Sd(e,t,n,r[r.length-1].index)+o,top:i}}function Sd(e,t,n,r){const o=E1(e.width,n.width,t.column),i=Ds(r/o),a=i*n.height+Wi(0,i-1)*t.row;return a>0?a+t.row:a}const rF=Ke(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(wp),a=ae("div"),s=ae(vi),c=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),lt()),p),l=ae(!1),u=ae(!1);return we(Pe(u),l),{components:t,computeItemKey:i,context:n,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:c("Item","div"),itemContent:e,listClassName:o,ListComponent:c("List","div"),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),oF=Ke(([e,t])=>({...e,...t}),ut(nF,rF)),iF=E.memo(function(){const e=dt("gridState"),t=dt("listClassName"),n=dt("itemClassName"),r=dt("itemContent"),o=dt("computeItemKey"),i=dt("isSeeking"),a=ln("scrollHeight"),s=dt("ItemComponent"),c=dt("ListComponent"),l=dt("ScrollSeekPlaceholder"),u=dt("context"),d=ln("itemDimensions"),p=ln("gap"),f=dt("log"),h=dt("stateRestoreInProgress"),g=ln("reportReadyState"),m=Ln(E.useMemo(()=>y=>{const v=y.parentElement.parentElement.scrollHeight;a(v);const b=y.firstChild;if(b){const{height:T,width:w}=b.getBoundingClientRect();d({height:T,width:w})}p({column:qv("column-gap",getComputedStyle(y).columnGap,f),row:qv("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return x1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),h?null:x.jsx(c,{className:t,ref:m,...ct(c,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const v=o(y.index,y.data,u);return i?x.jsx(l,{...ct(l,u),height:e.itemHeight,index:y.index,width:e.itemWidth},v):E.createElement(s,{...ct(s,u),className:n,"data-index":y.index,key:v},r(y.index,y.data,u))})})}),aF=E.memo(function(){const e=dt("HeaderComponent"),t=ln("headerHeight"),n=dt("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=dt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),sF=E.memo(function(){const e=dt("FooterComponent"),t=ln("footerHeight"),n=dt("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=dt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),lF=({children:e})=>{const t=E.useContext(y1),n=ln("itemDimensions"),r=ln("viewportDimensions"),o=Ln(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.jsx("div",{ref:o,style:yi(!1),children:e})},cF=({children:e})=>{const t=E.useContext(y1),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=dt("customScrollParent"),i=pp(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.jsx("div",{ref:i,style:yi(!1),children:e})},uF=E.memo(function({...e}){const t=dt("useWindowScroll"),n=dt("customScrollParent"),r=n||t?fF:dF,o=n||t?cF:lF,i=dt("context");return x.jsx(r,{...e,...ct(r,i),children:x.jsxs(o,{children:[x.jsx(aF,{}),x.jsx(iF,{}),x.jsx(sF,{})]})})}),{useEmitter:C1,useEmitterValue:dt,usePublisher:ln}=bp(oF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},uF),dF=Sp({useEmitter:C1,useEmitterValue:dt,usePublisher:ln}),fF=Tp({useEmitter:C1,useEmitterValue:dt,usePublisher:ln});function qv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Rp=()=>{const e=E.useContext(si);return e?e.tweaks:gl},k1=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>x.jsxs("span",{className:Ie("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?x.jsx(cp,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:x.jsx("span",{className:"cursor-help",children:x.jsx(a0,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:x.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?x.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[x.jsx(o0,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(FA,{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]}),Pa=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:c,error:l,form:u,id:d,labelClassName:p="",name:f,title:h,componentName:g,placeholder:m,hideLeft:y=!1,required:v,disabled:b,reportStatus:T},w)=>{const S=Rp(),C=T!==void 0?T:S.input.iconFeedback,k=d??f,I=At(),A=e??I.inputOptionalLabel;return x.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!l,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:Ie("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[x.jsxs("label",{form:u,htmlFor:k,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(k1,{info:s,hideLeft:y,reportStatus:C,title:h,placeholder:m,children:A||n?x.jsxs(E.Fragment,{children:[v?null:x.jsx("span",{"aria-disabled":b,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?x.jsx(E.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,c,a?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:l}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),pF=e=>x.jsx(E.Fragment,{children:e.children}),mF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},hF=[],gF=E.forwardRef(function(t,n){return x.jsx(ft.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(xr,{children:t.children})})}),vF=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),yF={List:gF,Item:vF},yo=40,xF=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:c,optionalText:l,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:h=!1,...g},m)=>{const y=E.useRef(null),v=E.useRef(null),b=E.useRef(null),T=g.value??g.defaultValue??"",w=At(),[S,C]=E.useState(()=>Math.min(320,yo*o.length)),[k,I]=E.useState(!1),[A,O]=E.useState(""),[N,V]=E.useState(T),[P,D]=E.useState(()=>{var oe;return((oe=o.find(ue=>ue.value===T))==null?void 0:oe.label)??T}),[_,F]=E.useState(null),j=E.useRef(hF),B=lp(k,"block-only"),M=h&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,$=A?ap(M,"value",[{key:"value",value:A},{key:"label",value:A}]):M,J=()=>{I(!1),C(0)},X=$.filter(oe=>oe.hidden!==!0),Q=h?void 0:`^(${o.map(oe=>`${od(oe.value)}${oe.label?"|"+od(oe.label):""}`).join("|")})$`,{x:Z,y:Y,strategy:G,refs:L,context:z}=Er({open:k,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:di,middleware:[Sa(4),Pw({padding:10,elementContext:"reference",apply(oe){const ue=oe.elements.floating.querySelector("ul"),ee=(ue==null?void 0:ue.getBoundingClientRect().height)||0,q=Ki(L.reference.current,window.innerHeight),te=Math.min(ee<yo?q:ee,q,oe.availableHeight),me=X.length===0?yo:Math.min(te,q,ee),Oe=`${v.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:Oe,maxWidth:Oe,height:me})}})]}),K=Ww(z,mF),{getReferenceProps:ie,getFloatingProps:H,getItemProps:ye}=Cr([so(z,{role:"listbox"}),ao(z),El(z,{cols:0,listRef:j,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const oe=o.find(ue=>ue.value===g.value);V((oe==null?void 0:oe.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!k)return C(0);const oe=L.reference;if(oe.current===null)return;const ue=Ki(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(ue,X.length*yo)),100)},[A,k,L.reference]),E.useEffect(()=>{const oe=L.reference.current;if(oe)return ga(oe)},[]);const Te=(oe,ue)=>{V(oe.value);const ee=L.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",oe.value),ee.value=oe.value;const q=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(q),g.onChange&&g.onChange(q),D(oe.label??""),J(),O(""),F(ue)},Re=oe=>{var ee;const ue=oe.target.value;return O(ue),!k&&ue===""?I(!0):(oe.target.name=g.name||"",ue?I(!0):(ee=g.onChange)==null?void 0:ee.call(g,oe))},$e=()=>{var oe;I(!0),O(""),(oe=L.reference.current)==null||oe.focus()},se=()=>{F(oe=>oe===null?0:oe),I(!0),O("")},xe=()=>{var oe;(oe=L.reference.current)==null||oe.setAttribute("data-value",""),O(""),V(""),D(""),cx(L.reference.current),J()},le=g.id||g.name,be=X.length===0;return x.jsxs(Pa,{...g,left:e,error:t,ref:v,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:$e,children:[x.jsx(Af,{size:20}),x.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),N?x.jsx("button",{type:"button",onClick:xe,className:"p-2 transition-colors link:text-danger md:p-1",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{"data-shadow":"true",...ie({...g,onChange:Re,onFocus:se,pattern:Q,ref:L.setReference,name:`${le}-shadow`,id:`${le}-shadow`,onClick:oe=>oe.currentTarget.focus(),onKeyDown(oe){var ue,ee;if(oe.key==="Escape")return oe.currentTarget.blur(),J();if(k){if(oe.key==="ArrowDown"){let q=Ve.number(_)?_+1:0;return q>X.length-1&&(q=0),(ue=b.current)==null||ue.scrollIntoView({index:q}),F(q)}if(oe.key==="ArrowUp"){let q=Ve.number(_)?_-1:X.length-1;return q<0&&(q=X.length-1),(ee=b.current)==null||ee.scrollIntoView({index:q}),F(q)}if(oe.key==="Enter"){if(_!==null&&X[_])return oe.preventDefault(),Te(X[_],_);if(X.length===1)return oe.preventDefault(),Te(X[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":le,"data-target":le,required:f,value:k?A:P||N,"aria-autocomplete":"list",autoComplete:"off",className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary text-base",g.className)}),x.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:m,required:f,defaultValue:g.value||N||void 0}),x.jsx(io,{preserveTabOrder:!0,children:k?x.jsx(mi,{modal:!0,guards:!0,returnFocus:!1,context:z,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs(ft.div,{...H({ref:qn(B,L.setFloating),style:{...K.styles,left:Z,top:Y??0,position:G}}),initial:!1,"data-floating":"true",animate:{height:be?"auto":S},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!k)return C(0);const ue=L.floating.current.querySelectorAll("li").item(0),ee=(ue?ue.getBoundingClientRect().height:yo)*X.length;return ha.flushSync(()=>C(ee+2))},children:[be?x.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:c||w.autocompleteEmpty})}):null,x.jsx(Cp,{overscan:40,ref:b,hidden:be,data:X,style:{height:S},defaultItemHeight:yo,components:yF,scrollerRef:oe=>void(y.current=oe),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(oe,ue)=>{const ee=ue.Render??pF,q=N===ue.value||N===ue.label,te=_===oe,me=ue.label??ue.value;return x.jsx("button",{"data-value":ue.value,...ye({ref:Oe=>void(j.current[oe]=Oe),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":ue.disabled,onClick:()=>Te(ue,oe),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${te?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(ee,{...g,label:ue.label,value:ue.value,children:me})})}})]})}):null})]})}),Pp=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...c},l)=>{const u=c.disabled||r;return x.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Ie("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[x.jsx("input",{...c,ref:l,disabled:u,type:"checkbox","data-task":t,className:Ie("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,x.jsx("span",{"data-name":"checkbox-label",className:Ie("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),R1=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:c,right:l,container:u,rightLabel:d,interactive:p,optionalText:f,type:h="text",labelClassName:g,feedback:m=null,hideLeft:y=!1,loading:v,...b},T)=>{const w=e,S=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=ga(C.current),A=r==null?void 0:r(k),O=N=>{const V=N;if(V.key==="Enter"&&k.enterKeyHint==="next"){const P=k.getAttribute("data-next");if(P){const D=document.getElementById(P);if(D)return D.focus(),void V.preventDefault()}}};return k.addEventListener("keydown",O),()=>{A==null||A(),I(),k.removeEventListener("keydown",O)}},[]),x.jsx(Pa,{...n,info:i,left:a,error:c,right:l,loading:v,form:b.form,name:b.name,feedback:m,hideLeft:y,title:b.title,container:Ie(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:x.jsx(w,{...n,...b,id:S,name:S,type:h,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:qn(T,C),className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),Aa=R1(P0,"input",{type:"text"}),Uv=new Date(1970,11,31),fu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Kv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},bF={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},pu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},wF=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Lf(t),c=E.useId(),l=At(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,h]=E.useState(!1),g=pu(u,Uv).flatMap(C=>Ve.keyof(fu,C.type)?fu[C.type](C.value):[]),m=pu(u,Uv).reduce((C,k)=>C+(Ve.keyof(Kv,k.type)?Kv[k.type](k.value):""),""),[y,v]=E.useState(d?pu(u,d).reduce((C,k)=>C+(Ve.keyof(fu,k.type)?bF[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(v(k),g.length===k.length&&g.every((A,O)=>{const N=k.charAt(O);return typeof A=="string"?N===A:A.test(N)})){const A=$o(hO(k,m,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},T=C=>(p(C),r==null||r(C),v(C?h_(C,m):"")),w=d0(d),S=w?d.toISOString():void 0;return x.jsx(Aa,{...i,mask:g,value:y,id:void 0,name:void 0,className:"uppercase","data-value":S,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??m,right:x.jsxs(E.Fragment,{children:[x.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),x.jsx(hi,{open:f,onChange:h,trigger:x.jsxs("span",{"aria-labelledby":c,children:[x.jsx("span",{id:c,className:"sr-only",children:l.datePickerCalendarButtonLabel}),x.jsx(IA,{})]}),buttonProps:{"aria-describedby":c},children:x.jsx(L0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),SF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],TF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],EF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],CF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Yv=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Gv(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?CF:EF:t.binary?TF:SF,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Yv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const c=Yv(Number(e),t.locale,a),l=n[s];return i+c+r+l}var Za={exports:{}},Xa={exports:{}},Ge={};/** @license React v16.13.1
187
+ */var kD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Cs=kD.join(","),yw=typeof Element>"u",Wo=yw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ks=!yw&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Rs=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},RD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},PD=function(t,n,r){if(Rs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Cs));return n&&Wo.call(t,Cs)&&o.unshift(t),o=o.filter(r),o},AD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Rs(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=Wo.call(a,Cs);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Rs(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},xw=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bw=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||RD(t))&&!xw(t)?0:t.tabIndex},ID=function(t,n){var r=bw(t);return r<0&&n&&!xw(t)?0:r},_D=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ww=function(t){return t.tagName==="INPUT"},OD=function(t){return ww(t)&&t.type==="hidden"},MD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},DD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},jD=function(t){if(!t.name)return!0;var n=t.form||ks(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=DD(o,t.form);return!i||i===t},ND=function(t){return ww(t)&&t.type==="radio"},FD=function(t){return ND(t)&&!jD(t)},LD=function(t){var n,r=t&&ks(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=ks(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},qg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},VD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Wo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Wo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=ks(t);if(l&&!l.shadowRoot&&o(l)===!0)return qg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(LD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return qg(t);return!1},$D=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 Wo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},zD=function(t,n){return!(n.disabled||Rs(n)||OD(n)||VD(n,t)||MD(n)||$D(n))},gd=function(t,n){return!(FD(n)||bw(n)<0||!zD(t,n))},BD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},HD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=ID(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(_D).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ra=function(t,n){n=n||{};var r;return n.getShadowRoot?r=AD([t],n.includeContainer,{filter:gd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:BD}):r=PD(t,n.includeContainer,gd.bind(null,n)),HD(r)},WD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wo.call(t,Cs)===!1?!1:gd(n,t)};function Ug(e,t,n){let{reference:r,floating:o}=e;const i=Zr(t),a=Jf(t),s=Qf(a),l=gr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(ui(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const qD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ug(c,r,l),p=r,f={},h=0;for(let g=0;g<s.length;g++){const{name:m,fn:y}=s[g],{x:v,y:b,data:S,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=v??u,d=b??d,f={...f,[m]:{...f[m],...S}},w&&h<=50&&(h++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Ug(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function ep(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ci(t,e),h=vw(f),m=s[p?d==="floating"?"reference":"floating":d],y=Es(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=Es(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-w.top+h.top)/S.y,bottom:(w.bottom-y.bottom+h.bottom)/S.y,left:(y.left-w.left+h.left)/S.x,right:(w.right-y.right+h.right)/S.x}}const UD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ci(e,t)||{};if(c==null)return{};const d=vw(u),p={x:n,y:r},f=Jf(o),h=Qf(f),g=await a.getDimensions(c),m=f==="y",y=m?"top":"left",v=m?"bottom":"right",b=m?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[f]-p[f]-i.floating[h],w=p[f]-i.reference[f],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=T?T[b]:0;(!C||!await(a.isElement==null?void 0:a.isElement(T)))&&(C=s.floating[b]||i.floating[h]);const k=S/2-w/2,I=C/2-g[h]/2-1,A=In(d[y],I),O=In(d[v],I),N=A,V=C-g[h]-O,P=C/2-g[h]/2+k,D=md(N,P,V),_=!l.arrow&&ui(o)!=null&&P!==D&&i.reference[h]/2-(P<N?A:O)-g[h]/2<0,F=_?P<N?P-N:P-V:0;return{[f]:p[f]+F,data:{[f]:D,centerOffset:P-D-F,..._&&{alignmentOffset:F}},reset:_}}}),KD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=ci(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=gr(o),v=Zr(s),b=gr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(b||!g?[Ts(s)]:SD(s)),T=h!=="none";!p&&T&&w.push(...ED(s,g,h,S));const C=[s,...w],k=await ep(t,m),I=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),d){const P=wD(o,a,S);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var O,N;const P=(((O=i.flip)==null?void 0:O.index)||0)+1,D=C[P];if(D)return{data:{index:P,overflows:A},reset:{placement:D}};let _=(N=A.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!_)switch(f){case"bestFit":{var V;const F=(V=A.filter(j=>{if(T){const B=Zr(j.placement);return B===v||B==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(B=>B>0).reduce((B,M)=>B+M,0)]).sort((j,B)=>j[1]-B[1])[0])==null?void 0:V[0];F&&(_=F);break}case"initialPlacement":_=s;break}if(o!==_)return{reset:{placement:_}}}return{}}}};async function YD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=gr(n),s=ui(n),l=Zr(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ci(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const GD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await YD(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},ZD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:m=>{let{x:y,y:v}=m;return{x:y,y:v}}},...l}=ci(e,t),c={x:n,y:r},u=await ep(t,l),d=Zr(gr(o)),p=gw(d);let f=c[p],h=c[d];if(i){const m=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=f+u[m],b=f-u[y];f=md(v,f,b)}if(a){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=h+u[m],b=h-u[y];h=md(v,h,b)}const g=s.fn({...t,[p]:f,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},XD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ci(e,t),l=await ep(t,s),c=gr(n),u=ui(n),d=Zr(n)==="y",{width:p,height:f}=r.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const m=f-l.top-l.bottom,y=p-l.left-l.right,v=In(f-l[h],m),b=In(p-l[g],y),S=!t.middlewareData.shift;let w=v,T=b;if(d?T=u||S?In(b,y):y:w=u||S?In(v,m):m,S&&!u){const k=Xt(l.left,0),I=Xt(l.right,0),A=Xt(l.top,0),O=Xt(l.bottom,0);d?T=p-2*(k!==0||I!==0?k+I:Xt(l.left,l.right)):w=f-2*(A!==0||O!==0?A+O:Xt(l.top,l.bottom))}await a({...t,availableWidth:T,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function Sw(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ss(n)!==i||Ss(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function tp(e){return tt(e)?e:e.contextElement}function Po(e){const t=tp(e);if(!wt(t))return hr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Sw(t);let a=(i?Ss(n.width):n.width)/r,s=(i?Ss(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const QD=hr(0);function Tw(e){const t=Bt(e);return!Kf()||!t.visualViewport?QD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Xr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=tp(e);let a=hr(1);t&&(r?tt(r)&&(a=Po(r)):a=Po(e));const s=JD(i,n,r)?Tw(i):hr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Bt(i),f=r&&tt(r)?Bt(r):r;let h=p,g=fd(h);for(;g&&r&&f!==h;){const m=Po(g),y=g.getBoundingClientRect(),v=nn(g),b=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,S=y.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=b,c+=S,h=Bt(g),g=fd(h)}}return Es({width:u,height:d,x:l,y:c})}function ej(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Qn(r),s=t?wl(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=hr(1);const u=hr(0),d=wt(r);if((d||!d&&!i)&&((wr(r)!=="body"||wa(a))&&(l=Sl(r)),wt(r))){const p=Xr(r);c=Po(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function tj(e){return Array.from(e.getClientRects())}function Ew(e){return Xr(Qn(e)).left+Sl(e).scrollLeft}function nj(e){const t=Qn(e),n=Sl(e),r=e.ownerDocument.body,o=Xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ew(e);const s=-n.scrollTop;return nn(r).direction==="rtl"&&(a+=Xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function rj(e,t){const n=Bt(e),r=Qn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Kf();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function oj(e,t){const n=Xr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wt(e)?Po(e):hr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function Kg(e,t,n){let r;if(t==="viewport")r=rj(e,n);else if(t==="document")r=nj(Qn(e));else if(tt(t))r=oj(t,n);else{const o=Tw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Es(r)}function Cw(e,t){const n=Gn(e);return n===t||!tt(n)||mr(n)?!1:nn(n).position==="fixed"||Cw(n,t)}function ij(e,t){const n=t.get(e);if(n)return n;let r=dr(e,[],!1).filter(s=>tt(s)&&wr(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?Gn(e):e;for(;tt(a)&&!mr(a);){const s=nn(a),l=Uf(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||wa(a)&&!l&&Cw(e,a))?r=r.filter(u=>u!==a):o=s,a=Gn(a)}return t.set(e,r),r}function aj(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?wl(t)?[]:ij(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=Kg(t,u,o);return c.top=Xt(d.top,c.top),c.right=In(d.right,c.right),c.bottom=In(d.bottom,c.bottom),c.left=Xt(d.left,c.left),c},Kg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sj(e){const{width:t,height:n}=Sw(e);return{width:t,height:n}}function lj(e,t,n){const r=wt(t),o=Qn(t),i=n==="fixed",a=Xr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=hr(0);if(r||!r&&!i)if((wr(t)!=="body"||wa(o))&&(s=Sl(t)),r){const d=Xr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Ew(o));const c=a.left+s.scrollLeft-l.x,u=a.top+s.scrollTop-l.y;return{x:c,y:u,width:a.width,height:a.height}}function Xc(e){return nn(e).position==="static"}function Yg(e,t){return!wt(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function kw(e,t){const n=Bt(e);if(wl(e))return n;if(!wt(e)){let o=Gn(e);for(;o&&!mr(o);){if(tt(o)&&!Xc(o))return o;o=Gn(o)}return n}let r=Yg(e,t);for(;r&&pD(r)&&Xc(r);)r=Yg(r,t);return r&&mr(r)&&Xc(r)&&!Uf(r)?n:r||mD(e)||n}const cj=async function(e){const t=this.getOffsetParent||kw,n=this.getDimensions,r=await n(e.floating);return{reference:lj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uj(e){return nn(e).direction==="rtl"}const dj={convertOffsetParentRelativeRectToViewportRelativeRect:ej,getDocumentElement:Qn,getClippingRect:aj,getOffsetParent:kw,getElementRects:cj,getClientRects:tj,getDimensions:sj,getScale:Po,isElement:tt,isRTL:uj};function fj(e,t){let n=null,r;const o=Qn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=ko(u),h=ko(o.clientWidth-(c+d)),g=ko(o.clientHeight-(u+p)),m=ko(c),v={rootMargin:-f+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Xt(0,In(1,l))||1};let b=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!b)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return a(!0),i}function di(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=tp(e),u=o||i?[...c?dr(c):[],...dr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?fj(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,g=l?Xr(e):null;l&&m();function m(){const y=Xr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(m)}return n(),()=>{var y;u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const pj=GD,mj=ZD,hj=KD,gj=XD,Gg=UD,vj=(e,t,n)=>{const r=new Map,o={platform:dj,...n},i={...o.platform,_c:r};return qD(e,t,{...o,platform:i})};var is=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ps(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(!Ps(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)&&!Ps(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Rw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zg(e,t){const n=Rw(e);return Math.round(t*n)/n}function Qc(e){const t=R.useRef(e);return is(()=>{t.current=e}),t}function yj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=R.useState(r);Ps(p,r)||f(r);const[h,g]=R.useState(null),[m,y]=R.useState(null),v=R.useCallback(j=>{j!==T.current&&(T.current=j,g(j))},[]),b=R.useCallback(j=>{j!==C.current&&(C.current=j,y(j))},[]),S=i||h,w=a||m,T=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=l!=null,A=Qc(l),O=Qc(o),N=Qc(c),V=R.useCallback(()=>{if(!T.current||!C.current)return;const j={placement:t,strategy:n,middleware:p};O.current&&(j.platform=O.current),vj(T.current,C.current,j).then(B=>{const M={...B,isPositioned:N.current!==!1};P.current&&!Ps(k.current,M)&&(k.current=M,Qs.flushSync(()=>{d(M)}))})},[p,t,n,O,N]);is(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const P=R.useRef(!1);is(()=>(P.current=!0,()=>{P.current=!1}),[]),is(()=>{if(S&&(T.current=S),w&&(C.current=w),S&&w){if(A.current)return A.current(S,w,V);V()}},[S,w,V,A,I]);const D=R.useMemo(()=>({reference:T,floating:C,setReference:v,setFloating:b}),[v,b]),_=R.useMemo(()=>({reference:S,floating:w}),[S,w]),F=R.useMemo(()=>{const j={position:n,left:0,top:0};if(!_.floating)return j;const B=Zg(_.floating,u.x),M=Zg(_.floating,u.y);return s?{...j,transform:"translate("+B+"px, "+M+"px)",...Rw(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:M}},[n,s,_.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:V,refs:D,elements:_,floatingStyles:F}),[u,V,D,_,F])}const xj=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?Gg({element:r.current,padding:o}).fn(n):{}:r?Gg({element:r,padding:o}).fn(n):{}}}},Sa=(e,t)=>({...pj(e),options:[e,t]}),np=(e,t)=>({...mj(e),options:[e,t]}),rp=(e,t)=>({...hj(e),options:[e,t]}),Pw=(e,t)=>({...gj(e),options:[e,t]}),Aw=(e,t)=>({...xj(e),options:[e,t]}),Iw={...R},bj=Iw.useInsertionEffect,wj=bj||(e=>e());function kt(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wj(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const op="ArrowUp",Ta="ArrowDown",qo="ArrowLeft",fi="ArrowRight";function Ha(e,t,n){return Math.floor(e/t)!==n}function zi(e,t){return t<0||t>=e.current.length}function Jc(e,t){return Ft(e,{disabledIndices:t})}function Xg(e,t){return Ft(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ft(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-i:i;while(s>=0&&s<=a.length-1&&as(a,s,o));return s}function Sj(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===op){if(u&&Dt(n),c===-1)d=l;else if(d=Ft(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||d<0)){const p=c%i,f=l%i,h=l-(f-p);f===p?d=l:d=f>p?h:h-i}zi(e,d)&&(d=c)}if(n.key===Ta&&(u&&Dt(n),c===-1?d=s:(d=Ft(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Ft(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),zi(e,d)&&(d=c)),r==="both"){const p=ko(c/i);n.key===fi&&(u&&Dt(n),c%i!==i-1?(d=Ft(e,{startingIndex:c,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c-c%i-1,disabledIndices:a})),Ha(d,i,p)&&(d=c)),n.key===qo&&(u&&Dt(n),c%i!==0?(d=Ft(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&Ha(d,i,p)&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Ft(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),Ha(d,i,p)&&(d=c));const f=ko(l/i)===p;zi(e,d)&&(o&&f?d=n.key===qo?l:Ft(e,{startingIndex:c-c%i-1,disabledIndices:a}):d=c)}return d}function Tj(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let p=0;p<l;p++)u.push(o+d+p*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function Ej(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function Cj(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function as(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Qg=0;function sr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Qg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Qg=requestAnimationFrame(i)}var We=typeof document<"u"?E.useLayoutEffect:E.useEffect;function kj(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 Rj(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const _w=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Pj(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=R.useState(()=>new Map),a=R.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),s=R.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return We(()=>{const l=new Map(o);Array.from(l.keys()).sort(kj).forEach((u,d)=>{l.set(u,d)}),Rj(o,l)||i(l)},[o]),R.createElement(_w.Provider,{value:R.useMemo(()=>({register:a,unregister:s,map:o,elementsRef:n,labelsRef:r}),[a,s,o,n,r])},t)}function Ow(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=R.useContext(_w),[s,l]=R.useState(null),c=R.useRef(null),u=R.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var p;const f=t!==void 0;a.current[s]=f?t:(p=d==null?void 0:d.textContent)!=null?p:null}},[s,i,a,t]);return We(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),We(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),R.useMemo(()=>({ref:u,index:s??-1}),[s,u])}function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(this,arguments)}let Jg=!1,Aj=0;const ev=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Aj++;function Ij(){const[e,t]=R.useState(()=>Jg?ev():void 0);return We(()=>{e==null&&t(ev())},[]),R.useEffect(()=>{Jg=!0},[]),e}const _j=Iw.useId,pi=_j||Ij;let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function ss(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.warn(o)}}function Oj(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=oa)!=null&&e.has(o))){var i;(i=oa)==null||i.add(o),console.error(o)}}const Mw=R.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:f,...h}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||ss("The `ref` prop is required for `FloatingArrow`."));const m=pi(),[y,v]=R.useState(!1);if(We(()=>{if(!o)return;nn(o).direction==="rtl"&&v(!0)},[o]),!o)return null;const b=c*2,S=b/2,w=a/2*(l/-8+1),T=s/2*l/4,[C,k]=r.split("-"),I=!!p,A=C==="top"||C==="bottom",O=u&&k==="end"?"bottom":"top";let N=u&&k==="end"?"right":"left";u&&y&&(N=k==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",D=p||"M0,0"+(" H"+a)+(" L"+(a-w)+","+(s-T))+(" Q"+a/2+","+s+" "+w+","+(s-T))+" Z",_={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",Uo({},g,{"aria-hidden":!0,ref:n,width:I?a:a+b,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[N]:V,[O]:P,[C]:A||I?"100%":"calc(100% - "+b/2+"px)",transform:""+_+(f??""),...h}}),b>0&&R.createElement("path",{clipPath:"url(#"+m+")",fill:"none",stroke:d,strokeWidth:b+(p?0:1),d:D}),R.createElement("path",{stroke:b&&!p?g.fill:"none",d:D}),R.createElement("clipPath",{id:m},R.createElement("rect",{x:-S,y:S*(I?-1:1),width:a+b,height:a})))});function Dw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const jw=R.createContext(null),Nw=R.createContext(null),Sr=()=>{var e;return((e=R.useContext(jw))==null?void 0:e.id)||null},Tr=()=>R.useContext(Nw);function Mj(e){const t=pi(),n=Tr(),o=Sr();return We(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function Dj(e){const{children:t,id:n}=e,r=Sr();return R.createElement(jw.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function jj(e){const{children:t}=e,n=R.useRef([]),r=R.useCallback(a=>{n.current=[...n.current,a]},[]),o=R.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),i=R.useState(()=>Dw())[0];return R.createElement(Nw.Provider,{value:R.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function vr(e){return"data-floating-ui-"+e}function jt(e){const t=E.useRef(e);return We(()=>{t.current=e}),t}const tv=vr("safe-polygon");function eu(e,t,n){return n&&!Ho(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Fw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,f=Tr(),h=Sr(),g=jt(c),m=jt(l),y=jt(n),v=R.useRef(),b=R.useRef(-1),S=R.useRef(),w=R.useRef(-1),T=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),I=R.useCallback(()=>{var D;const _=(D=o.current.openEvent)==null?void 0:D.type;return(_==null?void 0:_.includes("mouse"))&&_!=="mousedown"},[o]);R.useEffect(()=>{if(!s)return;function D(_){let{open:F}=_;F||(clearTimeout(b.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[s,i]),R.useEffect(()=>{if(!s||!g.current||!n)return;function D(F){I()&&r(!1,F,"hover")}const _=_t(a.floating).documentElement;return _.addEventListener("mouseleave",D),()=>{_.removeEventListener("mouseleave",D)}},[a.floating,n,r,s,g,I]);const A=R.useCallback(function(D,_,F){_===void 0&&(_=!0),F===void 0&&(F="hover");const j=eu(m.current,"close",v.current);j&&!S.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,D,F),j)):_&&(clearTimeout(b.current),r(!1,D,F))},[m,r]),O=kt(()=>{k.current(),S.current=void 0}),N=kt(()=>{if(C.current){const D=_t(a.floating).body;D.style.pointerEvents="",D.removeAttribute(tv),C.current=!1}});R.useEffect(()=>{if(!s)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function _(M){if(clearTimeout(b.current),T.current=!1,u&&!Ho(v.current)||d>0&&!eu(m.current,"open"))return;const z=eu(m.current,"open",v.current);z?b.current=window.setTimeout(()=>{y.current||r(!0,M,"hover")},z):r(!0,M,"hover")}function F(M){if(D())return;k.current();const z=_t(a.floating);if(clearTimeout(w.current),g.current&&o.current.floatingContext){n||clearTimeout(b.current),S.current=g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M,!0,"safe-polygon")}});const X=S.current;z.addEventListener("mousemove",X),k.current=()=>{z.removeEventListener("mousemove",X)};return}(v.current==="touch"?!yt(a.floating,M.relatedTarget):!0)&&A(M)}function j(M){D()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:f,x:M.clientX,y:M.clientY,onClose(){N(),O(),A(M)}})(M))}if(tt(a.domReference)){var B;const M=a.domReference;return n&&M.addEventListener("mouseleave",j),(B=a.floating)==null||B.addEventListener("mouseleave",j),p&&M.addEventListener("mousemove",_,{once:!0}),M.addEventListener("mouseenter",_),M.addEventListener("mouseleave",F),()=>{var z;n&&M.removeEventListener("mouseleave",j),(z=a.floating)==null||z.removeEventListener("mouseleave",j),p&&M.removeEventListener("mousemove",_),M.removeEventListener("mouseenter",_),M.removeEventListener("mouseleave",F)}}},[a,s,e,u,d,p,A,O,N,r,n,y,f,m,g,o]),We(()=>{var D;if(s&&n&&(D=g.current)!=null&&D.__options.blockPointerEvents&&I()){const F=_t(a.floating).body;F.setAttribute(tv,""),F.style.pointerEvents="none",C.current=!0;const j=a.floating;if(tt(a.domReference)&&j){var _;const B=a.domReference,M=f==null||(_=f.nodesRef.current.find(z=>z.id===h))==null||(_=_.context)==null?void 0:_.elements.floating;return M&&(M.style.pointerEvents=""),B.style.pointerEvents="auto",j.style.pointerEvents="auto",()=>{B.style.pointerEvents="",j.style.pointerEvents=""}}}},[s,n,h,a,f,g,I]),We(()=>{n||(v.current=void 0,O(),N())},[n,O,N]),R.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(w.current),N()},[s,a.domReference,O,N]);const V=R.useMemo(()=>{function D(_){v.current=_.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(_){const{nativeEvent:F}=_;function j(){!T.current&&!y.current&&r(!0,F,"hover")}u&&!Ho(v.current)||n||d===0||(clearTimeout(w.current),v.current==="touch"?j():w.current=window.setTimeout(j,d))}}},[u,r,n,y,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(D){A(D.nativeEvent,!1)}}),[A]);return R.useMemo(()=>s?{reference:V,floating:P}:{},[s,V,P])}function Nj(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function qr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function Fj(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),qr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let go=new WeakMap,Wa=new WeakSet,qa={},tu=0;const Lj=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Lw=e=>e&&(e.host||Lw(e.parentNode)),Vj=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Lw(n);return e.contains(r)?r:null}).filter(n=>n!=null);function $j(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=Vj(t,e),s=new Set,l=new Set(a),c=[];qa[o]||(qa[o]=new WeakMap);const u=qa[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,h=>{if(wr(h)!=="script")if(s.has(h))p(h);else{const g=i?h.getAttribute(i):null,m=g!==null&&g!=="false",y=(go.get(h)||0)+1,v=(u.get(h)||0)+1;go.set(h,y),u.set(h,v),c.push(h),y===1&&m&&Wa.add(h),v===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return tu++,()=>{c.forEach(f=>{const h=(go.get(f)||0)-1,g=(u.get(f)||0)-1;go.set(f,h),u.set(f,g),h||(!Wa.has(f)&&i&&f.removeAttribute(i),Wa.delete(f)),g||f.removeAttribute(o)}),tu--,tu||(go=new WeakMap,go=new WeakMap,Wa=new WeakSet,qa={})}}function nv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=_t(e[0]).body;return $j(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ko=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Vw(e,t){const n=ra(e,Ko());t==="prev"&&n.reverse();const r=n.indexOf(gn(_t(e)));return n.slice(r+1)[0]}function $w(){return Vw(document.body,"next")}function zw(){return Vw(document.body,"prev")}function Bi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function zj(e){ra(e,Ko()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Bj(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 Hj(e,t,n){const r=e.indexOf(t);function o(a){const s=vr("focus-guard");let l=r+(a?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(s)||yt(n,c));)a?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const ip={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let Wj;function rv(e){e.key==="Tab"&&(e.target,clearTimeout(Wj))}const As=R.forwardRef(function(t,n){const[r,o]=R.useState();We(()=>(Zf()&&o("button"),document.addEventListener("keydown",rv),()=>{document.removeEventListener("keydown",rv)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[vr("focus-guard")]:"",style:ip};return R.createElement("span",Uo({},t,i))}),Bw=R.createContext(null),ov=vr("portal");function qj(e){e===void 0&&(e={});const{id:t,root:n}=e,r=pi(),o=Hw(),[i,a]=R.useState(null),s=R.useRef(null);return We(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{s.current=null})},[i]),We(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(ov,""),l.appendChild(c),s.current=c,a(c)},[t,r]),We(()=>{if(!r||s.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!tt(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(ov,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function io(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=qj({id:n,root:r}),[a,s]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return R.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&Bi(h)&&(h.type==="focusin"?Bj:zj)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),R.createElement(Bw.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&R.createElement(As,{"data-type":"outside",ref:l,onFocus:f=>{if(Bi(f,i)){var h;(h=u.current)==null||h.focus()}else{const g=zw()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus()}}}),p&&i&&R.createElement("span",{"aria-owns":i.id,style:ip}),i&&Qs.createPortal(t,i),p&&i&&R.createElement(As,{"data-type":"outside",ref:c,onFocus:f=>{if(Bi(f,i)){var h;(h=d.current)==null||h.focus()}else{const g=$w()||(a==null?void 0:a.refs.domReference.current);g==null||g.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const Hw=()=>R.useContext(Bw),Uj=20;let Fr=[];function nu(e){Fr=Fr.filter(n=>n.isConnected);let t=e;if(!(!t||wr(t)==="body")){if(!WD(t,Ko())){const n=ra(t,Ko())[0];n&&(t=n)}Fr.push(t),Fr.length>Uj&&(Fr=Fr.slice(-20))}}function iv(){return Fr.slice().reverse().find(e=>e.isConnected)}const Kj=R.forwardRef(function(t,n){return R.createElement("button",Uo({},t,{type:"button",ref:n,tabIndex:-1,style:ip}))});function mi(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:h,onOpenChange:g,events:m,dataRef:y,floatingId:v,elements:{domReference:b,floating:S}}=t,w=typeof a=="number"&&a<0,T=hw(b)&&w,C=Lj()?i:!0,k=jt(o),I=jt(a),A=jt(s),O=Tr(),N=Hw(),V=R.useRef(null),P=R.useRef(null),D=R.useRef(!1),_=R.useRef(!1),F=R.useRef(-1),j=N!=null,B=S==null?void 0:S.firstElementChild,M=(B==null?void 0:B.id)===v?B:S,z=kt(function(Z){return Z===void 0&&(Z=M),Z?ra(Z,Ko()):[]}),Q=kt(Z=>{const Y=z(Z);return k.current.map(G=>b&&G==="reference"?b:M&&G==="floating"?M:Y).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function Z(G){if(G.key==="Tab"){yt(M,gn(_t(M)))&&z().length===0&&!T&&Dt(G);const L=Q(),$=An(G);k.current[0]==="reference"&&$===b&&(Dt(G),G.shiftKey?sr(L[L.length-1]):sr(L[1])),k.current[1]==="floating"&&$===M&&G.shiftKey&&(Dt(G),sr(L[0]))}}const Y=_t(M);return Y.addEventListener("keydown",Z),()=>{Y.removeEventListener("keydown",Z)}},[r,b,M,c,k,T,z,Q]),R.useEffect(()=>{if(r||!S)return;function Z(Y){const G=An(Y),$=z().indexOf(G);$!==-1&&(F.current=$)}return S.addEventListener("focusin",Z),()=>{S.removeEventListener("focusin",Z)}},[r,S,z]),R.useEffect(()=>{if(r||!d)return;function Z(){_.current=!0,setTimeout(()=>{_.current=!1})}function Y(G){const L=G.relatedTarget;queueMicrotask(()=>{const $=!(yt(b,L)||yt(S,L)||yt(L,S)||yt(N==null?void 0:N.portalNode,L)||L!=null&&L.hasAttribute(vr("focus-guard"))||O&&(qr(O.nodesRef.current,h).find(K=>{var ie,H;return yt((ie=K.context)==null?void 0:ie.elements.floating,L)||yt((H=K.context)==null?void 0:H.elements.domReference,L)})||Nj(O.nodesRef.current,h).find(K=>{var ie,H;return((ie=K.context)==null?void 0:ie.elements.floating)===L||((H=K.context)==null?void 0:H.elements.domReference)===L})));if(l&&$&&gn(_t(M))===_t(M).body){wt(M)&&(M==null||M.focus());const K=F.current,ie=z(),H=ie[K]||ie[ie.length-1]||M;wt(H)&&H.focus()}(T||!c)&&L&&$&&!_.current&&L!==iv()&&(D.current=!0,g(!1,G))})}if(S&&wt(b))return b.addEventListener("focusout",Y),b.addEventListener("pointerdown",Z),S.addEventListener("focusout",Y),()=>{b.removeEventListener("focusout",Y),b.removeEventListener("pointerdown",Z),S.removeEventListener("focusout",Y)}},[r,b,S,M,c,h,O,N,g,d,l,z,T]),R.useEffect(()=>{var Z;if(r)return;const Y=Array.from((N==null||(Z=N.portalNode)==null?void 0:Z.querySelectorAll("["+vr("portal")+"]"))||[]);if(S){const G=[S,...Y,V.current,P.current,k.current.includes("reference")||T?b:null].filter($=>$!=null),L=c||T?nv(G,C,!C):nv(G);return()=>{L()}}},[r,b,S,c,k,N,T,C]),We(()=>{if(r||!wt(M))return;const Z=_t(M),Y=gn(Z);queueMicrotask(()=>{const G=Q(M),L=I.current,$=(typeof L=="number"?G[L]:L.current)||M,K=yt(M,Y);!w&&!K&&p&&sr($,{preventScroll:$===M})})},[r,p,M,w,Q,I]),We(()=>{if(r||!M)return;let Z=!1;const Y=_t(M),G=gn(Y);let $=y.current.openEvent;const K=f.domReference.current;nu(G);function ie(H){let{open:ye,reason:Te,event:Re,nested:$e}=H;ye&&($=Re),Te==="escape-key"&&f.domReference.current&&nu(f.domReference.current),Te==="hover"&&Re.type==="mouseleave"&&(D.current=!0),Te==="outside-press"&&($e?(D.current=!1,Z=!0):D.current=!(pw(Re)||Gf(Re)))}return m.on("openchange",ie),()=>{m.off("openchange",ie);const H=gn(Y),ye=yt(S,H)||O&&qr(O.nodesRef.current,h).some(se=>{var xe;return yt((xe=se.context)==null?void 0:xe.elements.floating,H)});(ye||$&&["click","mousedown"].includes($.type))&&f.domReference.current&&nu(f.domReference.current);const Re=K||G,$e=ra(_t(Re).body,Ko());queueMicrotask(()=>{let se=iv();!se&&wt(Re)&&S&&(se=Hj($e,Re,S)),A.current&&!D.current&&wt(se)&&(!(se!==H&&H!==Y.body)||ye)&&se.focus({preventScroll:Z})})}},[r,S,M,A,y,f,m,O,h]),We(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:f}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,g,f,d]),We(()=>{if(r||!M||typeof MutationObserver!="function"||w)return;const Z=()=>{const G=M.getAttribute("tabindex"),L=z(),$=gn(_t(S)),K=L.indexOf($);K!==-1&&(F.current=K),k.current.includes("floating")||$!==f.domReference.current&&L.length===0?G!=="0"&&M.setAttribute("tabindex","0"):G!=="-1"&&M.setAttribute("tabindex","-1")};Z();const Y=new MutationObserver(Z);return Y.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{Y.disconnect()}},[r,S,M,f,k,z,w]);function X(Z){return r||!u||!c?null:R.createElement(Kj,{ref:Z==="start"?V:P,onClick:Y=>g(!1,Y.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!T:!0)&&(j||c);return R.createElement(R.Fragment,null,J&&R.createElement(As,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:Z=>{if(c){const G=Q();sr(o[0]==="reference"?G[0]:G[G.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(D.current=!1,Bi(Z,N.portalNode)){const G=$w()||b;G==null||G.focus()}else{var Y;(Y=N.beforeOutsideRef.current)==null||Y.focus()}}}),!T&&X("start"),n,X("end"),J&&R.createElement(As,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:Z=>{if(c)sr(Q()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(D.current=!0),Bi(Z,N.portalNode)){const G=zw()||b;G==null||G.focus()}else{var Y;(Y=N.afterOutsideRef.current)==null||Y.focus()}}}))}const ru=new Set,Yj=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=pi();return We(()=>{if(!r)return;ru.add(i);const a=/iP(hone|ad|od)|iOS/.test(Yf()),s=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=s.left?parseFloat(s.left):window.scrollX,p=s.top?parseFloat(s.top):window.scrollY;if(s.overflow="hidden",u&&(s[c]=u+"px"),a){var f,h;const g=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,m=((h=window.visualViewport)==null?void 0:h.offsetTop)||0;Object.assign(s,{position:"fixed",top:-(p-Math.floor(m))+"px",left:-(d-Math.floor(g))+"px",right:"0"})}return()=>{ru.delete(i),ru.size===0&&(Object.assign(s,{overflow:"",[c]:""}),a&&(Object.assign(s,{position:"",top:"",left:"",right:""}),window.scrollTo(d,p)))}},[i,r]),R.createElement("div",Uo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function av(e){return wt(e.target)&&e.target.tagName==="BUTTON"}function sv(e){return Xf(e)}function Ea(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=R.useRef(),p=R.useRef(!1),f=R.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const g=d.current;h.button===0&&s!=="click"&&(Ho(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const g=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Ho(g,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!u||av(h))&&(h.key===" "&&!sv(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||av(h)||sv(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}function Gj(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,p=a.x,f=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),p-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:p,y:f,top:f,right:p+u,bottom:f+d,left:p}}}}function lv(e){return e!=null&&e.clientX!=null}function Zj(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=R.useRef(!1),p=R.useRef(null),[f,h]=R.useState(),[g,m]=R.useState([]),y=kt((T,C)=>{d.current||r.current.openEvent&&!lv(r.current.openEvent)||a.setPositionReference(Gj(i,{x:T,y:C,axis:l,dataRef:r,pointerType:f}))}),v=kt(T=>{c!=null||u!=null||(n?p.current||m([]):y(T.clientX,T.clientY))}),b=Ho(f)?o:n,S=R.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const T=Bt(o);function C(k){const I=An(k);yt(o,I)?(T.removeEventListener("mousemove",C),p.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||lv(r.current.openEvent)){T.addEventListener("mousemove",C);const k=()=>{T.removeEventListener("mousemove",C),p.current=null};return p.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,y]);R.useEffect(()=>S(),[S,g]),R.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),R.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),We(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const w=R.useMemo(()=>{function T(C){let{pointerType:k}=C;h(k)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:v,onMouseEnter:v}},[v]);return R.useMemo(()=>s?{reference:w}:{},[s,w])}const Xj={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Qj={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},cv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function ao(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:h}=t,g=Tr(),m=kt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?m:l,v=R.useRef(!1),b=R.useRef(!1),{escapeKey:S,outsidePress:w}=cv(f),{escapeKey:T,outsidePress:C}=cv(h),k=kt(P=>{var D;if(!n||!a||!s||P.key!=="Escape")return;const _=(D=i.current.floatingContext)==null?void 0:D.nodeId,F=g?qr(g.nodesRef.current,_):[];if(!S&&(P.stopPropagation(),F.length>0)){let j=!0;if(F.forEach(B=>{var M;if((M=B.context)!=null&&M.open&&!B.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,gD(P)?P.nativeEvent:P,"escape-key")}),I=kt(P=>{var D;const _=()=>{var F;k(P),(F=An(P))==null||F.removeEventListener("keydown",_)};(D=An(P))==null||D.addEventListener("keydown",_)}),A=kt(P=>{var D;const _=v.current;v.current=!1;const F=b.current;if(b.current=!1,c==="click"&&F||_||typeof y=="function"&&!y(P))return;const j=An(P),B="["+vr("inert")+"]",M=_t(o.floating).querySelectorAll(B);let z=tt(j)?j:null;for(;z&&!mr(z);){const Z=Gn(z);if(mr(Z)||!tt(Z))break;z=Z}if(M.length&&tt(j)&&!vD(j)&&!yt(j,o.floating)&&Array.from(M).every(Z=>!yt(z,Z)))return;if(wt(j)&&V){const Z=j.clientWidth>0&&j.scrollWidth>j.clientWidth,Y=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let G=Y&&P.offsetX>j.clientWidth;if(Y&&nn(j).direction==="rtl"&&(G=P.offsetX<=j.offsetWidth-j.clientWidth),G||Z&&P.offsetY>j.clientHeight)return}const Q=(D=i.current.floatingContext)==null?void 0:D.nodeId,X=g&&qr(g.nodesRef.current,Q).some(Z=>{var Y;return Zc(P,(Y=Z.context)==null?void 0:Y.elements.floating)});if(Zc(P,o.floating)||Zc(P,o.domReference)||X)return;const J=g?qr(g.nodesRef.current,Q):[];if(J.length>0){let Z=!0;if(J.forEach(Y=>{var G;if((G=Y.context)!=null&&G.open&&!Y.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}r(!1,P,"outside-press")}),O=kt(P=>{var D;const _=()=>{var F;A(P),(F=An(P))==null||F.removeEventListener(c,_)};(D=An(P))==null||D.addEventListener(c,_)});R.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function P(F){r(!1,F,"ancestor-scroll")}const D=_t(o.floating);s&&D.addEventListener("keydown",T?I:k,T),y&&D.addEventListener(c,C?O:A,C);let _=[];return p&&(tt(o.domReference)&&(_=dr(o.domReference)),tt(o.floating)&&(_=_.concat(dr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(_=_.concat(dr(o.reference.contextElement)))),_=_.filter(F=>{var j;return F!==((j=D.defaultView)==null?void 0:j.visualViewport)}),_.forEach(F=>{F.addEventListener("scroll",P,{passive:!0})}),()=>{s&&D.removeEventListener("keydown",T?I:k,T),y&&D.removeEventListener(c,C?O:A,C),_.forEach(F=>{F.removeEventListener("scroll",P)})}},[i,o,s,y,c,n,r,p,a,S,w,k,T,I,A,C,O]),R.useEffect(()=>{v.current=!1},[y,c]);const N=R.useMemo(()=>({onKeyDown:k,[Xj[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),V=R.useMemo(()=>({onKeyDown:k,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Qj[c]]:()=>{v.current=!0}}),[k,c]);return R.useMemo(()=>a?{reference:N,floating:V}:{},[a,N,V])}function Jj(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=pi(),i=R.useRef({}),[a]=R.useState(()=>Dw()),s=Sr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!tt(f)&&Oj("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]=R.useState(r.reference),u=kt((f,h,g)=>{i.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:g,nested:s}),n==null||n(f,h,g)}),d=R.useMemo(()=>({setPositionReference:c}),[]),p=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d}),[t,u,p,a,o,d])}function Er(e){e===void 0&&(e={});const{nodeId:t}=e,n=Jj({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=R.useState(null),[s,l]=R.useState(null),u=(o==null?void 0:o.reference)||i,d=R.useRef(null),p=Tr();We(()=>{u&&(d.current=u)},[u]);const f=yj({...e,elements:{...o,...s&&{reference:s}}}),h=R.useCallback(b=>{const S=tt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(S),f.refs.setReference(S)},[f.refs]),g=R.useCallback(b=>{(tt(b)||b===null)&&(d.current=b,a(b)),(tt(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!tt(b))&&f.refs.setReference(b)},[f.refs]),m=R.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:d}),[f.refs,g,h]),y=R.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),v=R.useMemo(()=>({...f,...r,refs:m,elements:y,nodeId:t}),[f,m,y,t,r]);return We(()=>{r.dataRef.current.floatingContext=v;const b=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);b&&(b.context=v)}),R.useMemo(()=>({...f,context:v,refs:m,elements:y}),[f,m,y,v])}function eN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=R.useRef(!1),u=R.useRef(),d=R.useRef(!0);R.useEffect(()=>{if(!s)return;const f=Bt(a.domReference);function h(){!n&&wt(a.domReference)&&a.domReference===gn(_t(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),R.useEffect(()=>{if(!s)return;function f(h){let{reason:g}=h;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=R.useMemo(()=>({onPointerDown(f){Gf(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=An(f.nativeEvent);if(l&&tt(h))try{if(Zf()&&mw())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Xf(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,g=f.nativeEvent,m=tt(h)&&h.hasAttribute(vr("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const v=gn(a.domReference?a.domReference.ownerDocument:document);!h&&v===a.domReference||yt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,v)||yt(a.domReference,v)||m||r(!1,g,"focus")})}}),[i,a.domReference,r,l]);return R.useMemo(()=>s?{reference:p}:{},[s,p])}const uv="active",dv="selected";function ou(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[uv]:a,[dv]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[uv,dv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var p,f=arguments.length,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function Cr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),o=R.useCallback(s=>ou(s,e,"reference"),t),i=R.useCallback(s=>ou(s,e,"floating"),n),a=R.useCallback(s=>ou(s,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}let fv=!1;function Tl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function pv(e,t){return Tl(t,e===op||e===Ta,e===qo||e===fi)}function iu(e,t,n){return Tl(t,e===Ta,n?e===qo:e===fi)||e==="Enter"||e===" "||e===""}function tN(e,t,n){return Tl(t,n?e===qo:e===fi,e===Ta)}function mv(e,t,n){return Tl(t,n?e===fi:e===qo,e===op)}function El(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:h=!1,focusItemOnOpen:g="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:y=!0,disabledIndices:v=void 0,orientation:b="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||ss("`useListNavigation` looping must be enabled to allow escaping."),h||ss("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&S>1&&ss("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=Sr(),A=Tr(),O=kt(s),N=R.useRef(g),V=R.useRef(c??-1),P=R.useRef(null),D=R.useRef(!0),_=R.useRef(O),F=R.useRef(!!o.floating),j=R.useRef(n),B=R.useRef(!1),M=R.useRef(!1),z=jt(v),Q=jt(n),X=jt(w),J=jt(o.floating),Z=jt(c),[Y,G]=R.useState(),[L,$]=R.useState(),K=kt(function(se,xe,le){le===void 0&&(le=!1);function be(ue){h?(G(ue.id),A==null||A.events.emit("virtualfocus",ue),T&&(T.current=ue)):sr(ue,{preventScroll:!0,sync:mw()&&Zf()?fv||B.current:!1})}const oe=se.current[xe.current];oe&&be(oe),requestAnimationFrame(()=>{const ue=se.current[xe.current]||oe;if(!ue)return;oe||be(ue);const ee=X.current;ee&&H&&(le||!D.current)&&(ue.scrollIntoView==null||ue.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});We(()=>{document.createElement("div").focus({get preventScroll(){return fv=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?N.current&&c!=null&&(M.current=!0,V.current=c,O(c)):F.current&&(V.current=-1,_.current(null)))},[l,n,o.floating,c,O]),We(()=>{if(l&&n&&o.floating)if(a==null){if(B.current=!1,Z.current!=null)return;if(F.current&&(V.current=-1,K(i,V)),(!j.current||!F.current)&&N.current&&(P.current!=null||N.current===!0&&P.current==null)){let se=0;const xe=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(xe),se++):(V.current=P.current==null||iu(P.current,b,f)||p?Jc(i,z.current):Xg(i,z.current),P.current=null,O(V.current))};xe()}}else zi(i,a)||(V.current=a,K(i,V,M.current),M.current=!1)},[l,n,o.floating,a,Z,p,i,b,f,O,K,z]),We(()=>{var se;if(!l||o.floating||!A||h||!F.current)return;const xe=A.nodesRef.current,le=(se=xe.find(ue=>ue.id===I))==null||(se=se.context)==null?void 0:se.elements.floating,be=gn(_t(o.floating)),oe=xe.some(ue=>ue.context&&yt(ue.context.elements.floating,be));le&&!oe&&D.current&&le.focus({preventScroll:!0})},[l,o.floating,A,I,h]),We(()=>{if(!l||!A||!h||I)return;function se(xe){$(xe.id),T&&(T.current=xe)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[l,A,h,I,T]),We(()=>{_.current=O,F.current=!!o.floating}),We(()=>{n||(P.current=null)},[n]),We(()=>{j.current=n},[n]);const ie=a!=null,H=R.useMemo(()=>{function se(le){if(!n)return;const be=i.current.indexOf(le);be!==-1&&O(be)}return{onFocus(le){let{currentTarget:be}=le;se(be)},onClick:le=>{let{currentTarget:be}=le;return be.focus({preventScroll:!0})},...m&&{onMouseMove(le){let{currentTarget:be}=le;se(be)},onPointerLeave(le){let{pointerType:be}=le;!D.current||be==="touch"||(V.current=-1,K(i,V),O(null),h||sr(J.current,{preventScroll:!0}))}}}},[n,J,K,m,i,O,h]),ye=kt(se=>{if(D.current=!1,B.current=!0,!Q.current&&se.currentTarget===J.current)return;if(p&&mv(se.key,b,f)){Dt(se),r(!1,se.nativeEvent,"list-navigation"),wt(o.domReference)&&!h&&o.domReference.focus();return}const xe=V.current,le=Jc(i,v),be=Xg(i,v);if(se.key==="Home"&&(Dt(se),V.current=le,O(V.current)),se.key==="End"&&(Dt(se),V.current=be,O(V.current)),S>1){const oe=C||Array.from({length:i.current.length},()=>({width:1,height:1})),ue=Tj(oe,S,k),ee=ue.findIndex(te=>te!=null&&!as(i.current,te,v)),q=ue.reduce((te,me,Oe)=>me!=null&&!as(i.current,me,v)?Oe:te,-1);if(V.current=ue[Sj({current:ue.map(te=>te!=null?i.current[te]:null)},{event:se,orientation:b,loop:d,cols:S,disabledIndices:Cj([...v||i.current.map((te,me)=>as(i.current,me)?me:void 0),void 0],ue),minIndex:ee,maxIndex:q,prevIndex:Ej(V.current>be?le:V.current,oe,ue,S,se.key===Ta?"bl":se.key===fi?"tr":"tl"),stopEvent:!0})],O(V.current),b==="both")return}if(pv(se.key,b)){if(Dt(se),n&&!h&&gn(se.currentTarget.ownerDocument)===se.currentTarget){V.current=iu(se.key,b,f)?le:be,O(V.current);return}iu(se.key,b,f)?d?V.current=xe>=be?u&&xe!==i.current.length?-1:le:Ft(i,{startingIndex:xe,disabledIndices:v}):V.current=Math.min(be,Ft(i,{startingIndex:xe,disabledIndices:v})):d?V.current=xe<=le?u&&xe!==-1?i.current.length:be:Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:v}):V.current=Math.max(le,Ft(i,{startingIndex:xe,decrement:!0,disabledIndices:v})),zi(i,V.current)?O(null):O(V.current)}}),Te=R.useMemo(()=>h&&n&&ie&&{"aria-activedescendant":L||Y},[h,n,ie,L,Y]),Re=R.useMemo(()=>({"aria-orientation":b==="both"?void 0:b,...!hw(o.domReference)&&Te,onKeyDown:ye,onPointerMove(){D.current=!0}}),[Te,ye,o.domReference,b]),$e=R.useMemo(()=>{function se(le){g==="auto"&&pw(le.nativeEvent)&&(N.current=!0)}function xe(le){N.current=g,g==="auto"&&Gf(le.nativeEvent)&&(N.current=!0)}return{...Te,onKeyDown(le){D.current=!1;const be=le.key.indexOf("Arrow")===0,oe=tN(le.key,b,f),ue=mv(le.key,b,f),ee=pv(le.key,b),q=(p?oe:ee)||le.key==="Enter"||le.key.trim()==="";if(h&&n){const He=A==null?void 0:A.nodesRef.current.find(Ot=>Ot.parentId==null),Ye=A&&He?Fj(A.nodesRef.current,He.id):null;if(be&&Ye&&T){const Ot=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(oe||ue){var te,me;const fn=((te=Ye.context)==null?void 0:te.elements.domReference)===le.currentTarget,En=ue&&!fn?(me=Ye.context)==null?void 0:me.elements.domReference:oe?i.current.find(Jn=>(Jn==null?void 0:Jn.id)===Y):null;En&&(Dt(le),En.dispatchEvent(Ot),$(void 0))}if(ee&&Ye.context&&Ye.context.open&&Ye.parentId&&le.currentTarget!==Ye.context.elements.domReference){var Oe;Dt(le),(Oe=Ye.context.elements.domReference)==null||Oe.dispatchEvent(Ot);return}}return ye(le)}if(!(!n&&!y&&be)){if(q&&(P.current=p&&ee?null:le.key),p){oe&&(Dt(le),n?(V.current=Jc(i,z.current),O(V.current)):r(!0,le.nativeEvent,"list-navigation"));return}ee&&(c!=null&&(V.current=c),Dt(le),!n&&y?r(!0,le.nativeEvent,"list-navigation"):ye(le),n&&O(V.current))}},onFocus(){n&&!h&&O(null)},onPointerDown:xe,onMouseDown:se,onClick:se}},[Y,Te,ye,z,g,i,p,O,r,n,y,b,f,c,A,h,T]);return R.useMemo(()=>l?{reference:$e,floating:Re,item:H}:{},[l,$e,Re,H])}const nN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function so(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(n=nN.get(a))!=null?n:a,l=pi(),u=Sr()!=null,d=R.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,r,l,a]),p=R.useMemo(()=>{const h={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?h:{...h,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),f=R.useCallback(h=>{let{active:g,selected:m}=h;const y={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...y,"aria-selected":g&&m};case"combobox":return{...y,...g&&{"aria-selected":!0}}}return{}},[o,a]);return R.useMemo(()=>i?{reference:d,floating:p,item:f}:{},[i,d,p,f])}const hv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function vo(e,t){return typeof e=="function"?e(t):e}function rN(e,t){const[n,r]=R.useState(e);return e&&!n&&r(!0),R.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function oN(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=R.useState("unmounted"),c=rN(n,a);return!c&&s==="close"&&l("unmounted"),We(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Ww(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=R.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,p=(u?a:a.close)||0,[f,h]=R.useState(()=>({...vo(i,c),...vo(n,c)})),{isMounted:g,status:m}=oN(e,{duration:a}),y=jt(n),v=jt(r),b=jt(o),S=jt(i);return We(()=>{const w=vo(y.current,c),T=vo(b.current,c),C=vo(S.current,c),k=vo(v.current,c)||Object.keys(w).reduce((I,A)=>(I[A]="",I),{});if(m==="initial"&&h(I=>({transitionProperty:I.transitionProperty,...C,...w})),m==="open"&&h({transitionProperty:Object.keys(k).map(hv).join(","),transitionDuration:d+"ms",...C,...k}),m==="close"){const I=T||w;h({transitionProperty:Object.keys(I).map(hv).join(","),transitionDuration:p+"ms",...C,...I})}},[p,b,y,v,S,d,m,c]),{isMounted:g,styles:f}}function iN(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=R.useRef(),g=R.useRef(""),m=R.useRef((n=f??a)!=null?n:-1),y=R.useRef(null),v=kt(s),b=kt(l),S=jt(u),w=jt(p);We(()=>{r&&(clearTimeout(h.current),y.current=null,g.current="")},[r]),We(()=>{if(r&&g.current===""){var A;m.current=(A=f??a)!=null?A:-1}},[r,f,a]);const T=kt(A=>{A?o.current.typing||(o.current.typing=A,b(A)):o.current.typing&&(o.current.typing=A,b(A))}),C=kt(A=>{function O(_,F,j){const B=S.current?S.current(F,j):F.find(M=>(M==null?void 0:M.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return B?_.indexOf(B):-1}const N=i.current;if(g.current.length>0&&g.current[0]!==" "&&(O(N,N,g.current)===-1?T(!1):A.key===" "&&Dt(A)),N==null||w.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(Dt(A),T(!0)),N.every(_=>{var F,j;return _?((F=_[0])==null?void 0:F.toLocaleLowerCase())!==((j=_[1])==null?void 0:j.toLocaleLowerCase()):!0})&&g.current===A.key&&(g.current="",m.current=y.current),g.current+=A.key,clearTimeout(h.current),h.current=setTimeout(()=>{g.current="",m.current=y.current,T(!1)},d);const P=m.current,D=O(N,[...N.slice((P||0)+1),...N.slice(0,(P||0)+1)],g.current);D!==-1?(v(D),y.current=D):A.key!==" "&&(g.current="",T(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),I=R.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&T(!1)}}),[C,T]);return R.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function gv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function aN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();function c(d,p){const f=performance.now(),h=f-l;if(a===null||s===null||h===0)return a=d,s=p,l=f,null;const g=d-a,m=p-s,v=Math.sqrt(g*g+m*m)/h;return a=d,s=p,l=f,v}const u=d=>{let{x:p,y:f,placement:h,elements:g,onClose:m,nodeId:y,tree:v}=d;return function(S){function w(){clearTimeout(o),m()}if(clearTimeout(o),!g.domReference||!g.floating||h==null||p==null||f==null)return;const{clientX:T,clientY:C}=S,k=[T,C],I=An(S),A=S.type==="mouseleave",O=yt(g.floating,I),N=yt(g.domReference,I),V=g.domReference.getBoundingClientRect(),P=g.floating.getBoundingClientRect(),D=h.split("-")[0],_=p>P.right-P.width/2,F=f>P.bottom-P.height/2,j=aN(k,V),B=P.width>V.width,M=P.height>V.height,z=(B?V:P).left,Q=(B?V:P).right,X=(M?V:P).top,J=(M?V:P).bottom;if(O&&(i=!0,!A))return;if(N&&(i=!1),N&&!A){i=!0;return}if(A&&tt(S.relatedTarget)&&yt(g.floating,S.relatedTarget)||v&&qr(v.nodesRef.current,y).some(G=>{let{context:L}=G;return L==null?void 0:L.open}))return;if(D==="top"&&f>=V.bottom-1||D==="bottom"&&f<=V.top+1||D==="left"&&p>=V.right-1||D==="right"&&p<=V.left+1)return w();let Z=[];switch(D){case"top":Z=[[z,V.top+1],[z,P.bottom-1],[Q,P.bottom-1],[Q,V.top+1]];break;case"bottom":Z=[[z,P.top+1],[z,V.bottom-1],[Q,V.bottom-1],[Q,P.top+1]];break;case"left":Z=[[P.right-1,J],[P.right-1,X],[V.left+1,X],[V.left+1,J]];break;case"right":Z=[[V.right-1,J],[V.right-1,X],[P.left+1,X],[P.left+1,J]];break}function Y(G){let[L,$]=G;switch(D){case"top":{const K=[B?L+t/2:_?L+t*4:L-t*4,$+t+1],ie=[B?L-t/2:_?L+t*4:L-t*4,$+t+1],H=[[P.left,_||B?P.bottom-t:P.top],[P.right,_?B?P.bottom-t:P.top:P.bottom-t]];return[K,ie,...H]}case"bottom":{const K=[B?L+t/2:_?L+t*4:L-t*4,$-t],ie=[B?L-t/2:_?L+t*4:L-t*4,$-t],H=[[P.left,_||B?P.top+t:P.bottom],[P.right,_?B?P.top+t:P.bottom:P.top+t]];return[K,ie,...H]}case"left":{const K=[L+t+1,M?$+t/2:F?$+t*4:$-t*4],ie=[L+t+1,M?$-t/2:F?$+t*4:$-t*4];return[...[[F||M?P.right-t:P.left,P.top],[F?M?P.right-t:P.left:P.right-t,P.bottom]],K,ie]}case"right":{const K=[L-t,M?$+t/2:F?$+t*4:$-t*4],ie=[L-t,M?$-t/2:F?$+t*4:$-t*4],H=[[F||M?P.left+t:P.right,P.top],[F?M?P.left+t:P.right:P.left+t,P.bottom]];return[K,ie,...H]}}}if(!gv([T,C],Z)){if(i&&!j)return w();if(!A&&r){const G=c(S.clientX,S.clientY);if(G!==null&&G<.1)return w()}gv([T,C],Y([p,f]))?!i&&r&&(o=window.setTimeout(w,40)):w()}}};return u.__options={blockPointerEvents:n},u}const sN=/Mac|iPod|iPhone|iPad/,Is=()=>sN.test(navigator.userAgent),lN=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Is()?"Meta":"Control":n==="Hyper"?Is()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),vv=e=>e.map(t=>t.trim()).join("+");class cN{constructor(t=[]){this.combinations=[],this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=vv(lN(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=vv(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}class yn extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof yn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new yn(this);return t?t(n):n}static from(t,n){return new yn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(yn.from(t,n).values())}toArray(){return Array.from(this.values())}}const uN=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},yv=(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},xv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},bv=(e,t)=>{const n=yv(t,xv.basic,e);return n!==void 0&&n!==e?n:yv(t,xv.extend,e)},wv=e=>e.replace(/[^0-9]/g,""),Ua=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),Sv=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?wv(e).includes(wv(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?uN(e,t)!==null:!1,dN=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>Sv(e,o,n,r)):Sv(e,t,n,r),ap=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Ve.array(i.value)?i.value.map(Ua):Ua(`${i.value}`)}));return e.forEach(i=>{const a=bv(i,t);o.forEach(s=>{const l=bv(i,s.key);if(!l)return;const c=Ua(`${s.value}`.toLocaleLowerCase()).trim(),u=Ua(`${l}`.toLocaleLowerCase()).trim();if(dN(u,c,s.score,s.match))return void r.set(a,i);Ve.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},fN=e=>(e=e.trim(),e==="Alt"?Is()?x.jsx(YA,{"aria-label":"Option",size:14}):"Alt":e==="Mod"?Is()?x.jsx(VA,{"aria-label":"Command",size:14}):"Ctrl":e),pN=e=>{const t=e.value.trim().split("+");return x.jsx("span",{className:"flex items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return x.jsxs(E.Fragment,{children:[x.jsx("kbd",{"aria-label":n,children:fN(n)}),o?null:x.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},sp=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),mN=(e,t)=>Yr()?t:window.matchMedia(e).matches,hN=(e,t=!0)=>{const[n,r]=E.useState(t);return E.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(mN(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},Tv=()=>window.matchMedia("@media (pointer: coarse)"),gN=()=>{var r;const e=E.useRef(Yr()?null:Tv()),[t,n]=E.useState(Yr()?!1:((r=e.current)==null?void 0:r.matches)??!1);return E.useEffect(()=>{(e.current===null?Tv():e.current).addEventListener("change",i=>n(i.matches))},[]),t},lp=(e,t="overflow-hidden")=>{const n=E.useRef(null),r=gN(),o=E.useRef(Yr()?"":document.documentElement.style.overflowY);return E.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||j0())return;document.documentElement.style.padding=ux(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),E.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(fT(c.style.height)):null,p=Ve.number(d)?d:u.height,f=c.scrollHeight<=p;return p===c.scrollHeight?e?l.preventDefault():void 0:f?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},vn="500ms",vN={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:vn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:vn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:vn}},yN={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:vn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:vn}},au={drawer:e=>e==="left"?vN:yN,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:vn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:vn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:vn,originY:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:vn},initial:{opacity:.5,scale:.95,animationDuration:vn,type:"spring"},enter:{opacity:1,scale:[1.05,1],animationDuration:vn}}},xN=ei("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),Uw={top:0,left:0,right:0,bottom:0},Kw=e=>e*.65,bN=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x,p=Math.abs(u+d);return e.value.set(p)}const i=e.parent.current.getBoundingClientRect(),a=e.value.get()||i.height,s=Math.abs(a-r.delta.y),l=Kw(window.outerHeight);return s>=l?e.value.set(s):(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350))}};return x.jsx(ft.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:Uw,whileDrag:{cursor:"grabbing"},className:Ie("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Ka={drawer:"right",sheet:"none",dialog:"none"},wN=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ka.drawer:Ka[o]:t?Ka[o]:Ka.sheet},SN=[],Yw=E.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:p=!0,forceType:f=!1,layoutId:h=void 0,overlayClassName:g="",type:m="dialog",position:y,overlayClickClose:v=!1,role:b="dialog",interactions:S=SN,...w},T)=>{const C=d?ft.div:"div",k=lp(e,"block-only"),I=E.useId(),A=E.useId(),O=hN("(min-width: 64rem)"),N=m!=="dialog",V=wN(O,f,m,y),P=O||f?au[m]:au.sheet,D=typeof P=="function"?P(V):P,_=O||f?m:"sheet",F=Er({open:e,onOpenChange:a,transform:!0,strategy:"absolute"}),j=Ea(F.context),B=so(F.context,{role:b}),M=ao(F.context,{escapeKey:!0,referencePress:!0,outsidePress:v}),z=Cr([j,B,M].concat(S)),Q=o,X=ul(void 0);E.useEffect(()=>{X.set(void 0)},[X,_]);const J=()=>a(!1);E.useImperativeHandle(T,()=>({context:F.context,floating:k.current}),[F.context,k]);const Y=d&&_==="sheet"?{layout:!0,exit:"exit",dragListener:!0,dragMomentum:!0,animate:"enter",dragElastic:0,dragPropagation:!0,onDrag:(G,L)=>{const $=F.refs.floating;if($.current&&_==="sheet"){const ie=$.current.getBoundingClientRect(),H=X.get()||ie.height,ye=Math.abs(H-L.delta.y),Te=Kw(window.outerHeight);return ye<Te?(J(),setTimeout(()=>X.set(window.outerHeight),350)):X.set(ye)}},dragSnapToOrigin:!0,dragDirectionLock:!0,initial:"initial",layoutId:h,variants:D,drag:_==="sheet"?"y":"x",draggable:_==="sheet",dragConstraints:Uw}:{};return x.jsxs(E.Fragment,{children:[o?x.jsx(E.Fragment,{children:r?x.jsx(Bo,{ref:F.refs.setReference,...z.getReferenceProps({layoutId:h}),children:Q}):x.jsx(ft.button,{ref:F.refs.setReference,...z.getReferenceProps(),layoutId:h,type:"button",children:Q})}):null,x.jsx(io,{children:x.jsx(xr,{mode:"wait",presenceAffectsLayout:!0,children:e?x.jsx(Yj,{lockScroll:!0,className:Ie(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${_==="drawer"?"":"flex items-start justify-center p-10"}`,g),children:x.jsx(mi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:F.context,children:x.jsxs(C,{...w,...Y,...t?{"aria-labelledby":I,"aria-describedby":A}:{"aria-label":s},...z.getFloatingProps({"aria-modal":e,ref:qn(F.refs.setFloating,k),className:Ie(xN({position:V,type:_}),l,"overscroll-contain")}),"data-component":"modal",style:_==="drawer"?{width:X}:{height:X},children:[t?x.jsx("header",{className:"relative w-full",children:t?x.jsx("h2",{id:I,className:"px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,x.jsx("section",{className:Ie("flex-1 overflow-y-auto px-8 select-text py-1",c),children:i}),n?x.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,p?x.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:x.jsx("button",{type:"button",onClick:J,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:x.jsx(dl,{})})}):null,N&&u?x.jsx(bN,{onChange:a,value:X,sheet:_==="sheet",position:V,parent:F.refs.floating}):null]})})}):null})})]})}),TN=e=>x.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Kd(e.item.title)?x.jsx(e.item.title,{text:e.text}):e.item.title}),EN=E.forwardRef((e,t)=>{const n=E.useId(),r=e.active,o=e.item;return o.type==="group"?x.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:x.jsx(TN,{text:e.text,item:o})}):o.type!=="shortcut"?x.jsx(E.Fragment,{}):x.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[x.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,x.jsx("span",{children:Kd(o.title)?x.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?x.jsx(pN,{value:o.shortcut}):null]})}),CN=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Ve.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Ve.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=ap(o,"title",n),a=r.filter(s=>Ve.function(s.enabled)?s.enabled({text:t}):!1);return yn.unique(i.concat(a),s=>s.title)},kN=[0,0,0,0,0],RN=e=>{const t=e.bind??"Mod + k",n=E.useRef([]),r=At(),[o,i]=E.useState(""),a=Ur(o),s=E.useId(),l=E.useRef(null),[c,u]=E.useState(null),d=Er({open:e.open,strategy:"absolute",onOpenChange:e.onChangeVisibility,whileElementsMounted:di}),p=El(d.context,{listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,scrollItemIntoView:!0,onNavigate:v=>u(b=>Ve.number(v)?v:e.open?b??0:null)}),{getItemProps:f}=Cr([p]),h=e.commands.flatMap(v=>v.type==="group"?[v,...v.items]:[v]),g=CN(h,o),m=o===""?h:[{type:"group",title:"Results",items:[]},...g.filter(v=>v.type!=="group")];E.useEffect(()=>{const v=new cN;return v.add(t,()=>{var b;return(b=e.onChangeVisibility)==null?void 0:b.call(e,!0)}),h.forEach(b=>{b.type!=="group"&&b.type==="shortcut"&&b.shortcut!==void 0&&v.add(b.shortcut,S=>b.action({event:S,text:a.current,setOpen:e.onChangeVisibility}))}),v.register()},[t]);const y=e.Icon??dg;return x.jsx(E.Fragment,{children:x.jsxs(Yw,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,interactions:[p],ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-2","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[x.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4",children:[x.jsx("div",{className:"flex size-10 items-center justify-center",children:x.jsx(y,{Default:dg,text:o,size:16})}),x.jsx("input",{autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:v=>i(v.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none",onKeyDown:v=>{var b;if((v.key==="ArrowDown"||v.key==="ArrowUp")&&c!==null&&((b=n.current[c])==null||b.scrollIntoView({block:"start",inline:"start"})),v.key==="Enter"){if(c!==null&&m[c]){v.preventDefault();const S=m[c],w=v.currentTarget.value;if(S.type==="shortcut")return S.action({event:v,setOpen:e.onChangeVisibility,text:w})}if(m.length===1){v.preventDefault();const S=m[0],w=v.currentTarget.value;if(S.type==="shortcut")return S.action({event:v,setOpen:e.onChangeVisibility,text:w})}}}})]}),e.loading?x.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:[x.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:r.commandPaletteLoading}),kN.map((v,b)=>x.jsx("li",{className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:sp},`${s}-${b}-skeleton-index`))]}):x.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[x.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[m.map((v,b)=>E.createElement(EN,{...f({onMouseEnter:()=>u(b),ref(S){n.current[b]=S},onClick(S){var w;S.preventDefault(),e.onChangeVisibility(!1),(w=d.refs.domReference.current)==null||w.focus(),v.type==="shortcut"&&v.action({event:S,setOpen:e.onChangeVisibility,text:o})}}),item:v,text:o,active:c===b,key:`${s}-${v.type}-${b}`})),m.length===1?x.jsx("div",{className:Ie("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Ve.number(c)?x.jsx(e.Preview,{command:m[c],text:o}):null]}),e.footer?x.jsx("footer",{className:"flex h-8 items-center rounded-b-lg bg-background p-2",children:e.footer}):null]})})},hi=e=>{const t=E.useId(),[n,r]=E.useState(e.open),o=E.useRef(null),i=E.useMemo(()=>[Sa(10),rp({fallbackAxisSideDirection:"end"}),np(),Aw({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Er({open:n,middleware:i,transform:!0,whileElementsMounted:di,onOpenChange:(h,g)=>{var y;const m=g==null?void 0:g.relatedTarget;m&&m.dataset.floating==="true"&&!h||(r(h),(y=e.onChange)==null||y.call(e,h))}}),c=Ea(l),u=ao(l),d=so(l,{role:"tooltip"}),{getReferenceProps:p,getFloatingProps:f}=Cr([c,u,d]);return x.jsxs(E.Fragment,{children:[x.jsx("button",{ref:a.setReference,...p(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(io,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(mi,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-2xl",ref:a.setFloating,style:s,"aria-labelledby":t,...f(),children:[x.jsx(Mw,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},PN=e=>{const t=E.useRef(null),n=E.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=E.useState(e.open??!1);E.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Er({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=Ea(s,{enabled:e.disabled??!0}),u=so(s,{role:"tooltip"}),d=ao(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:p,getReferenceProps:f}=Cr([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Mo,{...f(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:x.jsx(ft.span,{layoutId:o,children:e.trigger})}),x.jsx(xr,{children:i?x.jsx(io,{root:t,children:x.jsx(mi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:x.jsx(ft.div,{...p(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Gw=200,AN=500,Zw=(e="")=>Ie("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),vd=E.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Ev=E.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=E.useState(r??!1),[p,f]=E.useState(!1),[h,g]=E.useState(null),m=E.useRef([]),y=E.useRef([]),v=E.useContext(vd),b=Sr(),S=Tr(),w=Mj(),T=Ow(),C=b!==null,{floatingStyles:k,refs:I,context:A}=Er({nodeId:w,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:di,placement:C?"right":"bottom-start",middleware:[Sa({mainAxis:C?0:4,alignmentAxis:C?-4:0}),rp(),np()]}),O=so(A,{role:"menu"}),N=ao(A,{bubbles:!0}),V=Fw(A,{move:!1,enabled:n,delay:{open:Gw},handleClose:qw({blockPointerEvents:!0})}),P=Ea(A,{toggle:!C,event:"mousedown",ignoreMouse:C,keyboardHandlers:!0}),D=El(A,{loop:!0,activeIndex:h,nested:C,listRef:m,onNavigate:g}),_=iN(A,{activeIndex:h,listRef:y,resetMs:AN,onMatch:u?g:void 0}),{getReferenceProps:F,getFloatingProps:j,getItemProps:B}=Cr([V,P,O,N,D,_]);E.useEffect(()=>{if(!S)return;const z=()=>d(!1),Q=X=>{X.nodeId!==w&&X.parentId===b&&d(!1)};return S.events.on("click",z),S.events.on("menuopen",Q),()=>{S.events.off("click",z),S.events.off("menuopen",Q)}},[S,w,b]),E.useEffect(()=>{u&&S&&S.events.emit("menuopen",{parentId:b,nodeId:w})},[S,u,w,b]);const M=o?l.className:Ie(Zw(l.className));return x.jsxs(Dj,{id:w,children:[x.jsx(E.Fragment,{children:l.asChild?x.jsx(Bo,{...F(v.getItemProps({...l,onFocus(z){var Q;(Q=l.onFocus)==null||Q.call(l,z),f(!1),v.setHasFocusInside(!0)}})),children:s,className:M,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:qn(I.setReference,T.ref,c),tabIndex:C?v.activeIndex===T.index?0:-1:void 0}):x.jsxs("button",{type:"button",className:M,"data-open":u?"":void 0,"data-nested":C?"":void 0,role:C?"menuitem":void 0,"data-focus-inside":p?"":void 0,ref:qn(I.setReference,T.ref,c),tabIndex:C?v.activeIndex===T.index?0:-1:void 0,...F(v.getItemProps({...l,onFocus(z){var Q;(Q=l.onFocus)==null||Q.call(l,z),f(!1),v.setHasFocusInside(!0)}})),children:[s,C&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(If,{size:14})]})]})}),x.jsx(vd.Provider,{value:{activeIndex:h,setActiveIndex:g,getItemProps:B,setHasFocusInside:f,isOpen:u},children:x.jsx(Pj,{elementsRef:m,labelsRef:y,children:u&&x.jsx(io,{preserveTabOrder:!0,children:x.jsx(mi,{context:A,modal:!1,initialFocus:C?-1:0,returnFocus:o?i:!C,children:x.jsx(t,{...j(),ref:I.setFloating,style:{...l.style,...k},className:Ie("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",a),children:e})})})})})]})}),IN=E.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=E.useContext(vd),s=Ow({label:n?null:e}),l=Tr(),c=s.index===a.activeIndex;return x.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:qn(s.ref,i),className:Zw(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),a.setHasFocusInside(!0)}}),children:[r,t?x.jsx(t,{size:16}):null]})}),_N=E.forwardRef((e,t)=>Sr()!==null?x.jsx(Ev,{...e,isParent:!1,ref:t}):x.jsx(jj,{children:x.jsx(Ev,{...e,isParent:!0,ref:t})})),ON=e=>x.jsx(ft.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),cp=E.forwardRef(function({as:t,title:n,children:r,placement:o,open:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,followCursor:u=!1,onChange:d=$f,...p},f){const[h,g]=E.useState(i??!1),m=E.useRef(null),y=t||"span",v=P=>{g(P),d==null||d(P)},{refs:b,floatingStyles:S,context:w}=Er({open:h,placement:o,transform:!0,strategy:"absolute",whileElementsMounted:di,onOpenChange:i?void 0:v,middleware:[np(),Sa(5),rp({fallbackAxisSideDirection:"start"}),Aw({padding:5,element:m})]}),T=Fw(w,{move:!0,delay:{open:Gw},enabled:l?s:!1,handleClose:c?qw():null}),C=eN(w,{enabled:l?a:!1}),k=Ea(w,{enabled:l?c:!1}),I=ao(w,{enabled:l}),A=so(w,{role:"tooltip",enabled:l}),O=Zj(w,{enabled:!!l&&!!u}),{getReferenceProps:N,getFloatingProps:V}=Cr([A,I,O,a?C:void 0,s?T:void 0,c?k:void 0]);return E.useEffect(()=>g(i===void 0?!1:i),[i]),x.jsxs(E.Fragment,{children:[x.jsx(y,{...N(p),ref:qn(b.setReference,f),children:n}),h&&x.jsx(io,{preserveTabOrder:!0,children:x.jsxs(cn,{...V(),ref:b.setFloating,style:S,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(Mw,{ref:m,context:w,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),r]})})]})}),Cl=0,kr=1,gi=2,Xw=4;function Cv(e){return()=>e}function MN(e){e()}function ia(e,t){return n=>e(t(n))}function kv(e,t){return()=>e(t)}function Qw(e,t){return n=>e(t,n)}function up(e){return e!==void 0}function DN(...e){return()=>{e.map(MN)}}function vi(){}function kl(e,t){return t(e),e}function jN(e,t){return t(e)}function ut(...e){return e}function Qe(e,t){return e(kr,t)}function De(e,t){e(Cl,t)}function dp(e){e(gi)}function Lt(e){return e(Xw)}function we(e,t){return Qe(e,Qw(t,Cl))}function Fn(e,t){const n=e(kr,r=>{n(),t(r)});return n}function Rv(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Jw(e,t){return e===t}function lt(e=Jw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function pe(e){return t=>ia(t,e)}function kn(e){return t=>()=>{t(e)}}function ne(e,...t){const n=NN(...t);return(r,o)=>{switch(r){case gi:dp(e);return;case kr:return Qe(e,n(o))}}}function _n(e,t){return n=>r=>{n(t=e(t,r))}}function Yo(e){return t=>n=>{e>0?e--:t(n)}}function ur(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ne(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function NN(...e){return t=>e.reduceRight(jN,t)}function FN(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case kr:return i?n===i?void 0:(r(),n=i,t=Qe(e,i),t):(r(),vi);case gi:r(),n=null;return}}}function ae(e){let t=e;const n=Be();return(r,o)=>{switch(r){case Cl:t=o;break;case kr:{o(t);break}case Xw:return t}return n(r,o)}}function Vt(e,t){return kl(ae(t),n=>we(e,n))}function Be(){const e=[];return(t,n)=>{switch(t){case Cl:e.slice().forEach(r=>{r(n)});return;case gi:e.splice(0,e.length);return;case kr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function en(e){return kl(Be(),t=>we(e,t))}function Ke(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:LN(),singleton:n}}const LN=()=>Symbol();function VN(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function Rt(...e){const t=Be(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);Qe(i,l=>{n[a]=l,r=r|s,r===o&&De(t,n)})}),function(i,a){switch(i){case gi:{dp(t);return}case kr:return r===o&&a(n),Qe(t,a)}}}function Pe(e,t=Jw){return ne(e,lt(t))}function Pv(...e){return function(t,n){switch(t){case gi:return;case kr:return DN(...e.map(r=>Qe(r,n)))}}}var tn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(tn||{});const $N={0:"debug",3:"error",1:"log",2:"warn"},zN=()=>typeof globalThis>"u"?window:globalThis,Rr=Ke(()=>{const e=ae(3);return{log:ae((t,n,r=1)=>{var o;const i=(o=zN().VIRTUOSO_LOG_LEVEL)!=null?o:Lt(e);r>=i&&console[$N[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Ln(e,t,n){return fp(e,t,n).callbackRef}function fp(e,t,n){const r=E.useRef(null);let o=i=>{};if(typeof ResizeObserver<"u"){const i=E.useMemo(()=>new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}),[e]);o=a=>{a&&t?(i.observe(a),r.current=a):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function e1(e,t,n,r,o,i,a,s,l){const c=E.useCallback(u=>{const d=BN(u.children,t,s?"offsetWidth":"offsetHeight",o);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const f=p.lastElementChild.dataset.viewportType==="window";let h;f&&(h=p.ownerDocument.defaultView);const g=a?s?a.scrollLeft:a.scrollTop:f?s?h.scrollX||h.document.documentElement.scrollLeft:h.scrollY||h.document.documentElement.scrollTop:s?p.scrollLeft:p.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:f?s?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight:s?p.scrollWidth:p.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:f?s?h.innerWidth:h.innerHeight:s?p.offsetWidth:p.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:y}),i==null||i(s?Av("column-gap",getComputedStyle(u).columnGap,o):Av("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r]);return fp(c,n,l)}function BN(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},tn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function Av(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}function pp(e,t,n){const r=E.useRef(null),o=E.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,p;if(t){const f=t.getBoundingClientRect(),h=c.top-f.top;p=f.height-Math.max(0,h),d=h+t.scrollTop}else{const f=a.current.ownerDocument.defaultView;p=f.innerHeight-Math.max(0,c.top),d=c.top+f.scrollY}r.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=fp(o,!0,n),s=E.useCallback(()=>{o(a.current)},[o,a]);return E.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c==null||c.addEventListener("scroll",s),c==null||c.addEventListener("resize",s),()=>{c==null||c.removeEventListener("scroll",s),c==null||c.removeEventListener("resize",s)}}},[s,t]),i}const Wt=Ke(()=>{const e=Be(),t=Be(),n=ae(0),r=Be(),o=ae(0),i=Be(),a=Be(),s=ae(0),l=ae(0),c=ae(0),u=ae(0),d=Be(),p=Be(),f=ae(!1),h=ae(!1),g=ae(!1);return we(ne(e,pe(({scrollTop:m})=>m)),t),we(ne(e,pe(({scrollHeight:m})=>m)),a),we(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:h,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),aa={lvl:0};function t1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ot(e){return e===aa}function sa(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?sa(e.l,t):sa(e.r,t)}function Sn(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Sn(e.l,t,n)}function Jt(e,t,n){return ot(e)?o1(t,n,1):t===e.k?Ct(e,{k:t,v:n}):t<e.k?Iv(Ct(e,{l:Jt(e.l,t,n)})):Iv(Ct(e,{r:Jt(e.r,t,n)}))}function Ao(){return aa}function Rl(e,t,n){if(ot(e))return[];const r=Sn(e,t)[0];return HN(xd(e,r,n))}function yd(e,t){if(ot(e))return aa;const{k:n,l:r,r:o}=e;if(t===n){if(ot(r))return o;if(ot(o))return r;{const[i,a]=r1(r);return ls(Ct(e,{k:i,l:n1(r),v:a}))}}else return t<n?ls(Ct(e,{l:yd(r,t)})):ls(Ct(e,{r:yd(o,t)}))}function Hr(e){return ot(e)?[]:[...Hr(e.l),{k:e.k,v:e.v},...Hr(e.r)]}function xd(e,t,n){if(ot(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(xd(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(xd(i,t,n))),s}function ls(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(su(t))return i1(Ct(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return Ct(t.r,{l:Ct(t,{r:t.r.l}),lvl:n,r:Ct(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(su(e))return bd(Ct(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const o=r.l,i=su(o)?r.lvl-1:r.lvl;return Ct(o,{l:Ct(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:bd(Ct(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Ct(e,t){return o1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function n1(e){return ot(e.r)?e.l:ls(Ct(e,{r:n1(e.r)}))}function su(e){return ot(e)||e.lvl>e.r.lvl}function r1(e){return ot(e.r)?[e.k,e.v]:r1(e.r)}function o1(e,t,n,r=aa,o=aa){return{k:e,l:r,lvl:n,r:o,v:t}}function Iv(e){return bd(i1(e))}function i1(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Ct(t,{r:Ct(e,{l:t.r})}):e}function bd(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Ct(n,{l:Ct(e,{r:n.l}),lvl:t+1}):e}function HN(e){return t1(e,({k:t,v:n})=>({index:t,value:n}))}function a1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function la(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const mp=Ke(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function s1(e,t,n){return e[_s(e,t,n)]}function _s(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function WN(e,t,n,r){const o=_s(e,t,r),i=_s(e,n,r,o);return e.slice(o,i+1)}function Tn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Pl(e){return!ot(e.groupOffsetTree)}function hp({index:e},t){return t===e?0:t<e?-1:1}function qN(){return{groupIndices:[],groupOffsetTree:Ao(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Ao()}}function UN(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ot(e)){e=Jt(e,0,i);continue}const s=Rl(e,a-1,o+1);if(s.some(JN(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:p}of s)l?(o>=d||i===p)&&(e=yd(e,d)):(c=p!==i,l=!0),u>o&&o>=d&&p!==i&&(e=Jt(e,o+1,p));c&&(e=Jt(e,a,i))}return[e,n]}function KN(e){return typeof e.groupIndex<"u"}function YN({offset:e},t){return t===e?0:t<e?-1:1}function ca(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=s1(t,e,hp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function l1(e,t){if(!Pl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function c1(e,t,n){if(KN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=l1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function GN(e,t,n,r=0){return r>0&&(t=Math.max(t,s1(e,r,hp).offset)),t1(WN(e,t,n,YN),QN)}function ZN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,tn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ot(i)&&t.length===2){const p=t[0].size,f=t[1].size;a=n.reduce((h,g)=>Jt(Jt(h,g,p),g+1,f),a)}else[a,s]=UN(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=wd(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((p,f)=>Jt(p,f,ca(f,d,o)),Ao()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function XN(e){return Hr(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 _v(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 wd(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=_s(o,t-1,hp),s=o[l].offset;const c=Sn(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Rl(n,t,1/0)){const d=c-i,p=d*a+s+d*r;o.push({index:c,offset:p,size:u}),i=c,s=p,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function QN(e){return{index:e.index,value:e}}function JN(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 e2={offsetHeight:"height",offsetWidth:"width"},zn=Ke(([{log:e},{recalcInProgress:t}])=>{const n=Be(),r=Be(),o=Vt(r,0),i=Be(),a=Be(),s=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((w,T)=>Tn(w,e2[T])),p=ae(void 0),f=ae(0),h=qN(),g=Vt(ne(n,Ne(l,e,f),_n(ZN,h),lt()),h),m=Vt(ne(l,lt(),_n((w,T)=>({current:T,prev:w.current}),{current:[],prev:[]}),pe(({prev:w})=>w)),[]);we(ne(l,Ce(w=>w.length>0),Ne(g,f),pe(([w,T,C])=>{const k=w.reduce((I,A,O)=>Jt(I,A,ca(A,T.offsetTree,C)||O),Ao());return{...T,groupIndices:w,groupOffsetTree:k}})),g),we(ne(r,Ne(g),Ce(([w,{lastIndex:T}])=>w<T),pe(([w,{lastIndex:T,lastSize:C}])=>[{endIndex:T,size:C,startIndex:w}])),n),we(c,u);const y=Vt(ne(c,pe(w=>w===void 0)),!0);we(ne(u,Ce(w=>w!==void 0&&ot(Lt(g).sizeTree)),pe(w=>[{endIndex:0,size:w,startIndex:0}])),n);const v=en(ne(n,Ne(g),_n(({sizes:w},[T,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:h}),pe(w=>w.changed)));Qe(ne(s,_n((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),pe(w=>w.diff)),w=>{const{groupIndices:T}=Lt(g);if(w>0)De(t,!0),De(i,w+_v(w,T));else if(w<0){const C=Lt(m);C.length>0&&(w-=_v(-w,C)),De(a,w)}}),Qe(ne(s,Ne(e)),([w,T])=>{w<0&&T("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},tn.ERROR)});const b=en(i);we(ne(i,Ne(g),pe(([w,T])=>{const C=T.groupIndices.length>0,k=[],I=T.lastSize;if(C){const A=sa(T.sizeTree,0);let O=0,N=0;for(;O<w;){const P=T.groupIndices[N],D=T.groupIndices.length===N+1?1/0:T.groupIndices[N+1]-P-1;k.push({endIndex:P,size:A,startIndex:P}),k.push({endIndex:P+1+D-1,size:I,startIndex:P+1}),N++,O+=D+1}const V=Hr(T.sizeTree);return O!==w&&V.shift(),V.reduce((P,{k:D,v:_})=>{let F=P.ranges;return P.prevSize!==0&&(F=[...P.ranges,{endIndex:D+w-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:D+w,prevSize:_,ranges:F}},{prevIndex:w,prevSize:0,ranges:k}).ranges}return Hr(T.sizeTree).reduce((A,{k:O,v:N})=>({prevIndex:O+w,prevSize:N,ranges:[...A.ranges,{endIndex:O+w-1,size:A.prevSize,startIndex:A.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const S=en(ne(a,Ne(g,f),pe(([w,{offsetTree:T},C])=>{const k=-w;return ca(k,T,C)})));return we(ne(a,Ne(g,f),pe(([w,T,C])=>{if(T.groupIndices.length>0){if(ot(T.sizeTree))return T;let k=Ao();const I=Lt(m);let A=0,O=0,N=0;for(;A<-w;){N=I[O];const V=I[O+1]-N-1;O++,A+=V+1}if(k=Hr(T.sizeTree).reduce((V,{k:P,v:D})=>Jt(V,Math.max(0,P+w),D),k),A!==-w){const V=sa(T.sizeTree,N);k=Jt(k,0,V);const P=Sn(T.sizeTree,-w+1)[1];k=Jt(k,1,P)}return{...T,sizeTree:k,...wd(T.offsetTree,0,k,C)}}else{const k=Hr(T.sizeTree).reduce((I,{k:A,v:O})=>Jt(I,Math.max(0,A+w),O),Ao());return{...T,sizeTree:k,...wd(T.offsetTree,0,k,C)}}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,gap:f,groupIndices:l,itemSize:d,listRefresh:v,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:g,statefulTotalCount:o,totalCount:r,trackItemSizes:y,unshiftWith:i}},ut(Rr,mp),{singleton:!0});function t2(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const u1=Ke(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Be(),a=Be(),s=en(ne(i,pe(t2)));return we(ne(s,pe(l=>l.totalCount)),n),we(ne(s,pe(l=>l.groupIndices)),e),we(ne(Rt(o,t,r),Ce(([l,c])=>Pl(c)),pe(([l,c,u])=>Sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),lt(),pe(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ut(zn,Wt)),Pr=Ke(([{log:e}])=>{const t=ae(!1),n=en(ne(t,Ce(r=>r),lt()));return Qe(t,r=>{r&&Lt(e)("props updated",{},tn.DEBUG)}),{didMount:n,propsReady:t}},ut(Rr),{singleton:!0}),n2=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function d1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!n2)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ca=Ke(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const f=Be(),h=Be(),g=ae(0);let m=null,y=null,v=null;function b(){m&&(m(),m=null),v&&(v(),v=null),y&&(clearTimeout(y),y=null),De(l,!1)}return we(ne(f,Ne(n,d,r,g,s,a,p),Ne(e,i,o),pe(([[S,w,T,C,k,I,A,O],N,V,P])=>{const D=d1(S),{align:_,behavior:F,offset:j}=D,B=C-1,M=c1(D,w,B);let z=ca(M,w.offsetTree,N)+I;_==="end"?(z+=V+Sn(w.sizeTree,M)[1]-T+P,M===B&&(z+=A)):_==="center"?z+=(V+Sn(w.sizeTree,M)[1]-T+P)/2:z-=k,j&&(z+=j);const Q=X=>{b(),X?(O("retrying to scroll to",{location:S},tn.DEBUG),De(f,S)):(De(h,!0),O("list did not change, scroll successful",{},tn.DEBUG))};if(b(),F==="smooth"){let X=!1;v=Qe(t,J=>{X=X||J}),m=Fn(u,()=>{Q(X)})}else m=Fn(ne(t,r2(150)),Q);return y=setTimeout(()=>{b()},1200),De(l,!0),O("scrolling from index to",{behavior:F,index:M,top:z},tn.DEBUG),{behavior:F,top:z}})),c),{scrollTargetReached:h,scrollToIndex:f,topListHeight:g}},ut(zn,Wt,Rr),{singleton:!0});function r2(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function gp(e,t){e==0?t():requestAnimationFrame(()=>{gp(e-1,t)})}function vp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ka=Ke(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=ae(!0),l=ae(0),c=ae(!0);return we(ne(a,Ne(l),Ce(([u,d])=>!!d),kn(!1)),s),we(ne(a,Ne(l),Ce(([u,d])=>!!d),kn(!1)),c),Qe(ne(Rt(t,a),Ne(s,n,e,c),Ce(([[,u],d,{sizeTree:p},f,h])=>u&&(!ot(p)||up(f))&&!d&&!h),Ne(l)),([,u])=>{Fn(o,()=>{De(c,!0)}),gp(4,()=>{Fn(r,()=>{De(s,!0)}),De(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ut(zn,Wt,Ca,Pr),{singleton:!0});function f1(e,t){return Math.abs(e-t)<1.01}const ua="up",Hi="down",o2="none",i2={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},a2=0,Ra=Ke(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=ae(!1),s=ae(!0),l=Be(),c=Be(),u=ae(4),d=ae(a2),p=Vt(ne(Pv(ne(Pe(o),Yo(1),kn(!0)),ne(Pe(o),Yo(1),kn(!1),Rv(100))),lt()),!1),f=Vt(ne(Pv(ne(n,kn(!0)),ne(n,kn(!1),Rv(200))),lt()),!1);we(ne(Rt(Pe(o),Pe(d)),pe(([v,b])=>v<=b),lt()),s),we(ne(s,ur(50)),c);const h=en(ne(Rt(r,Pe(i),Pe(t),Pe(e),Pe(u)),_n((v,[{scrollHeight:b,scrollTop:S},w,T,C,k])=>{const I=S+w-b>-k,A={scrollHeight:b,scrollTop:S,viewportHeight:w};if(I){let N,V;return S>v.state.scrollTop?(N="SCROLLED_DOWN",V=v.state.scrollTop-S):(N="SIZE_DECREASED",V=v.state.scrollTop-S||v.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:V,state:A}}let O;return A.scrollHeight>v.state.scrollHeight?O="SIZE_INCREASED":w<v.state.viewportHeight?O="VIEWPORT_HEIGHT_DECREASING":S<v.state.scrollTop?O="SCROLLING_UPWARDS":O="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:O,state:A}},i2),lt((v,b)=>v&&v.atBottom===b.atBottom))),g=Vt(ne(r,_n((v,{scrollHeight:b,scrollTop:S,viewportHeight:w})=>{if(f1(v.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:S};{const T=b-(S+w)<1;return v.scrollTop!==S&&T?{changed:!0,jump:v.scrollTop-S,scrollHeight:b,scrollTop:S}:{changed:!0,jump:0,scrollHeight:b,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ce(v=>v.changed),pe(v=>v.jump)),0);we(ne(h,pe(v=>v.atBottom)),a),we(ne(a,ur(50)),l);const m=ae(Hi);we(ne(r,pe(({scrollTop:v})=>v),lt(),_n((v,b)=>Lt(f)?{direction:v.direction,prevScrollTop:b}:{direction:b<v.prevScrollTop?ua:Hi,prevScrollTop:b},{direction:Hi,prevScrollTop:0}),pe(v=>v.direction)),m),we(ne(r,ur(50),kn(o2)),m);const y=ae(0);return we(ne(p,Ce(v=>!v),kn(0)),y),we(ne(o,ur(100),Ne(p),Ce(([v,b])=>!!b),_n(([v,b],[S])=>[b,S],[0,0]),pe(([v,b])=>b-v)),y),{atBottomState:h,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:y}},ut(Wt)),Os="top",Ms="bottom",Ov="none";function Mv(e,t,n){return typeof e=="number"?n===ua&&t===Os||n===Hi&&t===Ms?e:0:n===ua?t===Os?e.main:e.reverse:t===Ms?e.main:e.reverse}function Dv(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const yp=Ke(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Be(),a=ae(0),s=ae(0),l=ae(0),c=Vt(ne(Rt(Pe(r),Pe(o),Pe(n),Pe(i,la),Pe(l),Pe(a),Pe(t),Pe(e),Pe(s)),pe(([u,d,p,[f,h],g,m,y,v,b])=>{const S=u-v,w=m+y,T=Math.max(p-S,0);let C=Ov;const k=Dv(b,Os),I=Dv(b,Ms);return f-=v,f+=p+y,h+=p+y,h-=v,f>u+w-k&&(C=ua),h<u-T+d+I&&(C=Hi),C!==Ov?[Math.max(S-p-Mv(g,Os,C)-k,0),S-T-y+d+Mv(g,Ms,C)+I]:null}),Ce(u=>u!=null),lt(la)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},ut(Wt),{singleton:!0});function s2(e,t,n){if(Pl(t)){const r=l1(e,t);return[{index:Sn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const lu={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function cs(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-a,p=s+d*l+(d-1)*r,f=c,h=p-u;return{bottom:u,firstItemIndex:i,items:jv(e,o,i),offsetBottom:h,offsetTop:c,top:f,topItems:jv(t,o,i),topListHeight:t.reduce((g,m)=>m.size+g,0),totalCount:n}}function p1(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=vp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return cs(c,[],s,o,n,r)}function jv(e,t,n){if(e.length===0)return[];if(!Pl(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=Rl(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}const lo=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:f},{recalcInProgress:h}])=>{const g=ae([]),m=ae(0),y=Be();we(i.topItemsIndexes,g);const v=Vt(ne(Rt(f,h,Pe(l,la),Pe(o),Pe(r),Pe(c),u,Pe(g),Pe(t),Pe(n),e),Ce(([T,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return T&&!C&&!A}),pe(([,,[T,C],k,I,A,O,N,V,P,D])=>{const _=I,{offsetTree:F,sizeTree:j}=_,B=Lt(m);if(k===0)return{...lu,totalCount:k};if(T===0&&C===0)return B===0?{...lu,totalCount:k}:p1(B,A,I,V,P,D||[]);if(ot(j))return B>0?null:cs(s2(vp(A,k),_,D),[],k,P,_,V);const M=[];if(N.length>0){const Z=N[0],Y=N[N.length-1];let G=0;for(const L of Rl(j,Z,Y)){const $=L.value,K=Math.max(L.start,Z),ie=Math.min(L.end,Y);for(let H=K;H<=ie;H++)M.push({data:D==null?void 0:D[H],index:H,offset:G,size:$}),G+=$}}if(!O)return cs([],M,k,P,_,V);const z=N.length>0?N[N.length-1]+1:0,Q=GN(F,T,C,z);if(Q.length===0)return null;const X=k-1,J=kl([],Z=>{for(const Y of Q){const G=Y.value;let L=G.offset,$=Y.start;const K=G.size;if(G.offset<T){$+=Math.floor((T-G.offset+P)/(K+P));const H=$-Y.start;L+=H*K+H*P}$<z&&(L+=(z-$)*K,$=z);const ie=Math.min(Y.end,X);for(let H=$;H<=ie&&!(L>=C);H++)Z.push({data:D==null?void 0:D[H],index:H,offset:L,size:K}),L+=K+P}});return cs(J,M,k,P,_,V)}),Ce(T=>T!==null),lt()),lu);we(ne(e,Ce(up),pe(T=>T==null?void 0:T.length)),o),we(ne(v,pe(T=>T.topListHeight)),d),we(d,s),we(ne(v,pe(T=>[T.top,T.bottom])),a),we(ne(v,pe(T=>T.items)),y);const b=en(ne(v,Ce(({items:T})=>T.length>0),Ne(o,e),Ce(([{items:T},C])=>T[T.length-1].originalIndex===C-1),pe(([,T,C])=>[T-1,C]),lt(la),pe(([T])=>T))),S=en(ne(v,ur(200),Ce(({items:T,topItems:C})=>T.length>0&&T[0].originalIndex===C.length),pe(({items:T})=>T[0].index),lt())),w=en(ne(v,Ce(({items:T})=>T.length>0),pe(({items:T})=>{let C=0,k=T.length-1;for(;T[C].type==="group"&&C<k;)C++;for(;T[k].type==="group"&&k>C;)k--;return{endIndex:T[k].index,startIndex:T[C].index}}),lt(a1)));return{endReached:b,initialItemCount:m,itemsRendered:y,listState:v,rangeChanged:w,startReached:S,topItemsIndexes:g,...p}},ut(zn,u1,yp,ka,Ca,Ra,Pr,mp),{singleton:!0}),m1=Ke(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Be(),a=Vt(ne(Rt(n,e,r,t,o),pe(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return we(Pe(a),i),{totalListHeight:a,totalListHeightChanged:i}},ut(Wt,lo),{singleton:!0}),l2=Ke(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),r=Vt(ne(Rt(n,e,t),Ce(([o])=>o),pe(([,o,i])=>Math.max(0,o-i)),ur(0),lt()),0);return{alignToBottom:n,paddingTopAddition:r}},ut(Wt,m1),{singleton:!0});function Nv(e){return e?e==="smooth"?"smooth":"auto":!1}const c2=(e,t)=>typeof e=="function"?Nv(e(t)):t&&Nv(e),u2=Ke(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:c}])=>{const u=ae(!1),d=Be();let p=null;function f(g){De(o,{align:"end",behavior:g,index:"LAST"})}Qe(ne(Rt(ne(Pe(t),Yo(1)),a),Ne(Pe(u),r,i,c),pe(([[g,m],y,v,b,S])=>{let w=m&&b,T="auto";return w&&(T=c2(y,v||S),w=w&&!!T),{followOutputBehavior:T,shouldFollow:w,totalCount:g}}),Ce(({shouldFollow:g})=>g)),({followOutputBehavior:g,totalCount:m})=>{p&&(p(),p=null),p=Fn(e,()=>{Lt(l)("following output to ",{totalCount:m},tn.DEBUG),f(g),p=null})});function h(g){const m=Fn(n,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!p&&(Lt(l)("scrolling to bottom due to increased size",{},tn.DEBUG),f("auto"))});setTimeout(m,100)}return Qe(ne(Rt(Pe(u),t,s),Ce(([g,,m])=>g&&m),_n(({value:g},[,m])=>({refreshed:g===m,value:m}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),Ne(u,t)),([,g])=>{Lt(i)&&h(g!==!1)}),Qe(d,()=>{h(Lt(u)!==!1)}),Qe(Rt(Pe(u),n),([g,m])=>{g&&!m.atBottom&&m.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{autoscrollToBottom:d,followOutput:u}},ut(zn,Ra,Ca,ka,Pr,Rr,Wt)),d2=Ke(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(we(ne(s,Ne(i),Ce(([,l])=>l!==0),Ne(o,r,t,n,e),pe(([[,l],c,u,d,p,f=[]])=>p1(l,c,u,d,p,f))),a),{}),ut(zn,ka,lo,Pr),{singleton:!0}),f2=Ke(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ae(0);return Qe(ne(e,Ne(r),Ce(([,o])=>o!==0),pe(([,o])=>({top:o}))),o=>{Fn(ne(n,Yo(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{De(t,o)})})}),{initialScrollTop:r}},ut(Pr,Wt,lo),{singleton:!0}),p2=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,m2=Ke(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Be();return we(ne(u,Ne(t,l,n,i,o,r,s),Ne(e),pe(([[d,p,f,h,g,m,y,v],b])=>{const{align:S,behavior:w,calculateViewLocation:T=p2,done:C,...k}=d,I=c1(d,p,h-1),A=ca(I,p.offsetTree,b)+g+m,O=A+Sn(p.sizeTree,I)[1],N=v+m,V=v+f-y,P=T({itemBottom:O,itemTop:A,locationParams:{align:S,behavior:w,...k},viewportBottom:V,viewportTop:N});return P?C&&Fn(ne(a,Ce(D=>!D),Yo(Lt(a)?1:2)),C):C&&C(),P}),Ce(d=>d!==null)),c),{scrollIntoView:u}},ut(zn,Wt,Ca,lo,Rr),{singleton:!0}),h1=Ke(([{scrollVelocity:e}])=>{const t=ae(!1),n=Be(),r=ae(!1);return we(ne(e,Ne(r,t,n),Ce(([o,i])=>!!i),pe(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),lt()),t),Qe(ne(Rt(t,e,n),Ne(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},ut(Ra),{singleton:!0}),xp=Ke(([{scrollContainerState:e,scrollTo:t}])=>{const n=Be(),r=Be(),o=Be(),i=ae(!1),a=ae(void 0);return we(ne(Rt(n,r),pe(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),we(ne(t,Ne(r),pe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},ut(Wt)),h2=Ke(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Be(),u=ae(void 0),d=ae(null),p=ae(null);return we(s,d),we(l,p),Qe(ne(c,Ne(t,r,a,d,p,n)),([f,h,g,m,y,v,b])=>{const S=XN(h.sizeTree);m&&y!==null&&v!==null&&(g=y.scrollTop-v.offsetTop),g-=b,f({ranges:S,scrollTop:g})}),we(ne(u,Ce(up),pe(g2)),o),we(ne(i,Ne(u),Ce(([,f])=>f!==void 0),lt(),pe(([,f])=>f.ranges)),e),{getState:c,restoreStateFrom:u}},ut(zn,Wt,ka,Pr,xp));function g2(e){return{align:"start",index:0,offset:e.scrollTop}}const v2=Ke(([{topItemsIndexes:e}])=>{const t=ae(0);return we(ne(t,Ce(n=>n>=0),pe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},ut(lo));function g1(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const y2=g1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),x2=Ke(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:h}])=>{const g=en(ne(l,Ne(a),_n(([,y,v,b],[{bottom:S,items:w,offsetBottom:T,totalCount:C},k])=>{const I=S+T;let A=0;return v===C&&y.length>0&&w.length>0&&(w[0].originalIndex===0&&y[0].originalIndex===0||(A=I-b,A!==0&&(A+=k))),[A,w,C,I]},[0,[],0,0]),Ce(([y])=>y!==0),Ne(r,s,n,o,f,h),Ce(([,y,v,b,,,S])=>!S&&!b&&y!==0&&v===ua),pe(([[y],,,,,v])=>(v("Upward scrolling compensation",{amount:y},tn.DEBUG),y))));function m(y){y>0?(De(t,{behavior:"auto",top:-y}),De(e,0)):(De(e,0),De(t,{behavior:"auto",top:-y}))}return Qe(ne(g,Ne(e,i)),([y,v,b])=>{b&&y2()?De(e,v-y):m(-y)}),Qe(ne(Rt(Vt(i,!1),e,h),Ce(([y,v,b])=>!y&&!b&&v!==0),pe(([y,v])=>v),ur(1)),m),we(ne(d,pe(y=>({top:-y}))),t),Qe(ne(c,Ne(p,u),pe(([y,{groupIndices:v,lastSize:b,sizeTree:S},w])=>{function T(C){return C*(b+w)}if(v.length===0)return T(y);{let C=0;const k=sa(S,0);let I=0,A=0;for(;I<y;){I++,C+=k;let O=v.length===A+1?1/0:v[A+1]-v[A]-1;I+O>y&&(C-=k,O=y-I+1),I+=O,C+=T(O),A++}return C}})),y=>{De(e,y),requestAnimationFrame(()=>{De(t,{top:y}),requestAnimationFrame(()=>{De(e,0),De(h,!1)})})}),{deviation:e}},ut(Wt,Ra,lo,zn,Rr,mp)),b2=Ke(([e,t,n,r,o,i,a,s,l,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c}),ut(yp,d2,Pr,h1,m1,f2,l2,xp,m2,Rr)),v1=Ke(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:c,totalCount:u,trackItemSizes:d},{initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h},g,m,y,{listState:v,topItemsIndexes:b,...S},{scrollToIndex:w},T,{topItemCount:C},{groupCounts:k},I])=>(we(S.rangeChanged,I.scrollSeekRangeChanged),we(ne(I.windowViewportRect,pe(A=>A.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:p,initialTopMostItemIndex:f,scrolledToInitialItem:h,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:u,...y,groupIndices:i,itemSize:a,listState:v,scrollToIndex:w,statefulTotalCount:c,trackItemSizes:d,...S,...I,...g,sizes:l,...m}),ut(zn,ka,Wt,h2,u2,lo,Ca,x2,v2,u1,b2));function w2(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const Ya=typeof document<"u"?E.useLayoutEffect:E.useEffect;function bp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=E.createContext({});function l(m,y){m.propsReady&&De(m.propsReady,!1);for(const v of r){const b=m[t.required[v]];De(b,y[v])}for(const v of o)if(v in y){const b=m[t.optional[v]];De(b,y[v])}m.propsReady&&De(m.propsReady,!0)}function c(m){return i.reduce((y,v)=>(y[v]=b=>{const S=m[t.methods[v]];De(S,b)},y),{})}function u(m){return a.reduce((y,v)=>(y[v]=FN(m[t.events[v]]),y),{})}const d=E.forwardRef((m,y)=>{const{children:v,...b}=m,[S]=E.useState(()=>kl(VN(e),C=>{l(C,b)})),[w]=E.useState(kv(u,S));Ya(()=>{for(const C of a)C in b&&Qe(w[C],b[C]);return()=>{Object.values(w).map(dp)}},[b,w,S]),Ya(()=>{l(S,b)}),E.useImperativeHandle(y,Cv(c(S)));const T=n;return x.jsx(s.Provider,{value:S,children:n?x.jsx(T,{...w2([...r,...o,...a],b),children:v}):v})}),p=m=>E.useCallback(Qw(De,E.useContext(s)[m]),[m]),f=m=>{const y=E.useContext(s)[m],v=E.useCallback(b=>Qe(y,b),[y]);return E.useSyncExternalStore(v,()=>Lt(y),()=>Lt(y))},h=m=>{const y=E.useContext(s)[m],[v,b]=E.useState(kv(Lt,y));return Ya(()=>Qe(y,S=>{S!==v&&b(Cv(S))}),[y,v]),v},g=E.version.startsWith("18")?f:h;return{Component:d,useEmitter:(m,y)=>{const v=E.useContext(s)[m];Ya(()=>Qe(v,y),[y,v])},useEmitterValue:g,usePublisher:p}}const Al=E.createContext(void 0),y1=E.createContext(void 0),x1=typeof document<"u"?E.useLayoutEffect:E.useEffect;function cu(e){return"self"in e}function S2(e){return"body"in e}function b1(e,t,n,r=vi,o,i){const a=E.useRef(null),s=E.useRef(null),l=E.useRef(null),c=E.useCallback(p=>{let f,h,g;const m=p.target;if(S2(m)||cu(m)){const v=cu(m)?m:m.defaultView;g=i?v.scrollX:v.scrollY,f=i?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight,h=i?v.innerWidth:v.innerHeight}else g=i?m.scrollLeft:m.scrollTop,f=i?m.scrollWidth:m.scrollHeight,h=i?m.offsetWidth:m.offsetHeight;const y=()=>{e({scrollHeight:f,scrollTop:Math.max(g,0),viewportHeight:h})};p.suppressFlushSync?y():ha.flushSync(y),s.current!==null&&(g===s.current||g<=0||g===f-h)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);E.useEffect(()=>{const p=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",c,{passive:!0}),()=>{r(null),p.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(p){const f=a.current;if(!f||(i?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const h=p.behavior==="smooth";let g,m,y;cu(f)?(m=Math.max(Tn(f.document.documentElement,i?"width":"height"),i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),g=i?f.innerWidth:f.innerHeight,y=i?window.scrollX:window.scrollY):(m=f[i?"scrollWidth":"scrollHeight"],g=Tn(f,i?"width":"height"),y=f[i?"scrollLeft":"scrollTop"]);const v=m-g;if(p.top=Math.ceil(Math.max(Math.min(v,p.top),0)),f1(g,m)||p.top===y){e({scrollHeight:m,scrollTop:y,viewportHeight:g}),h&&t(!0);return}h?(s.current=p.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(p={behavior:p.behavior,left:p.top}),f.scrollTo(p)}function d(p){i&&(p={behavior:p.behavior,left:p.top}),a.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const uu="-webkit-sticky",Fv="sticky",w1=g1(()=>{if(typeof document>"u")return Fv;const e=document.createElement("div");return e.style.position=uu,e.style.position===uu?uu:Fv});function wp(e){return e}const T2=Ke(()=>{const e=ae(l=>`Item ${l}`),t=ae(null),n=ae(l=>`Group ${l}`),r=ae({}),o=ae(wp),i=ae("div"),a=ae(vi),s=(l,c=null)=>Vt(ne(r,pe(u=>u[l]),lt()),c);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),E2=Ke(([e,t])=>({...e,...t}),ut(v1,T2)),C2=({height:e})=>x.jsx("div",{style:{height:e}}),k2={overflowAnchor:"none",position:w1(),zIndex:1},S1={overflowAnchor:"none"},R2={...S1,display:"inline-block",height:"100%"},Lv=E.memo(function({showTopList:e=!1}){const t=Ae("listState"),n=sn("sizeRanges"),r=Ae("useWindowScroll"),o=Ae("customScrollParent"),i=sn("windowScrollContainerState"),a=sn("scrollContainerState"),s=o||r?i:a,l=Ae("itemContent"),c=Ae("context"),u=Ae("groupContent"),d=Ae("trackItemSizes"),p=Ae("itemSize"),f=Ae("log"),h=sn("gap"),g=Ae("horizontalDirection"),{callbackRef:m}=e1(n,p,d,e?vi:s,f,h,o,g,Ae("skipAnimationFrameInResizeObserver")),[y,v]=E.useState(0);Ep("deviation",P=>{y!==P&&v(P)});const b=Ae("EmptyPlaceholder"),S=Ae("ScrollSeekPlaceholder")||C2,w=Ae("ListComponent"),T=Ae("ItemComponent"),C=Ae("GroupComponent"),k=Ae("computeItemKey"),I=Ae("isSeeking"),A=Ae("groupIndices").length>0,O=Ae("alignToBottom"),N=Ae("initialItemFinalLocationReached"),V=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:y!==0?y:O?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:O?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?x.jsx(b,{...ct(b,c)}):x.jsx(w,{...ct(w,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:V,children:(e?t.topItems:t.items).map(P=>{const D=P.originalIndex,_=k(D+t.firstItemIndex,P.data,c);return I?E.createElement(S,{...ct(S,c),height:P.size,index:P.index,key:_,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?E.createElement(C,{...ct(C,c),"data-index":D,"data-item-index":P.index,"data-known-size":P.size,key:_,style:k2},u(P.index,c)):E.createElement(T,{...ct(T,c),...T1(T,P.data),"data-index":D,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:_,style:g?R2:S1},A?l(P.index,P.groupIndex,P.data,c):l(P.index,P.data,c))})})}),P2={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},A2={outline:"none",overflowX:"auto",position:"relative"},yi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),I2={position:w1(),top:0,width:"100%",zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function T1(e,t){return{item:typeof e=="string"?void 0:t}}const _2=E.memo(function(){const e=Ae("HeaderComponent"),t=sn("headerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),O2=E.memo(function(){const e=Ae("FooterComponent"),t=sn("footerHeight"),n=Ae("HeaderFooterTag"),r=Ln(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,Ae("skipAnimationFrameInResizeObserver")),o=Ae("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null});function Sp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("scrollerRef"),u=t("context"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:h}=b1(a,l,s,c,void 0,d);return e("scrollTo",h),e("scrollBy",p),x.jsx(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...d?A2:P2,...o},tabIndex:0,...i,...ct(s,u),children:r})})}function Tp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return E.memo(function({children:r,style:o,...i}){const a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),c=t("totalListHeight"),u=t("deviation"),d=t("customScrollParent"),p=t("context"),f=E.useRef(null),h=t("scrollerRef"),{scrollByCallback:g,scrollerRef:m,scrollToCallback:y}=b1(a,l,s,h,d);return x1(()=>{var v;return m.current=d||((v=f.current)==null?void 0:v.ownerDocument.defaultView),()=>{m.current=null}},[m,d]),e("windowScrollTo",y),e("scrollBy",g),x.jsx(s,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...c!==0?{height:c+u}:{}},...i,...ct(s,p),children:r})})}const M2=({children:e})=>{const t=E.useContext(Al),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=Ae("alignToBottom"),i=Ae("horizontalDirection"),a=E.useMemo(()=>ia(n,l=>Tn(l,i?"width":"height")),[n,i]),s=Ln(a,!0,Ae("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:s,style:yi(o),children:e})},D2=({children:e})=>{const t=E.useContext(Al),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Ae("customScrollParent"),i=pp(n,o,Ae("skipAnimationFrameInResizeObserver")),a=Ae("alignToBottom");return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(a),children:e})},j2=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...I2,marginTop:`${n}px`},o=Ae("context");return x.jsx(t,{style:r,...ct(t,o),children:e})},N2=E.memo(function(e){const t=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,r=Ae("customScrollParent"),o=Ae("context"),i=r||t?V2:L2,a=r||t?D2:M2;return x.jsxs(i,{...e,...ct(i,o),children:[n&&x.jsx(j2,{children:x.jsx(Lv,{showTopList:!0})}),x.jsxs(a,{children:[x.jsx(_2,{}),x.jsx(Lv,{}),x.jsx(O2,{})]})]})}),{Component:F2,useEmitter:Ep,useEmitterValue:Ae,usePublisher:sn}=bp(E2,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},N2),L2=Sp({useEmitter:Ep,useEmitterValue:Ae,usePublisher:sn}),V2=Tp({useEmitter:Ep,useEmitterValue:Ae,usePublisher:sn}),Cp=F2,$2=Ke(()=>{const e=ae(l=>x.jsxs("td",{children:["Item $",l]})),t=ae(null),n=ae(null),r=ae(null),o=ae({}),i=ae(wp),a=ae(vi),s=(l,c=null)=>Vt(ne(o,pe(u=>u[l]),lt()),c);return{components:o,computeItemKey:i,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),z2=Ke(([e,t])=>({...e,...t}),ut(v1,$2)),B2=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{height:e}})}),H2=({height:e})=>x.jsx("tr",{children:x.jsx("td",{style:{border:0,height:e,padding:0}})}),W2={overflowAnchor:"none"},Vv=E.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("isSeeking"),i=je("ScrollSeekPlaceholder")||B2,a=je("context"),s=je("TableRowComponent"),l=je("fixedHeaderHeight"),c=je("itemContent"),u=(e?t.topItems:[]).reduce((p,f,h)=>(h===0?p.push(f.size):p.push(p[h-1]+f.size),p),[]),d=(e?t.topItems:t.items).map(p=>{const f=p.originalIndex,h=n(f+r,p.data,a),g=e?f===0?0:u[f-1]:0;return o?E.createElement(i,{...ct(i,a),height:p.size,index:p.index,key:h,type:p.type||"item"}):E.createElement(s,{...ct(s,a),...T1(s,p.data),"data-index":f,"data-item-index":p.index,"data-known-size":p.size,key:h,style:e?{overflowAnchor:"none",position:"sticky",top:l+g,zIndex:2}:W2},c(p.index,p.data,a))});return x.jsx(x.Fragment,{children:d})}),q2=E.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=bn("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=bn("windowScrollContainerState"),a=bn("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:p}=e1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[f,h]=E.useState(0);kp("deviation",A=>{f!==A&&(p.current.style.marginTop=`${A}px`,h(A))});const g=je("EmptyPlaceholder"),m=je("FillerRow")||H2,y=je("TableBodyComponent"),v=je("paddingTopAddition"),b=je("statefulTotalCount"),S=je("context");if(b===0&&g)return x.jsx(g,{...ct(g,S)});const w=(t?e.topItems:[]).reduce((A,O)=>A+O.size,0),T=e.offsetTop+v+f-w,C=e.offsetBottom,k=T>0?x.jsx(m,{context:S,height:T},"padding-top"):null,I=C>0?x.jsx(m,{context:S,height:C},"padding-bottom"):null;return x.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...ct(y,S),children:[k,t&&x.jsx(Vv,{showTopList:!0}),x.jsx(Vv,{}),I]})}),U2=({children:e})=>{const t=E.useContext(Al),n=bn("viewportHeight"),r=bn("fixedItemHeight"),o=Ln(E.useMemo(()=>ia(n,i=>Tn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.jsx("div",{"data-viewport-type":"element",ref:o,style:yi(!1),children:e})},K2=({children:e})=>{const t=E.useContext(Al),n=bn("windowViewportRect"),r=bn("fixedItemHeight"),o=je("customScrollParent"),i=pp(n,o,je("skipAnimationFrameInResizeObserver"));return E.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.jsx("div",{"data-viewport-type":"window",ref:i,style:yi(!1),children:e})},Y2=E.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=bn("fixedHeaderHeight"),o=bn("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Ln(E.useMemo(()=>ia(r,y=>Tn(y,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Ln(E.useMemo(()=>ia(o,y=>Tn(y,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?X2:Z2,d=n||t?K2:U2,p=je("TableComponent"),f=je("TableHeadComponent"),h=je("TableFooterComponent"),g=i?x.jsx(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...ct(f,s),children:i()},"TableHead"):null,m=a?x.jsx(h,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...ct(h,s),children:a()},"TableFoot"):null;return x.jsx(u,{...e,...ct(u,s),children:x.jsx(d,{children:x.jsxs(p,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(p,s),children:[g,x.jsx(q2,{},"TableBody"),m]})})})}),{Component:G2,useEmitter:kp,useEmitterValue:je,usePublisher:bn}=bp(z2,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},Y2),Z2=Sp({useEmitter:kp,useEmitterValue:je,usePublisher:bn}),X2=Tp({useEmitter:kp,useEmitterValue:je,usePublisher:bn}),Q2=G2,$v={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},J2={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:zv,floor:Ds,max:Wi,min:du,round:Bv}=Math;function Hv(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function eF(e){return{...J2,items:e}}function Ga(e,t){return e&&e.width===t.width&&e.height===t.height}function tF(e,t){return e&&e.column===t.column&&e.row===t.row}const nF=Ke(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},p,f,{didMount:h,propsReady:g},{customScrollParent:m,useWindowScroll:y,windowScrollContainerState:v,windowScrollTo:b,windowViewportRect:S},w])=>{const T=ae(0),C=ae(0),k=ae($v),I=ae({height:0,width:0}),A=ae({height:0,width:0}),O=Be(),N=Be(),V=ae(0),P=ae(null),D=ae({column:0,row:0}),_=Be(),F=Be(),j=ae(!1),B=ae(0),M=ae(!0),z=ae(!1),Q=ae(!1);Qe(ne(h,Ne(B),Ce(([L,$])=>!!$)),()=>{De(M,!1)}),Qe(ne(Rt(h,M,A,I,B,z),Ce(([L,$,K,ie,,H])=>L&&!$&&K.height!==0&&ie.height!==0&&!H)),([,,,,L])=>{De(z,!0),gp(1,()=>{De(O,L)}),Fn(ne(c),()=>{De(t,[0,0]),De(M,!0)})}),we(ne(F,Ce(L=>L!=null&&L.scrollTop>0),kn(0)),C),Qe(ne(h,Ne(F),Ce(([,L])=>L!=null)),([,L])=>{L&&(De(I,L.viewport),De(A,L.item),De(D,L.gap),L.scrollTop>0&&(De(j,!0),Fn(ne(c,Yo(1)),$=>{De(j,!1)}),De(l,{top:L.scrollTop})))}),we(ne(I,pe(({height:L})=>L)),d),we(ne(Rt(Pe(I,Ga),Pe(A,Ga),Pe(D,(L,$)=>L&&L.column===$.column&&L.row===$.row),Pe(c)),pe(([L,$,K,ie])=>({gap:K,item:$,scrollTop:ie,viewport:L}))),_),we(ne(Rt(Pe(T),r,Pe(D,tF),Pe(A,Ga),Pe(I,Ga),Pe(P),Pe(C),Pe(j),Pe(M),Pe(B)),Ce(([,,,,,,,L])=>!L),pe(([L,[$,K],ie,H,ye,Te,Re,,$e,se])=>{const{column:xe,row:le}=ie,{height:be,width:oe}=H,{width:ue}=ye;if(Re===0&&(L===0||ue===0))return $v;if(oe===0){const fn=vp(se,L),En=fn+Math.max(Re-1,0);return eF(Hv(fn,En,Te))}const ee=E1(ue,oe,xe);let q,te;$e?$===0&&K===0&&Re>0?(q=0,te=Re-1):(q=ee*Ds(($+le)/(be+le)),te=ee*zv((K+le)/(be+le))-1,te=du(L-1,Wi(te,ee-1)),q=du(te,Wi(0,q))):(q=0,te=-1);const me=Hv(q,te,Te),{bottom:Oe,top:He}=Wv(ye,ie,H,me),Ye=zv(L/ee),Ot=Ye*be+(Ye-1)*le-Oe;return{bottom:Oe,itemHeight:be,items:me,itemWidth:oe,offsetBottom:Ot,offsetTop:He,top:He}})),k),we(ne(P,Ce(L=>L!==null),pe(L=>L.length)),T),we(ne(Rt(I,A,k,D),Ce(([L,$,{items:K}])=>K.length>0&&$.height!==0&&L.height!==0),pe(([L,$,{items:K},ie])=>{const{bottom:H,top:ye}=Wv(L,ie,$,K);return[ye,H]}),lt(la)),t);const X=ae(!1);we(ne(c,Ne(X),pe(([L,$])=>$||L!==0)),X);const J=en(ne(Rt(k,T),Ce(([{items:L}])=>L.length>0),Ne(X),Ce(([[L,$],K])=>{const ie=L.items[L.items.length-1].index===$-1;return(K||L.bottom>0&&L.itemHeight>0&&L.offsetBottom===0&&L.items.length===$)&&ie}),pe(([[,L]])=>L-1),lt())),Z=en(ne(Pe(k),Ce(({items:L})=>L.length>0&&L[0].index===0),kn(0),lt())),Y=en(ne(Pe(k),Ne(j),Ce(([{items:L},$])=>L.length>0&&!$),pe(([{items:L}])=>({endIndex:L[L.length-1].index,startIndex:L[0].index})),lt(a1),ur(0)));we(Y,f.scrollSeekRangeChanged),we(ne(O,Ne(I,A,T,D),pe(([L,$,K,ie,H])=>{const ye=d1(L),{align:Te,behavior:Re,offset:$e}=ye;let se=ye.index;se==="LAST"&&(se=ie-1),se=Wi(0,se,du(ie-1,se));let xe=Sd($,H,K,se);return Te==="end"?xe=Bv(xe-$.height+K.height):Te==="center"&&(xe=Bv(xe-$.height/2+K.height/2)),$e&&(xe+=$e),{behavior:Re,top:xe}})),l);const G=Vt(ne(k,pe(L=>L.offsetBottom+L.bottom)),0);return we(ne(S,pe(L=>({height:L.visibleHeight,width:L.visibleWidth}))),I),{customScrollParent:m,data:P,deviation:V,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:A,overscan:n,restoreStateFrom:F,scrollBy:a,scrollContainerState:s,scrollHeight:N,scrollTo:l,scrollToIndex:O,scrollTop:c,smoothScrollTargetReached:u,totalCount:T,useWindowScroll:y,viewportDimensions:I,windowScrollContainerState:v,windowScrollTo:b,windowViewportRect:S,...f,gridState:k,horizontalDirection:Q,initialTopMostItemIndex:B,totalListHeight:G,...p,endReached:J,propsReady:g,rangeChanged:Y,startReached:Z,stateChanged:_,stateRestoreInProgress:j,...w}},ut(yp,Wt,Ra,h1,Pr,xp,Rr));function E1(e,t,n){return Wi(1,Ds((e+n)/(Ds(t)+n)))}function Wv(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Sd(e,t,n,r[0].index);return{bottom:Sd(e,t,n,r[r.length-1].index)+o,top:i}}function Sd(e,t,n,r){const o=E1(e.width,n.width,t.column),i=Ds(r/o),a=i*n.height+Wi(0,i-1)*t.row;return a>0?a+t.row:a}const rF=Ke(()=>{const e=ae(d=>`Item ${d}`),t=ae({}),n=ae(null),r=ae("virtuoso-grid-item"),o=ae("virtuoso-grid-list"),i=ae(wp),a=ae("div"),s=ae(vi),l=(d,p=null)=>Vt(ne(t,pe(f=>f[d]),lt()),p),c=ae(!1),u=ae(!1);return we(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),oF=Ke(([e,t])=>({...e,...t}),ut(nF,rF)),iF=E.memo(function(){const e=dt("gridState"),t=dt("listClassName"),n=dt("itemClassName"),r=dt("itemContent"),o=dt("computeItemKey"),i=dt("isSeeking"),a=ln("scrollHeight"),s=dt("ItemComponent"),l=dt("ListComponent"),c=dt("ScrollSeekPlaceholder"),u=dt("context"),d=ln("itemDimensions"),p=ln("gap"),f=dt("log"),h=dt("stateRestoreInProgress"),g=ln("reportReadyState"),m=Ln(E.useMemo(()=>y=>{const v=y.parentElement.parentElement.scrollHeight;a(v);const b=y.firstChild;if(b){const{height:S,width:w}=b.getBoundingClientRect();d({height:S,width:w})}p({column:qv("column-gap",getComputedStyle(y).columnGap,f),row:qv("row-gap",getComputedStyle(y).rowGap,f)})},[a,d,p,f]),!0,!1);return x1(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),h?null:x.jsx(l,{className:t,ref:m,...ct(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const v=o(y.index,y.data,u);return i?x.jsx(c,{...ct(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},v):E.createElement(s,{...ct(s,u),className:n,"data-index":y.index,key:v},r(y.index,y.data,u))})})}),aF=E.memo(function(){const e=dt("HeaderComponent"),t=ln("headerHeight"),n=dt("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=dt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),sF=E.memo(function(){const e=dt("FooterComponent"),t=ln("footerHeight"),n=dt("headerFooterTag"),r=Ln(E.useMemo(()=>i=>{t(Tn(i,"height"))},[t]),!0,!1),o=dt("context");return e?x.jsx(n,{ref:r,children:x.jsx(e,{...ct(e,o)})}):null}),lF=({children:e})=>{const t=E.useContext(y1),n=ln("itemDimensions"),r=ln("viewportDimensions"),o=Ln(E.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return E.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.jsx("div",{ref:o,style:yi(!1),children:e})},cF=({children:e})=>{const t=E.useContext(y1),n=ln("windowViewportRect"),r=ln("itemDimensions"),o=dt("customScrollParent"),i=pp(n,o,!1);return E.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.jsx("div",{ref:i,style:yi(!1),children:e})},uF=E.memo(function({...e}){const t=dt("useWindowScroll"),n=dt("customScrollParent"),r=n||t?fF:dF,o=n||t?cF:lF,i=dt("context");return x.jsx(r,{...e,...ct(r,i),children:x.jsxs(o,{children:[x.jsx(aF,{}),x.jsx(iF,{}),x.jsx(sF,{})]})})}),{useEmitter:C1,useEmitterValue:dt,usePublisher:ln}=bp(oF,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},uF),dF=Sp({useEmitter:C1,useEmitterValue:dt,usePublisher:ln}),fF=Tp({useEmitter:C1,useEmitterValue:dt,usePublisher:ln});function qv(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,tn.WARN),t==="normal"?0:parseInt(t??"0",10)}const Rp=()=>{const e=E.useContext(si);return e?e.tweaks:gl},k1=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>x.jsxs("span",{className:Ie("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[a,e||o?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?x.jsx(cp,{as:"button",type:"button","aria-description":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:x.jsx("span",{className:"cursor-help",children:x.jsx(a0,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:x.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?x.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[x.jsx(o0,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(FA,{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]}),Pa=E.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:p="",name:f,title:h,componentName:g,placeholder:m,hideLeft:y=!1,required:v,disabled:b,reportStatus:S},w)=>{const T=Rp(),C=S!==void 0?S:T.input.iconFeedback,k=d??f,I=At(),A=e??I.inputOptionalLabel;return x.jsxs("fieldset",{ref:w,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":g,"data-interactive":!!i,className:Ie("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[x.jsxs("label",{form:u,htmlFor:k,className:"text-field-label max-w-full w-full relative inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(k1,{info:s,hideLeft:y,reportStatus:C,title:h,placeholder:m,children:A||n?x.jsxs(E.Fragment,{children:[v?null:x.jsx("span",{"aria-disabled":b,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?x.jsx(E.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${p}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,a?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:a}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),pF=e=>x.jsx(E.Fragment,{children:e.children}),mF={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},hF=[],gF=E.forwardRef(function(t,n){return x.jsx(ft.ul,{...t,ref:n,className:"w-full overscroll-contain rounded-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(xr,{children:t.children})})}),vF=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),yF={List:gF,Item:vF},yo=40,xF=E.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:h=!1,...g},m)=>{const y=E.useRef(null),v=E.useRef(null),b=E.useRef(null),S=g.value??g.defaultValue??"",w=At(),[T,C]=E.useState(()=>Math.min(320,yo*o.length)),[k,I]=E.useState(!1),[A,O]=E.useState(""),[N,V]=E.useState(S),[P,D]=E.useState(()=>{var oe;return((oe=o.find(ue=>ue.value===S))==null?void 0:oe.label)??S}),[_,F]=E.useState(null),j=E.useRef(hF),B=lp(k,"block-only"),M=h&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...o]:o,z=A?ap(M,"value",[{key:"value",value:A},{key:"label",value:A}]):M,Q=()=>{I(!1),C(0)},X=z.filter(oe=>oe.hidden!==!0),J=h?void 0:`^(${o.map(oe=>`${od(oe.value)}${oe.label?"|"+od(oe.label):""}`).join("|")})$`,{x:Z,y:Y,strategy:G,refs:L,context:$}=Er({open:k,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:di,middleware:[Sa(4),Pw({padding:10,elementContext:"reference",apply(oe){const ue=oe.elements.floating.querySelector("ul"),ee=(ue==null?void 0:ue.getBoundingClientRect().height)||0,q=Ki(L.reference.current,window.innerHeight),te=Math.min(ee<yo?q:ee,q,oe.availableHeight),me=X.length===0?yo:Math.min(te,q,ee),Oe=`${v.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:Oe,maxWidth:Oe,height:me})}})]}),K=Ww($,mF),{getReferenceProps:ie,getFloatingProps:H,getItemProps:ye}=Cr([so($,{role:"listbox"}),ao($),El($,{cols:0,listRef:j,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);E.useEffect(()=>{if(g.value){const oe=o.find(ue=>ue.value===g.value);V((oe==null?void 0:oe.label)??g.value)}},[g.value]),E.useEffect(()=>{if(!k)return C(0);const oe=L.reference;if(oe.current===null)return;const ue=Ki(oe.current,window.innerHeight);setTimeout(()=>C(Math.min(ue,X.length*yo)),100)},[A,k,L.reference]),E.useEffect(()=>{const oe=L.reference.current;if(oe)return ga(oe)},[]);const Te=(oe,ue)=>{V(oe.value);const ee=L.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",oe.value),ee.value=oe.value;const q=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(q),g.onChange&&g.onChange(q),D(oe.label??""),Q(),O(""),F(ue)},Re=oe=>{var ee;const ue=oe.target.value;return O(ue),!k&&ue===""?I(!0):(oe.target.name=g.name||"",ue?I(!0):(ee=g.onChange)==null?void 0:ee.call(g,oe))},$e=()=>{var oe;I(!0),O(""),(oe=L.reference.current)==null||oe.focus()},se=()=>{F(oe=>oe===null?0:oe),I(!0),O("")},xe=()=>{var oe;(oe=L.reference.current)==null||oe.setAttribute("data-value",""),O(""),V(""),D(""),cx(L.reference.current),Q()},le=g.id||g.name,be=X.length===0;return x.jsxs(Pa,{...g,left:e,error:t,ref:v,form:g.form,loading:r,name:g.name,feedback:d,hideLeft:p,required:f,title:g.title,container:i,rightLabel:a,interactive:s,id:g.name||g.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:g.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:$e,children:[x.jsx(Af,{size:20}),x.jsx("span",{className:"sr-only",children:w.inputCaretDown})]}),N?x.jsx("button",{type:"button",onClick:xe,className:"p-2 transition-colors link:text-danger md:p-1",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{"data-shadow":"true",...ie({...g,onChange:Re,onFocus:se,pattern:J,ref:L.setReference,name:`${le}-shadow`,id:`${le}-shadow`,onClick:oe=>oe.currentTarget.focus(),onKeyDown(oe){var ue,ee;if(oe.key==="Escape")return oe.currentTarget.blur(),Q();if(k){if(oe.key==="ArrowDown"){let q=Ve.number(_)?_+1:0;return q>X.length-1&&(q=0),(ue=b.current)==null||ue.scrollIntoView({index:q}),F(q)}if(oe.key==="ArrowUp"){let q=Ve.number(_)?_-1:X.length-1;return q<0&&(q=X.length-1),(ee=b.current)==null||ee.scrollIntoView({index:q}),F(q)}if(oe.key==="Enter"){if(_!==null&&X[_])return oe.preventDefault(),Te(X[_],_);if(X.length===1)return oe.preventDefault(),Te(X[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":le,"data-target":le,required:f,value:k?A:P||N,"aria-autocomplete":"list",autoComplete:"off",className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary text-base",g.className)}),x.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:m,required:f,defaultValue:g.value||N||void 0}),x.jsx(io,{preserveTabOrder:!0,children:k?x.jsx(mi,{modal:!0,guards:!0,returnFocus:!1,context:$,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs(ft.div,{...H({ref:qn(B,L.setFloating),style:{...K.styles,left:Z,top:Y??0,position:G}}),initial:!1,"data-floating":"true",animate:{height:be?"auto":T},className:"isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating ease-in-out",onAnimationComplete:()=>{if(!k)return C(0);const ue=L.floating.current.querySelectorAll("li").item(0),ee=(ue?ue.getBoundingClientRect().height:yo)*X.length;return ha.flushSync(()=>C(ee+2))},children:[be?x.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||w.autocompleteEmpty})}):null,x.jsx(Cp,{overscan:40,ref:b,hidden:be,data:X,style:{height:T},defaultItemHeight:yo,components:yF,scrollerRef:oe=>void(y.current=oe),className:"max-h-80 overscroll-contain rounded-lg border-floating-border bg-floating-background p-0 text-foreground",itemContent:(oe,ue)=>{const ee=ue.Render??pF,q=N===ue.value||N===ue.label,te=_===oe,me=ue.label??ue.value;return x.jsx("button",{"data-value":ue.value,...ye({ref:Oe=>void(j.current[oe]=Oe),role:"option",type:"button","aria-checked":q,"aria-current":q,"aria-selected":q,"aria-busy":ue.disabled,onClick:()=>Te(ue,oe),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${q?"bg-primary-hover text-primary-foreground":""} ${te?"bg-floating-hover text-floating-foreground":""}`}),children:x.jsx(ee,{...g,label:ue.label,value:ue.value,children:me})})}})]})}):null})]})}),Pp=E.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return x.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Ie("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[x.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Ie("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,x.jsx("span",{"data-name":"checkbox-label",className:Ie("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),R1=(e,t,n,r)=>E.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:p,optionalText:f,type:h="text",labelClassName:g,feedback:m=null,hideLeft:y=!1,loading:v,...b},S)=>{const w=e,T=b.id??b.name,C=E.useRef(null);return E.useEffect(()=>{if(C.current===null)return;const k=C.current,I=ga(C.current),A=r==null?void 0:r(k),O=N=>{const V=N;if(V.key==="Enter"&&k.enterKeyHint==="next"){const P=k.getAttribute("data-next");if(P){const D=document.getElementById(P);if(D)return D.focus(),void V.preventDefault()}}};return k.addEventListener("keydown",O),()=>{A==null||A(),I(),k.removeEventListener("keydown",O)}},[]),x.jsx(Pa,{...n,info:i,left:a,error:l,right:c,loading:v,form:b.form,name:b.name,feedback:m,hideLeft:y,title:b.title,container:Ie(u,n.container),rightLabel:d,disabled:b.disabled,interactive:p,required:b.required,componentName:t,id:b.name||b.id,optionalText:f,labelClassName:g,placeholder:b.placeholder,children:x.jsx(w,{...n,...b,id:T,name:T,type:h,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:qn(S,C),className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),Aa=R1(P0,"input",{type:"text"}),Uv=new Date(1970,11,31),fu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Kv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},bF={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},pu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},wF=E.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},a)=>{const s=Lf(t),l=E.useId(),c=At(),u=E.useMemo(()=>new Intl.DateTimeFormat(s),[s]),[d,p]=E.useState(e||void 0),[f,h]=E.useState(!1),g=pu(u,Uv).flatMap(C=>Ve.keyof(fu,C.type)?fu[C.type](C.value):[]),m=pu(u,Uv).reduce((C,k)=>C+(Ve.keyof(Kv,k.type)?Kv[k.type](k.value):""),""),[y,v]=E.useState(d?pu(u,d).reduce((C,k)=>C+(Ve.keyof(fu,k.type)?bF[k.type](d,k.value):""),""):""),b=C=>{const k=C.target.value;if(v(k),g.length===k.length&&g.every((A,O)=>{const N=k.charAt(O);return typeof A=="string"?N===A:A.test(N)})){const A=$o(hO(k,m,new Date));return p(A),r==null?void 0:r(A)}return p(void 0),r==null?void 0:r(void 0)},S=C=>(p(C),r==null||r(C),v(C?h_(C,m):"")),w=d0(d),T=w?d.toISOString():void 0;return x.jsx(Aa,{...i,mask:g,value:y,id:void 0,name:void 0,className:"uppercase","data-value":T,formNoValidate:!f,"data-target":i.name,"data-component":"date-picker",onChange:b,required:i.required??!0,error:f?void 0:i.error,placeholder:i.placeholder??m,right:x.jsxs(E.Fragment,{children:[x.jsx("input",{"data-origin":i.name,defaultValue:T,form:i.form,hidden:!0,id:i.name,name:i.name,ref:a,type:"date"}),x.jsx(hi,{open:f,onChange:h,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(IA,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(L0,{...i,locale:s,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:w?d:void 0})})]})})}),SF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],TF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],EF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],CF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Yv=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Gv(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?CF:EF:t.binary?TF:SF,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let a;if(t.minimumFractionDigits!==void 0&&(a={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(a={maximumFractionDigits:t.maximumFractionDigits,...a}),e<1){const u=Yv(e,t.locale,a);return i+u+r+n[0]}const s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,a||(e=e.toPrecision(3));const l=Yv(Number(e),t.locale,a),c=n[s];return i+l+r+c}var Za={exports:{}},Xa={exports:{}},Ge={};/** @license React v16.13.1
188
188
  * react-is.production.min.js
189
189
  *
190
190
  * Copyright (c) Facebook, Inc. and its affiliates.
191
191
  *
192
192
  * This source code is licensed under the MIT license found in the
193
193
  * LICENSE file in the root directory of this source tree.
194
- */var Zv;function kF(){if(Zv)return Ge;Zv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case c:case l:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case h:case f:case a:return w;default:return S}}case n:return S}}}function T(w){return b(w)===l}return Ge.AsyncMode=c,Ge.ConcurrentMode=l,Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=u,Ge.Fragment=r,Ge.Lazy=h,Ge.Memo=f,Ge.Portal=n,Ge.Profiler=i,Ge.StrictMode=o,Ge.Suspense=d,Ge.isAsyncMode=function(w){return T(w)||b(w)===c},Ge.isConcurrentMode=T,Ge.isContextConsumer=function(w){return b(w)===s},Ge.isContextProvider=function(w){return b(w)===a},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ge.isForwardRef=function(w){return b(w)===u},Ge.isFragment=function(w){return b(w)===r},Ge.isLazy=function(w){return b(w)===h},Ge.isMemo=function(w){return b(w)===f},Ge.isPortal=function(w){return b(w)===n},Ge.isProfiler=function(w){return b(w)===i},Ge.isStrictMode=function(w){return b(w)===o},Ge.isSuspense=function(w){return b(w)===d},Ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===l||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===h||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===m||w.$$typeof===y||w.$$typeof===v||w.$$typeof===g)},Ge.typeOf=b,Ge}var Ze={};/** @license React v16.13.1
194
+ */var Zv;function kF(){if(Zv)return Ge;Zv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case t:switch(w=w.type,w){case l:case c:case r:case i:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case u:case h:case f:case a:return w;default:return T}}case n:return T}}}function S(w){return b(w)===c}return Ge.AsyncMode=l,Ge.ConcurrentMode=c,Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=u,Ge.Fragment=r,Ge.Lazy=h,Ge.Memo=f,Ge.Portal=n,Ge.Profiler=i,Ge.StrictMode=o,Ge.Suspense=d,Ge.isAsyncMode=function(w){return S(w)||b(w)===l},Ge.isConcurrentMode=S,Ge.isContextConsumer=function(w){return b(w)===s},Ge.isContextProvider=function(w){return b(w)===a},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ge.isForwardRef=function(w){return b(w)===u},Ge.isFragment=function(w){return b(w)===r},Ge.isLazy=function(w){return b(w)===h},Ge.isMemo=function(w){return b(w)===f},Ge.isPortal=function(w){return b(w)===n},Ge.isProfiler=function(w){return b(w)===i},Ge.isStrictMode=function(w){return b(w)===o},Ge.isSuspense=function(w){return b(w)===d},Ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===h||w.$$typeof===f||w.$$typeof===a||w.$$typeof===s||w.$$typeof===u||w.$$typeof===m||w.$$typeof===y||w.$$typeof===v||w.$$typeof===g)},Ge.typeOf=b,Ge}var Ze={};/** @license React v16.13.1
195
195
  * react-is.development.js
196
196
  *
197
197
  * Copyright (c) Facebook, Inc. and its affiliates.
198
198
  *
199
199
  * This source code is licensed under the MIT license found in the
200
200
  * LICENSE file in the root directory of this source tree.
201
- */var Xv;function RF(){return Xv||(Xv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(H){return typeof H=="string"||typeof H=="function"||H===r||H===l||H===i||H===o||H===d||H===p||typeof H=="object"&&H!==null&&(H.$$typeof===h||H.$$typeof===f||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===m||H.$$typeof===y||H.$$typeof===v||H.$$typeof===g)}function T(H){if(typeof H=="object"&&H!==null){var ye=H.$$typeof;switch(ye){case t:var Te=H.type;switch(Te){case c:case l:case r:case i:case o:case d:return Te;default:var Re=Te&&Te.$$typeof;switch(Re){case s:case u:case h:case f:case a:return Re;default:return ye}}case n:return ye}}}var w=c,S=l,C=s,k=a,I=t,A=u,O=r,N=h,V=f,P=n,D=i,_=o,F=d,j=!1;function B(H){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(H)||T(H)===c}function M(H){return T(H)===l}function $(H){return T(H)===s}function J(H){return T(H)===a}function X(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function Q(H){return T(H)===u}function Z(H){return T(H)===r}function Y(H){return T(H)===h}function G(H){return T(H)===f}function L(H){return T(H)===n}function z(H){return T(H)===i}function K(H){return T(H)===o}function ie(H){return T(H)===d}Ze.AsyncMode=w,Ze.ConcurrentMode=S,Ze.ContextConsumer=C,Ze.ContextProvider=k,Ze.Element=I,Ze.ForwardRef=A,Ze.Fragment=O,Ze.Lazy=N,Ze.Memo=V,Ze.Portal=P,Ze.Profiler=D,Ze.StrictMode=_,Ze.Suspense=F,Ze.isAsyncMode=B,Ze.isConcurrentMode=M,Ze.isContextConsumer=$,Ze.isContextProvider=J,Ze.isElement=X,Ze.isForwardRef=Q,Ze.isFragment=Z,Ze.isLazy=Y,Ze.isMemo=G,Ze.isPortal=L,Ze.isProfiler=z,Ze.isStrictMode=K,Ze.isSuspense=ie,Ze.isValidElementType=b,Ze.typeOf=T}()),Ze}var Qv;function P1(){return Qv||(Qv=1,process.env.NODE_ENV==="production"?Xa.exports=kF():Xa.exports=RF()),Xa.exports}/*
201
+ */var Xv;function RF(){return Xv||(Xv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===p||typeof H=="object"&&H!==null&&(H.$$typeof===h||H.$$typeof===f||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===m||H.$$typeof===y||H.$$typeof===v||H.$$typeof===g)}function S(H){if(typeof H=="object"&&H!==null){var ye=H.$$typeof;switch(ye){case t:var Te=H.type;switch(Te){case l:case c:case r:case i:case o:case d:return Te;default:var Re=Te&&Te.$$typeof;switch(Re){case s:case u:case h:case f:case a:return Re;default:return ye}}case n:return ye}}}var w=l,T=c,C=s,k=a,I=t,A=u,O=r,N=h,V=f,P=n,D=i,_=o,F=d,j=!1;function B(H){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(H)||S(H)===l}function M(H){return S(H)===c}function z(H){return S(H)===s}function Q(H){return S(H)===a}function X(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function J(H){return S(H)===u}function Z(H){return S(H)===r}function Y(H){return S(H)===h}function G(H){return S(H)===f}function L(H){return S(H)===n}function $(H){return S(H)===i}function K(H){return S(H)===o}function ie(H){return S(H)===d}Ze.AsyncMode=w,Ze.ConcurrentMode=T,Ze.ContextConsumer=C,Ze.ContextProvider=k,Ze.Element=I,Ze.ForwardRef=A,Ze.Fragment=O,Ze.Lazy=N,Ze.Memo=V,Ze.Portal=P,Ze.Profiler=D,Ze.StrictMode=_,Ze.Suspense=F,Ze.isAsyncMode=B,Ze.isConcurrentMode=M,Ze.isContextConsumer=z,Ze.isContextProvider=Q,Ze.isElement=X,Ze.isForwardRef=J,Ze.isFragment=Z,Ze.isLazy=Y,Ze.isMemo=G,Ze.isPortal=L,Ze.isProfiler=$,Ze.isStrictMode=K,Ze.isSuspense=ie,Ze.isValidElementType=b,Ze.typeOf=S}()),Ze}var Qv;function P1(){return Qv||(Qv=1,process.env.NODE_ENV==="production"?Xa.exports=kF():Xa.exports=RF()),Xa.exports}/*
202
202
  object-assign
203
203
  (c) Sindre Sorhus
204
204
  @license MIT
205
- */var mu,Jv;function PF(){if(Jv)return mu;Jv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return mu=o()?Object.assign:function(i,a){for(var s,c=r(i),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(c[d]=s[d]);if(e){l=e(s);for(var p=0;p<l.length;p++)n.call(s,l[p])&&(c[l[p]]=s[l[p]])}}return c},mu}var hu,ey;function Ap(){if(ey)return hu;ey=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hu=e,hu}var gu,ty;function A1(){return ty||(ty=1,gu=Function.call.bind(Object.prototype.hasOwnProperty)),gu}var vu,ny;function AF(){if(ny)return vu;ny=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ap(),n={},r=A1();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,c,s,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=l?l():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vu=o,vu}var yu,ry;function IF(){if(ry)return yu;ry=1;var e=P1(),t=PF(),n=Ap(),r=A1(),o=AF(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return yu=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(M){var $=M&&(l&&M[l]||M[u]);if(typeof $=="function")return $}var p="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(),arrayOf:b,element:T(),elementType:w(),instanceOf:S,node:A(),objectOf:k,oneOf:C,oneOfType:I,shape:N,exact:V};function h(M,$){return M===$?M!==0||1/M===1/$:M!==M&&$!==$}function g(M,$){this.message=M,this.data=$&&typeof $=="object"?$:{},this.stack=""}g.prototype=Error.prototype;function m(M){if(process.env.NODE_ENV!=="production")var $={},J=0;function X(Z,Y,G,L,z,K,ie){if(L=L||p,K=K||G,ie!==n){if(c){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=L+":"+G;!$[ye]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+L+"`. 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."),$[ye]=!0,J++)}}return Y[G]==null?Z?Y[G]===null?new g("The "+z+" `"+K+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new g("The "+z+" `"+K+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:M(Y,G,L,z,K)}var Q=X.bind(null,!1);return Q.isRequired=X.bind(null,!0),Q}function y(M){function $(J,X,Q,Z,Y,G){var L=J[X],z=_(L);if(z!==M){var K=F(L);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+K+"` supplied to `"+Q+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return m($)}function v(){return m(a)}function b(M){function $(J,X,Q,Z,Y){if(typeof M!="function")return new g("Property `"+Y+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var G=J[X];if(!Array.isArray(G)){var L=_(G);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+L+"` supplied to `"+Q+"`, expected an array."))}for(var z=0;z<G.length;z++){var K=M(G,z,Q,Z,Y+"["+z+"]",n);if(K instanceof Error)return K}return null}return m($)}function T(){function M($,J,X,Q,Z){var Y=$[J];if(!s(Y)){var G=_(Y);return new g("Invalid "+Q+" `"+Z+"` of type "+("`"+G+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return m(M)}function w(){function M($,J,X,Q,Z){var Y=$[J];if(!e.isValidElementType(Y)){var G=_(Y);return new g("Invalid "+Q+" `"+Z+"` of type "+("`"+G+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return m(M)}function S(M){function $(J,X,Q,Z,Y){if(!(J[X]instanceof M)){var G=M.name||p,L=B(J[X]);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+L+"` supplied to `"+Q+"`, expected ")+("instance of `"+G+"`."))}return null}return m($)}function C(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function $(J,X,Q,Z,Y){for(var G=J[X],L=0;L<M.length;L++)if(h(G,M[L]))return null;var z=JSON.stringify(M,function(ie,H){var ye=F(H);return ye==="symbol"?String(H):H});return new g("Invalid "+Z+" `"+Y+"` of value `"+String(G)+"` "+("supplied to `"+Q+"`, expected one of "+z+"."))}return m($)}function k(M){function $(J,X,Q,Z,Y){if(typeof M!="function")return new g("Property `"+Y+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var G=J[X],L=_(G);if(L!=="object")return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+L+"` supplied to `"+Q+"`, expected an object."));for(var z in G)if(r(G,z)){var K=M(G,z,Q,Z,Y+"."+z,n);if(K instanceof Error)return K}return null}return m($)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<M.length;$++){var J=M[$];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(J)+" at index "+$+"."),a}function X(Q,Z,Y,G,L){for(var z=[],K=0;K<M.length;K++){var ie=M[K],H=ie(Q,Z,Y,G,L,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&z.push(H.data.expectedType)}var ye=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new g("Invalid "+G+" `"+L+"` supplied to "+("`"+Y+"`"+ye+"."))}return m(X)}function A(){function M($,J,X,Q,Z){return P($[J])?null:new g("Invalid "+Q+" `"+Z+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return m(M)}function O(M,$,J,X,Q){return new g((M||"React class")+": "+$+" type `"+J+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function N(M){function $(J,X,Q,Z,Y){var G=J[X],L=_(G);if(L!=="object")return new g("Invalid "+Z+" `"+Y+"` of type `"+L+"` "+("supplied to `"+Q+"`, expected `object`."));for(var z in M){var K=M[z];if(typeof K!="function")return O(Q,Z,Y,z,F(K));var ie=K(G,z,Q,Z,Y+"."+z,n);if(ie)return ie}return null}return m($)}function V(M){function $(J,X,Q,Z,Y){var G=J[X],L=_(G);if(L!=="object")return new g("Invalid "+Z+" `"+Y+"` of type `"+L+"` "+("supplied to `"+Q+"`, expected `object`."));var z=t({},J[X],M);for(var K in z){var ie=M[K];if(r(M,K)&&typeof ie!="function")return O(Q,Z,Y,K,F(ie));if(!ie)return new g("Invalid "+Z+" `"+Y+"` key `"+K+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(J[X],null," ")+`
206
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var H=ie(G,K,Q,Z,Y+"."+K,n);if(H)return H}return null}return m($)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||s(M))return!0;var $=d(M);if($){var J=$.call(M),X;if($!==M.entries){for(;!(X=J.next()).done;)if(!P(X.value))return!1}else for(;!(X=J.next()).done;){var Q=X.value;if(Q&&!P(Q[1]))return!1}}else return!1;return!0;default:return!1}}function D(M,$){return M==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function _(M){var $=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":D($,M)?"symbol":$}function F(M){if(typeof M>"u"||M===null)return""+M;var $=_(M);if($==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return $}function j(M){var $=F(M);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function B(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},yu}var xu,oy;function _F(){if(oy)return xu;oy=1;var e=Ap();function t(){}function n(){}return n.resetWarningCache=t,xu=function(){function r(a,s,c,l,u,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},xu}var iy;function OF(){if(iy)return Za.exports;if(iy=1,process.env.NODE_ENV!=="production"){var e=P1(),t=!0;Za.exports=IF()(e.isElement,t)}else Za.exports=_F()();return Za.exports}var MF=OF();const rt=qy(MF);function co(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(d){a(d)}}function c(u){try{l(r.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}const DF=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 Go(e,t,n){const r=jF(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&ay(r,"path",i),ay(r,"relativePath",i),r}function jF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=DF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function ay(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const NF=[".DS_Store","Thumbs.db"];function FF(e){return co(this,void 0,void 0,function*(){return js(e)&&LF(e.dataTransfer)?BF(e.dataTransfer,e.type):VF(e)?$F(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?zF(e):[]})}function LF(e){return js(e)}function VF(e){return js(e)&&js(e.target)}function js(e){return typeof e=="object"&&e!==null}function $F(e){return Td(e.target.files).map(t=>Go(t))}function zF(e){return co(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Go(n))})}function BF(e,t){return co(this,void 0,void 0,function*(){if(e.items){const n=Td(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(HF));return sy(I1(r))}return sy(Td(e.files).map(n=>Go(n)))})}function sy(e){return e.filter(t=>NF.indexOf(t.name)===-1)}function Td(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 HF(e){if(typeof e.webkitGetAsEntry!="function")return ly(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?_1(t):ly(e,t)}function I1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?I1(n):[n]],[])}function ly(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 a=yield i.getFile();return a.handle=i,Go(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Go(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function WF(e){return co(this,void 0,void 0,function*(){return e.isDirectory?_1(e):qF(e)})}function _1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>co(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(WF));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function qF(e){return co(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Go(r,e.fullPath);t(o)},r=>{n(r)})})})}var Qa={},cy;function UF(){return cy||(cy=1,Qa.__esModule=!0,Qa.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),Qa}var KF=UF();const bu=qy(KF);function uy(e){return ZF(e)||GF(e)||M1(e)||YF()}function YF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
205
+ */var mu,Jv;function PF(){if(Jv)return mu;Jv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return mu=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},mu}var hu,ey;function Ap(){if(ey)return hu;ey=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hu=e,hu}var gu,ty;function A1(){return ty||(ty=1,gu=Function.call.bind(Object.prototype.hasOwnProperty)),gu}var vu,ny;function AF(){if(ny)return vu;ny=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ap(),n={},r=A1();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[u](a,u,l,s,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vu=o,vu}var yu,ry;function IF(){if(ry)return yu;ry=1;var e=P1(),t=PF(),n=Ap(),r=A1(),o=AF(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return yu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(M){var z=M&&(c&&M[c]||M[u]);if(typeof z=="function")return z}var p="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:v(),arrayOf:b,element:S(),elementType:w(),instanceOf:T,node:A(),objectOf:k,oneOf:C,oneOfType:I,shape:N,exact:V};function h(M,z){return M===z?M!==0||1/M===1/z:M!==M&&z!==z}function g(M,z){this.message=M,this.data=z&&typeof z=="object"?z:{},this.stack=""}g.prototype=Error.prototype;function m(M){if(process.env.NODE_ENV!=="production")var z={},Q=0;function X(Z,Y,G,L,$,K,ie){if(L=L||p,K=K||G,ie!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=L+":"+G;!z[ye]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+L+"`. 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."),z[ye]=!0,Q++)}}return Y[G]==null?Z?Y[G]===null?new g("The "+$+" `"+K+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new g("The "+$+" `"+K+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:M(Y,G,L,$,K)}var J=X.bind(null,!1);return J.isRequired=X.bind(null,!0),J}function y(M){function z(Q,X,J,Z,Y,G){var L=Q[X],$=_(L);if($!==M){var K=F(L);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return m(z)}function v(){return m(a)}function b(M){function z(Q,X,J,Z,Y){if(typeof M!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var G=Q[X];if(!Array.isArray(G)){var L=_(G);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+L+"` supplied to `"+J+"`, expected an array."))}for(var $=0;$<G.length;$++){var K=M(G,$,J,Z,Y+"["+$+"]",n);if(K instanceof Error)return K}return null}return m(z)}function S(){function M(z,Q,X,J,Z){var Y=z[Q];if(!s(Y)){var G=_(Y);return new g("Invalid "+J+" `"+Z+"` of type "+("`"+G+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return m(M)}function w(){function M(z,Q,X,J,Z){var Y=z[Q];if(!e.isValidElementType(Y)){var G=_(Y);return new g("Invalid "+J+" `"+Z+"` of type "+("`"+G+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return m(M)}function T(M){function z(Q,X,J,Z,Y){if(!(Q[X]instanceof M)){var G=M.name||p,L=B(Q[X]);return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+L+"` supplied to `"+J+"`, expected ")+("instance of `"+G+"`."))}return null}return m(z)}function C(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function z(Q,X,J,Z,Y){for(var G=Q[X],L=0;L<M.length;L++)if(h(G,M[L]))return null;var $=JSON.stringify(M,function(ie,H){var ye=F(H);return ye==="symbol"?String(H):H});return new g("Invalid "+Z+" `"+Y+"` of value `"+String(G)+"` "+("supplied to `"+J+"`, expected one of "+$+"."))}return m(z)}function k(M){function z(Q,X,J,Z,Y){if(typeof M!="function")return new g("Property `"+Y+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var G=Q[X],L=_(G);if(L!=="object")return new g("Invalid "+Z+" `"+Y+"` of type "+("`"+L+"` supplied to `"+J+"`, expected an object."));for(var $ in G)if(r(G,$)){var K=M(G,$,J,Z,Y+"."+$,n);if(K instanceof Error)return K}return null}return m(z)}function I(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var z=0;z<M.length;z++){var Q=M[z];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(Q)+" at index "+z+"."),a}function X(J,Z,Y,G,L){for(var $=[],K=0;K<M.length;K++){var ie=M[K],H=ie(J,Z,Y,G,L,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&$.push(H.data.expectedType)}var ye=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new g("Invalid "+G+" `"+L+"` supplied to "+("`"+Y+"`"+ye+"."))}return m(X)}function A(){function M(z,Q,X,J,Z){return P(z[Q])?null:new g("Invalid "+J+" `"+Z+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return m(M)}function O(M,z,Q,X,J){return new g((M||"React class")+": "+z+" type `"+Q+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function N(M){function z(Q,X,J,Z,Y){var G=Q[X],L=_(G);if(L!=="object")return new g("Invalid "+Z+" `"+Y+"` of type `"+L+"` "+("supplied to `"+J+"`, expected `object`."));for(var $ in M){var K=M[$];if(typeof K!="function")return O(J,Z,Y,$,F(K));var ie=K(G,$,J,Z,Y+"."+$,n);if(ie)return ie}return null}return m(z)}function V(M){function z(Q,X,J,Z,Y){var G=Q[X],L=_(G);if(L!=="object")return new g("Invalid "+Z+" `"+Y+"` of type `"+L+"` "+("supplied to `"+J+"`, expected `object`."));var $=t({},Q[X],M);for(var K in $){var ie=M[K];if(r(M,K)&&typeof ie!="function")return O(J,Z,Y,K,F(ie));if(!ie)return new g("Invalid "+Z+" `"+Y+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Q[X],null," ")+`
206
+ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var H=ie(G,K,J,Z,Y+"."+K,n);if(H)return H}return null}return m(z)}function P(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(P);if(M===null||s(M))return!0;var z=d(M);if(z){var Q=z.call(M),X;if(z!==M.entries){for(;!(X=Q.next()).done;)if(!P(X.value))return!1}else for(;!(X=Q.next()).done;){var J=X.value;if(J&&!P(J[1]))return!1}}else return!1;return!0;default:return!1}}function D(M,z){return M==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function _(M){var z=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":D(z,M)?"symbol":z}function F(M){if(typeof M>"u"||M===null)return""+M;var z=_(M);if(z==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return z}function j(M){var z=F(M);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function B(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},yu}var xu,oy;function _F(){if(oy)return xu;oy=1;var e=Ap();function t(){}function n(){}return n.resetWarningCache=t,xu=function(){function r(a,s,l,c,u,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},xu}var iy;function OF(){if(iy)return Za.exports;if(iy=1,process.env.NODE_ENV!=="production"){var e=P1(),t=!0;Za.exports=IF()(e.isElement,t)}else Za.exports=_F()();return Za.exports}var MF=OF();const rt=qy(MF);function co(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}const DF=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 Go(e,t,n){const r=jF(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&ay(r,"path",i),ay(r,"relativePath",i),r}function jF(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=DF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function ay(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const NF=[".DS_Store","Thumbs.db"];function FF(e){return co(this,void 0,void 0,function*(){return js(e)&&LF(e.dataTransfer)?BF(e.dataTransfer,e.type):VF(e)?$F(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?zF(e):[]})}function LF(e){return js(e)}function VF(e){return js(e)&&js(e.target)}function js(e){return typeof e=="object"&&e!==null}function $F(e){return Td(e.target.files).map(t=>Go(t))}function zF(e){return co(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Go(n))})}function BF(e,t){return co(this,void 0,void 0,function*(){if(e.items){const n=Td(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(HF));return sy(I1(r))}return sy(Td(e.files).map(n=>Go(n)))})}function sy(e){return e.filter(t=>NF.indexOf(t.name)===-1)}function Td(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 HF(e){if(typeof e.webkitGetAsEntry!="function")return ly(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?_1(t):ly(e,t)}function I1(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?I1(n):[n]],[])}function ly(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 a=yield i.getFile();return a.handle=i,Go(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Go(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function WF(e){return co(this,void 0,void 0,function*(){return e.isDirectory?_1(e):qF(e)})}function _1(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>co(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(WF));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function qF(e){return co(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Go(r,e.fullPath);t(o)},r=>{n(r)})})})}var Qa={},cy;function UF(){return cy||(cy=1,Qa.__esModule=!0,Qa.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),Qa}var KF=UF();const bu=qy(KF);function uy(e){return ZF(e)||GF(e)||M1(e)||YF()}function YF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
207
207
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZF(e){if(Array.isArray(e))return Ed(e)}function dy(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 fy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dy(Object(n),!0).forEach(function(r){O1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function da(e,t){return JF(e)||QF(e,t)||M1(e,t)||XF()}function XF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
208
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M1(e,t){if(e){if(typeof e=="string")return Ed(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 Ed(e,t)}}function Ed(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 QF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function JF(e){if(Array.isArray(e))return e}var eL=typeof bu=="function"?bu:bu.default,tL="file-invalid-type",nL="file-too-large",rL="file-too-small",oL="too-many-files",iL=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:tL,message:"File type must be ".concat(r)}},py=function(t){return{code:nL,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},my=function(t){return{code:rL,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},aL={code:oL,message:"Too many files"};function D1(e,t){var n=e.type==="application/x-moz-file"||eL(e,t);return[n,n?null:iL(t)]}function j1(e,t,n){if($r(e.size))if($r(t)&&$r(n)){if(e.size>n)return[!1,py(n)];if(e.size<t)return[!1,my(t)]}else{if($r(t)&&e.size<t)return[!1,my(t)];if($r(n)&&e.size>n)return[!1,py(n)]}return[!0,null]}function $r(e){return e!=null}function sL(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(c){var l=D1(c,n),u=da(l,1),d=u[0],p=j1(c,r,o),f=da(p,1),h=f[0],g=s?s(c):null;return d&&h&&!g})}function Ns(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ja(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 hy(e){e.preventDefault()}function lL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function cL(e){return e.indexOf("Edge/")!==-1}function uL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return lL(e)||cL(e)}function Cn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!Ns(r)&&s&&s.apply(void 0,[r].concat(i)),Ns(r)})}}function dL(){return"showOpenFilePicker"in window}function fL(e){if($r(e)){var t=Object.entries(e).filter(function(n){var r=da(n,2),o=r[0],i=r[1],a=!0;return N1(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(F1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=da(r,2),i=o[0],a=o[1];return fy(fy({},n),{},O1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function pL(e){if($r(e))return Object.entries(e).reduce(function(t,n){var r=da(n,2),o=r[0],i=r[1];return[].concat(uy(t),[o],uy(i))},[]).filter(function(t){return N1(t)||F1(t)}).join(",")}function mL(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function hL(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function N1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function F1(e){return/^.*\.[\w]+$/.test(e)}var gL=["children"],vL=["open"],yL=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],xL=["refKey","onChange","onClick"];function bL(e){return TL(e)||SL(e)||L1(e)||wL()}function wL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
208
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M1(e,t){if(e){if(typeof e=="string")return Ed(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 Ed(e,t)}}function Ed(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 QF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function JF(e){if(Array.isArray(e))return e}var eL=typeof bu=="function"?bu:bu.default,tL="file-invalid-type",nL="file-too-large",rL="file-too-small",oL="too-many-files",iL=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:tL,message:"File type must be ".concat(r)}},py=function(t){return{code:nL,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},my=function(t){return{code:rL,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},aL={code:oL,message:"Too many files"};function D1(e,t){var n=e.type==="application/x-moz-file"||eL(e,t);return[n,n?null:iL(t)]}function j1(e,t,n){if($r(e.size))if($r(t)&&$r(n)){if(e.size>n)return[!1,py(n)];if(e.size<t)return[!1,my(t)]}else{if($r(t)&&e.size<t)return[!1,my(t)];if($r(n)&&e.size>n)return[!1,py(n)]}return[!0,null]}function $r(e){return e!=null}function sL(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=D1(l,n),u=da(c,1),d=u[0],p=j1(l,r,o),f=da(p,1),h=f[0],g=s?s(l):null;return d&&h&&!g})}function Ns(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ja(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 hy(e){e.preventDefault()}function lL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function cL(e){return e.indexOf("Edge/")!==-1}function uL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return lL(e)||cL(e)}function Cn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!Ns(r)&&s&&s.apply(void 0,[r].concat(i)),Ns(r)})}}function dL(){return"showOpenFilePicker"in window}function fL(e){if($r(e)){var t=Object.entries(e).filter(function(n){var r=da(n,2),o=r[0],i=r[1],a=!0;return N1(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(F1))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=da(r,2),i=o[0],a=o[1];return fy(fy({},n),{},O1({},i,a))},{});return[{description:"Files",accept:t}]}return e}function pL(e){if($r(e))return Object.entries(e).reduce(function(t,n){var r=da(n,2),o=r[0],i=r[1];return[].concat(uy(t),[o],uy(i))},[]).filter(function(t){return N1(t)||F1(t)}).join(",")}function mL(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function hL(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function N1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function F1(e){return/^.*\.[\w]+$/.test(e)}var gL=["children"],vL=["open"],yL=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],xL=["refKey","onChange","onClick"];function bL(e){return TL(e)||SL(e)||L1(e)||wL()}function wL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
209
209
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function TL(e){if(Array.isArray(e))return Cd(e)}function wu(e,t){return kL(e)||CL(e,t)||L1(e,t)||EL()}function EL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
210
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L1(e,t){if(e){if(typeof e=="string")return Cd(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 Cd(e,t)}}function Cd(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 CL(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function kL(e){if(Array.isArray(e))return e}function gy(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 mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gy(Object(n),!0).forEach(function(r){kd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fs(e,t){if(e==null)return{};var n=RL(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 RL(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 Ip=E.forwardRef(function(e,t){var n=e.children,r=Fs(e,gL),o=$1(r),i=o.open,a=Fs(o,vL);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(mt(mt({},a),{},{open:i})))});Ip.displayName="Dropzone";var V1={disabled:!1,getFilesFromEvent:FF,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};Ip.defaultProps=V1;Ip.propTypes={children:rt.func,accept:rt.objectOf(rt.arrayOf(rt.string)),multiple:rt.bool,preventDropOnDocument:rt.bool,noClick:rt.bool,noKeyboard:rt.bool,noDrag:rt.bool,noDragEventsBubbling:rt.bool,minSize:rt.number,maxSize:rt.number,maxFiles:rt.number,disabled:rt.bool,getFilesFromEvent:rt.func,onFileDialogCancel:rt.func,onFileDialogOpen:rt.func,useFsAccessApi:rt.bool,autoFocus:rt.bool,onDragEnter:rt.func,onDragLeave:rt.func,onDragOver:rt.func,onDrop:rt.func,onDropAccepted:rt.func,onDropRejected:rt.func,onError:rt.func,validator:rt.func};var Rd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function $1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=mt(mt({},V1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,h=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,b=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=E.useMemo(function(){return pL(n)},[n]),O=E.useMemo(function(){return fL(n)},[n]),N=E.useMemo(function(){return typeof m=="function"?m:vy},[m]),V=E.useMemo(function(){return typeof g=="function"?g:vy},[g]),P=E.useRef(null),D=E.useRef(null),_=E.useReducer(PL,Rd),F=wu(_,2),j=F[0],B=F[1],M=j.isFocused,$=j.isFileDialogActive,J=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&dL()),X=function(){!J.current&&$&&setTimeout(function(){if(D.current){var te=D.current.files;te.length||(B({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",X,!1),function(){window.removeEventListener("focus",X,!1)}},[D,$,V,J]);var Q=E.useRef([]),Z=function(te){P.current&&P.current.contains(te.target)||(te.preventDefault(),Q.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",hy,!1),document.addEventListener("drop",Z,!1)),function(){b&&(document.removeEventListener("dragover",hy),document.removeEventListener("drop",Z))}},[P,b]),E.useEffect(function(){return!r&&v&&P.current&&P.current.focus(),function(){}},[P,v,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),G=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),Q.current=[].concat(bL(Q.current),[q.target]),Ja(q)&&Promise.resolve(o(q)).then(function(te){if(!(Ns(q)&&!C)){var me=te.length,Oe=me>0&&sL({files:te,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:c,validator:I}),He=me>0&&!Oe;B({isDragAccept:Oe,isDragReject:He,isDragActive:!0,type:"setDraggedFiles"}),l&&l(q)}}).catch(function(te){return Y(te)})},[o,l,Y,C,A,a,i,s,c,I]),L=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=Ja(q);if(te&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return te&&d&&d(q),!1},[d,C]),z=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=Q.current.filter(function(Oe){return P.current&&P.current.contains(Oe)}),me=te.indexOf(q.target);me!==-1&&te.splice(me,1),Q.current=te,!(te.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ja(q)&&u&&u(q))},[P,u,C]),K=E.useCallback(function(q,te){var me=[],Oe=[];q.forEach(function(He){var Ye=D1(He,A),Ot=wu(Ye,2),fn=Ot[0],En=Ot[1],Jn=j1(He,a,i),er=wu(Jn,2),tr=er[0],W=er[1],U=I?I(He):null;if(fn&&tr&&!U)me.push(He);else{var ze=[En,W];U&&(ze=ze.concat(U)),Oe.push({file:He,errors:ze.filter(function(et){return et})})}}),(!s&&me.length>1||s&&c>=1&&me.length>c)&&(me.forEach(function(He){Oe.push({file:He,errors:[aL]})}),me.splice(0)),B({acceptedFiles:me,fileRejections:Oe,isDragReject:Oe.length>0,type:"setFiles"}),p&&p(me,Oe,te),Oe.length>0&&h&&h(Oe,te),me.length>0&&f&&f(me,te)},[B,s,A,a,i,c,p,f,h,I]),ie=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),Q.current=[],Ja(q)&&Promise.resolve(o(q)).then(function(te){Ns(q)&&!C||K(te,q)}).catch(function(te){return Y(te)}),B({type:"reset"})},[o,K,Y,C]),H=E.useCallback(function(){if(J.current){B({type:"openDialog"}),N();var q={multiple:s,types:O};window.showOpenFilePicker(q).then(function(te){return o(te)}).then(function(te){K(te,null),B({type:"closeDialog"})}).catch(function(te){mL(te)?(V(te),B({type:"closeDialog"})):hL(te)?(J.current=!1,D.current?(D.current.value=null,D.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(te)});return}D.current&&(B({type:"openDialog"}),N(),D.current.value=null,D.current.click())},[B,N,V,y,K,Y,O,s]),ye=E.useCallback(function(q){!P.current||!P.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),H())},[P,H]),Te=E.useCallback(function(){B({type:"focus"})},[]),Re=E.useCallback(function(){B({type:"blur"})},[]),$e=E.useCallback(function(){T||(uL()?setTimeout(H,0):H())},[T,H]),se=function(te){return r?null:te},xe=function(te){return w?null:se(te)},le=function(te){return S?null:se(te)},be=function(te){C&&te.stopPropagation()},oe=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,me=te===void 0?"ref":te,Oe=q.role,He=q.onKeyDown,Ye=q.onFocus,Ot=q.onBlur,fn=q.onClick,En=q.onDragEnter,Jn=q.onDragOver,er=q.onDragLeave,tr=q.onDrop,W=Fs(q,yL);return mt(mt(kd({onKeyDown:xe(Cn(He,ye)),onFocus:xe(Cn(Ye,Te)),onBlur:xe(Cn(Ot,Re)),onClick:se(Cn(fn,$e)),onDragEnter:le(Cn(En,G)),onDragOver:le(Cn(Jn,L)),onDragLeave:le(Cn(er,z)),onDrop:le(Cn(tr,ie)),role:typeof Oe=="string"&&Oe!==""?Oe:"presentation"},me,P),!r&&!w?{tabIndex:0}:{}),W)}},[P,ye,Te,Re,$e,G,L,z,ie,w,S,r]),ue=E.useCallback(function(q){q.stopPropagation()},[]),ee=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,me=te===void 0?"ref":te,Oe=q.onChange,He=q.onClick,Ye=Fs(q,xL),Ot=kd({accept:A,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:se(Cn(Oe,ie)),onClick:se(Cn(He,ue)),tabIndex:-1},me,D);return mt(mt({},Ot),Ye)}},[D,n,s,ie,r]);return mt(mt({},j),{},{isFocused:M&&!r,getRootProps:oe,getInputProps:ee,rootRef:P,inputRef:D,open:se(H)})}function PL(e,t){switch(t.type){case"focus":return mt(mt({},e),{},{isFocused:!0});case"blur":return mt(mt({},e),{},{isFocused:!1});case"openDialog":return mt(mt({},Rd),{},{isFileDialogActive:!0});case"closeDialog":return mt(mt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return mt(mt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return mt(mt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return mt({},Rd);default:return e}}function vy(){}const AL={isImage:e=>e.type.includes("image")},IL=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(AL.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Gv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Gv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Lo,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(i0,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Lo,{className:"text-danger"})})]})},_L=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(IL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),OL=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(_L,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),ML=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(aI,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),DL=({idle:e=ML,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:c,isDragActive:l}=$1({onDrop:a});return x.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...c(r),name:r.name,id:r.name}),x.jsx(OL,{onDeleteFile:t,isDragActive:l,idle:e,files:r.files??o})]})},jL=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},yy=40,NL=e=>x.jsx(E.Fragment,{children:e.children}),FL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},xy=[],LL=E.forwardRef(function(t,n){return x.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(xr,{children:t.children})})}),VL=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),$L={List:LL,Item:VL},zL=e=>{const t=At(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),c=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(c>a.width)return i(!0)},[r]),x.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?x.jsxs(Yd,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},BL=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:c,selectedLabel:l,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:h=!1,onChangeOptions:g,...m},y)=>{const v=E.useMemo(()=>new yn(r.map(ee=>[ee.value,ee])),[r]),b=E.useRef(null),T=E.useRef(null),w=m.value??m.defaultValue??xy,S=At(),[C,k]=E.useState(0),[I,A]=E.useState(!1),[O,N]=E.useState(""),[V,P]=E.useState(()=>{const ee=new yn;return w.forEach(q=>{const te=v.get(q);return te?ee.set(q,te):void 0}),ee}),D=E.useMemo(()=>Array.from(V.keys()),[V]),[_,F]=E.useState(()=>{const ee=new Set(w);return r.reduce((q,te)=>ee.has(te.value)?[...q,te.label??te.value]:q,[])??w}),[j,B]=E.useState(null),M=E.useRef(xy),$=h&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...r]:r,J=O.length===0?$:ap($,"value",[{key:"value",value:O},{key:"label",value:O}]),X=lp(I,"block-only"),Q=J.filter(ee=>ee.hidden!==!0),Z=Q.length===0,{x:Y,y:G,strategy:L,refs:z,context:K}=Er({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:di,middleware:[Sa(4),Pw({padding:10,elementContext:"reference",apply(ee){const q=ee.elements.floating.querySelector("ul"),te=(q==null?void 0:q.getBoundingClientRect().height)||0,me=Ki(z.reference.current,window.innerHeight),Oe=Math.min(te<yy?me:te,me,ee.availableHeight),He=Q.length===0?yy:Math.min(Oe,me,te),Ye=`${b.current.getBoundingClientRect().width}px`;Object.assign(ee.elements.floating.style,{width:Ye,maxWidth:Ye,height:He})}})]}),ie=Ww(K,FL),{getReferenceProps:H,getFloatingProps:ye,getItemProps:Te}=Cr([so(K,{role:"listbox"}),ao(K),El(K,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ee=>B(q=>ee??q)})]);E.useEffect(()=>{if(!I)return k(0);const ee=z.reference;if(ee.current===null)return;const q=Ki(ee.current,window.innerHeight);setTimeout(()=>k(Math.min(q,Q.length*40)),100)},[O,I,z.reference]),E.useEffect(()=>{m.value&&P(new yn(m.value.map(ee=>[ee,v.get(ee)])))},[m.value,v]),E.useEffect(()=>{const ee=z.reference.current;if(ee)return ga(ee)},[]);const Re=(ee,q)=>{const te=V.clone(He=>He.has(ee.value)?He.remove(ee.value):He.set(ee.value,ee));P(te);const me=z.reference.current;if(!me)return;const Oe=te.map(He=>He.value);me==null||me.setAttribute("data-value",JSON.stringify(Oe)),g&&g(Oe),F(He=>He.concat(ee.label??"")),N(""),B(q)},$e=ee=>{const q=ee.target.value;return N(q),!I&&q===""?A(!0):(ee.target.name=m.name||"",q?A(!0):void 0)},se=()=>{var ee;A(!0),N(""),(ee=z.reference.current)==null||ee.focus()},xe=()=>{A(!0),N("")},le=()=>{var ee;(ee=z.reference.current)==null||ee.setAttribute("data-value","[]"),N(""),A(!1),P(new yn),g==null||g([])},be=m.id||m.name,oe=V.map((ee,q)=>x.jsx(Yd,{size:"small",icon:x.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:te=>{te.preventDefault(),te.stopPropagation(),Re(ee,q),A(!1)},children:x.jsx(dl,{size:14})}),children:ee.label??ee.value},`MultiSelect-${ee.value}-x`)),ue={height:Z?"0":V.size===0?C-49:C-86};return x.jsxs(Pa,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:p,required:f,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:se,children:[x.jsx(Af,{size:20}),x.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),V?x.jsx("button",{type:"button",onClick:le,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("li",{...H({...m,onFocus:xe,id:`${be}-shadow`,name:`${be}-shadow`,ref:z.setReference}),tabIndex:0,role:"button","data-name":be,"data-target":be,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),value:I?O:_||V,className:Ie("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:x.jsx(zL,{label:l,children:oe})}),x.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:y,required:f,defaultValue:m.value||D||void 0}),x.jsx(io,{preserveTabOrder:!0,children:I?x.jsx(mi,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...ye({ref:z.setFloating,style:{...ie.styles,top:G??0,position:L,left:Y}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-80 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[x.jsx("input",{autoFocus:!0,value:O,onChange:$e,title:m.title,placeholder:S.multiSelectInnerPlaceholder,onKeyDown:ee=>{var q,te;if(ee.key==="ArrowDown"){let me=j+1;return me>Q.length-1&&(me=0),(q=T.current)==null||q.scrollIntoView({index:me}),B(me)}if(ee.key==="ArrowUp"){let me=j-1;return me<0&&(me=Q.length-1),(te=T.current)==null||te.scrollIntoView({index:me}),B(me)}if(ee.key==="Escape")return ee.currentTarget.blur(),A(!1);if(ee.key==="Enter"){if(j!==null&&Q[j])return ee.preventDefault(),Re(Q[j],j);if(Q.length===1)return ee.preventDefault(),Re(Q[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),Z?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||S.autocompleteEmpty})}):null,Z?null:x.jsx(ft.div,{initial:!1,"data-floating":"true",ref:X,animate:{height:Z?"auto":C},style:ue,className:"max-h-80 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return k(0);const q=z.floating.current.querySelectorAll("li").item(0),te=(q?q.getBoundingClientRect().height:40)*Q.length;return ha.flushSync(()=>k(te+2))},children:x.jsx(Cp,{ref:T,hidden:Z,data:Q,components:$L,style:ue,className:"max-h-80 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ee,q)=>{const te=q.Render??NL,me=V.has(q.value)||V.has(q.label??""),Oe=j===ee,He=q.label??q.value;return x.jsxs("button",{"data-value":q.value,...Te({ref:Ye=>void(M.current[ee]=Ye),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>Re(q,ee)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${me||Oe?"bg-floating-hover text-floating-foreground":""}`,children:[x.jsx(Pp,{onChange:$f,checked:me,"aria-checked":me,onClick:Ye=>{Ye.stopPropagation(),Re(q,ee)}}),x.jsx(te,{...m,label:q.label,value:q.value,children:He})]})}})}),V.size===0?null:x.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:oe})]})}):null})]})}),HL=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:Ie("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]}),Qr=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:c,optionalText:l,container:u,hideLeft:d=!1,right:p,left:f,error:h,...g},m)=>{const y=At(),v=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(m,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const w=new AbortController,S=v.current,C=ga(v.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const T=()=>{var w;return(w=v.current)==null?void 0:w.focus()};return x.jsx(Pa,{info:n,left:f,error:h,form:g.form,loading:c,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:l,labelClassName:i,placeholder:g.placeholder,right:x.jsxs("label",{htmlFor:b,children:[p,x.jsxs("button",{onClick:T,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Af,{size:20}),x.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:x.jsxs("select",{...g,id:b,name:b,value:g.value,required:e,ref:qn(m,v),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Ie("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})});function z1(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ro(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function by(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=by(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():by(e[o],null)}}}}function Jr(...e){return R.useCallback(B1(...e),e)}function H1(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),c=n.length;n=[...n,a];const l=d=>{var y;const{scope:p,children:f,...h}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[c])||s,m=R.useMemo(()=>h,Object.values(h));return x.jsx(g.Provider,{value:m,children:f})};l.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,h=R.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,WL(o,...t)]}function WL(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function W1(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function qL({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=UL({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=W1(n),c=R.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else o(l)},[i,e,o,s]);return[a,c]}function UL({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=W1(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var KL=R.createContext(void 0);function YL(e){const t=R.useContext(KL);return e||t||"ltr"}function GL(e){const t=R.useRef({value:e,previous:e});return R.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ZL=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{};function XL(e){const[t,n]=R.useState(void 0);return ZL(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Pd(e){const t=QL(e),n=R.forwardRef((r,o)=>{const{children:i,...a}=r,s=R.Children.toArray(i),c=s.find(eV);if(c){const l=c.props.children,u=s.map(d=>d===c?R.Children.count(l)>1?R.Children.only(null):R.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...a,ref:o,children:R.isValidElement(l)?R.cloneElement(l,void 0,u):null})}return x.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function QL(e){const t=R.forwardRef((n,r)=>{const{children:o,...i}=n;if(R.isValidElement(o)){const a=nV(o),s=tV(i,o.props);return o.type!==R.Fragment&&(s.ref=r?B1(r,a):a),R.cloneElement(o,s)}return R.Children.count(o)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JL=Symbol("radix.slottable");function eV(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JL}function tV(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function nV(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Il=rV.reduce((e,t)=>{const n=Pd(`Primitive.${t}`),r=R.forwardRef((o,i)=>{const{asChild:a,...s}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(c,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function oV(e){const t=e+"CollectionProvider",[n,r]=H1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:m,children:y}=g,v=E.useRef(null),b=E.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:b,collectionRef:v,children:y})};a.displayName=t;const s=e+"CollectionSlot",c=Pd(s),l=E.forwardRef((g,m)=>{const{scope:y,children:v}=g,b=i(s,y),T=Jr(m,b.collectionRef);return x.jsx(c,{ref:T,children:v})});l.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Pd(u),f=E.forwardRef((g,m)=>{const{scope:y,children:v,...b}=g,T=E.useRef(null),w=Jr(m,T),S=i(u,y);return E.useEffect(()=>(S.itemMap.set(T,{ref:T,...b}),()=>void S.itemMap.delete(T))),x.jsx(p,{[d]:"",ref:w,children:v})});f.displayName=u;function h(g){const m=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const v=m.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((S,C)=>b.indexOf(S.ref.current)-b.indexOf(C.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:l,ItemSlot:f},h,r]}var q1=["PageUp","PageDown"],U1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],K1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},xi="Slider",[Ad,iV,aV]=oV(xi),[Y1,Az]=H1(xi,[aV]),[sV,_l]=Y1(xi),G1=R.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:h,...g}=e,m=R.useRef(new Set),y=R.useRef(0),b=a==="horizontal"?lV:cV,[T=[],w]=qL({prop:u,defaultProp:l,onChange:O=>{var V;(V=[...m.current][y.current])==null||V.focus(),d(O)}}),S=R.useRef(T);function C(O){const N=mV(T,O);A(O,N)}function k(O){A(O,y.current)}function I(){const O=S.current[y.current];T[y.current]!==O&&p(T)}function A(O,N,{commit:V}={commit:!1}){const P=yV(i),D=xV(Math.round((O-r)/i)*i+r,P),_=z1(D,[r,o]);w((F=[])=>{const j=fV(F,_,N);if(vV(j,c*i)){y.current=j.indexOf(_);const B=String(j)!==String(F);return B&&V&&p(j),B?j:F}else return F})}return x.jsx(sV,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:m.current,values:T,orientation:a,form:h,children:x.jsx(Ad.Provider,{scope:e.__scopeSlider,children:x.jsx(Ad.Slot,{scope:e.__scopeSlider,children:x.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:Ro(g.onPointerDown,()=>{s||(S.current=T)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,T.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:N})=>{if(!s){const D=q1.includes(O.key)||O.shiftKey&&U1.includes(O.key)?10:1,_=y.current,F=T[_],j=i*D*N;A(F+j,_,{commit:!0})}}})})})})});G1.displayName=xi;var[Z1,X1]=Y1(xi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),lV=R.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,p]=R.useState(null),f=Jr(t,b=>p(b)),h=R.useRef(void 0),g=YL(o),m=g==="ltr",y=m&&!i||!m&&i;function v(b){const T=h.current||d.getBoundingClientRect(),w=[0,T.width],C=_p(w,y?[n,r]:[r,n]);return h.current=T,C(b-T.left)}return x.jsx(Z1,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:x.jsx(Q1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const T=v(b.clientX);a==null||a(T)},onSlideMove:b=>{const T=v(b.clientX);s==null||s(T)},onSlideEnd:()=>{h.current=void 0,c==null||c()},onStepKeyDown:b=>{const w=K1[y?"from-left":"from-right"].includes(b.key);l==null||l({event:b,direction:w?-1:1})}})})}),cV=R.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=R.useRef(null),d=Jr(t,u),p=R.useRef(void 0),f=!o;function h(g){const m=p.current||u.current.getBoundingClientRect(),y=[0,m.height],b=_p(y,f?[r,n]:[n,r]);return p.current=m,b(g-m.top)}return x.jsx(Z1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:x.jsx(Q1,{"data-orientation":"vertical",...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=h(g.clientY);i==null||i(m)},onSlideMove:g=>{const m=h(g.clientY);a==null||a(m)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const y=K1[f?"from-bottom":"from-top"].includes(g.key);c==null||c({event:g,direction:y?-1:1})}})})}),Q1=R.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=_l(xi,n);return x.jsx(Il.span,{...l,ref:t,onKeyDown:Ro(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):q1.concat(U1).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:Ro(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Ro(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Ro(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),J1="SliderTrack",eS=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_l(J1,n);return x.jsx(Il.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});eS.displayName=J1;var Id="SliderRange",tS=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_l(Id,n),i=X1(Id,n),a=R.useRef(null),s=Jr(t,a),c=o.values.length,l=o.values.map(p=>rS(p,o.min,o.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return x.jsx(Il.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});tS.displayName=Id;var _d="SliderThumb",nS=R.forwardRef((e,t)=>{const n=iV(e.__scopeSlider),[r,o]=R.useState(null),i=Jr(t,s=>o(s)),a=R.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return x.jsx(uV,{...e,ref:i,index:a})}),uV=R.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=_l(_d,n),s=X1(_d,n),[c,l]=R.useState(null),u=Jr(t,v=>l(v)),d=c?a.form||!!c.closest("form"):!0,p=XL(c),f=a.values[r],h=f===void 0?0:rS(f,a.min,a.max),g=pV(r,a.values.length),m=p==null?void 0:p[s.size],y=m?hV(m,h,s.direction):0;return R.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),x.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${h}% + ${y}px)`},children:[x.jsx(Ad.ItemSlot,{scope:e.__scopeSlider,children:x.jsx(Il.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:Ro(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&x.jsx(dV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});nS.displayName=_d;var dV=e=>{const{value:t,...n}=e,r=R.useRef(null),o=GL(t);return R.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&c){const l=new Event("input",{bubbles:!0});c.call(i,t),i.dispatchEvent(l)}},[o,t]),x.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function fV(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function rS(e,t,n){const i=100/(n-t)*(e-t);return z1(i,[0,100])}function pV(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function mV(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function hV(e,t,n){const r=e/2,i=_p([0,50],[0,r]);return(r-i(t)*n)*n}function gV(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function vV(e,t){if(t>0){const n=gV(e);return Math.min(...n)>=t}return!0}function _p(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yV(e){return(String(e).split(".")[1]||"").length}function xV(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var bV=G1,wV=eS,SV=tS,TV=nS;const EV=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Ve.number(i)&&n(i);const a=new MutationObserver(s=>{const c=s[0].target,l=Number(c.getAttribute("aria-valuenow"));n(Ve.number(l)?l:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),x.jsx(cp,{title:"",ref:r,as:TV,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},CV=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(li()),s=r||o||[];return x.jsxs(bV,{...i,defaultValue:r,value:o,className:Ie("relative flex h-5 w-full touch-none select-none items-center",n),children:[x.jsx(wV,{className:"relative h-2 grow rounded-full bg-background",children:x.jsx(SV,{className:"absolute h-full rounded-full bg-primary"})}),s.map((c,l)=>x.jsx(EV,{tooltip:t??!1},`${a.current}-${l}`))]})},kV=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,c]=E.useState(o.checked??!1),l=s,u=E.useRef(null),d=Ur(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},h=u.current;return h.addEventListener("change",f),()=>h==null?void 0:h.removeEventListener("change",f)}},[]);const p=()=>{var h,g;const f=!((h=u.current)!=null&&h.checked);c(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Ie("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:l,id:o.id||a,"data-trigger":"change","data-checked":l,disabled:o.disabled||t,onChange:f=>c(f.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":l,"data-checked":l,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),RV=e=>{const[t,n]=cA();return E.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),c=s.every(u=>u.checked),l=s.indexOf(a);c&&l!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:mA(.075,{from:l})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},PV=R1("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
211
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),AV=e=>{const[t,n]=E.useState(0);return E.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},IV={Item:E.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},_V=e=>{const t=E.useRef(null),n=AV(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Aa,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(Cp,{height:n,useWindowScroll:!0,data:e.source,components:IV,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(Pp,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Mo,{children:x.jsx(If,{})})}),x.jsx("div",{})]})};var OV=Object.defineProperty,wy=Object.getOwnPropertySymbols,MV=Object.prototype.hasOwnProperty,DV=Object.prototype.propertyIsEnumerable,Sy=(e,t,n)=>t in e?OV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jV=(e,t)=>{for(var n in t||(t={}))MV.call(t,n)&&Sy(e,n,t[n]);if(wy)for(var n of wy(t))DV.call(t,n)&&Sy(e,n,t[n]);return e},Op=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},NV=(e,t,n,r)=>Ol(Op,e,t,n,r),Zo=e=>typeof e=="object",fr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Zo(e)&&!Zo(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=>fr(e[r],t[r]))},FV=(e,t)=>(Zo(e)||Array.isArray(e))&&t?e[t]:e,LV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ls=e=>/[0-9.]+/.test(e),Ty=e=>["string","number"].includes(typeof e),Ey=e=>e==null||(e==null?void 0:e.length)===0||e==="",Cy={eq:fr,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:Ey,notEmpty:e=>!Ey(e),in:(e,t)=>Op(t,n=>fr(e,n)),notIn:(e,t)=>oS(t,n=>!fr(e,n))},VV=e=>{if(e in Cy)return Cy[e];throw new Error("Linq - Symbol not found")},Io=(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},Ol=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=VV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},$V=(e,t,n,r)=>Ol(Io,e,t,n,r),oS=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},zV=(e,t,n,r)=>Ol(oS,e,t,n,r),iS=e=>{if(e===null)return null;const t=jV({},e);return Object.keys(t).forEach(n=>t[n]=Zo(e[n])?iS(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},ky=(e,t)=>{if(Zo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(fr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(fr(t,r))return!0}return!1},BV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},HV=e=>Io(e,(t,n,r)=>Zo(t)?n===r.findIndex(o=>fr(o,t)):n===r.indexOf(t)),WV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},aS=(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())},qV=(e,t)=>aS(e,n=>n[t]),Ry=(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},UV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},KV=(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 Ls(e)&&Ls(t)?r.map(a=>Number.parseInt(a)):r},Su=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ls(e)&&Ls(t)){const o=[],[i,a]=UV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return KV(e,t,r)},YV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Su(r,o,1):Su(r,i,Number.parseInt(o,10))}return Ty(e)&&Ty(t)?Su(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Tu=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},Py=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},GV=(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)},ZV=(e,t,n,r)=>Ol(GV,e,t,n,r),Ay=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(LV(t))},sS=(e=>(e.Asc="asc",e.Desc="desc",e))(sS||{}),XV=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),QV=(e,t)=>e.sort(XV(t)),JV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Io(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},e$=class Od{constructor(t=[]){this.array=t}static Range(...t){return YV(...t)}static New(t){return new Od(t)}Where(t,n,r){return this.array=$V(this.array,t,n,r),this}Some(t,n,r){return NV(this.array,t,n,r)}All(t,n,r){return zV(this.array,t,n,r)}Reverse(){return this.array=Py(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=ZV(this.array,t,n,r),this}Distinct(){return this.array=HV(this.array),this}First(t){return t===void 0?this.array[0]:WV(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?Tu((n,r)=>n+r,0,this.array):Tu((n,r)=>n+FV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return qV(this.array,t)}GroupWith(t){return aS(this.array,t)}Except(t){return Io(this.array,n=>!ky(t,n))}Intersect(t){return Io(this.array,n=>ky(t,n))}OrderBy(t,n){let r;return r=t?Ay(this.array,t):this.array.toSorted(),this.array=n==="desc"?Py(r):r,this}Includes(t){return Op(this.array,n=>fr(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 Tu(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Ry(this.array,n=>[t,n]))}Zip(t,n){return Ry(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Io(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Od(iS(this.array))}ToObject(t){return BV(this.array,t)}Sort(t){return Array.isArray(t)?QV(this.array,t):Ay(this.array,t)}Unique(t){return JV(this.array,t)}},lS=e$,Eu={},Iy;function t$(){return Iy||(Iy=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,y)=>{try{Object.keys(m).forEach(y)}catch(v){window.console.log(v)}},n=m=>m==null,r=m=>{const y=typeof m;return y==="string"||y==="number"||y==="boolean"||n(m)},o=(m,y)=>{const v=y.getItem(m);try{return JSON.parse(v)}catch{return v??null}},i=m=>Object.keys(m).reduce((y,v)=>({...y,[v]:o(v,m)}),{}),a=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,s="1969-12-31T23:59:59.000Z",c=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,y)=>(m[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),m),{}),l=new Set,u=()=>{const m=c();l.forEach(y=>y(m))},d=[{name:"expires",parse:m=>`expires=${a(m.expires??s)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${a(m.expires??s)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const y=m.domain??"";return y===""?"":`domain=${m.multiDomain?".":""}${y}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],p={json:c,listener:m=>(l.add(m),()=>l.delete(m)),clearListeners:()=>l.clear(),has:m=>document.cookie.split(";").some(y=>y.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const y=p.json()[m];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,y,v={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),T=d.reduce((w,S)=>{const C=S.parse(v);return C===""?w:w.concat(C)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=T,u()}},f=m=>{const y=new Set,v=b=>{m().removeItem(b);const T=i(m());y.forEach(w=>w(T))};return{delete:v,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const T=m().getItem(b);return!n(T)},deleteAll:()=>{t(m(),v),y.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,T)=>{m().setItem(b,JSON.stringify(T)),y.forEach(w=>w(m()))}}},h=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=h,e.createStorage=f}(Eu)),Eu}var qi=t$();const Mp=e=>e.headerLabel??e.thead??e.id,Dp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var _o=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(_o||{});const jp=e=>e.type==="number"?e.valueAsNumber:e.value,n$=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},r$={},o$=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},i$=(e,t,n=r$)=>{const r=Yr()?null:qi.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Nf({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:o$(t,r==null?void 0:r.cols)},a=>{const s=c=>{const l=a.state(),u={...l,...c};return Yr()||qi.LocalStorage.set(`@components/table-${l.name}`,u),u};return s(a.state()),{set:c=>s(c)}});return{...o,...i,name:e}},a$=e=>{const t=Ur(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Md=(e,t,n,r={})=>{var l,u;const o=e.id,i=e.type??_o.Text,a=t[i]??[],s=((l=a.find(d=>d["data-default"]))==null?void 0:l.value)??((u=a[0])==null?void 0:u.value),c=n[s];return{id:li(),operation:c,label:Mp(e),name:o,type:i,value:"",...r}},Np=()=>{const e=At(),t=E.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:E.useMemo(()=>({[_o.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[_o.Boolean]:[t.is,t.isNot],[_o.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},s$=e=>{const t=At(),n=Np(),r=()=>{const c=e.cols.at(0);e.set(l=>[...l,Md(c,n.options,n.operations)])},o=c=>{const l=c.target.dataset.id||"",u=c.target.value;e.set(d=>d.map(p=>{if(l!==p.id)return p;const f=e.cols.find(h=>u===h.id);return Md(f,n.options,n.operations,{value:""})}))},i=c=>{const l=c.target.dataset.id||"",u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,operation:n.operations[u]}:p))},a=c=>{const l=c.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==l))},s=c=>{const l=c.target.dataset.id||"",u=jp(c.target);e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(hi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(UA,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const l=n.options[c.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Qr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:o}),x.jsx(Qr,{"data-id":c.id,onChange:i,value:c.operation.value,options:l,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Aa,{"data-id":c.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:x.jsx(Lo,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(_f,{size:14})," ",t.tableFilterNewFilter]})})]})})})},l$=({filter:e,onDelete:t,set:n})=>{const r=At(),o=Np(),i=s=>{const c=s.target.value,l=s.target.dataset.id||"";n(u=>u.map(d=>d.id===l?{...d,operation:o.operations[c]}:d))},a=s=>{const c=s.target.dataset.id||"",l=jp(s.target);n(u=>u.map(d=>d.id===c?{...d,value:l}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Qr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Aa,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Lo,{className:"text-danger",size:14})})]})},c$=({item:e,onPointerDown:t})=>{const n=ul(0);return x.jsxs(t0,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(HA,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},u$=e=>{var c;const t=At(),n=Dp(e.cols),r=fA(),[o,i]=E.useState(((c=e.groups[0])==null?void 0:c.thead)||""),a=l=>{var m;const u=l.target,d=u.value,p=u.options.selectedIndex,f=((m=u.options.item(p))==null?void 0:m.label)||"";i(f);const h=new lS(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(dT(h).map((y,v)=>{const b=h[y];return{...g,groupId:li(),groupKey:d,index:v,rows:b,groupName:y}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(hi,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(oI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Qr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),x.jsx(Mo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:x.jsx(Lo,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(SE,{children:x.jsx(e0,{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=>x.jsx(c$,{item:l,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},d$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),f$=(e,t)=>e.toSorted(d$(t)),cS=(e,t,n)=>({label:t,id:li(),type:n,value:e.id}),p$=e=>{const t=At(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const c=e.cols[0];c&&e.set(l=>[...l,cS(c,n.asc.label,n.asc.value)])},i=c=>l=>{const u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))},a=c=>l=>{const u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,type:u}:p))},s=c=>{const l=c.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==l))};return x.jsx(E.Fragment,{children:x.jsx(hi,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(r0,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(c=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Qr,{options:e.options,value:c.value,onChange:i(c.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Qr,{onChange:a(c.id),value:c.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":c.id,onClick:s,children:x.jsx(Lo,{className:"text-danger",size:14})})]},`sorter-select-${c.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(_f,{size:14})," ",t.tableSortAddButton]})})]})})})},m$=e=>{const t=At(),[n,r]=E.useState(()=>{const s=e.sorters.find(c=>c.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");E.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const c=s.findIndex(u=>u.value===e.col.id),l=cS(e.col,n,n);return c===-1?[...s,l]:(s[c]=l,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Mp(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?x.jsx(RA,{size:14}):null,n==="desc"?x.jsx(CA,{size:14}):null,n==="undefined"?x.jsx(r0,{size:14}):null]})},h$=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(s$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(p$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(u$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=jp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function g$(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const v$=e=>{const t=E.useId(),n=At(),r=E.useMemo(()=>g$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return x.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(E.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:x.jsx(E.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(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?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},y$=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const l=n.current,u=t.current;l===null||u===null||(u.style.left=`-${l.getBoundingClientRect().width+4}px`)},c=()=>o("opacity-100");return E.useEffect(()=>{const l=n.current;if(l===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(l),()=>u.disconnect()},[]),x.jsx("div",{ref:t,onMouseEnter:c,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:x.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},x$=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,c=Vf(t,i.id),l=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?x.jsx(y$,{children:x.jsx(p,{col:i,row:t,rowIndex:e})}):null,x.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),x.jsx("span",{className:"relative",children:o?sp:l?x.jsx(E.Fragment,{children:x.jsx(l,{row:t,matrix:s,col:i,rowIndex:e,value:c})}):x.jsx(E.Fragment,{children:Ve.nil(c)?"":c})}))})})},b$={top:0,left:0,right:0,bottom:-1},w$=e=>{var g;const t=Rp(),n=At(),r=e.filters.filter(m=>m.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=Np(),c=o?XA:JA,l=E.useRef(null),u=m=>{const y=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==y))},d=E.useCallback(m=>{if(m===null)return;l.current=m;const y=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(m=>e.header.id===m.value),f=p!=null&&p.type?p.type===sS.Asc?"ascending":"descending":"none",h=Mp(e.header);return x.jsxs(t0,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[x.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?x.jsx(hi,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),x.jsx(c,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"font-medium",children:h})]}),children:x.jsxs("ul",{className:"font-medium",children:[r.length===0?null:x.jsx(E.Fragment,{children:r.map(m=>x.jsx("li",{className:"my-1",children:x.jsx(l$,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(Md(e.header,s.options,s.operations))),children:[x.jsx(_f,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?x.jsx(m$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(ft.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:b$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:m=>void m.currentTarget.focus(),onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(l.current===null)return;l.current.setAttribute("data-resized","true");const y=l.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);l.current.style.width=`${Math.abs(y+b)}px`}},onDoubleClick:()=>{l.current!==null&&(l.current.style.width="auto")},onDrag:(m,y)=>{if(l.current===null)return;l.current.setAttribute("data-resized","true");const v=l.current.getBoundingClientRect().width,b=y.delta.x;l.current.style.width=`${Math.abs(v+b)}px`}})]})},S$=e=>{const[t,n]=a$(e.setCols);return x.jsx(e0,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:x.jsx(xr,{children:e.headers.map((r,o)=>x.jsx(w$,{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}`))})})},uS=E.createContext({}),T$=()=>E.useContext(uS),E$=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(xr,{children:n.children})})),C$=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse text-left ${t??""}`})),k$=E.forwardRef(({context:e,...t},n)=>{const r=T$(),o={...t==null?void 0:t.style,top:Ve.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs hidden md:table-header-group group:sticky top-0 bg-transparent",ref:n})}),R$=E.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row h-fit flex flex-wrap gap-1 flex-col justify-center md:table-row ${(n==null?void 0:n.className)??""}`})),P$=E.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),A$={TableHead:k$,Table:C$,TableBody:E$,TableRow:R$,TableFoot:P$},I$=[0,0,0,0,0,0,0,0,0,0],_$=e=>x.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?sp:x.jsx(V0,{})}),O$=()=>x.jsx(E.Fragment,{}),M$=()=>x.jsx(E.Fragment,{}),D$=[],_y=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:c=null,useControl:l=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),h=Ur(a),g=Ur(u.loadingMore),m=E.useMemo(()=>{if(u.loading)return I$;if(l)return u.rows;const b=new lS(u.rows);return t.length>0&&t.forEach(T=>T.value===""||Number.isNaN(T.value)?void 0:b.Where(T.name,T.operation.symbol,T.value)),r.length===0?b.Select():f$(b.Select(),r)},[u.loading,u.rows,l,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,T=new IntersectionObserver(w=>{var k;return w[w.length-1].isIntersecting&&g.current?((k=h.current)==null||k.call(h),void f(!0)):f(!1)});return T.observe(b),()=>T.disconnect()},[g,h]);const y=m.length===0,v={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group w-full rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(Q2,{useWindowScroll:!0,context:v,components:A$,totalCount:m.length,itemContent:y?O$:x$,data:y?D$:m,fixedFooterContent:p?M$:null,fixedHeaderContent:()=>x.jsx(S$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),y?x.jsx(_$,{loading:u.loading}):null,x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),c!==null?x.jsx(v$,{...c}):null]})},j$=(e,t)=>typeof t=="function"?t(e):t,es=(e,t,n)=>e===t||n==null?void 0:n(t),N$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Rp(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>Dp(e.cols),[e.cols]),[i,a]=Nf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const c=l=>u=>{const d=s.state();return{...d,[l]:j$(d[l],u)}};return{cols:c("cols"),sorters:c("sorters"),groups:c("groups"),filters:c("filters")}},{postMiddleware:[(s,c)=>{var l;return(l=e.set)==null||l.call(e,s),es((c==null?void 0:c.filters)??[],s.filters??[],e.setFilters),es((c==null?void 0:c.sorters)??[],s.sorters??[],e.setSorters),es((c==null?void 0:c.groups)??[],s.groups??[],e.setGroups),es((c==null?void 0:c.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(uS.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?x.jsx(h$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?x.jsx(_y,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):x.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,c)=>x.jsx("div",{className:"min-w-full",children:x.jsx(_y,{...e,group:s,index:c,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},F$=["INPUT","SELECT"],dS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{F$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Cu,Oy;function Fp(){if(Oy)return Cu;Oy=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Cu={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Cu}var ku,My;function fS(){if(My)return ku;My=1;var e=Fp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],y=0;y<256;++y)m.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return m}(),o=function(y){for(;y.length>1;){var v=y.pop(),b=v.obj[v.prop];if(n(b)){for(var T=[],w=0;w<b.length;++w)typeof b[w]<"u"&&T.push(b[w]);v.obj[v.prop]=T}}},i=function(y,v){for(var b=v&&v.plainObjects?{__proto__:null}:{},T=0;T<y.length;++T)typeof y[T]<"u"&&(b[T]=y[T]);return b},a=function m(y,v,b){if(!v)return y;if(typeof v!="object"&&typeof v!="function"){if(n(y))y.push(v);else if(y&&typeof y=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,v))&&(y[v]=!0);else return[y,v];return y}if(!y||typeof y!="object")return[y].concat(v);var T=y;return n(y)&&!n(v)&&(T=i(y,b)),n(y)&&n(v)?(v.forEach(function(w,S){if(t.call(y,S)){var C=y[S];C&&typeof C=="object"&&w&&typeof w=="object"?y[S]=m(C,w,b):y.push(w)}else y[S]=w}),y):Object.keys(v).reduce(function(w,S){var C=v[S];return t.call(w,S)?w[S]=m(w[S],C,b):w[S]=C,w},T)},s=function(y,v){return Object.keys(v).reduce(function(b,T){return b[T]=v[T],b},y)},c=function(m,y,v){var b=m.replace(/\+/g," ");if(v==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},l=1024,u=function(y,v,b,T,w){if(y.length===0)return y;var S=y;if(typeof y=="symbol"?S=Symbol.prototype.toString.call(y):typeof y!="string"&&(S=String(y)),b==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",k=0;k<S.length;k+=l){for(var I=S.length>=l?S.slice(k,k+l):S,A=[],O=0;O<I.length;++O){var N=I.charCodeAt(O);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){A[A.length]=I.charAt(O);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}O+=1,N=65536+((N&1023)<<10|I.charCodeAt(O)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(y){for(var v=[{obj:{o:y},prop:"o"}],b=[],T=0;T<v.length;++T)for(var w=v[T],S=w.obj[w.prop],C=Object.keys(S),k=0;k<C.length;++k){var I=C[k],A=S[I];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(v.push({obj:S,prop:I}),b.push(A))}return o(v),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},h=function(y,v){return[].concat(y,v)},g=function(y,v){if(n(y)){for(var b=[],T=0;T<y.length;T+=1)b.push(v(y[T]));return b}return v(y)};return ku={arrayToObject:i,assign:s,combine:h,compact:d,decode:c,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},ku}var Ru,Dy;function L$(){if(Dy)return Ru;Dy=1;var e=aT(),t=fS(),n=Fp(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,y){return m+"["+y+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(g,m){a.apply(g,i(m)?m:[m])},c=Date.prototype.toISOString,l=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:l,formatter:n.formatters[l],indices:!1,serializeDate:function(m){return c.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},p={},f=function g(m,y,v,b,T,w,S,C,k,I,A,O,N,V,P,D,_,F){for(var j=m,B=F,M=0,$=!1;(B=B.get(p))!==void 0&&!$;){var J=B.get(m);if(M+=1,typeof J<"u"){if(J===M)throw new RangeError("Cyclic object value");$=!0}typeof B.get(p)>"u"&&(M=0)}if(typeof I=="function"?j=I(y,j):j instanceof Date?j=N(j):v==="comma"&&i(j)&&(j=t.maybeMap(j,function(Re){return Re instanceof Date?N(Re):Re})),j===null){if(w)return k&&!D?k(y,u.encoder,_,"key",V):y;j=""}if(d(j)||t.isBuffer(j)){if(k){var X=D?y:k(y,u.encoder,_,"key",V);return[P(X)+"="+P(k(j,u.encoder,_,"value",V))]}return[P(y)+"="+P(String(j))]}var Q=[];if(typeof j>"u")return Q;var Z;if(v==="comma"&&i(j))D&&k&&(j=t.maybeMap(j,k)),Z=[{value:j.length>0?j.join(",")||null:void 0}];else if(i(I))Z=I;else{var Y=Object.keys(j);Z=A?Y.sort(A):Y}var G=C?String(y).replace(/\./g,"%2E"):String(y),L=b&&i(j)&&j.length===1?G+"[]":G;if(T&&i(j)&&j.length===0)return L+"[]";for(var z=0;z<Z.length;++z){var K=Z[z],ie=typeof K=="object"&&K&&typeof K.value<"u"?K.value:j[K];if(!(S&&ie===null)){var H=O&&C?String(K).replace(/\./g,"%2E"):String(K),ye=i(j)?typeof v=="function"?v(L,H):L:L+(O?"."+H:"["+H+"]");F.set(m,M);var Te=e();Te.set(p,F),s(Q,g(ie,ye,v,b,T,w,S,C,v==="comma"&&D&&i(j)?null:k,I,A,O,N,V,P,D,_,Te))}}return Q},h=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");v=m.format}var b=n.formatters[v],T=u.filter;(typeof m.filter=="function"||i(m.filter))&&(T=m.filter);var w;if(m.arrayFormat in o?w=m.arrayFormat:"indices"in m?w=m.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var S=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:S,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:y,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:v,formatter:b,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Ru=function(g,m){var y=g,v=h(m),b,T;typeof v.filter=="function"?(T=v.filter,y=T("",y)):i(v.filter)&&(T=v.filter,b=T);var w=[];if(typeof y!="object"||y===null)return"";var S=o[v.arrayFormat],C=S==="comma"&&v.commaRoundTrip;b||(b=Object.keys(y)),v.sort&&b.sort(v.sort);for(var k=e(),I=0;I<b.length;++I){var A=b[I],O=y[A];v.skipNulls&&O===null||s(w,f(O,A,S,C,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,k))}var N=w.join(v.delimiter),V=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},Ru}var Pu,jy;function V$(){if(jy)return Pu;jy=1;var e=fS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,f,h){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&h>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",c=function(f,h){var g={__proto__:null},m=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=h.parameterLimit===1/0?void 0:h.parameterLimit,v=m.split(h.delimiter,h.throwOnLimitExceeded?y+1:y);if(h.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var b=-1,T,w=h.charset;if(h.charsetSentinel)for(T=0;T<v.length;++T)v[T].indexOf("utf8=")===0&&(v[T]===s?w="utf-8":v[T]===a&&(w="iso-8859-1"),b=T,T=v.length);for(T=0;T<v.length;++T)if(T!==b){var S=v[T],C=S.indexOf("]="),k=C===-1?S.indexOf("="):C+1,I,A;k===-1?(I=h.decoder(S,r.decoder,w,"key"),A=h.strictNullHandling?null:""):(I=h.decoder(S.slice(0,k),r.decoder,w,"key"),A=e.maybeMap(i(S.slice(k+1),h,n(g[I])?g[I].length:0),function(N){return h.decoder(N,r.decoder,w,"value")})),A&&h.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),S.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var O=t.call(g,I);O&&h.duplicates==="combine"?g[I]=e.combine(g[I],A):(!O||h.duplicates==="last")&&(g[I]=A)}return g},l=function(p,f,h,g){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");m=Array.isArray(f)&&f[y]?f[y].length:0}for(var v=g?f:i(f,h,m),b=p.length-1;b>=0;--b){var T,w=p[b];if(w==="[]"&&h.parseArrays)T=h.allowEmptyArrays&&(v===""||h.strictNullHandling&&v===null)?[]:e.combine([],v);else{T=h.plainObjects?{__proto__:null}:{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=h.decodeDotInKeys?S.replace(/%2E/g,"."):S,k=parseInt(C,10);!h.parseArrays&&C===""?T={0:v}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&h.parseArrays&&k<=h.arrayLimit?(T=[],T[k]=v):C!=="__proto__"&&(T[C]=v)}v=T}return v},u=function(f,h,g,m){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,v=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,T=g.depth>0&&v.exec(y),w=T?y.slice(0,T.index):y,S=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;S.push(w)}for(var C=0;g.depth>0&&(T=b.exec(y))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,T[1].slice(1,-1))&&!g.allowPrototypes)return;S.push(T[1])}if(T){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");S.push("["+y.slice(T.index)+"]")}return l(S,h,g,m)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var h=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var m=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:m,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:h,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return Pu=function(p,f){var h=d(f);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?c(p,h):p,m=h.plainObjects?{__proto__:null}:{},y=Object.keys(g),v=0;v<y.length;++v){var b=y[v],T=u(b,g[b],h,typeof p=="string");m=e.merge(m,T,h)}return h.allowSparse===!0?m:e.compact(m)},Pu}var Au,Ny;function $$(){if(Ny)return Au;Ny=1;var e=L$(),t=V$(),n=Fp();return Au={formats:n,parse:t,stringify:e},Au}var z$=$$(),qe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(qe||(qe={}));var Fy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Fy||(Fy={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},re=qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class un extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),r}static assert(t){if(!(t instanceof un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}un.create=e=>new un(e);const fa=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:qe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,qe.assertNever(e)}return{message:n}};let B$=fa;function Dd(){return B$}const jd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ce(e,t){const n=Dd(),r=jd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===fa?void 0:fa].filter(o=>!!o)});e.common.issues.push(r)}class Ht{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ke;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return Ht.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return ke;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const ke=Object.freeze({status:"aborted"}),Ii=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),Ly=e=>e.status==="aborted",Vy=e=>e.status==="dirty",Xo=e=>e.status==="valid",Vs=e=>typeof Promise<"u"&&e instanceof Promise;function $s(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function pS(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var _i,Oi;class Vn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $y=(e,t)=>{if(Xo(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 un(e.common.issues);return this._error=n,this._error}}};function _e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var c,l;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:o}}class Fe{get description(){return this._def.description}_getType(t){return lr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Vs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return $y(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Xo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Xo(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Vs(o)?o:Promise.resolve(o));return $y(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:re.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Xn({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Wn.create(this,this._def)}nullable(){return no.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return jn.create(this)}promise(){return ma.create(this,this._def)}or(t){return Hs.create([this,t],this._def)}and(t){return Ws.create(this,t,this._def)}transform(t){return new Xn({..._e(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Gs({..._e(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new vS({typeName:Ee.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Zs({..._e(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ml.create(this,t)}readonly(){return Xs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const H$=/^c[^\s-]{8,}$/i,W$=/^[0-9a-z]+$/,q$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,U$=/^[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,K$=/^[a-z0-9_-]{21}$/i,Y$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,G$=/^[-+]?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)?)??$/,Z$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,X$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Iu;const Q$=/^(?:(?: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])$/,J$=/^(?:(?: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])$/,ez=/^(([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]))$/,tz=/^(([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])$/,nz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,mS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oz=new RegExp(`^${mS}$`);function hS(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function iz(e){return new RegExp(`^${hS(e)}$`)}function az(e){let t=`${mS}T${hS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function sz(e,t){return!!((t==="v4"||!t)&&Q$.test(e)||(t==="v6"||!t)&&ez.test(e))}function lz(e,t){if(!Y$.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function cz(e,t){return!!((t==="v4"||!t)&&J$.test(e)||(t==="v6"||!t)&&tz.test(e))}class Hn extends Fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),ke}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.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),ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ce(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Z$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Iu||(Iu=new RegExp(X$,"u")),Iu.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")U$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")K$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")H$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")W$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")q$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ulid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ce(o,{validation:"url",code:re.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),ce(o,{validation:"regex",code:re.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),ce(o,{code:re.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),ce(o,{code:re.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?az(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?oz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?iz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?G$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?sz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?lz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?cz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?nz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?rz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):qe.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:re.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ve.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...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}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function uz(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class eo extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),ke}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:re.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),ce(r,{code:re.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),ce(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?uz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_finite,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new eo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&qe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}eo.create=e=>new eo({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Qo extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;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),ce(r,{code:re.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),ce(r,{code:re.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),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),ke}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Qo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Qo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Qo.create=e=>{var t;return new Qo({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class Nd extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),ke}return Yt(t.data)}}Nd.create=e=>new Nd({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class pa extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),ke}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_date}),ke}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.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),ce(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):qe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new pa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}pa.create=e=>new pa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,..._e(e)});class Fd extends Fe{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),ke}return Yt(t.data)}}Fd.create=e=>new Fd({typeName:Ee.ZodSymbol,..._e(e)});class zs extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),ke}return Yt(t.data)}}zs.create=e=>new zs({typeName:Ee.ZodUndefined,..._e(e)});class Bs extends Fe{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),ke}return Yt(t.data)}}Bs.create=e=>new Bs({typeName:Ee.ZodNull,..._e(e)});class Ld extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Ld.create=e=>new Ld({typeName:Ee.ZodAny,..._e(e)});class Oo extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}Oo.create=e=>new Oo({typeName:Ee.ZodUnknown,..._e(e)});class yr extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),ke}}yr.create=e=>new yr({typeName:Ee.ZodNever,..._e(e)});class Vd extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),ke}return Yt(t.data)}}Vd.create=e=>new Vd({typeName:Ee.ZodVoid,..._e(e)});class jn extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ce(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),ke;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ce(n,{code:a?re.too_big:re.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ce(n,{code:re.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&&(ce(n,{code:re.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Vn(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Vn(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new jn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new jn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new jn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}jn.create=(e,t)=>new jn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,..._e(t)});function xo(e){if(e instanceof xt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Wn.create(xo(r))}return new xt({...e._def,shape:()=>t})}else return e instanceof jn?new jn({...e._def,type:xo(e.element)}):e instanceof Wn?Wn.create(xo(e.unwrap())):e instanceof no?no.create(xo(e.unwrap())):e instanceof Zn?Zn.create(e.items.map(t=>xo(t))):e}class xt extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=qe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const l=this._getOrReturnCtx(t);return ce(l,{code:re.invalid_type,expected:fe.object,received:l.parsedType}),ke}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof yr&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Vn(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof yr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(ce(o,{code:re.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Vn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,p=await u.value;l.push({key:d,value:p,alwaysSet:u.alwaysSet})}return l}).then(l=>Ht.mergeObjectSync(r,l)):Ht.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new xt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const c=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new xt({...this._def,unknownKeys:"strip"})}passthrough(){return new xt({...this._def,unknownKeys:"passthrough"})}extend(t){return new xt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new xt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new xt({...this._def,catchall:t})}pick(t){const n={};return qe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}deepPartial(){return xo(this)}partial(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new xt({...this._def,shape:()=>n})}required(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Wn;)i=i._def.innerType;n[r]=i}}),new xt({...this._def,shape:()=>n})}keyof(){return gS(qe.objectKeys(this.shape))}}xt.create=(e,t)=>new xt({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:Ee.ZodObject,..._e(t)});xt.strictCreate=(e,t)=>new xt({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:Ee.ZodObject,..._e(t)});xt.lazycreate=(e,t)=>new xt({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:Ee.ZodObject,..._e(t)});class Hs extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new un(s.ctx.common.issues));return ce(n,{code:re.invalid_union,unionErrors:a}),ke}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new un(c));return ce(n,{code:re.invalid_union,unionErrors:s}),ke}}get options(){return this._def.options}}Hs.create=(e,t)=>new Hs({options:e,typeName:Ee.ZodUnion,..._e(t)});const Bn=e=>e instanceof Us?Bn(e.schema):e instanceof Xn?Bn(e.innerType()):e instanceof Ks?[e.value]:e instanceof to?e.options:e instanceof Ys?qe.objectValues(e.enum):e instanceof Gs?Bn(e._def.innerType):e instanceof zs?[void 0]:e instanceof Bs?[null]:e instanceof Wn?[void 0,...Bn(e.unwrap())]:e instanceof no?[null,...Bn(e.unwrap())]:e instanceof vS||e instanceof Xs?Bn(e.unwrap()):e instanceof Zs?Bn(e._def.innerType):[];class Lp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ce(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),ke;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ce(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Bn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Lp({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._e(r)})}}function $d(e,t){const n=lr(e),r=lr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=qe.objectKeys(t),i=qe.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=$d(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=$d(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ws extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(Ly(i)||Ly(a))return ke;const s=$d(i.value,a.value);return s.valid?((Vy(i)||Vy(a))&&n.dirty(),{status:n.value,value:s.data}):(ce(r,{code:re.invalid_intersection_types}),ke)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ws.create=(e,t,n)=>new Ws({left:e,right:t,typeName:Ee.ZodIntersection,..._e(n)});class Zn extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ce(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),ke;if(r.data.length<this._def.items.length)return ce(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&r.data.length>this._def.items.length&&(ce(r,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Vn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Zn({...this._def,rest:t})}}Zn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zn({items:e,typeName:Ee.ZodTuple,rest:null,..._e(t)})};class qs extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return ce(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),ke;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Vn(r,s,r.path,s)),value:a._parse(new Vn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new qs({keyType:t,valueType:n,typeName:Ee.ZodRecord,..._e(r)}):new qs({keyType:Hn.create(),valueType:t,typeName:Ee.ZodRecord,..._e(n)})}}class zd extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return ce(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),ke;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,c],l)=>({key:o._parse(new Vn(r,s,r.path,[l,"key"])),value:i._parse(new Vn(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return ke;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return ke;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}zd.create=(e,t,n)=>new zd({valueType:t,keyType:e,typeName:Ee.ZodMap,..._e(n)});class Jo extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ce(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),ke;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ce(r,{code:re.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&&(ce(r,{code:re.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return ke;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>i._parse(new Vn(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new Jo({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new Jo({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Jo.create=(e,t)=>new Jo({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,..._e(t)});class Ui extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ce(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),ke;function r(s,c){return jd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Dd(),fa].filter(l=>!!l),issueData:{code:re.invalid_arguments,argumentsError:c}})}function o(s,c){return jd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Dd(),fa].filter(l=>!!l),issueData:{code:re.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ma){const s=this;return Yt(async function(...c){const l=new un([]),u=await s._def.args.parseAsync(c,i).catch(f=>{throw l.addIssue(r(c,f)),l}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw l.addIssue(o(d,f)),l})})}else{const s=this;return Yt(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new un([r(c,l.error)]);const u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new un([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ui({...this._def,args:Zn.create(t).rest(Oo.create())})}returns(t){return new Ui({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ui({args:t||Zn.create([]).rest(Oo.create()),returns:n||Oo.create(),typeName:Ee.ZodFunction,..._e(r)})}}class Us extends Fe{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})}}Us.create=(e,t)=>new Us({getter:e,typeName:Ee.ZodLazy,..._e(t)});class Ks extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ce(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ks.create=(e,t)=>new Ks({value:e,typeName:Ee.ZodLiteral,..._e(t)});function gS(e,t){return new to({values:e,typeName:Ee.ZodEnum,..._e(t)})}class to extends Fe{constructor(){super(...arguments),_i.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:qe.joinValues(r),received:n.parsedType,code:re.invalid_type}),ke}if($s(this,_i)||pS(this,_i,new Set(this._def.values)),!$s(this,_i).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{received:n.data,code:re.invalid_enum_value,options:r}),ke}return Yt(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 to.create(t,{...this._def,...n})}exclude(t,n=this._def){return to.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}_i=new WeakMap;to.create=gS;class Ys extends Fe{constructor(){super(...arguments),Oi.set(this,void 0)}_parse(t){const n=qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=qe.objectValues(n);return ce(r,{expected:qe.joinValues(o),received:r.parsedType,code:re.invalid_type}),ke}if($s(this,Oi)||pS(this,Oi,new Set(qe.getValidEnumValues(this._def.values))),!$s(this,Oi).has(t.data)){const o=qe.objectValues(n);return ce(r,{received:r.data,code:re.invalid_enum_value,options:o}),ke}return Yt(t.data)}get enum(){return this._def.values}}Oi=new WeakMap;Ys.create=(e,t)=>new Ys({values:e,typeName:Ee.ZodNativeEnum,..._e(t)});class ma extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ce(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),ke;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ma.create=(e,t)=>new ma({type:e,typeName:Ee.ZodPromise,..._e(t)});class Xn extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ce(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return ke;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?ke:c.status==="dirty"||n.value==="dirty"?Ii(c.value):c});{if(n.value==="aborted")return ke;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ke:s.status==="dirty"||n.value==="dirty"?Ii(s.value):s}}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ke:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ke:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Xo(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Xo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);qe.assertNever(o)}}Xn.create=(e,t,n)=>new Xn({schema:e,typeName:Ee.ZodEffects,effect:t,..._e(n)});Xn.createWithPreprocess=(e,t,n)=>new Xn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,..._e(n)});class Wn extends Fe{_parse(t){return this._getType(t)===fe.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wn.create=(e,t)=>new Wn({innerType:e,typeName:Ee.ZodOptional,..._e(t)});class no extends Fe{_parse(t){return this._getType(t)===fe.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}no.create=(e,t)=>new no({innerType:e,typeName:Ee.ZodNullable,..._e(t)});class Gs extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Gs.create=(e,t)=>new Gs({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class Zs extends Fe{_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 Vs(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class Bd extends Fe{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),ke}return{status:"valid",value:t.data}}}Bd.create=e=>new Bd({typeName:Ee.ZodNaN,..._e(e)});class vS extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ml extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ke:i.status==="dirty"?(n.dirty(),Ii(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ke:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ml({in:t,out:n,typeName:Ee.ZodPipeline})}}class Xs extends Fe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Xo(o)&&(o.value=Object.freeze(o.value)),o);return Vs(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Xs.create=(e,t)=>new Xs({innerType:e,typeName:Ee.ZodReadonly,..._e(t)});xt.lazycreate;var Ee;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ee||(Ee={}));Hn.create;eo.create;Bd.create;Qo.create;Nd.create;pa.create;Fd.create;zs.create;Bs.create;Ld.create;Oo.create;yr.create;Vd.create;jn.create;xt.create;xt.strictCreate;Hs.create;Lp.create;Ws.create;Zn.create;qs.create;zd.create;Jo.create;Ui.create;Us.create;Ks.create;to.create;Ys.create;ma.create;Xn.create;Wn.create;no.create;Xn.createWithPreprocess;Ml.create;const dz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},fz=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},yS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),mn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):yS(t),o=structuredClone(e);return fz(o,r,n),o},pz=(e,t)=>e.localeCompare(t),Ci={},xS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return bS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=xS(e._def.innerType);return t==="ZodArray"?n??[]:n}},bS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,xS(n)])),wS=(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]=wS(i,o):n[r]=o||i)}return n},mz={sort:pz,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},SS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return z$.parse(n.toString(),mz)},Lr=(e,t)=>yS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),cr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),_u=e=>{const t=e.dataset.target;if(!t)return cr(e);const n=document.querySelector(`[data-origin="${t}"]`);return cr(n||e)},hz={state:{},loading:!1,useOnChange:!1},zy=e=>e.dataset.target||e.name,gz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=qi.LocalStorage.get(t);return dz(n)?n:{}},clear:()=>void qi.LocalStorage.delete(t),set:n=>qi.LocalStorage.set(t,n)}},vz=(e,t,n=hz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Ve.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??bS(e)??{}),c=E.useCallback(v=>{var I;const b=v.target,T=v.currentTarget;if(b.dataset.optional==="true")return;const S=zy(b),C=_u(b)||(T?cr(T):""),k=Lr(S,e);if(b.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),O=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(N=>mn(N??{},S,O))}},[]),l=E.useCallback(v=>b=>{const T=b.currentTarget,w=Object.values(i.current).reduce((C,k)=>{var V;const I=k.element,A=k.schema.safeParse(cr(I));if(I.dataset.ignore==="ignore"||A.success)return C;const O=(V=A.error.issues[0])==null?void 0:V.message;I.setAttribute("data-initialized","true");const N=I.dataset.name||I.name||"";return mn(C,N,O)},{}),S=Ve.empty(w)?null:w;o(S),console.error(S),v==null||v({form:T,errors:S||{}})},[]),u=(v,b=Ci)=>{const T=Lr(v,e),w=S=>{var k;if(!S)return;const C=S instanceof Date?S.toISOString():S.target.value;s(I=>mn(I,v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,S)};return{...b,loading:n.loading,name:v,id:v,onChange:w,form:t,date:Ve.string(a[v])?new Date(a[v]):a[v],required:b.required??!T.isOptional(),error:r==null?void 0:r[v],ref:S=>{S!==null&&(i.current[v]={element:S,schema:T})}}},d=(v,b=Ci)=>{const T=Lr(v,e);return{...b,name:v,id:v,onChange:S=>{var k;const C=S.target.value;s(I=>mn(I,v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,S)},form:t,loading:n.loading,onInvalid:c,error:Ir(r,v,void 0),value:Ir(a,v,void 0)||"",required:b.required??!T.isOptional(),ref:S=>S!==null?i.current[v]={element:S,schema:T}:void 0}},p=(v,b=Ci)=>{const T=Lr(v,e);return{...b,name:v,id:v,onChange:S=>{var k;const C=S.target.checked;s(I=>mn(I??{},v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,S)},form:t,loading:n.loading,onInvalid:c,error:Ir(r,v,void 0),required:b.required??!T.isOptional(),ref:S=>S!==null?void(i.current[v]={element:S,schema:T}):void 0}},f=(v,b=Ci)=>{const T=Lr(v,e),w=S=>{var k,I;(k=S.persist)==null||k.call(S);const C=S.target.value;(I=b==null?void 0:b.onChange)==null||I.call(b,S),s(A=>mn(A,v,C))};return{...b,loading:n.loading,name:v,id:v,onChange:w,form:t,onInvalid:c,error:Ir(r,v,void 0),required:b.required??!T.isOptional(),value:Ir(a,v,void 0)||(b==null?void 0:b.value)||"",type:Ve.instance(T,eo)?"number":(b==null?void 0:b.type)??"text",ref:S=>S===null?void 0:i.current[v]={element:S,schema:T}}},h=(v,b=Ci)=>{const T=Lr(v,e),w=T._def.typeName==="ZodNumber";return{...b,name:v,id:v,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const k=w?C.target.valueAsNumber:C.target.value;(A=b==null?void 0:b.onChange)==null||A.call(b,C),s(O=>mn(O,v,k))},form:t,loading:n.loading,onInvalid:c,error:Ir(r,v,void 0),required:b.required??!T.isOptional(),type:w?"number":(b==null?void 0:b.type)??"text",value:Ir(a,v,void 0)||(b==null?void 0:b.value)||"",ref:C=>C===null?void 0:void(i.current[v]={element:C,schema:T})}};E.useEffect(()=>{const v=Object.values(i.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,S=T.schema.safeParse(cr(w)),C=O=>{var _;const N=zy(O.target);if(!N)return!1;const V=O.target,P=_u(O.target)||(O.relatedTarget?cr(O.relatedTarget):""),D=T.schema.safeParse(P);if(V.setAttribute("value",P),D.success)return w.setCustomValidity(""),o(F=>{if(Ve.null(F))return null;const j=mn(F,N,void 0);return Ve.empty(F)||Ve.nil(F)||Ve.empty(j)?null:j}),!1;if(w.required){const F=((_=D.error.issues[0])==null?void 0:_.message)||"";w.setCustomValidity(F),o(j=>{if(Ve.null(j))return null;const B=mn(j,N,F||void 0);return Ve.empty(B)?null:B})}return!1},k=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:k.signal});const A=w.dataset.shadow?!1:w.required?!S.success:!1;return{input:T,hasInitialError:A,unsubscribe:()=>k.abort()}});return v.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>v.forEach(T=>T.unsubscribe())});const g=v=>b=>{var A;b.preventDefault();const T=b.currentTarget;let w=SS(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(O=>{if(O.tagName==="SELECT"){const N=O;w=mn(w,N.name,N.value)}if(O.tagName==="INPUT"){const N=O,V=_u(N)||(N?cr(N):"");w=mn(w,N.dataset.target||N.name,V)}});const C=wS(w,a),k=e.safeParse(C),I=()=>{var O;dS(T),(O=n.interceptor)==null||O.clear()};if(k.success){const O=JSON.stringify(k.data);return T.setAttribute("data-json",O),(A=n.interceptor)==null||A.clear(),v==null?void 0:v(b,{form:T,event:b,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),T.reportValidity(),v==null?void 0:v(b,{form:T,json:w,event:b,reset:I,data:w,success:!1,errors:k.error.issues.map(O=>({message:O.message,path:O.path.map(N=>String(N))}))})},m=v=>Vf(a,v)||"",y=v=>({...v,id:t,name:t});return E.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(a))},[a]),{get:m,input:h,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:l,controller:y,datepicker:u,name:t,disabled:r!==null}},yz=e=>e?JSON.parse(e.getAttribute("data-json")):{},xz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},TS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},ES={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},CS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},bz={name:"dark",zIndex:CS,rounded:TS,spacing:ES,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},wz={rounded:TS,spacing:ES,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:CS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},Sz=bz,Tz=wz,Ez=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...gl,...e.tweaks},parser:e.parser||ml.hsla,map:{...hl,...e.map}}),[e]);return x.jsx(si.Provider,{value:t,children:e.children})},Cz=()=>{const e=E.useContext(si);return e?e.parser:ml.hsla};exports.Alert=dI;exports.Autocomplete=xF;exports.Button=Mo;exports.Calendar=L0;exports.Card=zf;exports.Checkbox=Pp;exports.ColType=_o;exports.Collapse=s0;exports.CommandPalette=RN;exports.ComponentsProvider=Ez;exports.Context=si;exports.DatePicker=wF;exports.Dict=yn;exports.Dropdown=hi;exports.Empty=V0;exports.Expand=PN;exports.FileUpload=DL;exports.Form=jL;exports.Input=Aa;exports.InputFeedback=k1;exports.InputField=Pa;exports.Menu=_N;exports.MenuItem=IN;exports.Modal=Yw;exports.MultiSelect=BL;exports.Notifications=aD;exports.Polymorph=cn;exports.Radiobox=HL;exports.RenderOnView=aE;exports.Select=Qr;exports.Slider=CV;exports.Stats=sD;exports.Switch=kV;exports.Tab=dD;exports.Table=N$;exports.Tabs=cD;exports.Tag=Yd;exports.TaskList=RV;exports.Textarea=PV;exports.Timeline=fD;exports.TimelineItem=xl;exports.Toolbar=ON;exports.Tooltip=cp;exports.TransferList=_V;exports.createColumns=n$;exports.createCssProperties=JO;exports.createDesignTokens=M0;exports.createFormStorage=gz;exports.createOptionCols=Dp;exports.createStyles=ZO;exports.createTheme=QO;exports.createTokenStyles=eM;exports.css=Ie;exports.defaultDarkTheme=Sz;exports.defaultLightTheme=Tz;exports.defaultTranslations=hl;exports.defaultTweaks=gl;exports.dispatchInput=cx;exports.formReset=dS;exports.formToJson=SS;exports.getCoords=tE;exports.getJsonForm=yz;exports.getRemainingSize=Ki;exports.getSchemaShape=Lr;exports.hasVerticalScroll=ux;exports.initializeInputDataset=ga;exports.isMobile=j0;exports.isReactComponent=eE;exports.isReactFC=Kd;exports.isSsr=Yr;exports.mergeRefs=qn;exports.negate=nM;exports.noop=$f;exports.parsers=ml;exports.path=Vf;exports.reduceTokens=Vr;exports.safeRegex=od;exports.splitInto=D0;exports.useColorParser=Cz;exports.useForm=vz;exports.useLocale=Lf;exports.useNotification=oD;exports.usePrevious=xz;exports.useReactive=lw;exports.useTablePreferences=i$;exports.useTranslations=At;exports.uuid=li;
210
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L1(e,t){if(e){if(typeof e=="string")return Cd(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 Cd(e,t)}}function Cd(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 CL(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function kL(e){if(Array.isArray(e))return e}function gy(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 mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gy(Object(n),!0).forEach(function(r){kd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fs(e,t){if(e==null)return{};var n=RL(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 RL(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 Ip=E.forwardRef(function(e,t){var n=e.children,r=Fs(e,gL),o=$1(r),i=o.open,a=Fs(o,vL);return E.useImperativeHandle(t,function(){return{open:i}},[i]),E.createElement(E.Fragment,null,n(mt(mt({},a),{},{open:i})))});Ip.displayName="Dropzone";var V1={disabled:!1,getFilesFromEvent:FF,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};Ip.defaultProps=V1;Ip.propTypes={children:rt.func,accept:rt.objectOf(rt.arrayOf(rt.string)),multiple:rt.bool,preventDropOnDocument:rt.bool,noClick:rt.bool,noKeyboard:rt.bool,noDrag:rt.bool,noDragEventsBubbling:rt.bool,minSize:rt.number,maxSize:rt.number,maxFiles:rt.number,disabled:rt.bool,getFilesFromEvent:rt.func,onFileDialogCancel:rt.func,onFileDialogOpen:rt.func,useFsAccessApi:rt.bool,autoFocus:rt.bool,onDragEnter:rt.func,onDragLeave:rt.func,onDragOver:rt.func,onDrop:rt.func,onDropAccepted:rt.func,onDropRejected:rt.func,onError:rt.func,validator:rt.func};var Rd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function $1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=mt(mt({},V1),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,f=t.onDropAccepted,h=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,b=t.preventDropOnDocument,S=t.noClick,w=t.noKeyboard,T=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=E.useMemo(function(){return pL(n)},[n]),O=E.useMemo(function(){return fL(n)},[n]),N=E.useMemo(function(){return typeof m=="function"?m:vy},[m]),V=E.useMemo(function(){return typeof g=="function"?g:vy},[g]),P=E.useRef(null),D=E.useRef(null),_=E.useReducer(PL,Rd),F=wu(_,2),j=F[0],B=F[1],M=j.isFocused,z=j.isFileDialogActive,Q=E.useRef(typeof window<"u"&&window.isSecureContext&&y&&dL()),X=function(){!Q.current&&z&&setTimeout(function(){if(D.current){var te=D.current.files;te.length||(B({type:"closeDialog"}),V())}},300)};E.useEffect(function(){return window.addEventListener("focus",X,!1),function(){window.removeEventListener("focus",X,!1)}},[D,z,V,Q]);var J=E.useRef([]),Z=function(te){P.current&&P.current.contains(te.target)||(te.preventDefault(),J.current=[])};E.useEffect(function(){return b&&(document.addEventListener("dragover",hy,!1),document.addEventListener("drop",Z,!1)),function(){b&&(document.removeEventListener("dragover",hy),document.removeEventListener("drop",Z))}},[P,b]),E.useEffect(function(){return!r&&v&&P.current&&P.current.focus(),function(){}},[P,v,r]);var Y=E.useCallback(function(q){k?k(q):console.error(q)},[k]),G=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),J.current=[].concat(bL(J.current),[q.target]),Ja(q)&&Promise.resolve(o(q)).then(function(te){if(!(Ns(q)&&!C)){var me=te.length,Oe=me>0&&sL({files:te,accept:A,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:I}),He=me>0&&!Oe;B({isDragAccept:Oe,isDragReject:He,isDragActive:!0,type:"setDraggedFiles"}),c&&c(q)}}).catch(function(te){return Y(te)})},[o,c,Y,C,A,a,i,s,l,I]),L=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=Ja(q);if(te&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return te&&d&&d(q),!1},[d,C]),$=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q);var te=J.current.filter(function(Oe){return P.current&&P.current.contains(Oe)}),me=te.indexOf(q.target);me!==-1&&te.splice(me,1),J.current=te,!(te.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ja(q)&&u&&u(q))},[P,u,C]),K=E.useCallback(function(q,te){var me=[],Oe=[];q.forEach(function(He){var Ye=D1(He,A),Ot=wu(Ye,2),fn=Ot[0],En=Ot[1],Jn=j1(He,a,i),er=wu(Jn,2),tr=er[0],W=er[1],U=I?I(He):null;if(fn&&tr&&!U)me.push(He);else{var ze=[En,W];U&&(ze=ze.concat(U)),Oe.push({file:He,errors:ze.filter(function(et){return et})})}}),(!s&&me.length>1||s&&l>=1&&me.length>l)&&(me.forEach(function(He){Oe.push({file:He,errors:[aL]})}),me.splice(0)),B({acceptedFiles:me,fileRejections:Oe,isDragReject:Oe.length>0,type:"setFiles"}),p&&p(me,Oe,te),Oe.length>0&&h&&h(Oe,te),me.length>0&&f&&f(me,te)},[B,s,A,a,i,l,p,f,h,I]),ie=E.useCallback(function(q){q.preventDefault(),q.persist(),be(q),J.current=[],Ja(q)&&Promise.resolve(o(q)).then(function(te){Ns(q)&&!C||K(te,q)}).catch(function(te){return Y(te)}),B({type:"reset"})},[o,K,Y,C]),H=E.useCallback(function(){if(Q.current){B({type:"openDialog"}),N();var q={multiple:s,types:O};window.showOpenFilePicker(q).then(function(te){return o(te)}).then(function(te){K(te,null),B({type:"closeDialog"})}).catch(function(te){mL(te)?(V(te),B({type:"closeDialog"})):hL(te)?(Q.current=!1,D.current?(D.current.value=null,D.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(te)});return}D.current&&(B({type:"openDialog"}),N(),D.current.value=null,D.current.click())},[B,N,V,y,K,Y,O,s]),ye=E.useCallback(function(q){!P.current||!P.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),H())},[P,H]),Te=E.useCallback(function(){B({type:"focus"})},[]),Re=E.useCallback(function(){B({type:"blur"})},[]),$e=E.useCallback(function(){S||(uL()?setTimeout(H,0):H())},[S,H]),se=function(te){return r?null:te},xe=function(te){return w?null:se(te)},le=function(te){return T?null:se(te)},be=function(te){C&&te.stopPropagation()},oe=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,me=te===void 0?"ref":te,Oe=q.role,He=q.onKeyDown,Ye=q.onFocus,Ot=q.onBlur,fn=q.onClick,En=q.onDragEnter,Jn=q.onDragOver,er=q.onDragLeave,tr=q.onDrop,W=Fs(q,yL);return mt(mt(kd({onKeyDown:xe(Cn(He,ye)),onFocus:xe(Cn(Ye,Te)),onBlur:xe(Cn(Ot,Re)),onClick:se(Cn(fn,$e)),onDragEnter:le(Cn(En,G)),onDragOver:le(Cn(Jn,L)),onDragLeave:le(Cn(er,$)),onDrop:le(Cn(tr,ie)),role:typeof Oe=="string"&&Oe!==""?Oe:"presentation"},me,P),!r&&!w?{tabIndex:0}:{}),W)}},[P,ye,Te,Re,$e,G,L,$,ie,w,T,r]),ue=E.useCallback(function(q){q.stopPropagation()},[]),ee=E.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.refKey,me=te===void 0?"ref":te,Oe=q.onChange,He=q.onClick,Ye=Fs(q,xL),Ot=kd({accept:A,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:se(Cn(Oe,ie)),onClick:se(Cn(He,ue)),tabIndex:-1},me,D);return mt(mt({},Ot),Ye)}},[D,n,s,ie,r]);return mt(mt({},j),{},{isFocused:M&&!r,getRootProps:oe,getInputProps:ee,rootRef:P,inputRef:D,open:se(H)})}function PL(e,t){switch(t.type){case"focus":return mt(mt({},e),{},{isFocused:!0});case"blur":return mt(mt({},e),{},{isFocused:!1});case"openDialog":return mt(mt({},Rd),{},{isFileDialogActive:!0});case"closeDialog":return mt(mt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return mt(mt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return mt(mt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return mt({},Rd);default:return e}}function vy(){}const AL={isImage:e=>e.type.includes("image")},IL=e=>{const[t,n]=E.useState({url:"",type:"",size:""});return E.useEffect(()=>{if(AL.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Gv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Gv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Lo,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(i0,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(Mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Lo,{className:"text-danger"})})]})},_L=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(IL,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),OL=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(_L,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(E.Fragment,{children:e.idle}),ML=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(aI,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),DL=({idle:e=ML,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=E.useState([]),a=d=>{n==null||n(d),i(d)},{getRootProps:s,getInputProps:l,isDragActive:c}=$1({onDrop:a});return x.jsxs("div",{...s(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(OL,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},jL=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},yy=40,NL=e=>x.jsx(E.Fragment,{children:e.children}),FL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},xy=[],LL=E.forwardRef(function(t,n){return x.jsx(ft.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:x.jsx(xr,{children:t.children})})}),VL=E.forwardRef(function({item:t,context:n,...r},o){return x.jsx(ft.li,{...r,ref:o,className:"last:rounded-t-lg"})}),$L={List:LL,Item:VL},zL=e=>{const t=At(),n=E.useRef(null),r=E.Children.count(e.children),[o,i]=E.useState(!1);return E.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),x.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?x.jsxs(Yd,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},BL=E.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:p=!1,required:f=!1,dynamicOption:h=!1,onChangeOptions:g,...m},y)=>{const v=E.useMemo(()=>new yn(r.map(ee=>[ee.value,ee])),[r]),b=E.useRef(null),S=E.useRef(null),w=m.value??m.defaultValue??xy,T=At(),[C,k]=E.useState(0),[I,A]=E.useState(!1),[O,N]=E.useState(""),[V,P]=E.useState(()=>{const ee=new yn;return w.forEach(q=>{const te=v.get(q);return te?ee.set(q,te):void 0}),ee}),D=E.useMemo(()=>Array.from(V.keys()),[V]),[_,F]=E.useState(()=>{const ee=new Set(w);return r.reduce((q,te)=>ee.has(te.value)?[...q,te.label??te.value]:q,[])??w}),[j,B]=E.useState(null),M=E.useRef(xy),z=h&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...r]:r,Q=O.length===0?z:ap(z,"value",[{key:"value",value:O},{key:"label",value:O}]),X=lp(I,"block-only"),J=Q.filter(ee=>ee.hidden!==!0),Z=J.length===0,{x:Y,y:G,strategy:L,refs:$,context:K}=Er({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:A,whileElementsMounted:di,middleware:[Sa(4),Pw({padding:10,elementContext:"reference",apply(ee){const q=ee.elements.floating.querySelector("ul"),te=(q==null?void 0:q.getBoundingClientRect().height)||0,me=Ki($.reference.current,window.innerHeight),Oe=Math.min(te<yy?me:te,me,ee.availableHeight),He=J.length===0?yy:Math.min(Oe,me,te),Ye=`${b.current.getBoundingClientRect().width}px`;Object.assign(ee.elements.floating.style,{width:Ye,maxWidth:Ye,height:He})}})]}),ie=Ww(K,FL),{getReferenceProps:H,getFloatingProps:ye,getItemProps:Te}=Cr([so(K,{role:"listbox"}),ao(K),El(K,{cols:0,listRef:M,loop:!0,virtual:!0,allowEscape:!0,activeIndex:j,selectedIndex:j,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ee=>B(q=>ee??q)})]);E.useEffect(()=>{if(!I)return k(0);const ee=$.reference;if(ee.current===null)return;const q=Ki(ee.current,window.innerHeight);setTimeout(()=>k(Math.min(q,J.length*40)),100)},[O,I,$.reference]),E.useEffect(()=>{m.value&&P(new yn(m.value.map(ee=>[ee,v.get(ee)])))},[m.value,v]),E.useEffect(()=>{const ee=$.reference.current;if(ee)return ga(ee)},[]);const Re=(ee,q)=>{const te=V.clone(He=>He.has(ee.value)?He.remove(ee.value):He.set(ee.value,ee));P(te);const me=$.reference.current;if(!me)return;const Oe=te.map(He=>He.value);me==null||me.setAttribute("data-value",JSON.stringify(Oe)),g&&g(Oe),F(He=>He.concat(ee.label??"")),N(""),B(q)},$e=ee=>{const q=ee.target.value;return N(q),!I&&q===""?A(!0):(ee.target.name=m.name||"",q?A(!0):void 0)},se=()=>{var ee;A(!0),N(""),(ee=$.reference.current)==null||ee.focus()},xe=()=>{A(!0),N("")},le=()=>{var ee;(ee=$.reference.current)==null||ee.setAttribute("data-value","[]"),N(""),A(!1),P(new yn),g==null||g([])},be=m.id||m.name,oe=V.map((ee,q)=>x.jsx(Yd,{size:"small",icon:x.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:te=>{te.preventDefault(),te.stopPropagation(),Re(ee,q),A(!1)},children:x.jsx(dl,{size:14})}),children:ee.label??ee.value},`MultiSelect-${ee.value}-x`)),ue={height:Z?"0":V.size===0?C-49:C-86};return x.jsxs(Pa,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:p,required:f,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[n,x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:se,children:[x.jsx(Af,{size:20}),x.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),V?x.jsx("button",{type:"button",onClick:le,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("li",{...H({...m,onFocus:xe,id:`${be}-shadow`,name:`${be}-shadow`,ref:$.setReference}),tabIndex:0,role:"button","data-name":be,"data-target":be,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":D.join(","),value:I?O:_||V,className:Ie("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:x.jsx(zL,{label:c,children:oe})}),x.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:y,required:f,defaultValue:m.value||D||void 0}),x.jsx(io,{preserveTabOrder:!0,children:I?x.jsx(mi,{modal:!0,guards:!0,returnFocus:!1,context:K,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...ye({ref:$.setFloating,style:{...ie.styles,top:G??0,position:L,left:Y}}),"data-floating":"true",className:"isolate z-floating m-0 max-h-80 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[x.jsx("input",{autoFocus:!0,value:O,onChange:$e,title:m.title,placeholder:T.multiSelectInnerPlaceholder,onKeyDown:ee=>{var q,te;if(ee.key==="ArrowDown"){let me=j+1;return me>J.length-1&&(me=0),(q=S.current)==null||q.scrollIntoView({index:me}),B(me)}if(ee.key==="ArrowUp"){let me=j-1;return me<0&&(me=J.length-1),(te=S.current)==null||te.scrollIntoView({index:me}),B(me)}if(ee.key==="Escape")return ee.currentTarget.blur(),A(!1);if(ee.key==="Enter"){if(j!==null&&J[j])return ee.preventDefault(),Re(J[j],j);if(J.length===1)return ee.preventDefault(),Re(J[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),Z?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:s||T.autocompleteEmpty})}):null,Z?null:x.jsx(ft.div,{initial:!1,"data-floating":"true",ref:X,animate:{height:Z?"auto":C},style:ue,className:"max-h-80 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return k(0);const q=$.floating.current.querySelectorAll("li").item(0),te=(q?q.getBoundingClientRect().height:40)*J.length;return ha.flushSync(()=>k(te+2))},children:x.jsx(Cp,{ref:S,hidden:Z,data:J,components:$L,style:ue,className:"max-h-80 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ee,q)=>{const te=q.Render??NL,me=V.has(q.value)||V.has(q.label??""),Oe=j===ee,He=q.label??q.value;return x.jsxs("button",{"data-value":q.value,...Te({ref:Ye=>void(M.current[ee]=Ye),role:"option",type:"button","aria-checked":me,"aria-current":me,"aria-selected":me,"aria-busy":q.disabled,onClick:()=>Re(q,ee)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${me||Oe?"bg-floating-hover text-floating-foreground":""}`,children:[x.jsx(Pp,{onChange:$f,checked:me,"aria-checked":me,onClick:Ye=>{Ye.stopPropagation(),Re(q,ee)}}),x.jsx(te,{...m,label:q.label,value:q.value,children:He})]})}})}),V.size===0?null:x.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:oe})]})}):null})]})}),HL=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:Ie("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]}),Qr=E.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:p,left:f,error:h,...g},m)=>{const y=At(),v=E.useRef(null),b=g.id??g.name;E.useImperativeHandle(m,()=>v.current),E.useEffect(()=>{if(v.current===null)return;const w=new AbortController,T=v.current,C=ga(v.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:w.signal}),()=>{C(),w.abort()}},[]);const S=()=>{var w;return(w=v.current)==null?void 0:w.focus()};return x.jsx(Pa,{info:n,left:f,error:h,form:g.form,loading:l,name:g.name,feedback:o,hideLeft:d,required:e,title:g.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:g.name||g.id,optionalText:c,labelClassName:i,placeholder:g.placeholder,right:x.jsxs("label",{htmlFor:b,children:[p,x.jsxs("button",{onClick:S,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Af,{size:20}),x.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:x.jsxs("select",{...g,id:b,name:b,value:g.value,required:e,ref:qn(m,v),"data-selected":!!g.value||!1,defaultValue:g.value?void 0:"",title:typeof g.title=="string"?g.title:void 0,className:Ie("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",g.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:g.placeholder}),t.map(w=>E.createElement("option",{...w,value:w.value,children:w.label??w.value,key:`${b}-select-option-${w.value}`}))]})})});function z1(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ro(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function by(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B1(...e){return t=>{let n=!1;const r=e.map(o=>{const i=by(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():by(e[o],null)}}}}function Jr(...e){return R.useCallback(B1(...e),e)}function H1(e,t=[]){let n=[];function r(i,a){const s=R.createContext(a),l=n.length;n=[...n,a];const c=d=>{var y;const{scope:p,children:f,...h}=d,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,m=R.useMemo(()=>h,Object.values(h));return x.jsx(g.Provider,{value:m,children:f})};c.displayName=i+"Provider";function u(d,p){var g;const f=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,h=R.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>R.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return R.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,WL(o,...t)]}function WL(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...s,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function W1(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function qL({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=UL({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=W1(n),l=R.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&s(d)}else o(c)},[i,e,o,s]);return[a,l]}function UL({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),i=W1(t);return R.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var KL=R.createContext(void 0);function YL(e){const t=R.useContext(KL);return e||t||"ltr"}function GL(e){const t=R.useRef({value:e,previous:e});return R.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ZL=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{};function XL(e){const[t,n]=R.useState(void 0);return ZL(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Pd(e){const t=QL(e),n=R.forwardRef((r,o)=>{const{children:i,...a}=r,s=R.Children.toArray(i),l=s.find(eV);if(l){const c=l.props.children,u=s.map(d=>d===l?R.Children.count(c)>1?R.Children.only(null):R.isValidElement(c)?c.props.children:null:d);return x.jsx(t,{...a,ref:o,children:R.isValidElement(c)?R.cloneElement(c,void 0,u):null})}return x.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function QL(e){const t=R.forwardRef((n,r)=>{const{children:o,...i}=n;if(R.isValidElement(o)){const a=nV(o),s=tV(i,o.props);return o.type!==R.Fragment&&(s.ref=r?B1(r,a):a),R.cloneElement(o,s)}return R.Children.count(o)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JL=Symbol("radix.slottable");function eV(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JL}function tV(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function nV(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Il=rV.reduce((e,t)=>{const n=Pd(`Primitive.${t}`),r=R.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function oV(e){const t=e+"CollectionProvider",[n,r]=H1(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:m,children:y}=g,v=E.useRef(null),b=E.useRef(new Map).current;return x.jsx(o,{scope:m,itemMap:b,collectionRef:v,children:y})};a.displayName=t;const s=e+"CollectionSlot",l=Pd(s),c=E.forwardRef((g,m)=>{const{scope:y,children:v}=g,b=i(s,y),S=Jr(m,b.collectionRef);return x.jsx(l,{ref:S,children:v})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=Pd(u),f=E.forwardRef((g,m)=>{const{scope:y,children:v,...b}=g,S=E.useRef(null),w=Jr(m,S),T=i(u,y);return E.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),x.jsx(p,{[d]:"",ref:w,children:v})});f.displayName=u;function h(g){const m=i(e+"CollectionConsumer",g);return E.useCallback(()=>{const v=m.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((T,C)=>b.indexOf(T.ref.current)-b.indexOf(C.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},h,r]}var q1=["PageUp","PageDown"],U1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],K1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},xi="Slider",[Ad,iV,aV]=oV(xi),[Y1,Az]=H1(xi,[aV]),[sV,_l]=Y1(xi),G1=R.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:f=!1,form:h,...g}=e,m=R.useRef(new Set),y=R.useRef(0),b=a==="horizontal"?lV:cV,[S=[],w]=qL({prop:u,defaultProp:c,onChange:O=>{var V;(V=[...m.current][y.current])==null||V.focus(),d(O)}}),T=R.useRef(S);function C(O){const N=mV(S,O);A(O,N)}function k(O){A(O,y.current)}function I(){const O=T.current[y.current];S[y.current]!==O&&p(S)}function A(O,N,{commit:V}={commit:!1}){const P=yV(i),D=xV(Math.round((O-r)/i)*i+r,P),_=z1(D,[r,o]);w((F=[])=>{const j=fV(F,_,N);if(vV(j,l*i)){y.current=j.indexOf(_);const B=String(j)!==String(F);return B&&V&&p(j),B?j:F}else return F})}return x.jsx(sV,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:m.current,values:S,orientation:a,form:h,children:x.jsx(Ad.Provider,{scope:e.__scopeSlider,children:x.jsx(Ad.Slot,{scope:e.__scopeSlider,children:x.jsx(b,{"aria-disabled":s,"data-disabled":s?"":void 0,...g,ref:t,onPointerDown:Ro(g.onPointerDown,()=>{s||(T.current=S)}),min:r,max:o,inverted:f,onSlideStart:s?void 0:C,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:I,onHomeKeyDown:()=>!s&&A(r,0,{commit:!0}),onEndKeyDown:()=>!s&&A(o,S.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:N})=>{if(!s){const D=q1.includes(O.key)||O.shiftKey&&U1.includes(O.key)?10:1,_=y.current,F=S[_],j=i*D*N;A(F+j,_,{commit:!0})}}})})})})});G1.displayName=xi;var[Z1,X1]=Y1(xi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),lV=R.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,p]=R.useState(null),f=Jr(t,b=>p(b)),h=R.useRef(void 0),g=YL(o),m=g==="ltr",y=m&&!i||!m&&i;function v(b){const S=h.current||d.getBoundingClientRect(),w=[0,S.width],C=_p(w,y?[n,r]:[r,n]);return h.current=S,C(b-S.left)}return x.jsx(Z1,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:x.jsx(Q1,{dir:g,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const S=v(b.clientX);a==null||a(S)},onSlideMove:b=>{const S=v(b.clientX);s==null||s(S)},onSlideEnd:()=>{h.current=void 0,l==null||l()},onStepKeyDown:b=>{const w=K1[y?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:w?-1:1})}})})}),cV=R.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=R.useRef(null),d=Jr(t,u),p=R.useRef(void 0),f=!o;function h(g){const m=p.current||u.current.getBoundingClientRect(),y=[0,m.height],b=_p(y,f?[r,n]:[n,r]);return p.current=m,b(g-m.top)}return x.jsx(Z1,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:x.jsx(Q1,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=h(g.clientY);i==null||i(m)},onSlideMove:g=>{const m=h(g.clientY);a==null||a(m)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:g=>{const y=K1[f?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:y?-1:1})}})})}),Q1=R.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=_l(xi,n);return x.jsx(Il.span,{...c,ref:t,onKeyDown:Ro(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):q1.concat(U1).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:Ro(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(p)?p.focus():r(d)}),onPointerMove:Ro(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:Ro(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),J1="SliderTrack",eS=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_l(J1,n);return x.jsx(Il.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});eS.displayName=J1;var Id="SliderRange",tS=R.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_l(Id,n),i=X1(Id,n),a=R.useRef(null),s=Jr(t,a),l=o.values.length,c=o.values.map(p=>rS(p,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return x.jsx(Il.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});tS.displayName=Id;var _d="SliderThumb",nS=R.forwardRef((e,t)=>{const n=iV(e.__scopeSlider),[r,o]=R.useState(null),i=Jr(t,s=>o(s)),a=R.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return x.jsx(uV,{...e,ref:i,index:a})}),uV=R.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=_l(_d,n),s=X1(_d,n),[l,c]=R.useState(null),u=Jr(t,v=>c(v)),d=l?a.form||!!l.closest("form"):!0,p=XL(l),f=a.values[r],h=f===void 0?0:rS(f,a.min,a.max),g=pV(r,a.values.length),m=p==null?void 0:p[s.size],y=m?hV(m,h,s.direction):0;return R.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),x.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${h}% + ${y}px)`},children:[x.jsx(Ad.ItemSlot,{scope:e.__scopeSlider,children:x.jsx(Il.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:e.style,onFocus:Ro(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&x.jsx(dV,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:f},r)]})});nS.displayName=_d;var dV=e=>{const{value:t,...n}=e,r=R.useRef(null),o=GL(t);return R.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(o!==t&&l){const c=new Event("input",{bubbles:!0});l.call(i,t),i.dispatchEvent(c)}},[o,t]),x.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function fV(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function rS(e,t,n){const i=100/(n-t)*(e-t);return z1(i,[0,100])}function pV(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function mV(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function hV(e,t,n){const r=e/2,i=_p([0,50],[0,r]);return(r-i(t)*n)*n}function gV(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function vV(e,t){if(t>0){const n=gV(e);return Math.min(...n)>=t}return!0}function _p(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yV(e){return(String(e).split(".")[1]||"").length}function xV(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var bV=G1,wV=eS,SV=tS,TV=nS;const EV=e=>{const[t,n]=E.useState(null),r=E.useRef(null);return E.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Ve.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Ve.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),x.jsx(cp,{title:"",ref:r,as:TV,enabled:e.tooltip,className:"block size-5 cursor-grab rounded-full border-2 border-card-border bg-card-background shadow active:cursor-grabbing",children:t})},CV=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=E.useRef(li()),s=r||o||[];return x.jsxs(bV,{...i,defaultValue:r,value:o,className:Ie("relative flex h-5 w-full touch-none select-none items-center",n),children:[x.jsx(wV,{className:"relative h-2 grow rounded-full bg-background",children:x.jsx(SV,{className:"absolute h-full rounded-full bg-primary"})}),s.map((l,c)=>x.jsx(EV,{tooltip:t??!1},`${a.current}-${c}`))]})},kV=E.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=E.useId(),[s,l]=E.useState(o.checked??!1),c=s,u=E.useRef(null),d=Ur(o.onChange);E.useImperativeHandle(i,()=>u.current),E.useEffect(()=>{if(u.current!==null&&d.current){const f=g=>{d.current&&d.current(g)},h=u.current;return h.addEventListener("change",f),()=>h==null?void 0:h.removeEventListener("change",f)}},[]);const p=()=>{var h,g;const f=!((h=u.current)!=null&&h.checked);l(f),(g=o==null?void 0:o.onCheck)==null||g.call(o,f),u.current!==null&&(u.current.checked=f,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Ie("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:f=>l(f.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:p,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),RV=e=>{const[t,n]=cA();return E.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:mA(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},PV=R1("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
211
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),AV=e=>{const[t,n]=E.useState(0);return E.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},IV={Item:E.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:E.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},_V=e=>{const t=E.useRef(null),n=AV(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Aa,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(Cp,{height:n,useWindowScroll:!0,data:e.source,components:IV,itemContent:(r,o)=>x.jsx(E.Fragment,{children:x.jsx(Pp,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Mo,{children:x.jsx(If,{})})}),x.jsx("div",{})]})};var OV=Object.defineProperty,wy=Object.getOwnPropertySymbols,MV=Object.prototype.hasOwnProperty,DV=Object.prototype.propertyIsEnumerable,Sy=(e,t,n)=>t in e?OV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jV=(e,t)=>{for(var n in t||(t={}))MV.call(t,n)&&Sy(e,n,t[n]);if(wy)for(var n of wy(t))DV.call(t,n)&&Sy(e,n,t[n]);return e},Op=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},NV=(e,t,n,r)=>Ol(Op,e,t,n,r),Zo=e=>typeof e=="object",fr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Zo(e)&&!Zo(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=>fr(e[r],t[r]))},FV=(e,t)=>(Zo(e)||Array.isArray(e))&&t?e[t]:e,LV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ls=e=>/[0-9.]+/.test(e),Ty=e=>["string","number"].includes(typeof e),Ey=e=>e==null||(e==null?void 0:e.length)===0||e==="",Cy={eq:fr,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:Ey,notEmpty:e=>!Ey(e),in:(e,t)=>Op(t,n=>fr(e,n)),notIn:(e,t)=>oS(t,n=>!fr(e,n))},VV=e=>{if(e in Cy)return Cy[e];throw new Error("Linq - Symbol not found")},Io=(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},Ol=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=VV(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},$V=(e,t,n,r)=>Ol(Io,e,t,n,r),oS=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},zV=(e,t,n,r)=>Ol(oS,e,t,n,r),iS=e=>{if(e===null)return null;const t=jV({},e);return Object.keys(t).forEach(n=>t[n]=Zo(e[n])?iS(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},ky=(e,t)=>{if(Zo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(fr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(fr(t,r))return!0}return!1},BV=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},HV=e=>Io(e,(t,n,r)=>Zo(t)?n===r.findIndex(o=>fr(o,t)):n===r.indexOf(t)),WV=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},aS=(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())},qV=(e,t)=>aS(e,n=>n[t]),Ry=(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},UV=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},KV=(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 Ls(e)&&Ls(t)?r.map(a=>Number.parseInt(a)):r},Su=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ls(e)&&Ls(t)){const o=[],[i,a]=UV(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return KV(e,t,r)},YV=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Su(r,o,1):Su(r,i,Number.parseInt(o,10))}return Ty(e)&&Ty(t)?Su(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Tu=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},Py=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},GV=(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)},ZV=(e,t,n,r)=>Ol(GV,e,t,n,r),Ay=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(LV(t))},sS=(e=>(e.Asc="asc",e.Desc="desc",e))(sS||{}),XV=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),QV=(e,t)=>e.sort(XV(t)),JV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Io(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},e$=class Od{constructor(t=[]){this.array=t}static Range(...t){return YV(...t)}static New(t){return new Od(t)}Where(t,n,r){return this.array=$V(this.array,t,n,r),this}Some(t,n,r){return NV(this.array,t,n,r)}All(t,n,r){return zV(this.array,t,n,r)}Reverse(){return this.array=Py(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=ZV(this.array,t,n,r),this}Distinct(){return this.array=HV(this.array),this}First(t){return t===void 0?this.array[0]:WV(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?Tu((n,r)=>n+r,0,this.array):Tu((n,r)=>n+FV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return qV(this.array,t)}GroupWith(t){return aS(this.array,t)}Except(t){return Io(this.array,n=>!ky(t,n))}Intersect(t){return Io(this.array,n=>ky(t,n))}OrderBy(t,n){let r;return r=t?Ay(this.array,t):this.array.toSorted(),this.array=n==="desc"?Py(r):r,this}Includes(t){return Op(this.array,n=>fr(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 Tu(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Ry(this.array,n=>[t,n]))}Zip(t,n){return Ry(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Io(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Od(iS(this.array))}ToObject(t){return BV(this.array,t)}Sort(t){return Array.isArray(t)?QV(this.array,t):Ay(this.array,t)}Unique(t){return JV(this.array,t)}},lS=e$,Eu={},Iy;function t$(){return Iy||(Iy=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,y)=>{try{Object.keys(m).forEach(y)}catch(v){window.console.log(v)}},n=m=>m==null,r=m=>{const y=typeof m;return y==="string"||y==="number"||y==="boolean"||n(m)},o=(m,y)=>{const v=y.getItem(m);try{return JSON.parse(v)}catch{return v??null}},i=m=>Object.keys(m).reduce((y,v)=>({...y,[v]:o(v,m)}),{}),a=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,y)=>(m[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(y=>y(m))},d=[{name:"expires",parse:m=>`expires=${a(m.expires??s)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${a(m.expires??s)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const y=m.domain??"";return y===""?"":`domain=${m.multiDomain?".":""}${y}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],p={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(y=>y.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const y=p.json()[m];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,y,v={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=d.reduce((w,T)=>{const C=T.parse(v);return C===""?w:w.concat(C)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=S,u()}},f=m=>{const y=new Set,v=b=>{m().removeItem(b);const S=i(m());y.forEach(w=>w(S))};return{delete:v,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const S=m().getItem(b);return!n(S)},deleteAll:()=>{t(m(),v),y.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,S)=>{m().setItem(b,JSON.stringify(S)),y.forEach(w=>w(m()))}}},h=f(()=>window.sessionStorage),g=f(()=>window.localStorage);e.Cookie=p,e.LocalStorage=g,e.SessionStorage=h,e.createStorage=f}(Eu)),Eu}var qi=t$();const Mp=e=>e.headerLabel??e.thead??e.id,Dp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var _o=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(_o||{});const jp=e=>e.type==="number"?e.valueAsNumber:e.value,n$=e=>{let t=[];return e({add:(o,i,a)=>t.push({...a,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},r$={},o$=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},i$=(e,t,n=r$)=>{const r=Yr()?null:qi.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Nf({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:o$(t,r==null?void 0:r.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Yr()||qi.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},a$=e=>{const t=Ur(e),n=E.useRef(null),r=E.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-colid="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},Md=(e,t,n,r={})=>{var c,u;const o=e.id,i=e.type??_o.Text,a=t[i]??[],s=((c=a.find(d=>d["data-default"]))==null?void 0:c.value)??((u=a[0])==null?void 0:u.value),l=n[s];return{id:li(),operation:l,label:Mp(e),name:o,type:i,value:"",...r}},Np=()=>{const e=At(),t=E.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:E.useMemo(()=>({[_o.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[_o.Boolean]:[t.is,t.isNot],[_o.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},s$=e=>{const t=At(),n=Np(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Md(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>{if(c!==p.id)return p;const f=e.cols.find(h=>u===h.id);return Md(f,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(p=>p.id===c?{...p,operation:n.operations[u]}:p))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=jp(l.target);e.set(d=>d.map(p=>p.id===c?{...p,value:u}:p))};return x.jsx(E.Fragment,{children:x.jsx(hi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(UA,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Qr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Qr,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Aa,{"data-id":l.id,onChange:s,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:x.jsx(Lo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(_f,{size:14})," ",t.tableFilterNewFilter]})})]})})})},l$=({filter:e,onDelete:t,set:n})=>{const r=At(),o=Np(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=jp(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Qr,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Aa,{optionalText:" ","data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Lo,{className:"text-danger",size:14})})]})},c$=({item:e,onPointerDown:t})=>{const n=ul(0);return x.jsxs(t0,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(HA,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},u$=e=>{var l;const t=At(),n=Dp(e.cols),r=fA(),[o,i]=E.useState(((l=e.groups[0])==null?void 0:l.thead)||""),a=c=>{var m;const u=c.target,d=u.value,p=u.options.selectedIndex,f=((m=u.options.item(p))==null?void 0:m.label)||"";i(f);const h=new lS(e.rows).GroupBy(d),g=e.cols.find(y=>y.id===d);e.setGroups(dT(h).map((y,v)=>{const b=h[y];return{...g,groupId:li(),groupKey:d,index:v,rows:b,groupName:y}}))},s=()=>e.setGroups([]);return x.jsx(E.Fragment,{children:x.jsxs(hi,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(oI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Qr,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),x.jsx(Mo,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:x.jsx(Lo,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(SE,{children:x.jsx(e0,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(c$,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},d$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),f$=(e,t)=>e.toSorted(d$(t)),cS=(e,t,n)=>({label:t,id:li(),type:n,value:e.id}),p$=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,cS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,value:u}:p))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(p=>p.id===l?{...p,type:u}:p))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(E.Fragment,{children:x.jsx(hi,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(r0,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Qr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Qr,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:x.jsx(Lo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(_f,{size:14})," ",t.tableSortAddButton]})})]})})})},m$=e=>{const t=At(),[n,r]=E.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");E.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=cS(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Mp(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?x.jsx(RA,{size:14}):null,n==="desc"?x.jsx(CA,{size:14}):null,n==="undefined"?x.jsx(r0,{size:14}):null]})},h$=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(s$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(p$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(u$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=jp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function g$(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const v$=e=>{const t=E.useId(),n=At(),r=E.useMemo(()=>g$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return x.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 px-1 py-4 lg:flex-nowrap lg:justify-between",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(E.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:x.jsx(E.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(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?x.jsx("li",{children:x.jsx(cn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},y$=e=>{const t=E.useRef(null),n=E.useRef(null),[r,o]=E.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return E.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),x.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full min-w-8 max-w-20 items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:x.jsx("div",{ref:n,className:"isolate block h-full w-auto",children:e.children})})},x$=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(E.Fragment,{children:r.map((i,a)=>{var f;const s=`${a},${e}`,l=Vf(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"",d=a===0&&n.Aside&&o===!1,p=n.Aside;return E.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`group-table-cell py-2 sm:py-2 flex flex-col md:table-cell md:h-14 md:border-l md:border-table-border px-2 first:border-transparent ${u}`},d?x.jsx(y$,{children:x.jsx(p,{col:i,row:t,rowIndex:e})}):null,x.jsx("span",{className:"block md:hidden text-sm font-bold leading-tight",children:i.thead}),x.jsx("span",{className:"relative",children:o?sp:c?x.jsx(E.Fragment,{children:x.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):x.jsx(E.Fragment,{children:Ve.nil(l)?"":l})}))})})},b$={top:0,left:0,right:0,bottom:-1},w$=e=>{var g;const t=Rp(),n=At(),r=e.filters.filter(m=>m.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=Np(),l=o?XA:JA,c=E.useRef(null),u=m=>{const y=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==y))},d=E.useCallback(m=>{if(m===null)return;c.current=m;const y=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),p=e.sorters.find(m=>e.header.id===m.value),f=p!=null&&p.type?p.type===sS.Asc?"ascending":"descending":"none",h=Mp(e.header);return x.jsxs(t0,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,"data-colid":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative min-w-0 cursor-grab font-medium ${((g=e.header.thProps)==null?void 0:g.className)??""}`,children:[x.jsx("span",{className:`flex h-full items-center justify-between bg-table-header px-2 py-4 ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&a?x.jsx(hi,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",h]}),x.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"font-medium",children:h})]}),children:x.jsxs("ul",{className:"font-medium",children:[r.length===0?null:x.jsx(E.Fragment,{children:r.map(m=>x.jsx("li",{className:"my-1",children:x.jsx(l$,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(Md(e.header,s.options,s.operations))),children:[x.jsx(_f,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?x.jsx(m$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:x.jsx(ft.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:b$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-table-border hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:m=>void m.currentTarget.focus(),onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(y+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,y)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=y.delta.x;c.current.style.width=`${Math.abs(v+b)}px`}})]})},S$=e=>{const[t,n]=a$(e.setCols);return x.jsx(e0,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,ref:t,onReorder:n,values:e.headers,children:x.jsx(xr,{children:e.headers.map((r,o)=>x.jsx(w$,{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}`))})})},uS=E.createContext({}),T$=()=>E.useContext(uS),E$=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(xr,{children:n.children})})),C$=E.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-fixed border-collapse text-left ${t??""}`})),k$=E.forwardRef(({context:e,...t},n)=>{const r=T$(),o={...t==null?void 0:t.style,top:Ve.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs hidden md:table-header-group group:sticky top-0 bg-transparent",ref:n})}),R$=E.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`group-table-row h-fit flex flex-wrap gap-1 flex-col justify-center md:table-row ${(n==null?void 0:n.className)??""}`})),P$=E.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),A$={TableHead:k$,Table:C$,TableBody:E$,TableRow:R$,TableFoot:P$},I$=[0,0,0,0,0,0,0,0,0,0],_$=e=>x.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?sp:x.jsx(V0,{})}),O$=()=>x.jsx(E.Fragment,{}),M$=()=>x.jsx(E.Fragment,{}),D$=[],_y=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,border:s=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=E.useRef(null),[p,f]=E.useState(!1),h=Ur(a),g=Ur(u.loadingMore),m=E.useMemo(()=>{if(u.loading)return I$;if(c)return u.rows;const b=new lS(u.rows);return t.length>0&&t.forEach(S=>S.value===""||Number.isNaN(S.value)?void 0:b.Where(S.name,S.operation.symbol,S.value)),r.length===0?b.Select():f$(b.Select(),r)},[u.loading,u.rows,c,t,r]);E.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,S=new IntersectionObserver(w=>{var k;return w[w.length-1].isIntersecting&&g.current?((k=h.current)==null||k.call(h),void f(!0)):f(!1)});return S.observe(b),()=>S.disconnect()},[g,h]);const y=m.length===0,v={loading:u.loading,loadingMore:u.loadingMore,cols:e,Aside:u.Aside};return x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group w-full rounded-lg ${s?"border border-table-border":""}`,children:[x.jsx(Q2,{useWindowScroll:!0,context:v,components:A$,totalCount:m.length,itemContent:y?O$:x$,data:y?D$:m,fixedFooterContent:p?M$:null,fixedHeaderContent:()=>x.jsx(S$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),y?x.jsx(_$,{loading:u.loading}):null,x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(v$,{...l}):null]})},j$=(e,t)=>typeof t=="function"?t(e):t,es=(e,t,n)=>e===t||n==null?void 0:n(t),N$=e=>{const t=E.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=Rp(),r=e.operations??n.table.operations??!0,o=E.useMemo(()=>Dp(e.cols),[e.cols]),[i,a]=Nf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:j$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>{var c;return(c=e.set)==null||c.call(e,s),es((l==null?void 0:l.filters)??[],s.filters??[],e.setFilters),es((l==null?void 0:l.sorters)??[],s.sorters??[],e.setSorters),es((l==null?void 0:l.groups)??[],s.groups??[],e.setGroups),es((l==null?void 0:l.cols)??[],s.cols??[],e.setCols),s}]});return x.jsx(uS.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[r?x.jsx(h$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?x.jsx(_y,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):x.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>x.jsx("div",{className:"min-w-full",children:x.jsx(_y,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},F$=["INPUT","SELECT"],dS=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{F$.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Cu,Oy;function Fp(){if(Oy)return Cu;Oy=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Cu={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Cu}var ku,My;function fS(){if(My)return ku;My=1;var e=Fp(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r=function(){for(var m=[],y=0;y<256;++y)m.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return m}(),o=function(y){for(;y.length>1;){var v=y.pop(),b=v.obj[v.prop];if(n(b)){for(var S=[],w=0;w<b.length;++w)typeof b[w]<"u"&&S.push(b[w]);v.obj[v.prop]=S}}},i=function(y,v){for(var b=v&&v.plainObjects?{__proto__:null}:{},S=0;S<y.length;++S)typeof y[S]<"u"&&(b[S]=y[S]);return b},a=function m(y,v,b){if(!v)return y;if(typeof v!="object"&&typeof v!="function"){if(n(y))y.push(v);else if(y&&typeof y=="object")(b&&(b.plainObjects||b.allowPrototypes)||!t.call(Object.prototype,v))&&(y[v]=!0);else return[y,v];return y}if(!y||typeof y!="object")return[y].concat(v);var S=y;return n(y)&&!n(v)&&(S=i(y,b)),n(y)&&n(v)?(v.forEach(function(w,T){if(t.call(y,T)){var C=y[T];C&&typeof C=="object"&&w&&typeof w=="object"?y[T]=m(C,w,b):y.push(w)}else y[T]=w}),y):Object.keys(v).reduce(function(w,T){var C=v[T];return t.call(w,T)?w[T]=m(w[T],C,b):w[T]=C,w},S)},s=function(y,v){return Object.keys(v).reduce(function(b,S){return b[S]=v[S],b},y)},l=function(m,y,v){var b=m.replace(/\+/g," ");if(v==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},c=1024,u=function(y,v,b,S,w){if(y.length===0)return y;var T=y;if(typeof y=="symbol"?T=Symbol.prototype.toString.call(y):typeof y!="string"&&(T=String(y)),b==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var C="",k=0;k<T.length;k+=c){for(var I=T.length>=c?T.slice(k,k+c):T,A=[],O=0;O<I.length;++O){var N=I.charCodeAt(O);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===e.RFC1738&&(N===40||N===41)){A[A.length]=I.charAt(O);continue}if(N<128){A[A.length]=r[N];continue}if(N<2048){A[A.length]=r[192|N>>6]+r[128|N&63];continue}if(N<55296||N>=57344){A[A.length]=r[224|N>>12]+r[128|N>>6&63]+r[128|N&63];continue}O+=1,N=65536+((N&1023)<<10|I.charCodeAt(O)&1023),A[A.length]=r[240|N>>18]+r[128|N>>12&63]+r[128|N>>6&63]+r[128|N&63]}C+=A.join("")}return C},d=function(y){for(var v=[{obj:{o:y},prop:"o"}],b=[],S=0;S<v.length;++S)for(var w=v[S],T=w.obj[w.prop],C=Object.keys(T),k=0;k<C.length;++k){var I=C[k],A=T[I];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(v.push({obj:T,prop:I}),b.push(A))}return o(v),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},h=function(y,v){return[].concat(y,v)},g=function(y,v){if(n(y)){for(var b=[],S=0;S<y.length;S+=1)b.push(v(y[S]));return b}return v(y)};return ku={arrayToObject:i,assign:s,combine:h,compact:d,decode:l,encode:u,isBuffer:f,isRegExp:p,maybeMap:g,merge:a},ku}var Ru,Dy;function L$(){if(Dy)return Ru;Dy=1;var e=aT(),t=fS(),n=Fp(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,y){return m+"["+y+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(g,m){a.apply(g,i(m)?m:[m])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},p={},f=function g(m,y,v,b,S,w,T,C,k,I,A,O,N,V,P,D,_,F){for(var j=m,B=F,M=0,z=!1;(B=B.get(p))!==void 0&&!z;){var Q=B.get(m);if(M+=1,typeof Q<"u"){if(Q===M)throw new RangeError("Cyclic object value");z=!0}typeof B.get(p)>"u"&&(M=0)}if(typeof I=="function"?j=I(y,j):j instanceof Date?j=N(j):v==="comma"&&i(j)&&(j=t.maybeMap(j,function(Re){return Re instanceof Date?N(Re):Re})),j===null){if(w)return k&&!D?k(y,u.encoder,_,"key",V):y;j=""}if(d(j)||t.isBuffer(j)){if(k){var X=D?y:k(y,u.encoder,_,"key",V);return[P(X)+"="+P(k(j,u.encoder,_,"value",V))]}return[P(y)+"="+P(String(j))]}var J=[];if(typeof j>"u")return J;var Z;if(v==="comma"&&i(j))D&&k&&(j=t.maybeMap(j,k)),Z=[{value:j.length>0?j.join(",")||null:void 0}];else if(i(I))Z=I;else{var Y=Object.keys(j);Z=A?Y.sort(A):Y}var G=C?String(y).replace(/\./g,"%2E"):String(y),L=b&&i(j)&&j.length===1?G+"[]":G;if(S&&i(j)&&j.length===0)return L+"[]";for(var $=0;$<Z.length;++$){var K=Z[$],ie=typeof K=="object"&&K&&typeof K.value<"u"?K.value:j[K];if(!(T&&ie===null)){var H=O&&C?String(K).replace(/\./g,"%2E"):String(K),ye=i(j)?typeof v=="function"?v(L,H):L:L+(O?"."+H:"["+H+"]");F.set(m,M);var Te=e();Te.set(p,F),s(J,g(ie,ye,v,b,S,w,T,C,v==="comma"&&D&&i(j)?null:k,I,A,O,N,V,P,D,_,Te))}}return J},h=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");v=m.format}var b=n.formatters[v],S=u.filter;(typeof m.filter=="function"||i(m.filter))&&(S=m.filter);var w;if(m.arrayFormat in o?w=m.arrayFormat:"indices"in m?w=m.indices?"indices":"repeat":w=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:w,charset:y,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:S,format:v,formatter:b,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Ru=function(g,m){var y=g,v=h(m),b,S;typeof v.filter=="function"?(S=v.filter,y=S("",y)):i(v.filter)&&(S=v.filter,b=S);var w=[];if(typeof y!="object"||y===null)return"";var T=o[v.arrayFormat],C=T==="comma"&&v.commaRoundTrip;b||(b=Object.keys(y)),v.sort&&b.sort(v.sort);for(var k=e(),I=0;I<b.length;++I){var A=b[I],O=y[A];v.skipNulls&&O===null||s(w,f(O,A,T,C,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,k))}var N=w.join(v.delimiter),V=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?V+="utf8=%26%2310003%3B&":V+="utf8=%E2%9C%93&"),N.length>0?V+N:""},Ru}var Pu,jy;function V$(){if(jy)return Pu;jy=1;var e=fS(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(f,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,f,h){if(p&&typeof p=="string"&&f.comma&&p.indexOf(",")>-1)return p.split(",");if(f.throwOnLimitExceeded&&h>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(f,h){var g={__proto__:null},m=h.ignoreQueryPrefix?f.replace(/^\?/,""):f;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=h.parameterLimit===1/0?void 0:h.parameterLimit,v=m.split(h.delimiter,h.throwOnLimitExceeded?y+1:y);if(h.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var b=-1,S,w=h.charset;if(h.charsetSentinel)for(S=0;S<v.length;++S)v[S].indexOf("utf8=")===0&&(v[S]===s?w="utf-8":v[S]===a&&(w="iso-8859-1"),b=S,S=v.length);for(S=0;S<v.length;++S)if(S!==b){var T=v[S],C=T.indexOf("]="),k=C===-1?T.indexOf("="):C+1,I,A;k===-1?(I=h.decoder(T,r.decoder,w,"key"),A=h.strictNullHandling?null:""):(I=h.decoder(T.slice(0,k),r.decoder,w,"key"),A=e.maybeMap(i(T.slice(k+1),h,n(g[I])?g[I].length:0),function(N){return h.decoder(N,r.decoder,w,"value")})),A&&h.interpretNumericEntities&&w==="iso-8859-1"&&(A=o(String(A))),T.indexOf("[]=")>-1&&(A=n(A)?[A]:A);var O=t.call(g,I);O&&h.duplicates==="combine"?g[I]=e.combine(g[I],A):(!O||h.duplicates==="last")&&(g[I]=A)}return g},c=function(p,f,h,g){var m=0;if(p.length>0&&p[p.length-1]==="[]"){var y=p.slice(0,-1).join("");m=Array.isArray(f)&&f[y]?f[y].length:0}for(var v=g?f:i(f,h,m),b=p.length-1;b>=0;--b){var S,w=p[b];if(w==="[]"&&h.parseArrays)S=h.allowEmptyArrays&&(v===""||h.strictNullHandling&&v===null)?[]:e.combine([],v);else{S=h.plainObjects?{__proto__:null}:{};var T=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=h.decodeDotInKeys?T.replace(/%2E/g,"."):T,k=parseInt(C,10);!h.parseArrays&&C===""?S={0:v}:!isNaN(k)&&w!==C&&String(k)===C&&k>=0&&h.parseArrays&&k<=h.arrayLimit?(S=[],S[k]=v):C!=="__proto__"&&(S[C]=v)}v=S}return v},u=function(f,h,g,m){if(f){var y=g.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,v=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,S=g.depth>0&&v.exec(y),w=S?y.slice(0,S.index):y,T=[];if(w){if(!g.plainObjects&&t.call(Object.prototype,w)&&!g.allowPrototypes)return;T.push(w)}for(var C=0;g.depth>0&&(S=b.exec(y))!==null&&C<g.depth;){if(C+=1,!g.plainObjects&&t.call(Object.prototype,S[1].slice(1,-1))&&!g.allowPrototypes)return;T.push(S[1])}if(S){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");T.push("["+y.slice(S.index)+"]")}return c(T,h,g,m)}},d=function(f){if(!f)return r;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var h=typeof f.charset>"u"?r.charset:f.charset,g=typeof f.duplicates>"u"?r.duplicates:f.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var m=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:r.allowDots:!!f.allowDots;return{allowDots:m,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:r.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:r.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:r.arrayLimit,charset:h,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:r.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:r.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:r.decoder,delimiter:typeof f.delimiter=="string"||e.isRegExp(f.delimiter)?f.delimiter:r.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:r.depth,duplicates:g,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:r.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:r.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:r.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return Pu=function(p,f){var h=d(f);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var g=typeof p=="string"?l(p,h):p,m=h.plainObjects?{__proto__:null}:{},y=Object.keys(g),v=0;v<y.length;++v){var b=y[v],S=u(b,g[b],h,typeof p=="string");m=e.merge(m,S,h)}return h.allowSparse===!0?m:e.compact(m)},Pu}var Au,Ny;function $$(){if(Ny)return Au;Ny=1;var e=L$(),t=V$(),n=Fp();return Au={formats:n,parse:t,stringify:e},Au}var z$=$$(),qe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(qe||(qe={}));var Fy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Fy||(Fy={}));const fe=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lr=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},re=qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class un extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}un.create=e=>new un(e);const fa=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,qe.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${qe.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${qe.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${qe.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:qe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.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 re.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 re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,qe.assertNever(e)}return{message:n}};let B$=fa;function Dd(){return B$}const jd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ce(e,t){const n=Dd(),r=jd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===fa?void 0:fa].filter(o=>!!o)});e.common.issues.push(r)}class Ht{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ke;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return Ht.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return ke;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const ke=Object.freeze({status:"aborted"}),Ii=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),Ly=e=>e.status==="aborted",Vy=e=>e.status==="dirty",Xo=e=>e.status==="valid",Vs=e=>typeof Promise<"u"&&e instanceof Promise;function $s(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function pS(e,t,n,r,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ve;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ve||(ve={}));var _i,Oi;class Vn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $y=(e,t)=>{if(Xo(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 un(e.common.issues);return this._error=n,this._error}}};function _e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{var l,c;const{message:u}=e;return a.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:o}}class Fe{get description(){return this._def.description}_getType(t){return lr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Vs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return $y(o,i)}"~validate"(t){var n,r;const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return Xo(i)?{value:i.value}:{issues:o.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>Xo(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Vs(o)?o:Promise.resolve(o));return $y(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:re.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Xn({schema:this,typeName:Ee.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Wn.create(this,this._def)}nullable(){return no.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return jn.create(this)}promise(){return ma.create(this,this._def)}or(t){return Hs.create([this,t],this._def)}and(t){return Ws.create(this,t,this._def)}transform(t){return new Xn({..._e(this._def),schema:this,typeName:Ee.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Gs({..._e(this._def),innerType:this,defaultValue:n,typeName:Ee.ZodDefault})}brand(){return new vS({typeName:Ee.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Zs({..._e(this._def),innerType:this,catchValue:n,typeName:Ee.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ml.create(this,t)}readonly(){return Xs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const H$=/^c[^\s-]{8,}$/i,W$=/^[0-9a-z]+$/,q$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,U$=/^[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,K$=/^[a-z0-9_-]{21}$/i,Y$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,G$=/^[-+]?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)?)??$/,Z$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,X$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Iu;const Q$=/^(?:(?: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])$/,J$=/^(?:(?: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])$/,ez=/^(([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]))$/,tz=/^(([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])$/,nz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rz=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,mS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oz=new RegExp(`^${mS}$`);function hS(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function iz(e){return new RegExp(`^${hS(e)}$`)}function az(e){let t=`${mS}T${hS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function sz(e,t){return!!((t==="v4"||!t)&&Q$.test(e)||(t==="v6"||!t)&&ez.test(e))}function lz(e,t){if(!Y$.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||!o.typ||!o.alg||t&&o.alg!==t)}catch{return!1}}function cz(e,t){return!!((t==="v4"||!t)&&J$.test(e)||(t==="v6"||!t)&&tz.test(e))}class Hn extends Fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.string,received:i.parsedType}),ke}const r=new Ht;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.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),ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ce(o,{code:re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ce(o,{code:re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Z$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"email",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Iu||(Iu=new RegExp(X$,"u")),Iu.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"emoji",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")U$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"uuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")K$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"nanoid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")H$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")W$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cuid2",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")q$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ulid",code:re.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ce(o,{validation:"url",code:re.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),ce(o,{validation:"regex",code:re.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),ce(o,{code:re.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),ce(o,{code:re.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?az(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?oz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?iz(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{code:re.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?G$.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"duration",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?sz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"ip",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?lz(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"jwt",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?cz(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"cidr",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?nz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64",code:re.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?rz.test(t.data)||(o=this._getOrReturnCtx(t,o),ce(o,{validation:"base64url",code:re.invalid_string,message:i.message}),r.dirty()):qe.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:re.invalid_string,...ve.errToObj(r)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ve.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ve.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ve.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ve.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ve.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ve.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ve.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ve.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ve.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ve.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ve.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ve.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ve.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ve.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ve.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ve.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ve.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ve.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ve.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ve.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ve.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ve.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ve.errToObj(n)})}nonempty(t){return this.min(1,ve.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...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}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:Ee.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function uz(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class eo extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==fe.number){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.number,received:i.parsedType}),ke}let r;const o=new Ht;for(const i of this._def.checks)i.kind==="int"?qe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:re.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),ce(r,{code:re.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),ce(r,{code:re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?uz(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ce(r,{code:re.not_finite,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new eo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ve.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ve.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&qe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}eo.create=e=>new eo({checks:[],typeName:Ee.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Qo extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==fe.bigint)return this._getInvalidInput(t);let r;const o=new Ht;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),ce(r,{code:re.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),ce(r,{code:re.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),ce(r,{code:re.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):qe.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.bigint,received:n.parsedType}),ke}gte(t,n){return this.setLimit("min",t,!0,ve.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ve.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ve.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ve.toString(n))}setLimit(t,n,r,o){return new Qo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ve.toString(o)}]})}_addCheck(t){return new Qo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ve.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Qo.create=e=>{var t;return new Qo({checks:[],typeName:Ee.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class Nd extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.boolean,received:r.parsedType}),ke}return Yt(t.data)}}Nd.create=e=>new Nd({typeName:Ee.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class pa extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_type,expected:fe.date,received:i.parsedType}),ke}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ce(i,{code:re.invalid_date}),ke}const r=new Ht;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ce(o,{code:re.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),ce(o,{code:re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):qe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new pa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ve.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ve.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}pa.create=e=>new pa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ee.ZodDate,..._e(e)});class Fd extends Fe{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.symbol,received:r.parsedType}),ke}return Yt(t.data)}}Fd.create=e=>new Fd({typeName:Ee.ZodSymbol,..._e(e)});class zs extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.undefined,received:r.parsedType}),ke}return Yt(t.data)}}zs.create=e=>new zs({typeName:Ee.ZodUndefined,..._e(e)});class Bs extends Fe{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.null,received:r.parsedType}),ke}return Yt(t.data)}}Bs.create=e=>new Bs({typeName:Ee.ZodNull,..._e(e)});class Ld extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Ld.create=e=>new Ld({typeName:Ee.ZodAny,..._e(e)});class Oo extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}Oo.create=e=>new Oo({typeName:Ee.ZodUnknown,..._e(e)});class yr extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ce(n,{code:re.invalid_type,expected:fe.never,received:n.parsedType}),ke}}yr.create=e=>new yr({typeName:Ee.ZodNever,..._e(e)});class Vd extends Fe{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.void,received:r.parsedType}),ke}return Yt(t.data)}}Vd.create=e=>new Vd({typeName:Ee.ZodVoid,..._e(e)});class jn extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==fe.array)return ce(n,{code:re.invalid_type,expected:fe.array,received:n.parsedType}),ke;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ce(n,{code:a?re.too_big:re.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ce(n,{code:re.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&&(ce(n,{code:re.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Vn(n,a,n.path,s)))).then(a=>Ht.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Vn(n,a,n.path,s)));return Ht.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new jn({...this._def,minLength:{value:t,message:ve.toString(n)}})}max(t,n){return new jn({...this._def,maxLength:{value:t,message:ve.toString(n)}})}length(t,n){return new jn({...this._def,exactLength:{value:t,message:ve.toString(n)}})}nonempty(t){return this.min(1,t)}}jn.create=(e,t)=>new jn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ee.ZodArray,..._e(t)});function xo(e){if(e instanceof xt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Wn.create(xo(r))}return new xt({...e._def,shape:()=>t})}else return e instanceof jn?new jn({...e._def,type:xo(e.element)}):e instanceof Wn?Wn.create(xo(e.unwrap())):e instanceof no?no.create(xo(e.unwrap())):e instanceof Zn?Zn.create(e.items.map(t=>xo(t))):e}class xt extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=qe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ce(c,{code:re.invalid_type,expected:fe.object,received:c.parsedType}),ke}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof yr&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Vn(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 s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ce(o,{code:re.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Vn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Ht.mergeObjectSync(r,c)):Ht.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ve.errToObj,new xt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ve.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new xt({...this._def,unknownKeys:"strip"})}passthrough(){return new xt({...this._def,unknownKeys:"passthrough"})}extend(t){return new xt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new xt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ee.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new xt({...this._def,catchall:t})}pick(t){const n={};return qe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}omit(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new xt({...this._def,shape:()=>n})}deepPartial(){return xo(this)}partial(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new xt({...this._def,shape:()=>n})}required(t){const n={};return qe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Wn;)i=i._def.innerType;n[r]=i}}),new xt({...this._def,shape:()=>n})}keyof(){return gS(qe.objectKeys(this.shape))}}xt.create=(e,t)=>new xt({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:Ee.ZodObject,..._e(t)});xt.strictCreate=(e,t)=>new xt({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:Ee.ZodObject,..._e(t)});xt.lazycreate=(e,t)=>new xt({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:Ee.ZodObject,..._e(t)});class Hs extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new un(s.ctx.common.issues));return ce(n,{code:re.invalid_union,unionErrors:a}),ke}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new un(l));return ce(n,{code:re.invalid_union,unionErrors:s}),ke}}get options(){return this._def.options}}Hs.create=(e,t)=>new Hs({options:e,typeName:Ee.ZodUnion,..._e(t)});const Bn=e=>e instanceof Us?Bn(e.schema):e instanceof Xn?Bn(e.innerType()):e instanceof Ks?[e.value]:e instanceof to?e.options:e instanceof Ys?qe.objectValues(e.enum):e instanceof Gs?Bn(e._def.innerType):e instanceof zs?[void 0]:e instanceof Bs?[null]:e instanceof Wn?[void 0,...Bn(e.unwrap())]:e instanceof no?[null,...Bn(e.unwrap())]:e instanceof vS||e instanceof Xs?Bn(e.unwrap()):e instanceof Zs?Bn(e._def.innerType):[];class Lp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.object)return ce(n,{code:re.invalid_type,expected:fe.object,received:n.parsedType}),ke;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ce(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=Bn(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Lp({typeName:Ee.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._e(r)})}}function $d(e,t){const n=lr(e),r=lr(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const o=qe.objectKeys(t),i=qe.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=$d(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=$d(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ws extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(Ly(i)||Ly(a))return ke;const s=$d(i.value,a.value);return s.valid?((Vy(i)||Vy(a))&&n.dirty(),{status:n.value,value:s.data}):(ce(r,{code:re.invalid_intersection_types}),ke)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ws.create=(e,t,n)=>new Ws({left:e,right:t,typeName:Ee.ZodIntersection,..._e(n)});class Zn extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ce(r,{code:re.invalid_type,expected:fe.array,received:r.parsedType}),ke;if(r.data.length<this._def.items.length)return ce(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ke;!this._def.rest&&r.data.length>this._def.items.length&&(ce(r,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Vn(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ht.mergeArray(n,a)):Ht.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Zn({...this._def,rest:t})}}Zn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zn({items:e,typeName:Ee.ZodTuple,rest:null,..._e(t)})};class qs extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.object)return ce(r,{code:re.invalid_type,expected:fe.object,received:r.parsedType}),ke;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new Vn(r,s,r.path,s)),value:a._parse(new Vn(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ht.mergeObjectAsync(n,o):Ht.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new qs({keyType:t,valueType:n,typeName:Ee.ZodRecord,..._e(r)}):new qs({keyType:Hn.create(),valueType:t,typeName:Ee.ZodRecord,..._e(n)})}}class zd extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.map)return ce(r,{code:re.invalid_type,expected:fe.map,received:r.parsedType}),ke;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Vn(r,s,r.path,[c,"key"])),value:i._parse(new Vn(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return ke;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}zd.create=(e,t,n)=>new zd({valueType:t,keyType:e,typeName:Ee.ZodMap,..._e(n)});class Jo extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ce(r,{code:re.invalid_type,expected:fe.set,received:r.parsedType}),ke;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ce(r,{code:re.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&&(ce(r,{code:re.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return ke;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Vn(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Jo({...this._def,minSize:{value:t,message:ve.toString(n)}})}max(t,n){return new Jo({...this._def,maxSize:{value:t,message:ve.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Jo.create=(e,t)=>new Jo({valueType:e,minSize:null,maxSize:null,typeName:Ee.ZodSet,..._e(t)});class Ui extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.function)return ce(n,{code:re.invalid_type,expected:fe.function,received:n.parsedType}),ke;function r(s,l){return jd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Dd(),fa].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function o(s,l){return jd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Dd(),fa].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ma){const s=this;return Yt(async function(...l){const c=new un([]),u=await s._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const s=this;return Yt(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new un([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new un([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ui({...this._def,args:Zn.create(t).rest(Oo.create())})}returns(t){return new Ui({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ui({args:t||Zn.create([]).rest(Oo.create()),returns:n||Oo.create(),typeName:Ee.ZodFunction,..._e(r)})}}class Us extends Fe{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})}}Us.create=(e,t)=>new Us({getter:e,typeName:Ee.ZodLazy,..._e(t)});class Ks extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ce(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ks.create=(e,t)=>new Ks({value:e,typeName:Ee.ZodLiteral,..._e(t)});function gS(e,t){return new to({values:e,typeName:Ee.ZodEnum,..._e(t)})}class to extends Fe{constructor(){super(...arguments),_i.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{expected:qe.joinValues(r),received:n.parsedType,code:re.invalid_type}),ke}if($s(this,_i)||pS(this,_i,new Set(this._def.values)),!$s(this,_i).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ce(n,{received:n.data,code:re.invalid_enum_value,options:r}),ke}return Yt(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 to.create(t,{...this._def,...n})}exclude(t,n=this._def){return to.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}_i=new WeakMap;to.create=gS;class Ys extends Fe{constructor(){super(...arguments),Oi.set(this,void 0)}_parse(t){const n=qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const o=qe.objectValues(n);return ce(r,{expected:qe.joinValues(o),received:r.parsedType,code:re.invalid_type}),ke}if($s(this,Oi)||pS(this,Oi,new Set(qe.getValidEnumValues(this._def.values))),!$s(this,Oi).has(t.data)){const o=qe.objectValues(n);return ce(r,{received:r.data,code:re.invalid_enum_value,options:o}),ke}return Yt(t.data)}get enum(){return this._def.values}}Oi=new WeakMap;Ys.create=(e,t)=>new Ys({values:e,typeName:Ee.ZodNativeEnum,..._e(t)});class ma extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ce(n,{code:re.invalid_type,expected:fe.promise,received:n.parsedType}),ke;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ma.create=(e,t)=>new ma({type:e,typeName:Ee.ZodPromise,..._e(t)});class Xn extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ce(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return ke;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?ke:l.status==="dirty"||n.value==="dirty"?Ii(l.value):l});{if(n.value==="aborted")return ke;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ke:s.status==="dirty"||n.value==="dirty"?Ii(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ke:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ke:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Xo(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Xo(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);qe.assertNever(o)}}Xn.create=(e,t,n)=>new Xn({schema:e,typeName:Ee.ZodEffects,effect:t,..._e(n)});Xn.createWithPreprocess=(e,t,n)=>new Xn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ee.ZodEffects,..._e(n)});class Wn extends Fe{_parse(t){return this._getType(t)===fe.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wn.create=(e,t)=>new Wn({innerType:e,typeName:Ee.ZodOptional,..._e(t)});class no extends Fe{_parse(t){return this._getType(t)===fe.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}no.create=(e,t)=>new no({innerType:e,typeName:Ee.ZodNullable,..._e(t)});class Gs extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Gs.create=(e,t)=>new Gs({innerType:e,typeName:Ee.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class Zs extends Fe{_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 Vs(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Zs.create=(e,t)=>new Zs({innerType:e,typeName:Ee.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class Bd extends Fe{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ce(r,{code:re.invalid_type,expected:fe.nan,received:r.parsedType}),ke}return{status:"valid",value:t.data}}}Bd.create=e=>new Bd({typeName:Ee.ZodNaN,..._e(e)});class vS extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ml extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ke:i.status==="dirty"?(n.dirty(),Ii(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ke:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ml({in:t,out:n,typeName:Ee.ZodPipeline})}}class Xs extends Fe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Xo(o)&&(o.value=Object.freeze(o.value)),o);return Vs(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Xs.create=(e,t)=>new Xs({innerType:e,typeName:Ee.ZodReadonly,..._e(t)});xt.lazycreate;var Ee;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ee||(Ee={}));Hn.create;eo.create;Bd.create;Qo.create;Nd.create;pa.create;Fd.create;zs.create;Bs.create;Ld.create;Oo.create;yr.create;Vd.create;jn.create;xt.create;xt.strictCreate;Hs.create;Lp.create;Ws.create;Zn.create;qs.create;zd.create;Jo.create;Ui.create;Us.create;Ks.create;to.create;Ys.create;ma.create;Xn.create;Wn.create;no.create;Xn.createWithPreprocess;Ml.create;const dz=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},fz=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},yS=e=>e.replace(/\[(\d+)]/g,".$1").split("."),mn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):yS(t),o=structuredClone(e);return fz(o,r,n),o},pz=(e,t)=>e.localeCompare(t),Ci={},xS=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return bS(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=xS(e._def.innerType);return t==="ZodArray"?n??[]:n}},bS=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,xS(n)])),wS=(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]=wS(i,o):n[r]=o||i)}return n},mz={sort:pz,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},SS=e=>{const t=new FormData(e),n=new URLSearchParams(t);return z$.parse(n.toString(),mz)},Lr=(e,t)=>yS(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),cr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),_u=e=>{const t=e.dataset.target;if(!t)return cr(e);const n=document.querySelector(`[data-origin="${t}"]`);return cr(n||e)},hz={state:{},loading:!1,useOnChange:!1},zy=e=>e.dataset.target||e.name,gz=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=qi.LocalStorage.get(t);return dz(n)?n:{}},clear:()=>void qi.LocalStorage.delete(t),set:n=>qi.LocalStorage.set(t,n)}},vz=(e,t,n=hz)=>{const[r,o]=E.useState(null),i=E.useRef({}),[a,s]=E.useState(()=>Ve.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??bS(e)??{}),l=E.useCallback(v=>{var I;const b=v.target,S=v.currentTarget;if(b.dataset.optional==="true")return;const T=zy(b),C=_u(b)||(S?cr(S):""),k=Lr(T,e);if(b.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),O=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(N=>mn(N??{},T,O))}},[]),c=E.useCallback(v=>b=>{const S=b.currentTarget,w=Object.values(i.current).reduce((C,k)=>{var V;const I=k.element,A=k.schema.safeParse(cr(I));if(I.dataset.ignore==="ignore"||A.success)return C;const O=(V=A.error.issues[0])==null?void 0:V.message;I.setAttribute("data-initialized","true");const N=I.dataset.name||I.name||"";return mn(C,N,O)},{}),T=Ve.empty(w)?null:w;o(T),console.error(T),v==null||v({form:S,errors:T||{}})},[]),u=(v,b=Ci)=>{const S=Lr(v,e),w=T=>{var k;if(!T)return;const C=T instanceof Date?T.toISOString():T.target.value;s(I=>mn(I,v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,T)};return{...b,loading:n.loading,name:v,id:v,onChange:w,form:t,date:Ve.string(a[v])?new Date(a[v]):a[v],required:b.required??!S.isOptional(),error:r==null?void 0:r[v],ref:T=>{T!==null&&(i.current[v]={element:T,schema:S})}}},d=(v,b=Ci)=>{const S=Lr(v,e);return{...b,name:v,id:v,onChange:T=>{var k;const C=T.target.value;s(I=>mn(I,v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,T)},form:t,loading:n.loading,onInvalid:l,error:Ir(r,v,void 0),value:Ir(a,v,void 0)||"",required:b.required??!S.isOptional(),ref:T=>T!==null?i.current[v]={element:T,schema:S}:void 0}},p=(v,b=Ci)=>{const S=Lr(v,e);return{...b,name:v,id:v,onChange:T=>{var k;const C=T.target.checked;s(I=>mn(I??{},v,C)),(k=b==null?void 0:b.onChange)==null||k.call(b,T)},form:t,loading:n.loading,onInvalid:l,error:Ir(r,v,void 0),required:b.required??!S.isOptional(),ref:T=>T!==null?void(i.current[v]={element:T,schema:S}):void 0}},f=(v,b=Ci)=>{const S=Lr(v,e),w=T=>{var k,I;(k=T.persist)==null||k.call(T);const C=T.target.value;(I=b==null?void 0:b.onChange)==null||I.call(b,T),s(A=>mn(A,v,C))};return{...b,loading:n.loading,name:v,id:v,onChange:w,form:t,onInvalid:l,error:Ir(r,v,void 0),required:b.required??!S.isOptional(),value:Ir(a,v,void 0)||(b==null?void 0:b.value)||"",type:Ve.instance(S,eo)?"number":(b==null?void 0:b.type)??"text",ref:T=>T===null?void 0:i.current[v]={element:T,schema:S}}},h=(v,b=Ci)=>{const S=Lr(v,e),w=S._def.typeName==="ZodNumber";return{...b,name:v,id:v,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const k=w?C.target.valueAsNumber:C.target.value;(A=b==null?void 0:b.onChange)==null||A.call(b,C),s(O=>mn(O,v,k))},form:t,loading:n.loading,onInvalid:l,error:Ir(r,v,void 0),required:b.required??!S.isOptional(),type:w?"number":(b==null?void 0:b.type)??"text",value:Ir(a,v,void 0)||(b==null?void 0:b.value)||"",ref:C=>C===null?void 0:void(i.current[v]={element:C,schema:S})}};E.useEffect(()=>{const v=Object.values(i.current).map(S=>{const w=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,T=S.schema.safeParse(cr(w)),C=O=>{var _;const N=zy(O.target);if(!N)return!1;const V=O.target,P=_u(O.target)||(O.relatedTarget?cr(O.relatedTarget):""),D=S.schema.safeParse(P);if(V.setAttribute("value",P),D.success)return w.setCustomValidity(""),o(F=>{if(Ve.null(F))return null;const j=mn(F,N,void 0);return Ve.empty(F)||Ve.nil(F)||Ve.empty(j)?null:j}),!1;if(w.required){const F=((_=D.error.issues[0])==null?void 0:_.message)||"";w.setCustomValidity(F),o(j=>{if(Ve.null(j))return null;const B=mn(j,N,F||void 0);return Ve.empty(B)?null:B})}return!1},k=new AbortController,I=w.getAttribute("data-trigger")||"blur";w.addEventListener(I,C,{signal:k.signal});const A=w.dataset.shadow?!1:w.required?!T.success:!1;return{input:S,hasInitialError:A,unsubscribe:()=>k.abort()}});return v.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>v.forEach(S=>S.unsubscribe())});const g=v=>b=>{var A;b.preventDefault();const S=b.currentTarget;let w=SS(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(O=>{if(O.tagName==="SELECT"){const N=O;w=mn(w,N.name,N.value)}if(O.tagName==="INPUT"){const N=O,V=_u(N)||(N?cr(N):"");w=mn(w,N.dataset.target||N.name,V)}});const C=wS(w,a),k=e.safeParse(C),I=()=>{var O;dS(S),(O=n.interceptor)==null||O.clear()};if(k.success){const O=JSON.stringify(k.data);return S.setAttribute("data-json",O),(A=n.interceptor)==null||A.clear(),v==null?void 0:v(b,{form:S,event:b,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),S.reportValidity(),v==null?void 0:v(b,{form:S,json:w,event:b,reset:I,data:w,success:!1,errors:k.error.issues.map(O=>({message:O.message,path:O.path.map(N=>String(N))}))})},m=v=>Vf(a,v)||"",y=v=>({...v,id:t,name:t});return E.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(a))},[a]),{get:m,input:h,state:a,errors:r,select:d,checkbox:p,onSubmit:g,setState:s,textarea:f,onInvalid:c,controller:y,datepicker:u,name:t,disabled:r!==null}},yz=e=>e?JSON.parse(e.getAttribute("data-json")):{},xz=e=>{const t=E.useRef(void 0);return E.useEffect(()=>{t.current=e},[e]),t.current},TS={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},ES={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"1.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},CS={normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},bz={name:"dark",zIndex:CS,rounded:TS,spacing:ES,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},wz={rounded:TS,spacing:ES,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},zIndex:CS,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 20%, 97%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},Sz=bz,Tz=wz,Ez=e=>{const t=E.useMemo(()=>({locale:e.locale,tweaks:{...gl,...e.tweaks},parser:e.parser||ml.hsla,map:{...hl,...e.map}}),[e]);return x.jsx(si.Provider,{value:t,children:e.children})},Cz=()=>{const e=E.useContext(si);return e?e.parser:ml.hsla};exports.Alert=dI;exports.Autocomplete=xF;exports.Button=Mo;exports.Calendar=L0;exports.Card=zf;exports.Checkbox=Pp;exports.ColType=_o;exports.Collapse=s0;exports.CommandPalette=RN;exports.ComponentsProvider=Ez;exports.Context=si;exports.DatePicker=wF;exports.Dict=yn;exports.Dropdown=hi;exports.Empty=V0;exports.Expand=PN;exports.FileUpload=DL;exports.Form=jL;exports.Input=Aa;exports.InputFeedback=k1;exports.InputField=Pa;exports.Menu=_N;exports.MenuItem=IN;exports.Modal=Yw;exports.MultiSelect=BL;exports.Notifications=aD;exports.Polymorph=cn;exports.Radiobox=HL;exports.RenderOnView=aE;exports.Select=Qr;exports.Slider=CV;exports.Stats=sD;exports.Switch=kV;exports.Tab=dD;exports.Table=N$;exports.Tabs=cD;exports.Tag=Yd;exports.TaskList=RV;exports.Textarea=PV;exports.Timeline=fD;exports.TimelineItem=xl;exports.Toolbar=ON;exports.Tooltip=cp;exports.TransferList=_V;exports.createColumns=n$;exports.createCssProperties=JO;exports.createDesignTokens=M0;exports.createFormStorage=gz;exports.createOptionCols=Dp;exports.createStyles=ZO;exports.createTheme=QO;exports.createTokenStyles=eM;exports.css=Ie;exports.defaultDarkTheme=Sz;exports.defaultLightTheme=Tz;exports.defaultTranslations=hl;exports.defaultTweaks=gl;exports.dispatchInput=cx;exports.formReset=dS;exports.formToJson=SS;exports.getCoords=tE;exports.getJsonForm=yz;exports.getRemainingSize=Ki;exports.getSchemaShape=Lr;exports.hasVerticalScroll=ux;exports.initializeInputDataset=ga;exports.isMobile=j0;exports.isReactComponent=eE;exports.isReactFC=Kd;exports.isSsr=Yr;exports.mergeRefs=qn;exports.negate=nM;exports.noop=$f;exports.parsers=ml;exports.path=Vf;exports.reduceTokens=Vr;exports.safeRegex=od;exports.splitInto=D0;exports.useColorParser=Cz;exports.useForm=vz;exports.useLocale=Lf;exports.useNotification=oD;exports.usePrevious=xz;exports.useReactive=lw;exports.useTablePreferences=i$;exports.useTranslations=At;exports.uuid=li;
212
212
  //# sourceMappingURL=index.js.map