@g4rcez/components 0.0.60 → 0.0.61

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,7 +1,7 @@
1
- "use strict";var P0=Object.defineProperty;var R0=(e,t,n)=>t in e?P0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>R0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),x=require("react/jsx-runtime"),jc=require("react-dom");function gm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=gm(w),ys=gm(jc);function ym(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ym(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function I0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ym(e))&&(r&&(r+=" "),r+=t);return r}const xf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,wf=I0,co=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return wf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const h=xf(u)||xf(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...s,...a}[m]):{...s,...a}[m]===g})?[...c,f,h]:c},[]);return wf(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function vm(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=vm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function A0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=vm(e))&&(r&&(r+=" "),r+=t);return r}var Tf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function O0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function D0(e){if(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 M0=Error,k0=EvalError,F0=RangeError,j0=ReferenceError,bm=SyntaxError,vs=TypeError,N0=URIError,L0=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(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},Sf=typeof Symbol<"u"&&Symbol,_0=L0,V0=function(){return typeof Sf!="function"||typeof Symbol!="function"||typeof Sf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_0()},wa={__proto__:null,foo:{}},$0=Object,B0=function(){return{__proto__:wa}.foo===wa.foo&&!(wa instanceof $0)},W0="Function.prototype.bind called on incompatible ",H0=Object.prototype.toString,z0=Math.max,U0="[object Function]",Ef=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},G0=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},Y0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},K0=function(t){var n=this;if(typeof n!="function"||H0.apply(n)!==U0)throw new TypeError(W0+n);for(var r=G0(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Ef(r,arguments));return Object(u)===u?u:this}return n.apply(t,Ef(r,arguments))},i=z0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Y0(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},q0=K0,Nc=Function.prototype.bind||q0,X0=Function.prototype.call,Q0=Object.prototype.hasOwnProperty,Z0=Nc,J0=Z0.call(X0,Q0),he,ex=M0,tx=k0,nx=F0,rx=j0,Hr=bm,_r=vs,ox=N0,xm=Function,Ta=function(e){try{return xm('"use strict"; return ('+e+").constructor;")()}catch{}},ur=Object.getOwnPropertyDescriptor;if(ur)try{ur({},"")}catch{ur=null}var Sa=function(){throw new _r},sx=ur?function(){try{return arguments.callee,Sa}catch{try{return ur(arguments,"callee").get}catch{return Sa}}}():Sa,Er=V0(),ix=B0(),ct=Object.getPrototypeOf||(ix?function(e){return e.__proto__}:null),Or={},ax=typeof Uint8Array>"u"||!ct?he:ct(Uint8Array),fr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?he:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?he:ArrayBuffer,"%ArrayIteratorPrototype%":Er&&ct?ct([][Symbol.iterator]()):he,"%AsyncFromSyncIteratorPrototype%":he,"%AsyncFunction%":Or,"%AsyncGenerator%":Or,"%AsyncGeneratorFunction%":Or,"%AsyncIteratorPrototype%":Or,"%Atomics%":typeof Atomics>"u"?he:Atomics,"%BigInt%":typeof BigInt>"u"?he:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?he:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?he:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?he:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ex,"%eval%":eval,"%EvalError%":tx,"%Float32Array%":typeof Float32Array>"u"?he:Float32Array,"%Float64Array%":typeof Float64Array>"u"?he:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?he:FinalizationRegistry,"%Function%":xm,"%GeneratorFunction%":Or,"%Int8Array%":typeof Int8Array>"u"?he:Int8Array,"%Int16Array%":typeof Int16Array>"u"?he:Int16Array,"%Int32Array%":typeof Int32Array>"u"?he:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Er&&ct?ct(ct([][Symbol.iterator]())):he,"%JSON%":typeof JSON=="object"?JSON:he,"%Map%":typeof Map>"u"?he:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Er||!ct?he:ct(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?he:Promise,"%Proxy%":typeof Proxy>"u"?he:Proxy,"%RangeError%":nx,"%ReferenceError%":rx,"%Reflect%":typeof Reflect>"u"?he:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?he:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Er||!ct?he:ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?he:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Er&&ct?ct(""[Symbol.iterator]()):he,"%Symbol%":Er?Symbol:he,"%SyntaxError%":Hr,"%ThrowTypeError%":sx,"%TypedArray%":ax,"%TypeError%":_r,"%Uint8Array%":typeof Uint8Array>"u"?he:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?he:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?he:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?he:Uint32Array,"%URIError%":ox,"%WeakMap%":typeof WeakMap>"u"?he:WeakMap,"%WeakRef%":typeof WeakRef>"u"?he:WeakRef,"%WeakSet%":typeof WeakSet>"u"?he:WeakSet};if(ct)try{null.error}catch(e){var lx=ct(ct(e));fr["%Error.prototype%"]=lx}var cx=function e(t){var n;if(t==="%AsyncFunction%")n=Ta("async function () {}");else if(t==="%GeneratorFunction%")n=Ta("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ta("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ct&&(n=ct(o.prototype))}return fr[t]=n,n},Cf={__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"]},bs=Nc,ui=J0,ux=bs.call(Function.call,Array.prototype.concat),fx=bs.call(Function.apply,Array.prototype.splice),Pf=bs.call(Function.call,String.prototype.replace),fi=bs.call(Function.call,String.prototype.slice),dx=bs.call(Function.call,RegExp.prototype.exec),hx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,px=/\\(\\)?/g,mx=function(t){var n=fi(t,0,1),r=fi(t,-1);if(n==="%"&&r!=="%")throw new Hr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Hr("invalid intrinsic syntax, expected opening `%`");var o=[];return Pf(t,hx,function(s,i,a,l){o[o.length]=a?Pf(l,px,"$1"):i||s}),o},gx=function(t,n){var r=t,o;if(ui(Cf,r)&&(o=Cf[r],r="%"+o[0]+"%"),ui(fr,r)){var s=fr[r];if(s===Or&&(s=cx(r)),typeof s>"u"&&!n)throw new _r("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Hr("intrinsic "+t+" does not exist!")},uo=function(t,n){if(typeof t!="string"||t.length===0)throw new _r("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new _r('"allowMissing" argument must be a boolean');if(dx(/^%?[^%]*%?$/,t)===null)throw new Hr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=mx(t),o=r.length>0?r[0]:"",s=gx("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],fx(r,ux([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=fi(h,0,1),p=fi(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new Hr("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),o+="."+h,i="%"+o+"%",ui(fr,i))a=fr[i];else if(a!=null){if(!(h in a)){if(!n)throw new _r("base intrinsic for "+t+" exists, but the property is not available.");return}if(ur&&u+1>=r.length){var m=ur(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=ui(a,h),a=a[h];f&&!l&&(fr[i]=a)}}return a},wm={exports:{}},Ea,Rf;function Lc(){if(Rf)return Ea;Rf=1;var e=uo,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ea=t,Ea}var yx=uo,Js=yx("%Object.getOwnPropertyDescriptor%",!0);if(Js)try{Js([],"length")}catch{Js=null}var Tm=Js,If=Lc(),vx=bm,Cr=vs,Af=Tm,bx=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Cr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Cr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Cr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Cr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Cr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Cr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Af&&Af(t,n);if(If)If(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new vx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Al=Lc(),Sm=function(){return!!Al};Sm.hasArrayLengthDefineBug=function(){if(!Al)return null;try{return Al([],"length",{value:1}).length!==1}catch{return!0}};var xx=Sm,wx=uo,Of=bx,Tx=xx(),Df=Tm,Mf=vs,Sx=wx("%Math.floor%"),Ex=function(t,n){if(typeof t!="function")throw new Mf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Sx(n)!==n)throw new Mf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&Df){var i=Df(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Tx?Of(t,"length",n,!0,!0):Of(t,"length",n)),t};(function(e){var t=Nc,n=uo,r=Ex,o=vs,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Lc(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var d=a(t,i,arguments);return r(d,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(wm);var Cx=wm.exports,Em=uo,Cm=Cx,Px=Cm(Em("String.prototype.indexOf")),Rx=function(t,n){var r=Em(t,!!n);return typeof r=="function"&&Px(t,".prototype.")>-1?Cm(r):r};const Ix={},Ax=Object.freeze(Object.defineProperty({__proto__:null,default:Ix},Symbol.toStringTag,{value:"Module"})),Ox=D0(Ax);var _c=typeof Map=="function"&&Map.prototype,Ca=Object.getOwnPropertyDescriptor&&_c?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,di=_c&&Ca&&typeof Ca.get=="function"?Ca.get:null,kf=_c&&Map.prototype.forEach,Vc=typeof Set=="function"&&Set.prototype,Pa=Object.getOwnPropertyDescriptor&&Vc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,hi=Vc&&Pa&&typeof Pa.get=="function"?Pa.get:null,Ff=Vc&&Set.prototype.forEach,Dx=typeof WeakMap=="function"&&WeakMap.prototype,Ho=Dx?WeakMap.prototype.has:null,Mx=typeof WeakSet=="function"&&WeakSet.prototype,zo=Mx?WeakSet.prototype.has:null,kx=typeof WeakRef=="function"&&WeakRef.prototype,jf=kx?WeakRef.prototype.deref:null,Fx=Boolean.prototype.valueOf,jx=Object.prototype.toString,Nx=Function.prototype.toString,Lx=String.prototype.match,$c=String.prototype.slice,Dn=String.prototype.replace,_x=String.prototype.toUpperCase,Nf=String.prototype.toLowerCase,Pm=RegExp.prototype.test,Lf=Array.prototype.concat,Zt=Array.prototype.join,Vx=Array.prototype.slice,_f=Math.floor,Ol=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ra=Object.getOwnPropertySymbols,Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,zr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",St=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===zr||!0)?Symbol.toStringTag:null,Rm=Object.prototype.propertyIsEnumerable,Vf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function $f(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Pm.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-_f(-e):_f(e);if(r!==e){var o=String(r),s=$c.call(t,o.length+1);return Dn.call(o,n,"$&_")+"."+Dn.call(Dn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Dn.call(t,n,"$&_")}var Ml=Ox,Bf=Ml.custom,Wf=Am(Bf)?Bf:null,$x=function e(t,n,r,o){var s=n||{};if(In(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(In(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=In(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(In(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(In(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Dm(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?$f(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?$f(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return kl(t)?"[Array]":"[Object]";var f=ow(s,r);if(typeof o>"u")o=[];else if(Om(o,t)>=0)return"[Circular]";function h(L,C,M){if(C&&(o=Vx.call(o),o.push(C)),M){var j={depth:s.depth};return In(s,"quoteStyle")&&(j.quoteStyle=s.quoteStyle),e(L,j,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!Hf(t)){var d=qx(t),p=Fs(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Zt.call(p,", ")+" }":"")}if(Am(t)){var m=zr?Dn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Dl.call(t);return typeof t=="object"&&!zr?ko(m):m}if(tw(t)){for(var g="<"+Nf.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)g+=" "+v[b].name+"="+Im(Bx(v[b].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Nf.call(String(t.nodeName))+">",g}if(kl(t)){if(t.length===0)return"[]";var y=Fs(t,h);return f&&!rw(y)?"["+Fl(y,f)+"]":"[ "+Zt.call(y,", ")+" ]"}if(Hx(t)){var S=Fs(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Rm.call(t,"cause")?"{ ["+String(t)+"] "+Zt.call(Lf.call("[cause]: "+h(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Zt.call(S,", ")+" }"}if(typeof t=="object"&&i){if(Wf&&typeof t[Wf]=="function"&&Ml)return Ml(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Xx(t)){var T=[];return kf&&kf.call(t,function(L,C){T.push(h(C,t,!0)+" => "+h(L,t))}),zf("Map",di.call(t),T,f)}if(Jx(t)){var E=[];return Ff&&Ff.call(t,function(L){E.push(h(L,t))}),zf("Set",hi.call(t),E,f)}if(Qx(t))return Ia("WeakMap");if(ew(t))return Ia("WeakSet");if(Zx(t))return Ia("WeakRef");if(Ux(t))return ko(h(Number(t)));if(Yx(t))return ko(h(Ol.call(t)));if(Gx(t))return ko(Fx.call(t));if(zx(t))return ko(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Tf<"u"&&t===Tf)return"{ [object globalThis] }";if(!Wx(t)&&!Hf(t)){var R=Fs(t,h),A=Vf?Vf(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",I=!A&&St&&Object(t)===t&&St in t?$c.call(Wn(t),8,-1):O?"Object":"",F=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",k=F+(I||O?"["+Zt.call(Lf.call([],I||[],O||[]),": ")+"] ":"");return R.length===0?k+"{}":f?k+"{"+Fl(R,f)+"}":k+"{ "+Zt.call(R,", ")+" }"}return String(t)};function Im(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Bx(e){return Dn.call(String(e),/"/g,"&quot;")}function kl(e){return Wn(e)==="[object Array]"&&(!St||!(typeof e=="object"&&St in e))}function Wx(e){return Wn(e)==="[object Date]"&&(!St||!(typeof e=="object"&&St in e))}function Hf(e){return Wn(e)==="[object RegExp]"&&(!St||!(typeof e=="object"&&St in e))}function Hx(e){return Wn(e)==="[object Error]"&&(!St||!(typeof e=="object"&&St in e))}function zx(e){return Wn(e)==="[object String]"&&(!St||!(typeof e=="object"&&St in e))}function Ux(e){return Wn(e)==="[object Number]"&&(!St||!(typeof e=="object"&&St in e))}function Gx(e){return Wn(e)==="[object Boolean]"&&(!St||!(typeof e=="object"&&St in e))}function Am(e){if(zr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Dl)return!1;try{return Dl.call(e),!0}catch{}return!1}function Yx(e){if(!e||typeof e!="object"||!Ol)return!1;try{return Ol.call(e),!0}catch{}return!1}var Kx=Object.prototype.hasOwnProperty||function(e){return e in this};function In(e,t){return Kx.call(e,t)}function Wn(e){return jx.call(e)}function qx(e){if(e.name)return e.name;var t=Lx.call(Nx.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Om(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Xx(e){if(!di||!e||typeof e!="object")return!1;try{di.call(e);try{hi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Qx(e){if(!Ho||!e||typeof e!="object")return!1;try{Ho.call(e,Ho);try{zo.call(e,zo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Zx(e){if(!jf||!e||typeof e!="object")return!1;try{return jf.call(e),!0}catch{}return!1}function Jx(e){if(!hi||!e||typeof e!="object")return!1;try{hi.call(e);try{di.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ew(e){if(!zo||!e||typeof e!="object")return!1;try{zo.call(e,zo);try{Ho.call(e,Ho)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function tw(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Dm(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Dm($c.call(e,0,t.maxStringLength),t)+r}var o=Dn.call(Dn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,nw);return Im(o,"single",t)}function nw(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_x.call(t.toString(16))}function ko(e){return"Object("+e+")"}function Ia(e){return e+" { ? }"}function zf(e,t,n,r){var o=r?Fl(n,r):Zt.call(n,", ");return e+" ("+t+") {"+o+"}"}function rw(e){for(var t=0;t<e.length;t++)if(Om(e[t],`
1
+ "use strict";var P0=Object.defineProperty;var R0=(e,t,n)=>t in e?P0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>R0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),w=require("react/jsx-runtime"),jc=require("react-dom");function gm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=gm(x),ys=gm(jc);function ym(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ym(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function I0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ym(e))&&(r&&(r+=" "),r+=t);return r}const xf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,wf=I0,co=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return wf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const h=xf(u)||xf(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...s,...a}[m]):{...s,...a}[m]===g})?[...c,f,h]:c},[]);return wf(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function vm(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=vm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function A0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=vm(e))&&(r&&(r+=" "),r+=t);return r}var Tf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function O0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function D0(e){if(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 M0=Error,k0=EvalError,F0=RangeError,j0=ReferenceError,bm=SyntaxError,vs=TypeError,N0=URIError,L0=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(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},Sf=typeof Symbol<"u"&&Symbol,_0=L0,V0=function(){return typeof Sf!="function"||typeof Symbol!="function"||typeof Sf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_0()},wa={__proto__:null,foo:{}},$0=Object,B0=function(){return{__proto__:wa}.foo===wa.foo&&!(wa instanceof $0)},W0="Function.prototype.bind called on incompatible ",H0=Object.prototype.toString,z0=Math.max,U0="[object Function]",Ef=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},G0=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},Y0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},K0=function(t){var n=this;if(typeof n!="function"||H0.apply(n)!==U0)throw new TypeError(W0+n);for(var r=G0(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Ef(r,arguments));return Object(u)===u?u:this}return n.apply(t,Ef(r,arguments))},i=z0(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Y0(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},q0=K0,Nc=Function.prototype.bind||q0,X0=Function.prototype.call,Q0=Object.prototype.hasOwnProperty,Z0=Nc,J0=Z0.call(X0,Q0),he,ex=M0,tx=k0,nx=F0,rx=j0,Hr=bm,_r=vs,ox=N0,xm=Function,Ta=function(e){try{return xm('"use strict"; return ('+e+").constructor;")()}catch{}},ur=Object.getOwnPropertyDescriptor;if(ur)try{ur({},"")}catch{ur=null}var Sa=function(){throw new _r},sx=ur?function(){try{return arguments.callee,Sa}catch{try{return ur(arguments,"callee").get}catch{return Sa}}}():Sa,Er=V0(),ix=B0(),ct=Object.getPrototypeOf||(ix?function(e){return e.__proto__}:null),Or={},ax=typeof Uint8Array>"u"||!ct?he:ct(Uint8Array),fr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?he:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?he:ArrayBuffer,"%ArrayIteratorPrototype%":Er&&ct?ct([][Symbol.iterator]()):he,"%AsyncFromSyncIteratorPrototype%":he,"%AsyncFunction%":Or,"%AsyncGenerator%":Or,"%AsyncGeneratorFunction%":Or,"%AsyncIteratorPrototype%":Or,"%Atomics%":typeof Atomics>"u"?he:Atomics,"%BigInt%":typeof BigInt>"u"?he:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?he:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?he:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?he:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ex,"%eval%":eval,"%EvalError%":tx,"%Float32Array%":typeof Float32Array>"u"?he:Float32Array,"%Float64Array%":typeof Float64Array>"u"?he:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?he:FinalizationRegistry,"%Function%":xm,"%GeneratorFunction%":Or,"%Int8Array%":typeof Int8Array>"u"?he:Int8Array,"%Int16Array%":typeof Int16Array>"u"?he:Int16Array,"%Int32Array%":typeof Int32Array>"u"?he:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Er&&ct?ct(ct([][Symbol.iterator]())):he,"%JSON%":typeof JSON=="object"?JSON:he,"%Map%":typeof Map>"u"?he:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Er||!ct?he:ct(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?he:Promise,"%Proxy%":typeof Proxy>"u"?he:Proxy,"%RangeError%":nx,"%ReferenceError%":rx,"%Reflect%":typeof Reflect>"u"?he:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?he:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Er||!ct?he:ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?he:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Er&&ct?ct(""[Symbol.iterator]()):he,"%Symbol%":Er?Symbol:he,"%SyntaxError%":Hr,"%ThrowTypeError%":sx,"%TypedArray%":ax,"%TypeError%":_r,"%Uint8Array%":typeof Uint8Array>"u"?he:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?he:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?he:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?he:Uint32Array,"%URIError%":ox,"%WeakMap%":typeof WeakMap>"u"?he:WeakMap,"%WeakRef%":typeof WeakRef>"u"?he:WeakRef,"%WeakSet%":typeof WeakSet>"u"?he:WeakSet};if(ct)try{null.error}catch(e){var lx=ct(ct(e));fr["%Error.prototype%"]=lx}var cx=function e(t){var n;if(t==="%AsyncFunction%")n=Ta("async function () {}");else if(t==="%GeneratorFunction%")n=Ta("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ta("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ct&&(n=ct(o.prototype))}return fr[t]=n,n},Cf={__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"]},bs=Nc,fi=J0,ux=bs.call(Function.call,Array.prototype.concat),fx=bs.call(Function.apply,Array.prototype.splice),Pf=bs.call(Function.call,String.prototype.replace),di=bs.call(Function.call,String.prototype.slice),dx=bs.call(Function.call,RegExp.prototype.exec),hx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,px=/\\(\\)?/g,mx=function(t){var n=di(t,0,1),r=di(t,-1);if(n==="%"&&r!=="%")throw new Hr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Hr("invalid intrinsic syntax, expected opening `%`");var o=[];return Pf(t,hx,function(s,i,a,l){o[o.length]=a?Pf(l,px,"$1"):i||s}),o},gx=function(t,n){var r=t,o;if(fi(Cf,r)&&(o=Cf[r],r="%"+o[0]+"%"),fi(fr,r)){var s=fr[r];if(s===Or&&(s=cx(r)),typeof s>"u"&&!n)throw new _r("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Hr("intrinsic "+t+" does not exist!")},uo=function(t,n){if(typeof t!="string"||t.length===0)throw new _r("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new _r('"allowMissing" argument must be a boolean');if(dx(/^%?[^%]*%?$/,t)===null)throw new Hr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=mx(t),o=r.length>0?r[0]:"",s=gx("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],fx(r,ux([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=di(h,0,1),p=di(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new Hr("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),o+="."+h,i="%"+o+"%",fi(fr,i))a=fr[i];else if(a!=null){if(!(h in a)){if(!n)throw new _r("base intrinsic for "+t+" exists, but the property is not available.");return}if(ur&&u+1>=r.length){var m=ur(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=fi(a,h),a=a[h];f&&!l&&(fr[i]=a)}}return a},wm={exports:{}},Ea,Rf;function Lc(){if(Rf)return Ea;Rf=1;var e=uo,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ea=t,Ea}var yx=uo,ei=yx("%Object.getOwnPropertyDescriptor%",!0);if(ei)try{ei([],"length")}catch{ei=null}var Tm=ei,If=Lc(),vx=bm,Cr=vs,Af=Tm,bx=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Cr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Cr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Cr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Cr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Cr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Cr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Af&&Af(t,n);if(If)If(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new vx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Al=Lc(),Sm=function(){return!!Al};Sm.hasArrayLengthDefineBug=function(){if(!Al)return null;try{return Al([],"length",{value:1}).length!==1}catch{return!0}};var xx=Sm,wx=uo,Of=bx,Tx=xx(),Df=Tm,Mf=vs,Sx=wx("%Math.floor%"),Ex=function(t,n){if(typeof t!="function")throw new Mf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Sx(n)!==n)throw new Mf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&Df){var i=Df(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Tx?Of(t,"length",n,!0,!0):Of(t,"length",n)),t};(function(e){var t=Nc,n=uo,r=Ex,o=vs,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Lc(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var d=a(t,i,arguments);return r(d,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(wm);var Cx=wm.exports,Em=uo,Cm=Cx,Px=Cm(Em("String.prototype.indexOf")),Rx=function(t,n){var r=Em(t,!!n);return typeof r=="function"&&Px(t,".prototype.")>-1?Cm(r):r};const Ix={},Ax=Object.freeze(Object.defineProperty({__proto__:null,default:Ix},Symbol.toStringTag,{value:"Module"})),Ox=D0(Ax);var _c=typeof Map=="function"&&Map.prototype,Ca=Object.getOwnPropertyDescriptor&&_c?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,hi=_c&&Ca&&typeof Ca.get=="function"?Ca.get:null,kf=_c&&Map.prototype.forEach,Vc=typeof Set=="function"&&Set.prototype,Pa=Object.getOwnPropertyDescriptor&&Vc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,pi=Vc&&Pa&&typeof Pa.get=="function"?Pa.get:null,Ff=Vc&&Set.prototype.forEach,Dx=typeof WeakMap=="function"&&WeakMap.prototype,Ho=Dx?WeakMap.prototype.has:null,Mx=typeof WeakSet=="function"&&WeakSet.prototype,zo=Mx?WeakSet.prototype.has:null,kx=typeof WeakRef=="function"&&WeakRef.prototype,jf=kx?WeakRef.prototype.deref:null,Fx=Boolean.prototype.valueOf,jx=Object.prototype.toString,Nx=Function.prototype.toString,Lx=String.prototype.match,$c=String.prototype.slice,Dn=String.prototype.replace,_x=String.prototype.toUpperCase,Nf=String.prototype.toLowerCase,Pm=RegExp.prototype.test,Lf=Array.prototype.concat,Zt=Array.prototype.join,Vx=Array.prototype.slice,_f=Math.floor,Ol=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ra=Object.getOwnPropertySymbols,Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,zr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",St=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===zr||!0)?Symbol.toStringTag:null,Rm=Object.prototype.propertyIsEnumerable,Vf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function $f(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Pm.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-_f(-e):_f(e);if(r!==e){var o=String(r),s=$c.call(t,o.length+1);return Dn.call(o,n,"$&_")+"."+Dn.call(Dn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Dn.call(t,n,"$&_")}var Ml=Ox,Bf=Ml.custom,Wf=Am(Bf)?Bf:null,$x=function e(t,n,r,o){var s=n||{};if(In(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(In(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=In(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(In(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(In(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Dm(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?$f(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?$f(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return kl(t)?"[Array]":"[Object]";var f=ow(s,r);if(typeof o>"u")o=[];else if(Om(o,t)>=0)return"[Circular]";function h(j,P,O){if(P&&(o=Vx.call(o),o.push(P)),O){var F={depth:s.depth};return In(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(j,F,r+1,o)}return e(j,s,r+1,o)}if(typeof t=="function"&&!Hf(t)){var d=qx(t),p=js(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Zt.call(p,", ")+" }":"")}if(Am(t)){var m=zr?Dn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Dl.call(t);return typeof t=="object"&&!zr?ko(m):m}if(tw(t)){for(var g="<"+Nf.call(String(t.nodeName)),y=t.attributes||[],b=0;b<y.length;b++)g+=" "+y[b].name+"="+Im(Bx(y[b].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Nf.call(String(t.nodeName))+">",g}if(kl(t)){if(t.length===0)return"[]";var v=js(t,h);return f&&!rw(v)?"["+Fl(v,f)+"]":"[ "+Zt.call(v,", ")+" ]"}if(Hx(t)){var S=js(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Rm.call(t,"cause")?"{ ["+String(t)+"] "+Zt.call(Lf.call("[cause]: "+h(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Zt.call(S,", ")+" }"}if(typeof t=="object"&&i){if(Wf&&typeof t[Wf]=="function"&&Ml)return Ml(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Xx(t)){var T=[];return kf&&kf.call(t,function(j,P){T.push(h(P,t,!0)+" => "+h(j,t))}),zf("Map",hi.call(t),T,f)}if(Jx(t)){var E=[];return Ff&&Ff.call(t,function(j){E.push(h(j,t))}),zf("Set",pi.call(t),E,f)}if(Qx(t))return Ia("WeakMap");if(ew(t))return Ia("WeakSet");if(Zx(t))return Ia("WeakRef");if(Ux(t))return ko(h(Number(t)));if(Yx(t))return ko(h(Ol.call(t)));if(Gx(t))return ko(Fx.call(t));if(zx(t))return ko(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Tf<"u"&&t===Tf)return"{ [object globalThis] }";if(!Wx(t)&&!Hf(t)){var R=js(t,h),I=Vf?Vf(t)===Object.prototype:t instanceof Object||t.constructor===Object,M=t instanceof Object?"":"null prototype",A=!I&&St&&Object(t)===t&&St in t?$c.call(Wn(t),8,-1):M?"Object":"",N=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",k=N+(A||M?"["+Zt.call(Lf.call([],A||[],M||[]),": ")+"] ":"");return R.length===0?k+"{}":f?k+"{"+Fl(R,f)+"}":k+"{ "+Zt.call(R,", ")+" }"}return String(t)};function Im(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Bx(e){return Dn.call(String(e),/"/g,"&quot;")}function kl(e){return Wn(e)==="[object Array]"&&(!St||!(typeof e=="object"&&St in e))}function Wx(e){return Wn(e)==="[object Date]"&&(!St||!(typeof e=="object"&&St in e))}function Hf(e){return Wn(e)==="[object RegExp]"&&(!St||!(typeof e=="object"&&St in e))}function Hx(e){return Wn(e)==="[object Error]"&&(!St||!(typeof e=="object"&&St in e))}function zx(e){return Wn(e)==="[object String]"&&(!St||!(typeof e=="object"&&St in e))}function Ux(e){return Wn(e)==="[object Number]"&&(!St||!(typeof e=="object"&&St in e))}function Gx(e){return Wn(e)==="[object Boolean]"&&(!St||!(typeof e=="object"&&St in e))}function Am(e){if(zr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Dl)return!1;try{return Dl.call(e),!0}catch{}return!1}function Yx(e){if(!e||typeof e!="object"||!Ol)return!1;try{return Ol.call(e),!0}catch{}return!1}var Kx=Object.prototype.hasOwnProperty||function(e){return e in this};function In(e,t){return Kx.call(e,t)}function Wn(e){return jx.call(e)}function qx(e){if(e.name)return e.name;var t=Lx.call(Nx.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Om(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Xx(e){if(!hi||!e||typeof e!="object")return!1;try{hi.call(e);try{pi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Qx(e){if(!Ho||!e||typeof e!="object")return!1;try{Ho.call(e,Ho);try{zo.call(e,zo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Zx(e){if(!jf||!e||typeof e!="object")return!1;try{return jf.call(e),!0}catch{}return!1}function Jx(e){if(!pi||!e||typeof e!="object")return!1;try{pi.call(e);try{hi.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ew(e){if(!zo||!e||typeof e!="object")return!1;try{zo.call(e,zo);try{Ho.call(e,Ho)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function tw(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Dm(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Dm($c.call(e,0,t.maxStringLength),t)+r}var o=Dn.call(Dn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,nw);return Im(o,"single",t)}function nw(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_x.call(t.toString(16))}function ko(e){return"Object("+e+")"}function Ia(e){return e+" { ? }"}function zf(e,t,n,r){var o=r?Fl(n,r):Zt.call(n,", ");return e+" ("+t+") {"+o+"}"}function rw(e){for(var t=0;t<e.length;t++)if(Om(e[t],`
2
2
  `)>=0)return!1;return!0}function ow(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Zt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Zt.call(Array(t+1),n)}}function Fl(e,t){if(e.length===0)return"";var n=`
3
3
  `+t.prev+t.base;return n+Zt.call(e,","+n)+`
4
- `+t.prev}function Fs(e,t){var n=kl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=In(e,o)?t(e[o],e):""}var s=typeof Ra=="function"?Ra(e):[],i;if(zr){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)In(e,l)&&(n&&String(Number(l))===l&&l<e.length||zr&&i["$"+l]instanceof Symbol||(Pm.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Ra=="function")for(var c=0;c<s.length;c++)Rm.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Mm=uo,fo=Rx,sw=$x,iw=vs,js=Mm("%WeakMap%",!0),Ns=Mm("%Map%",!0),aw=fo("WeakMap.prototype.get",!0),lw=fo("WeakMap.prototype.set",!0),cw=fo("WeakMap.prototype.has",!0),uw=fo("Map.prototype.get",!0),fw=fo("Map.prototype.set",!0),dw=fo("Map.prototype.has",!0),Bc=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},hw=function(e,t){var n=Bc(e,t);return n&&n.value},pw=function(e,t,n){var r=Bc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},mw=function(e,t){return!!Bc(e,t)},gw=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new iw("Side channel does not contain "+sw(s))},get:function(s){if(js&&s&&(typeof s=="object"||typeof s=="function")){if(t)return aw(t,s)}else if(Ns){if(n)return uw(n,s)}else if(r)return hw(r,s)},has:function(s){if(js&&s&&(typeof s=="object"||typeof s=="function")){if(t)return cw(t,s)}else if(Ns){if(n)return dw(n,s)}else if(r)return mw(r,s);return!1},set:function(s,i){js&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new js),lw(t,s,i)):Ns?(n||(n=new Ns),fw(n,s,i)):(r||(r={key:{},next:null}),pw(r,s,i))}};return o},Uf=e=>Array.isArray(e),Aa=e=>e===void 0,Oa=e=>e===null,yw=Function.bind.call(Function.call,Object.prototype.toString),vw=e=>!!e&&yw(e)==="[object Error]"||e instanceof Error,km=(e,t)=>e instanceof t,bw=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},xw=e=>Object.prototype.toString.call(e)==="[object Date]"&&km(e,Date),vn={array:Uf,date:xw,empty:e=>Oa(e)||Aa(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:km,isError:vw,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Oa(e)||Aa(e),null:Oa,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Uf(e)&&typeof e=="object",primitive:bw,string:e=>typeof e=="string",undefined:Aa},jl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=jl(s?[]:{},o,n)}else e[r]=jl(e[r],o,n)}else e[r]=n;return e},ww=e=>Object.keys(e),Tw=e=>e.replace("[",".").replace("]","").split("."),Da=(e,t,n)=>{const r=Array.isArray(t)?t:Tw(t),o=structuredClone(e);return jl(o,r,n),o};const Wc="-";function Sw(e){const t=Cw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Wc);return a[0]===""&&a.length!==1&&a.shift(),Fm(a,t)||Ew(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Fm(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Fm(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Wc);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Gf=/^\[(.+)\]$/;function Ew(e){if(Gf.test(e)){const t=Gf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Cw(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Rw(Object.entries(e.classGroups),n).forEach(([s,i])=>{Nl(i,r,s,t)}),r}function Nl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Yf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Pw(o)){Nl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Nl(i,Yf(t,s),n,r)})})}function Yf(e,t){let n=e;return t.split(Wc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Pw(e){return e.isThemeGetter}function Rw(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function Iw(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const jm="!";function Aw(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,f;for(let g=0;g<a.length;g++){let v=a[g];if(c===0){if(v===o&&(r||a.slice(g,g+s)===t)){l.push(a.slice(u,g)),u=g+s;continue}if(v==="/"){f=g;continue}}v==="["?c++:v==="]"&&c--}const h=l.length===0?a:a.substring(u),d=h.startsWith(jm),p=d?h.substring(1):h,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Ow(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Dw(e){return{cache:Iw(e.cacheSize),parseClassName:Aw(e),...Sw(e)}}const Mw=/\s+/;function kw(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(Mw).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let f=!!u,h=r(f?c.substring(0,u):c);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const d=Ow(a).join(":");return{isTailwindClass:!0,modifierId:l?d+jm:d,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(f=>s.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Fw(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Nm(t))&&(r&&(r+=" "),r+=n);return r}function Nm(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Nm(e[r]))&&(n&&(n+=" "),n+=t);return n}function jw(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=Dw(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=kw(l,n);return o(l,u),u}return function(){return s(Fw.apply(null,arguments))}}function Le(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Lm=/^\[(?:([a-z-]+):)?(.+)\]$/i,Nw=/^\d+\/\d+$/,Lw=new Set(["px","full","screen"]),_w=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vw=/\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$/,$w=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Bw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ww=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function gn(e){return ar(e)||Lw.has(e)||Nw.test(e)}function En(e){return ho(e,"length",Xw)}function ar(e){return!!e&&!Number.isNaN(Number(e))}function Ls(e){return ho(e,"number",ar)}function Fo(e){return!!e&&Number.isInteger(Number(e))}function Hw(e){return e.endsWith("%")&&ar(e.slice(0,-1))}function ue(e){return Lm.test(e)}function Cn(e){return _w.test(e)}const zw=new Set(["length","size","percentage"]);function Uw(e){return ho(e,zw,_m)}function Gw(e){return ho(e,"position",_m)}const Yw=new Set(["image","url"]);function Kw(e){return ho(e,Yw,Zw)}function qw(e){return ho(e,"",Qw)}function jo(){return!0}function ho(e,t,n){const r=Lm.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Xw(e){return Vw.test(e)&&!$w.test(e)}function _m(){return!1}function Qw(e){return Bw.test(e)}function Zw(e){return Ww.test(e)}function Jw(){const e=Le("colors"),t=Le("spacing"),n=Le("blur"),r=Le("brightness"),o=Le("borderColor"),s=Le("borderRadius"),i=Le("borderSpacing"),a=Le("borderWidth"),l=Le("contrast"),c=Le("grayscale"),u=Le("hueRotate"),f=Le("invert"),h=Le("gap"),d=Le("gradientColorStops"),p=Le("gradientColorStopPositions"),m=Le("inset"),g=Le("margin"),v=Le("opacity"),b=Le("padding"),y=Le("saturate"),S=Le("scale"),T=Le("sepia"),E=Le("skew"),R=Le("space"),A=Le("translate"),O=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",ue,t],k=()=>[ue,t],L=()=>["",gn,En],C=()=>["auto",ar,ue],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],_=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ue],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[ar,Ls],q=()=>[ar,ue];return{cacheSize:500,separator:":",theme:{colors:[jo],spacing:[gn,En],blur:["none","",Cn,ue],brightness:$(),borderColor:[e],borderRadius:["none","","full",Cn,ue],borderSpacing:k(),borderWidth:L(),contrast:$(),grayscale:U(),hueRotate:q(),invert:U(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Hw,En],inset:F(),margin:F(),opacity:$(),padding:k(),saturate:$(),scale:$(),sepia:U(),skew:q(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Cn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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"],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:[...M(),ue]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fo,ue]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",Fo,ue]}],"grid-cols":[{"grid-cols":[jo]}],"col-start-end":[{col:["auto",{span:["full",Fo,ue]},ue]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[jo]}],"row-start-end":[{row:["auto",{span:[Fo,ue]},ue]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Cn]},Cn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Cn,En]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ls]}],"font-family":[{font:[jo]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ue]}],"line-clamp":[{"line-clamp":["none",ar,Ls]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gn,En]}],"underline-offset":[{"underline-offset":["auto",gn,ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],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",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),Gw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Uw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Kw]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[gn,ue]}],"outline-w":[{outline:[gn,En]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[gn,En]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cn,qw]}],"shadow-color":[{shadow:[jo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Cn,ue]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Fo,ue]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gn,En,Ls]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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"],"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"]}}}const e1=jw(Jw),Hc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},t1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),n1=e=>vn.function(e),De=(...e)=>e1(A0(e)),Vm=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Hi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},po=w.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return x.jsx(s,{ref:o,...r,children:n})}),r1=co("relative overflow-hidden inline-flex duration-500 enabled:hover: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 ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Ur=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(po,{...l,ref:c,type:s,"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:De(r1({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),$m=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function o1(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 s1=({children:e,...t})=>{const n=$m(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:o1(r.current));return w.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(f=>c.isIntersecting?!0:f)});return a.observe(i),()=>a.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},i1=co("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),a1=co("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{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:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),l1=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(po,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:De(a1({size:i,theme:s}),t),children:[n?x.jsx("span",{className:i1({theme:n})}):null,r,a.children]})}),Gr=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),zi=w.createContext({}),Ui=w.createContext(null),zc=typeof document<"u",Gi=zc?w.useLayoutEffect:w.useEffect,Bm=w.createContext({strict:!1}),Yi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),c1="framerAppearId",Wm="data-"+Yi(c1),u1={skipAnimations:!1,useManualTiming:!1};function f1(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,f=!1)=>{const d=f&&r?t:n;return u&&s.add(c),d.has(c)||d.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const _s=["read","resolveKeyframes","update","preRender","render","postRender"],d1=40;function Hm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=_s.reduce((v,b)=>(v[b]=f1(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:h}=i,d=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,d1),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(d))},p=()=>{n=!0,r=!0,o.isProcessing||e(d)};return{schedule:_s.reduce((v,b)=>{const y=i[b];return v[b]=(S,T=!1,E=!1)=>(n||p(),y.schedule(S,T,E)),v},{}),cancel:v=>{for(let b=0;b<_s.length;b++)i[_s[b]].cancel(v)},state:o,steps:i}}const{schedule:Uc,cancel:AL}=Hm(queueMicrotask,!1);function Dr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const zm=w.createContext({});let Kf=!1;function h1(e,t,n,r,o){const{visualElement:s}=w.useContext(zi),i=w.useContext(Bm),a=w.useContext(Ui),l=w.useContext(Gr).reducedMotion,c=w.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=w.useContext(zm);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&m1(c.current,n,o,f),w.useInsertionEffect(()=>{u&&u.update(n,a)});const h=w.useRef(!!(n[Wm]&&!window.HandoffComplete));return Gi(()=>{u&&(u.updateFeatures(),Uc.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,Kf||(Kf=!0,queueMicrotask(p1))))}),u}function p1(){window.HandoffComplete=!0}function m1(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Um(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&Dr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Um(e){if(e)return e.options.allowProjection!==!1?e.projection:Um(e.parent)}function g1(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Dr(n)&&(n.current=r))},[t])}function ns(e){return typeof e=="string"||Array.isArray(e)}function rs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Gc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yc=["initial",...Gc];function Ki(e){return rs(e.animate)||Yc.some(t=>ns(e[t]))}function Gm(e){return!!(Ki(e)||e.variants)}function y1(e,t){if(Ki(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ns(n)?n:void 0,animate:ns(r)?r:void 0}}return e.inherit!==!1?t:{}}function v1(e){const{initial:t,animate:n}=y1(e,w.useContext(zi));return w.useMemo(()=>({initial:t,animate:n}),[qf(t),qf(n)])}function qf(e){return Array.isArray(e)?e.join(" "):e}const Xf={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"]},Yr={};for(const e in Xf)Yr[e]={isEnabled:t=>Xf[e].some(n=>!!t[n])};function b1(e){for(const t in e)Yr[t]={...Yr[t],...e[t]}}const os=w.createContext({}),x1=Symbol.for("motionComponentSymbol"),yt=e=>e;let mo=yt,Lt=yt;process.env.NODE_ENV!=="production"&&(mo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Lt=(e,t)=>{if(!e)throw new Error(t)});function w1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&b1(e);function s(a,l){let c;const u={...w.useContext(Gr),...a,layoutId:T1(a)},{isStatic:f}=u,h=v1(a),d=r(a,f);if(!f&&zc){S1(u,e);const p=E1(u);c=p.MeasureLayout,h.visualElement=h1(o,d,u,t,p.ProjectionNode)}return x.jsxs(zi.Provider,{value:h,children:[c&&h.visualElement?x.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,g1(d,h.visualElement,l),d,f,h.visualElement)]})}const i=w.forwardRef(s);return i[x1]=o,i}function T1({layoutId:e}){const t=w.useContext(os).id;return t&&e!==void 0?t+"-"+e:e}function S1(e,t){const n=w.useContext(Bm).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?mo(!1,r):Lt(!1,r)}}function E1(e){const{drag:t,layout:n}=Yr;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}}function C1(e){function t(r,o={}){return w1(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const P1=["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 Kc(e){return typeof e!="string"||e.includes("-")?!1:!!(P1.indexOf(e)>-1||/[A-Z]/u.test(e))}const pi={};function R1(e){Object.assign(pi,e)}const xs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hn=new Set(xs);function Ym(e,{layout:t,layoutId:n}){return Hn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!pi[e]||e==="opacity")}const lt=e=>!!(e&&e.getVelocity),I1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},A1=xs.length;function O1(e,t,n){let r="";for(let o=0;o<A1;o++){const s=xs[o];if(e[s]!==void 0){const i=I1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Km=e=>t=>typeof t=="string"&&t.startsWith(e),qm=Km("--"),D1=Km("var(--"),qc=e=>D1(e)?M1.test(e.split("/*")[0].trim()):!1,M1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,k1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Nn=(e,t,n)=>n>t?t:n<e?e:n,go={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Uo={...go,transform:e=>Nn(0,1,e)},Vs={...go,default:1},Go=e=>Math.round(e*1e5)/1e5,Xc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,F1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,j1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ws(e){return typeof e=="string"}function N1(e){return e==null}const Ts=e=>({test:t=>ws(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Rn=Ts("deg"),sn=Ts("%"),ae=Ts("px"),L1=Ts("vh"),_1=Ts("vw"),Qf={...sn,parse:e=>sn.parse(e)/100,transform:e=>sn.transform(e*100)},Zf={...go,transform:Math.round},Xm={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,size:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,rotate:Rn,rotateX:Rn,rotateY:Rn,rotateZ:Rn,scale:Vs,scaleX:Vs,scaleY:Vs,scaleZ:Vs,skew:Rn,skewX:Rn,skewY:Rn,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:Uo,originX:Qf,originY:Qf,originZ:ae,zIndex:Zf,backgroundPositionX:ae,backgroundPositionY:ae,fillOpacity:Uo,strokeOpacity:Uo,numOctaves:Zf};function Qc(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const f=t[u];if(qm(u)){o[u]=f;continue}const h=Xm[u],d=k1(f,h);if(Hn.has(u)){if(a=!0,s[u]=d,!c)continue;f!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=d):r[u]=d}if(t.transform||(a||n?r.transform=O1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${f} ${h}`}}const Zc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qm(e,t,n){for(const r in t)!lt(t[r])&&!Ym(r,n)&&(e[r]=t[r])}function V1({transformTemplate:e},t){return w.useMemo(()=>{const n=Zc();return Qc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function $1(e,t){const n=e.style||{},r={};return Qm(r,n,e),Object.assign(r,V1(e,t)),r}function B1(e,t){const n={},r=$1(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 W1=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 mi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||W1.has(e)}let Zm=e=>!mi(e);function Jm(e){e&&(Zm=t=>t.startsWith("on")?!mi(t):e(t))}try{Jm(require("@emotion/is-prop-valid").default)}catch{}function H1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Zm(o)||n===!0&&mi(o)||!t&&!mi(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Jf(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function z1(e,t,n){const r=Jf(t,e.x,e.width),o=Jf(n,e.y,e.height);return`${r} ${o}`}const U1={offset:"stroke-dashoffset",array:"stroke-dasharray"},G1={offset:"strokeDashoffset",array:"strokeDasharray"};function Y1(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?U1:G1;e[s.offset]=ae.transform(-r);const i=ae.transform(t),a=ae.transform(n);e[s.array]=`${i} ${a}`}function Jc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Qc(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:d,dimensions:p}=e;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(o!==void 0||s!==void 0||d.transform)&&(d.transformOrigin=z1(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&Y1(h,i,a,l,!1)}const eg=()=>({...Zc(),attrs:{}}),eu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function K1(e,t,n,r){const o=w.useMemo(()=>{const s=eg();return Jc(s,t,eu(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Qm(s,e.style,e),o.style={...s,...o.style}}return o}function q1(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Kc(n)?K1:B1)(r,s,i,n),c=H1(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=w.useMemo(()=>lt(f)?f.get():f,[f]);return w.createElement(n,{...u,children:h})}}function tg(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ng=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 rg(e,t,n,r){tg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ng.has(o)?o:Yi(o),t.attrs[o])}function tu(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(lt(o[i])||t.style&&lt(t.style[i])||Ym(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function og(e,t,n){const r=tu(e,t,n);for(const o in e)if(lt(e[o])||lt(t[o])){const s=xs.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function ed(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function nu(e,t,n,r){if(typeof t=="function"){const[o,s]=ed(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ed(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function cn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ll=e=>Array.isArray(e),X1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Q1=e=>Ll(e)?e[e.length-1]||0:e;function ei(e){const t=lt(e)?e.get():e;return X1(t)?t.toValue():t}const sg=new Set(["opacity","clipPath","filter","transform"]);function ig(e){if(Hn.has(e))return"transform";if(sg.has(e))return Yi(e)}function qi(e,t){e.indexOf(t)===-1&&e.push(t)}function Ss(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Z1([...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,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function J1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:tT(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const ag=e=>(t,n)=>{const r=w.useContext(zi),o=w.useContext(Ui),s=()=>J1(e,t,r,o,n);return n?s():cn(s)};function eT(e,t){const n=ig(t);n&&qi(e,n)}function td(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=nu(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function tT(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const g in c)i[g]=ei(c[g]);let{initial:u,animate:f}=e;const h=Ki(e),d=Gm(e);t&&d&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!rs(m)&&td(e,m,(g,v)=>{for(const b in g){let y=g[b];if(Array.isArray(y)){const S=p?y.length-1:0;y=y[S]}y!==null&&(i[b]=y)}for(const b in v)i[b]=v[b]}),l&&(f&&u!==!1&&!rs(f)&&td(e,f,g=>{for(const v in g)eT(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Te,cancel:un,state:pt,steps:Ma}=Hm(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),nT={useVisualState:ag({scrapeMotionValuesFromProps:og,createRenderState:eg,onMount:(e,t,{renderState:n,latestValues:r})=>{Te.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Te.render(()=>{Jc(n,r,eu(t.tagName),e.transformTemplate),rg(t,n)})}})},rT={useVisualState:ag({applyWillChange:!0,scrapeMotionValuesFromProps:tu,createRenderState:Zc})};function oT(e,{forwardMotionProps:t=!1},n,r){return{...Kc(e)?nT:rT,preloadedFeatures:n,useRender:q1(t),createVisualElement:r,Component:e}}function yn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const lg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Xi(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const sT=e=>t=>lg(t)&&e(t,Xi(t));function bn(e,t,n,r){return yn(e,t,sT(n),r)}const iT=(e,t)=>n=>t(e(n)),xn=(...e)=>e.reduce(iT);function cg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const nd=cg("dragHorizontal"),rd=cg("dragVertical");function ug(e){let t=!1;if(e==="y")t=rd();else if(e==="x")t=nd();else{const n=nd(),r=rd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function fg(){const e=ug(!0);return e?(e(),!1):!0}class zn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function od(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||fg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Te.postRender(()=>l(s,i))};return bn(e.current,n,o,{passive:!e.getProps()[r]})}class aT extends zn{mount(){this.unmount=xn(od(this.node,!0),od(this.node,!1))}unmount(){}}class lT extends zn{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=xn(yn(this.node.current,"focus",()=>this.onFocus()),yn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dg=(e,t)=>t?e===t?!0:dg(e,t.parentElement):!1;function ka(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Xi(n))}class cT extends zn{constructor(){super(...arguments),this.removeStartListeners=yt,this.removeEndListeners=yt,this.removeAccessibleListeners=yt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=bn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),h=!f&&!dg(this.node.current,a.target)?u:c;h&&Te.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=bn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||ka("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Te.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=yn(this.node.current,"keyup",i),ka("down",(a,l)=>{this.startPress(a,l)})},n=yn(this.node.current,"keydown",t),r=()=>{this.isPressing&&ka("cancel",(s,i)=>this.cancelPress(s,i))},o=yn(this.node.current,"blur",r);this.removeAccessibleListeners=xn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Te.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!fg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Te.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=bn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=yn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,Fa=new WeakMap,uT=e=>{const t=_l.get(e.target);t&&t(e)},fT=e=>{e.forEach(uT)};function dT({root:e,...t}){const n=e||document;Fa.has(n)||Fa.set(n,{});const r=Fa.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(fT,{root:e,...t})),r[o]}function hT(e,t,n){const r=dT(t);return _l.set(e,n),r.observe(e),()=>{_l.delete(e),r.unobserve(e)}}const pT={some:0,all:1};class mT extends zn{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:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:pT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return hT(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(gT(t,n))&&this.startObserver()}unmount(){}}function gT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const yT={inView:{Feature:mT},tap:{Feature:cT},focus:{Feature:lT},hover:{Feature:aT}};function hg(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}function Qi(e,t,n){const r=e.getProps();return nu(r,t,n!==void 0?n:r.custom,e)}const an=e=>e*1e3,ln=e=>e/1e3,vT={type:"spring",stiffness:500,damping:25,restSpeed:10},bT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xT={type:"keyframes",duration:.8},wT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TT=(e,{keyframes:t})=>t.length>2?xT:Hn.has(e)?e.startsWith("scale")?bT(t[1]):vT:wT;function ST({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function ru(e,t){return e[t]||e.default||e}const ET=e=>e!==null;function Zi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ET),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let ti;function CT(){ti=void 0}const kn={now:()=>(ti===void 0&&kn.set(pt.isProcessing||u1.useManualTiming?pt.timestamp:performance.now()),ti),set:e=>{ti=e,queueMicrotask(CT)}},pg=e=>/^0[^.\s]+$/u.test(e);function PT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||pg(e):!0}const mg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),RT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function IT(e){const t=RT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const AT=4;function gg(e,t,n=1){Lt(n<=AT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=IT(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return mg(i)?parseFloat(i):i}return qc(o)?gg(o,t,n+1):o}const OT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),sd=e=>e===go||e===ae,id=(e,t)=>parseFloat(e.split(", ")[t]),ad=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return id(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?id(s[1],e):0}},DT=new Set(["x","y","z"]),MT=xs.filter(e=>!DT.has(e));function kT(e){const t=[];return MT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Kr={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:ad(4,13),y:ad(5,14)};Kr.translateX=Kr.x;Kr.translateY=Kr.y;const yg=e=>t=>t.test(e),FT={test:e=>e==="auto",parse:e=>e},vg=[go,ae,sn,Rn,_1,L1,FT],ld=e=>vg.find(yg(e)),dr=new Set;let Vl=!1,$l=!1;function bg(){if($l){const e=Array.from(dr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=kT(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(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}$l=!1,Vl=!1,dr.forEach(e=>e.complete()),dr.clear()}function xg(){dr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($l=!0)})}function jT(){xg(),bg()}class ou{constructor(t,n,r,o,s,i=!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=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(dr.add(this),Vl||(Vl=!0,Te.read(xg),Te.resolveKeyframes(bg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),dr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,dr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const su=(e,t)=>n=>!!(ws(n)&&j1.test(n)&&n.startsWith(e)||t&&!N1(n)&&Object.prototype.hasOwnProperty.call(n,t)),wg=(e,t,n)=>r=>{if(!ws(r))return r;const[o,s,i,a]=r.match(Xc);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},NT=e=>Nn(0,255,e),ja={...go,transform:e=>Math.round(NT(e))},lr={test:su("rgb","red"),parse:wg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ja.transform(e)+", "+ja.transform(t)+", "+ja.transform(n)+", "+Go(Uo.transform(r))+")"};function LT(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 Bl={test:su("#"),parse:LT,transform:lr.transform},Mr={test:su("hsl","hue"),parse:wg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+sn.transform(Go(t))+", "+sn.transform(Go(n))+", "+Go(Uo.transform(r))+")"},bt={test:e=>lr.test(e)||Bl.test(e)||Mr.test(e),parse:e=>lr.test(e)?lr.parse(e):Mr.test(e)?Mr.parse(e):Bl.parse(e),transform:e=>ws(e)?e:e.hasOwnProperty("red")?lr.transform(e):Mr.transform(e)};function _T(e){var t,n;return isNaN(e)&&ws(e)&&(((t=e.match(Xc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(F1))===null||n===void 0?void 0:n.length)||0)>0}const Tg="number",Sg="color",VT="var",$T="var(",cd="${}",BT=/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 ss(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(BT,l=>(bt.test(l)?(r.color.push(s),o.push(Sg),n.push(bt.parse(l))):l.startsWith($T)?(r.var.push(s),o.push(VT),n.push(l)):(r.number.push(s),o.push(Tg),n.push(parseFloat(l))),++s,cd)).split(cd);return{values:n,split:a,indexes:r,types:o}}function Eg(e){return ss(e).values}function Cg(e){const{split:t,types:n}=ss(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Tg?s+=Go(o[i]):a===Sg?s+=bt.transform(o[i]):s+=o[i]}return s}}const WT=e=>typeof e=="number"?0:e;function HT(e){const t=Eg(e);return Cg(e)(t.map(WT))}const Ln={test:_T,parse:Eg,createTransformer:Cg,getAnimatableNone:HT},zT=new Set(["brightness","contrast","saturate","opacity"]);function UT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xc)||[];if(!r)return e;const o=n.replace(r,"");let s=zT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const GT=/\b([a-z-]*)\(.*?\)/gu,Wl={...Ln,getAnimatableNone:e=>{const t=e.match(GT);return t?t.map(UT).join(" "):e}},YT={...Xm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Wl,WebkitFilter:Wl},iu=e=>YT[e];function Pg(e,t){let n=iu(e);return n!==Wl&&(n=Ln),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const KT=new Set(["auto","none","0"]);function qT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!KT.has(s)&&ss(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Pg(n,o)}class Rg extends ou{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),qc(c))){const u=gg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!OT.has(r)||t.length!==2)return;const[o,s]=t,i=ld(o),a=ld(s);if(i!==a)if(sd(i)&&sd(a))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++)PT(t[o])&&r.push(o);r.length&&qT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Kr[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.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Kr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Ig(e){let t;return()=>(t===void 0&&(t=e()),t)}const ud=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ln.test(e)||e==="0")&&!e.startsWith("url("));function XT(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 QT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=ud(o,t),a=ud(s,t);return mo(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:XT(e)||n==="spring"&&r}class Ag{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&jT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!QT(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(Zi(t,this.options,n)),a==null||a(),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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Og(e,t){return t?e*(1e3/t):0}const ZT=5;function Dg(e,t,n){const r=Math.max(t-ZT,0);return Og(n-e(r),t-r)}const Na=.001,JT=.01,fd=10,eS=.05,tS=1;function nS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;mo(e<=an(fd),"Spring duration must be 10 seconds or less");let i=1-t;i=Nn(eS,tS,i),e=Nn(JT,fd,ln(e)),i<1?(o=c=>{const u=c*i,f=u*e,h=u-n,d=Hl(c,i),p=Math.exp(-f);return Na-h/d*p},s=c=>{const f=c*i*e,h=f*n+n,d=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=Hl(Math.pow(c,2),i);return(-o(c)+Na>0?-1:1)*((h-d)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Na+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=oS(o,s,a);if(e=an(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const rS=12;function oS(e,t,n){let r=n;for(let o=1;o<rS;o++)r=r-e(r)/t(r);return r}function Hl(e,t){return e*Math.sqrt(1-t*t)}const sS=["duration","bounce"],iS=["stiffness","damping","mass"];function dd(e,t){return t.some(n=>e[n]!==void 0)}function aS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!dd(e,iS)&&dd(e,sS)){const n=nS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function au({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:h}=aS({...r,velocity:-ln(r.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=s-o,g=ln(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let b;if(p<1){const y=Hl(g,p);b=S=>{const T=Math.exp(-p*g*S);return s-T*((d+p*g*m)/y*Math.sin(y*S)+m*Math.cos(y*S))}}else if(p===1)b=y=>s-Math.exp(-g*y)*(m+(d+g*m)*y);else{const y=g*Math.sqrt(p*p-1);b=S=>{const T=Math.exp(-p*g*S),E=Math.min(y*S,300);return s-T*((d+p*g*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:h&&u||null,next:y=>{const S=b(y);if(h)i.done=y>=u;else{let T=d;y!==0&&(p<1?T=Dg(b,y,S):T=0);const E=Math.abs(T)<=n,R=Math.abs(s-S)<=t;i.done=E&&R}return i.value=i.done?s:S,i}}}function hd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*t;const g=f+m,v=i===void 0?g:i(g);v!==g&&(m=v-f);const b=A=>-m*Math.exp(-A/r),y=A=>v+b(A),S=A=>{const O=b(A),I=y(A);h.done=Math.abs(O)<=c,h.value=h.done?v:I};let T,E;const R=A=>{d(h.value)&&(T=A,E=au({keyframes:[h.value,p(h.value)],velocity:Dg(y,A,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return R(0),{calculatedDuration:null,next:A=>{let O=!1;return!E&&T===void 0&&(O=!0,S(A),R(A)),T!==void 0&&A>=T?E.next(A-T):(!O&&S(A),h)}}}const Mg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lS=1e-7,cS=12;function uS(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Mg(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>lS&&++a<cS);return i}function Es(e,t,n,r){if(e===t&&n===r)return yt;const o=s=>uS(s,0,1,e,n);return s=>s===0||s===1?s:Mg(o(s),t,r)}const fS=Es(.42,0,1,1),dS=Es(0,0,.58,1),kg=Es(.42,0,.58,1),Fg=e=>Array.isArray(e)&&typeof e[0]!="number",jg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ng=e=>t=>1-e(1-t),lu=e=>1-Math.sin(Math.acos(e)),Lg=Ng(lu),hS=jg(lu),_g=Es(.33,1.53,.69,.99),cu=Ng(_g),pS=jg(cu),mS=e=>(e*=2)<1?.5*cu(e):.5*(2-Math.pow(2,-10*(e-1))),pd={linear:yt,easeIn:fS,easeInOut:kg,easeOut:dS,circIn:lu,circInOut:hS,circOut:Lg,backIn:cu,backInOut:pS,backOut:_g,anticipate:mS},zl=e=>{if(Array.isArray(e)){Lt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Es(t,n,r,o)}else if(typeof e=="string")return Lt(pd[e]!==void 0,`Invalid easing type '${e}'`),pd[e];return e},qr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ve=(e,t,n)=>e+(t-e)*n;function La(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 gS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=La(l,a,e+1/3),s=La(l,a,e),i=La(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function gi(e,t){return n=>n>0?t:e}const _a=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},yS=[Bl,lr,Mr],vS=e=>yS.find(t=>t.test(e));function md(e){const t=vS(e);if(mo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Mr&&(n=gS(n)),n}const gd=(e,t)=>{const n=md(e),r=md(t);if(!n||!r)return gi(e,t);const o={...n};return s=>(o.red=_a(n.red,r.red,s),o.green=_a(n.green,r.green,s),o.blue=_a(n.blue,r.blue,s),o.alpha=Ve(n.alpha,r.alpha,s),lr.transform(o))},Ul=new Set(["none","hidden"]);function bS(e,t){return Ul.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function xS(e,t){return n=>Ve(e,t,n)}function uu(e){return typeof e=="number"?xS:typeof e=="string"?qc(e)?gi:bt.test(e)?gd:SS:Array.isArray(e)?Vg:typeof e=="object"?bt.test(e)?gd:wS:gi}function Vg(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>uu(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function wS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=uu(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function TS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const SS=(e,t)=>{const n=Ln.createTransformer(t),r=ss(e),o=ss(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?Ul.has(e)&&!o.values.length||Ul.has(t)&&!r.values.length?bS(e,t):xn(Vg(TS(r,o),o.values),n):(mo(!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.`),gi(e,t))};function $g(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):uu(e)(e,t)}function ES(e,t,n){const r=[],o=n||$g,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||yt:t;a=xn(l,a)}r.push(a)}return r}function Bg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Lt(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=ES(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=qr(e[u],e[u+1],c);return i[u](f)};return n?c=>l(Nn(e[0],e[s-1],c)):l}function Wg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=qr(0,t,r);e.push(Ve(n,1,o))}}function Hg(e){const t=[0];return Wg(t,e.length-1),t}function CS(e,t){return e.map(n=>n*t)}function PS(e,t){return e.map(()=>t||kg).splice(0,e.length-1)}function yi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Fg(r)?r.map(zl):zl(r),s={done:!1,value:t[0]},i=CS(n&&n.length===t.length?n:Hg(t),e),a=Bg(i,t,{ease:Array.isArray(o)?o:PS(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Gl=2e4;function zg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Gl;)t+=n,r=e.next(t);return t>=Gl?1/0:t}const RS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Te.update(t,!0),stop:()=>un(t),now:()=>pt.isProcessing?pt.timestamp:kn.now()}},IS={decay:hd,inertia:hd,tween:yi,keyframes:yi,spring:au},AS=e=>e/100;class fu extends Ag{constructor({KeyframeResolver:t=ou,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=IS[n]||yi;let l,c;a!==yi&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Lt(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=xn(AS,$g(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=zg(u));const{calculatedDuration:f}=u,h=f+o,d=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:d}}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:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,S=s;if(d){const A=Math.min(this.currentTime,u)/f;let O=Math.floor(A),I=A%1;!I&&A>=1&&(I=1),I===1&&O--,O=Math.min(O,d+1),!!(O%2)&&(p==="reverse"?(I=1-I,m&&(I-=m/f)):p==="mirror"&&(S=i)),y=Nn(0,1,I)*f}const T=b?{done:!1,value:l[0]}:S.next(y);a&&(T.value=a(T.value));let{done:E}=T;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return R&&o!==void 0&&(T.value=Zi(l,this.options,o)),g&&g(T.value),R&&this.finish(),T}get duration(){const{resolved:t}=this;return t?ln(t.calculatedDuration):0}get time(){return ln(this.currentTime)}set time(t){t=an(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=ln(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=RS,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),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 Ug=e=>Array.isArray(e)&&typeof e[0]=="number";function Gg(e){return!!(!e||typeof e=="string"&&e in du||Ug(e)||Array.isArray(e)&&e.every(Gg))}const $o=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,du={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$o([0,.65,.55,1]),circOut:$o([.55,0,1,.45]),backIn:$o([.31,.01,.66,-.59]),backOut:$o([.33,1.53,.69,.99])};function OS(e){return Yg(e)||du.easeOut}function Yg(e){if(e)return Ug(e)?$o(e):Array.isArray(e)?e.map(OS):du[e]}function DS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Yg(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const MS=Ig(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),vi=10,kS=2e4;function FS(e){return e.type==="spring"||!Gg(e.ease)}function jS(e,t){const n=new fu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<kS;)r=n.sample(s),o.push(r.value),s+=vi;return{times:void 0,keyframes:o,duration:s-vi,ease:"linear"}}class yd extends Ag{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Rg(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(FS(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=jS(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=DS(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=kn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(Zi(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ln(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ln(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=an(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}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return yt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return yt}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;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...h}=this.options,d=new fu({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=an(this.time);c.setWithVelocity(d.sample(p-vi).value,d.sample(p).value,vi)}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:s,damping:i,type:a}=t;return MS()&&r&&sg.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function NS(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Te.update(r,!0),()=>un(r)}const LS=Ig(()=>window.ScrollTimeline!==void 0);class hu{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(LS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),NS(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const pu=(e,t,n,r={},o,s,i)=>a=>{const l=ru(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-an(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};ST(l)||(f={...f,...TT(e,f)}),f.duration&&(f.duration=an(f.duration)),f.repeatDelay&&(f.repeatDelay=an(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(h=!0)),h&&!s&&t.get()!==void 0){const d=Zi(f.keyframes,l);if(d!==void 0)return Te.update(()=>{f.onUpdate(d),f.onComplete()}),new hu([])}return!s&&yd.supports(f)?new yd(f):new fu(f)};class mu{constructor(){this.subscriptions=[]}add(t){return qi(this.subscriptions,t),()=>Ss(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 s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vd=new Set;function gu(e,t,n){e||vd.has(t)||(console.warn(t),vd.add(t))}const bd=30,_S=e=>!isNaN(parseFloat(e)),Yo={current:void 0};class Kg{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=kn.now();this.updatedAt!==s&&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=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=_S(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gu(!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 mu);const r=this.events[t].add(n);return t==="change"?()=>{r(),Te.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 Yo.current&&Yo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bd);return Og(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 Xr(e,t){return new Kg(e,t)}function VS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xr(n))}function $S(e,t){const n=Qi(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=Q1(s[i]);VS(e,i,a)}}function qg(e){return e.getProps()[Wm]}class BS extends Kg{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=ig(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Ss(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function WS(e){return!!(lt(e)&&e.add)}function Yl(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new BS("auto"),e.addValue("willChange",r)),WS(r))return r.add(t)}function HS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function yu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),d=l[f];if(d===void 0||u&&HS(u,f))continue;const p={delay:n,elapsed:0,...ru(i||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=qg(e);if(v){const b=window.HandoffAppearAnimations(v,f,h,Te);b!==null&&(p.elapsed=b,m=!0)}}h.start(pu(f,h,d,e.shouldReduceMotion&&Hn.has(f)?{type:!1}:p,e,m,Yl(e,f)));const g=h.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Te.update(()=>{a&&$S(e,a)})}),c}function Kl(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:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(yu(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=s;return zS(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function zS(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(US).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Kl(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function US(e,t){return e.sortNodePosition(t)}function GS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Kl(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Kl(e,t,n);else{const o=typeof t=="function"?Qi(e,t,n.custom):t;r=Promise.all(yu(e,o,n))}return r.then(()=>{Te.postRender(()=>{e.notify("AnimationComplete",t)})})}const YS=[...Gc].reverse(),KS=Gc.length;function qS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>GS(e,n,r)))}function XS(e){let t=qS(e),n=xd(),r=!0;const o=l=>(c,u)=>{var f;const h=Qi(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let d={},p=1/0;for(let g=0;g<KS;g++){const v=YS[g],b=n[v],y=c[v]!==void 0?c[v]:u[v],S=ns(y),T=v===l?b.isActive:null;T===!1&&(p=g);let E=y===u[v]&&y!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...d},!b.isActive&&T===null||!y&&!b.prevProp||rs(y)||typeof y=="boolean")continue;let A=QS(b.prevProp,y)||v===l&&b.isActive&&!E&&S||g>p&&S,O=!1;const I=Array.isArray(y)?y:[y];let F=I.reduce(o(v),{});T===!1&&(F={});const{prevResolvedValues:k={}}=b,L={...k,...F},C=M=>{A=!0,h.has(M)&&(O=!0,h.delete(M)),b.needsAnimating[M]=!0;const j=e.getValue(M);j&&(j.liveStyle=!1)};for(const M in L){const j=F[M],_=k[M];if(d.hasOwnProperty(M))continue;let H=!1;Ll(j)&&Ll(_)?H=!hg(j,_):H=j!==_,H?j!=null?C(M):h.add(M):j!==void 0&&h.has(M)?C(M):b.protectedKeys[M]=!0}b.prevProp=y,b.prevResolvedValues=F,b.isActive&&(d={...d,...F}),r&&e.blockInitialAnimation&&(A=!1),A&&(!E||O)&&f.push(...I.map(M=>({animation:M,options:{type:v}})))}if(h.size){const g={};h.forEach(v=>{const b=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),g[v]=b??null}),f.push({animation:g})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var d;return(d=h.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=xd(),r=!0}}}function QS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hg(t,e):!1}function Zn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xd(){return{animate:Zn(!0),whileInView:Zn(),whileHover:Zn(),whileTap:Zn(),whileDrag:Zn(),whileFocus:Zn(),exit:Zn()}}class ZS extends zn{constructor(t){super(t),t.animationState||(t.animationState=XS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();rs(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 JS=0;class eE extends zn{constructor(){super(...arguments),this.id=JS++}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}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const tE={animation:{Feature:ZS},exit:{Feature:eE}},wd=(e,t)=>Math.abs(e-t);function nE(e,t){const n=wd(e.x,t.x),r=wd(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xg{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!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 f=$a(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=nE(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=pt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:v}=this.handlers;h||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Va(h,this.transformPagePoint),Te.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=$a(f.type==="pointercancel"?this.lastMoveEventInfo:Va(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,g),p&&p(f,g)},!lg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=Xi(t),a=Va(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=pt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,$a(a,this.history)),this.removeListeners=xn(bn(this.contextWindow,"pointermove",this.handlePointerMove),bn(this.contextWindow,"pointerup",this.handlePointerUp),bn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),un(this.updatePoint)}}function Va(e,t){return t?{point:t(e.point)}:e}function Td(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $a({point:e},t){return{point:e,delta:Td(e,Qg(t)),offset:Td(e,rE(t)),velocity:oE(t,.1)}}function rE(e){return e[0]}function Qg(e){return e[e.length-1]}function oE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Qg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>an(t)));)n--;if(!r)return{x:0,y:0};const s=ln(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const Zg=1e-4,sE=1-Zg,iE=1+Zg,Jg=.01,aE=0-Jg,lE=0+Jg;function _t(e){return e.max-e.min}function cE(e,t,n){return Math.abs(e-t)<=n}function Sd(e,t,n,r=.5){e.origin=r,e.originPoint=Ve(t.min,t.max,e.origin),e.scale=_t(n)/_t(t),e.translate=Ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=sE&&e.scale<=iE||isNaN(e.scale))&&(e.scale=1),(e.translate>=aE&&e.translate<=lE||isNaN(e.translate))&&(e.translate=0)}function Ko(e,t,n,r){Sd(e.x,t.x,n.x,r?r.originX:void 0),Sd(e.y,t.y,n.y,r?r.originY:void 0)}function Ed(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function uE(e,t,n){Ed(e.x,t.x,n.x),Ed(e.y,t.y,n.y)}function Cd(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function qo(e,t,n){Cd(e.x,t.x,n.x),Cd(e.y,t.y,n.y)}function fE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ve(n,e,r.max):Math.min(e,n)),e}function Pd(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 dE(e,{top:t,left:n,bottom:r,right:o}){return{x:Pd(e.x,n,o),y:Pd(e.y,t,r)}}function Rd(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 hE(e,t){return{x:Rd(e.x,t.x),y:Rd(e.y,t.y)}}function pE(e,t){let n=.5;const r=_t(e),o=_t(t);return o>r?n=qr(t.min,t.max-r,e.min):r>o&&(n=qr(e.min,e.max-o,t.min)),Nn(0,1,n)}function mE(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 ql=.35;function gE(e=ql){return e===!1?e=0:e===!0&&(e=ql),{x:Id(e,"left","right"),y:Id(e,"top","bottom")}}function Id(e,t,n){return{min:Ad(e,t),max:Ad(e,n)}}function Ad(e,t){return typeof e=="number"?e:e[t]||0}const Od=()=>({translate:0,scale:1,origin:0,originPoint:0}),kr=()=>({x:Od(),y:Od()}),Dd=()=>({min:0,max:0}),Je=()=>({x:Dd(),y:Dd()});function Bt(e){return[e("x"),e("y")]}function ey({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function yE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function vE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ba(e){return e===void 0||e===1}function Xl({scale:e,scaleX:t,scaleY:n}){return!Ba(e)||!Ba(t)||!Ba(n)}function er(e){return Xl(e)||ty(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ty(e){return Md(e.x)||Md(e.y)}function Md(e){return e&&e!=="0%"}function bi(e,t,n){const r=e-n,o=t*r;return n+o}function kd(e,t,n,r,o){return o!==void 0&&(e=bi(e,o,r)),bi(e,n,r)+t}function Ql(e,t=0,n=1,r,o){e.min=kd(e.min,t,n,r,o),e.max=kd(e.max,t,n,r,o)}function ny(e,{x:t,y:n}){Ql(e.x,t.translate,t.scale,t.originPoint),Ql(e.y,n.translate,n.scale,n.originPoint)}const Fd=.999999999999,jd=1.0000000000001;function bE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Fr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,ny(e,i)),r&&er(s.latestValues)&&Fr(e,s.latestValues))}t.x<jd&&t.x>Fd&&(t.x=1),t.y<jd&&t.y>Fd&&(t.y=1)}function An(e,t){e.min=e.min+t,e.max=e.max+t}function Nd(e,t,n,r,o=.5){const s=Ve(e.min,e.max,o);Ql(e,t,n,s,r)}function Fr(e,t){Nd(e.x,t.x,t.scaleX,t.scale,t.originX),Nd(e.y,t.y,t.scaleY,t.scale,t.originY)}function ry(e,t){return ey(vE(e.getBoundingClientRect(),t))}function xE(e,t,n){const r=ry(e,n),{scroll:o}=t;return o&&(An(r.x,o.offset.x),An(r.y,o.offset.y)),r}const oy=({current:e})=>e?e.ownerDocument.defaultView:null,wE=new WeakMap;class TE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Je(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Xi(u,"page").point)},s=(u,f)=>{var h;const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ug(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bt(v=>{let b=this.getAxisMotionValue(v).get()||0;if(sn.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[v];S&&(b=_t(S)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&Te.postRender(()=>m(u,f)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=Yl(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:g}=f;if(d&&this.currentDirection===null){this.currentDirection=SE(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Bt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Xg(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:oy(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Te.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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!$s(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=fE(i,this.constraints[t],this.elastic[t])),s.set(i)}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,s=this.constraints;n&&Dr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=dE(o.layoutBox,n):this.constraints=!1,this.elastic=gE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Bt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=mE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Dr(t))return!1;const r=t.current;Lt(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 s=xE(r,o.root,this.visualElement.getTransformPagePoint());let i=hE(o.layout.layoutBox,s);if(n){const a=n(yE(i));this.hasMutatedConstraints=!!a,a&&(i=ey(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Bt(u=>{if(!$s(u,n,this.currentDirection))return;let f=l&&l[u]||{};i&&(f={min:0,max:0});const h=o?200:1e6,d=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(pu(t,r,0,n,this.visualElement,!1,Yl(this.visualElement,t)))}stopAnimation(){Bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Bt(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){Bt(n=>{const{drag:r}=this.getProps();if(!$s(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ve(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Dr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=pE({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Bt(i=>{if(!$s(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ve(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;wE.set(this.visualElement,this);const t=this.visualElement.current,n=bn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Dr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Te.read(r);const i=yn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Bt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=ql,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function $s(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function SE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class EE extends zn{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new TE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ld=e=>(t,n)=>{e&&Te.postRender(()=>e(t,n))};class CE extends zn{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Xg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:oy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ld(t),onStart:Ld(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Te.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=bn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function PE(){const e=w.useContext(Ui);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const ni={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _d(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const No={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=_d(e,t.target.x),r=_d(e,t.target.y);return`${n}% ${r}%`}},RE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ln.parse(e);if(o.length>5)return r;const s=Ln.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ve(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class IE extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;R1(AE),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ni.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Te.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Uc.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 sy(e){const[t,n]=PE(),r=w.useContext(os);return x.jsx(IE,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(zm),isPresent:t,safeToRemove:n})}const AE={borderRadius:{...No,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:No,borderTopRightRadius:No,borderBottomLeftRadius:No,borderBottomRightRadius:No,boxShadow:RE},iy=["TopLeft","TopRight","BottomLeft","BottomRight"],OE=iy.length,Vd=e=>typeof e=="string"?parseFloat(e):e,$d=e=>typeof e=="number"||ae.test(e);function DE(e,t,n,r,o,s){o?(e.opacity=Ve(0,n.opacity!==void 0?n.opacity:1,ME(r)),e.opacityExit=Ve(t.opacity!==void 0?t.opacity:1,0,kE(r))):s&&(e.opacity=Ve(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<OE;i++){const a=`border${iy[i]}Radius`;let l=Bd(t,a),c=Bd(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||$d(l)===$d(c)?(e[a]=Math.max(Ve(Vd(l),Vd(c),r),0),(sn.test(c)||sn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,r))}function Bd(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ME=ay(0,.5,Lg),kE=ay(.5,.95,yt);function ay(e,t,n){return r=>r<e?0:r>t?1:n(qr(e,t,r))}function Wd(e,t){e.min=t.min,e.max=t.max}function $t(e,t){Wd(e.x,t.x),Wd(e.y,t.y)}function Hd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zd(e,t,n,r,o){return e-=t,e=bi(e,1/n,r),o!==void 0&&(e=bi(e,1/o,r)),e}function FE(e,t=0,n=1,r=.5,o,s=e,i=e){if(sn.test(t)&&(t=parseFloat(t),t=Ve(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ve(s.min,s.max,r);e===s&&(a-=t),e.min=zd(e.min,t,n,a,o),e.max=zd(e.max,t,n,a,o)}function Ud(e,t,[n,r,o],s,i){FE(e,t[n],t[r],t[o],t.scale,s,i)}const jE=["x","scaleX","originX"],NE=["y","scaleY","originY"];function Gd(e,t,n,r){Ud(e.x,t,jE,n?n.x:void 0,r?r.x:void 0),Ud(e.y,t,NE,n?n.y:void 0,r?r.y:void 0)}function Yd(e){return e.translate===0&&e.scale===1}function ly(e){return Yd(e.x)&&Yd(e.y)}function LE(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function cy(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Kd(e){return _t(e.x)/_t(e.y)}function qd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class _E{constructor(){this.members=[]}add(t){qi(this.members,t),t.scheduleRender()}remove(t){if(Ss(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 s=this.members[o];if(s.isPresent!==!1){r=s;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 VE(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),d&&(r+=`skewX(${d}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $E=(e,t)=>e.depth-t.depth;class BE{constructor(){this.children=[],this.isDirty=!1}add(t){qi(this.children,t),this.isDirty=!0}remove(t){Ss(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($E),this.isDirty=!1,this.children.forEach(t)}}function WE(e,t){const n=kn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(un(r),e(s-t))};return Te.read(r,!0),()=>un(r)}function uy(e){return e instanceof SVGElement&&e.tagName!=="svg"}function vu(e,t,n){const r=lt(e)?e:Xr(e);return r.start(pu("",r,t,n)),r.animation}const tr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Wa=["","X","Y","Z"],HE={visibility:"hidden"},Xd=1e3;let zE=0;function Ha(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?qg(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?fy(e.parent):!1:!1}function dy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=zE++,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,window.MotionDebug&&(tr.totalNodes=tr.resolvedTargetDeltas=tr.recalculatedProjection=0),this.nodes.forEach(YE),this.nodes.forEach(ZE),this.nodes.forEach(JE),this.nodes.forEach(KE),window.MotionDebug&&window.MotionDebug.record(tr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new BE)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new mu),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=uy(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=WE(h,250),ni.hasAnimatedSinceResize&&(ni.hasAnimatedSinceResize=!1,this.nodes.forEach(Zd))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||oC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!cy(this.targetLayout,p)||d,y=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const S={...ru(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||Zd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.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(eC),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&fy(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qd);return}this.isUpdating||this.nodes.forEach(XE),this.isUpdating=!1,this.nodes.forEach(QE),this.nodes.forEach(UE),this.nodes.forEach(GE),this.clearAllSnapshots();const a=kn.now();pt.delta=Nn(0,1e3/60,a-pt.timestamp),pt.timestamp=a,pt.isProcessing=!0,Ma.update.process(pt),Ma.preRender.process(pt),Ma.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Uc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qE),this.sharedNodes.forEach(tC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Je(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ly(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||er(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),sC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return Je();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(An(a.x,l.offset.x),An(a.y,l.offset.y)),a}removeElementScroll(i){const a=Je();$t(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){$t(a,i);const{scroll:h}=this.root;h&&(An(a.x,-h.offset.x),An(a.y,-h.offset.y))}An(a.x,u.offset.x),An(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=Je();$t(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Fr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),er(u.latestValues)&&Fr(l,u.latestValues)}return er(this.latestValues)&&Fr(l,this.latestValues),l}removeTransform(i){const a=Je();$t(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!er(c.latestValues))continue;Xl(c.latestValues)&&c.updateSnapshot();const u=Je(),f=c.measurePageBox();$t(u,f),Gd(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return er(this.latestValues)&&Gd(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;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(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=pt.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),qo(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Je(),this.targetWithTransforms=Je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),ny(this.target,this.targetDelta)):$t(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),qo(this.relativeTargetOrigin,this.target,d.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&tr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Xl(this.parent.latestValues)||ty(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 i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===pt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=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||f))return;$t(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;bE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Je());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Hd(this.prevProjectionDelta.x,this.projectionDelta.x),Hd(this.prevProjectionDelta.y,this.projectionDelta.y)),Ko(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!qd(this.projectionDelta.x,this.prevProjectionDelta.x)||!qd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&tr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=kr(),this.projectionDelta=kr(),this.projectionDeltaWithTransform=kr()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=kr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Je(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),v=!g||g.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(rC));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const T=S/1e3;Jd(f.x,i.x,T),Jd(f.y,i.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qo(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nC(this.relativeTarget,this.relativeTargetOrigin,h,T),y&&LE(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Je()),$t(y,this.relativeTarget)),m&&(this.animationValues=u,DE(u,c,this.latestValues,T,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){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=Te.update(()=>{ni.hasAnimatedSinceResize=!0,this.currentAnimation=vu(0,Xd,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&hy(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Je();const f=_t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const h=_t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}$t(a,l),Fr(a,u),Ko(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new _E),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ha("z",i,c,this.animationValues);for(let u=0;u<Wa.length;u++)Ha(`rotate${Wa[u]}`,i,c,this.animationValues),Ha(`skew${Wa[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return HE;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ei(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ei(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!er(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=VE(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in pi){if(h[m]===void 0)continue;const{correct:g,applyTo:v}=pi[m],b=c.transform==="none"?h[m]:g(h[m],f);if(v){const y=v.length;for(let S=0;S<y;S++)c[v[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?ei(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Qd),this.root.sharedNodes.clear()}}}function UE(e){e.updateLayout()}function GE(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:s}=e.options,i=n.source!==e.layout.source;s==="size"?Bt(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=_t(h);h.min=r[f].min,h.max=h.min+d}):hy(s,n.layoutBox,r)&&Bt(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=_t(r[f]);h.max=h.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});const a=kr();Ko(a,r,n.layoutBox);const l=kr();i?Ko(l,e.applyTransform(o,!0),n.measuredBox):Ko(l,r,n.layoutBox);const c=!ly(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=Je();qo(p,n.layoutBox,h.layoutBox);const m=Je();qo(m,r,d.layoutBox),cy(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function YE(e){window.MotionDebug&&tr.totalNodes++,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 KE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qE(e){e.clearSnapshot()}function Qd(e){e.clearMeasurements()}function XE(e){e.isLayoutDirty=!1}function QE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ZE(e){e.resolveTargetDelta()}function JE(e){e.calcProjection()}function eC(e){e.resetSkewAndRotation()}function tC(e){e.removeLeadSnapshot()}function Jd(e,t,n){e.translate=Ve(t.translate,0,n),e.scale=Ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function eh(e,t,n,r){e.min=Ve(t.min,n.min,r),e.max=Ve(t.max,n.max,r)}function nC(e,t,n,r){eh(e.x,t.x,n.x,r),eh(e.y,t.y,n.y,r)}function rC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oC={duration:.45,ease:[.4,0,.1,1]},th=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nh=th("applewebkit/")&&!th("chrome/")?Math.round:yt;function rh(e){e.min=nh(e.min),e.max=nh(e.max)}function sC(e){rh(e.x),rh(e.y)}function hy(e,t,n){return e==="position"||e==="preserve-aspect"&&!cE(Kd(t),Kd(n),.2)}const iC=dy({attachResizeListener:(e,t)=>yn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),za={current:void 0},py=dy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!za.current){const e=new iC({});e.mount(window),e.setOptions({layoutScroll:!0}),za.current=e}return za.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),aC={pan:{Feature:CE},drag:{Feature:EE,ProjectionNode:py,MeasureLayout:sy}},Zl={current:null},my={current:!1};function lC(){if(my.current=!0,!!zc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zl.current=e.matches;e.addListener(t),t()}else Zl.current=!1}function cC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(lt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&gu(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(lt(s))e.addValue(r,Xr(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Xr(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const is=new WeakMap,uC=[...vg,bt,Ln],fC=e=>uC.find(yg(e)),oh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],dC=Yc.length;class hC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,d,p,m)=>new this.KeyframeResolver(h,d,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ou,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Te.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;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=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Ki(n),this.isVariantNode=Gm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];l[h]!==void 0&&lt(d)&&d.set(l[h],!1)}}mount(t){this.current=t,is.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)),my.current||lC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zl.current,process.env.NODE_ENV!=="production"&&gu(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(){is.delete(this.current),this.projection&&this.projection.unmount(),un(this.notifyUpdate),un(this.render),this.valueSubscriptions.forEach(t=>t()),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){const r=Hn.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),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 Yr){const n=Yr[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 s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}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<oh.length;r++){const o=oh[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=cC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<dC;r++){const o=Yc[r],s=this.props[o];(ns(s)||s===!1)&&(n[o]=s)}return n}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=Xr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(mg(o)||pg(o))?o=parseFloat(o):!fC(o)&&Ln.test(n)&&(o=Pg(t,n)),this.setBaseTarget(t,lt(o)?o.get():o)),lt(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 i=nu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!lt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class gy extends hC{constructor(){super(...arguments),this.KeyframeResolver=Rg}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]}}function pC(e){return window.getComputedStyle(e)}class yy extends gy{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=tg}readValueFromInstance(t,n){if(Hn.has(n)){const r=iu(n);return r&&r.default||0}else{const r=pC(t),o=(qm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ry(t,n)}build(t,n,r){Qc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tu(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;lt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class vy extends gy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Hn.has(n)){const r=iu(n);return r&&r.default||0}return n=ng.has(n)?n:Yi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return og(t,n,r)}build(t,n,r){Jc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){rg(t,n,r,o)}mount(t){this.isSVGTag=eu(t.tagName),super.mount(t)}}const mC=(e,t)=>Kc(e)?new vy(t):new yy(t,{allowProjection:e!==w.Fragment}),gC={layout:{ProjectionNode:py,MeasureLayout:sy}},yC={...tE,...yT,...aC,...gC},ft=C1((e,t)=>oT(e,t,yC,mC));function by(){const e=w.useRef(!1);return Gi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xy(){const e=by(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Te.postRender(r),[r]),t]}class vC extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bC({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=w.useContext(Gr);return w.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
4
+ `+t.prev}function js(e,t){var n=kl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=In(e,o)?t(e[o],e):""}var s=typeof Ra=="function"?Ra(e):[],i;if(zr){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)In(e,l)&&(n&&String(Number(l))===l&&l<e.length||zr&&i["$"+l]instanceof Symbol||(Pm.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Ra=="function")for(var c=0;c<s.length;c++)Rm.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Mm=uo,fo=Rx,sw=$x,iw=vs,Ns=Mm("%WeakMap%",!0),Ls=Mm("%Map%",!0),aw=fo("WeakMap.prototype.get",!0),lw=fo("WeakMap.prototype.set",!0),cw=fo("WeakMap.prototype.has",!0),uw=fo("Map.prototype.get",!0),fw=fo("Map.prototype.set",!0),dw=fo("Map.prototype.has",!0),Bc=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},hw=function(e,t){var n=Bc(e,t);return n&&n.value},pw=function(e,t,n){var r=Bc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},mw=function(e,t){return!!Bc(e,t)},gw=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new iw("Side channel does not contain "+sw(s))},get:function(s){if(Ns&&s&&(typeof s=="object"||typeof s=="function")){if(t)return aw(t,s)}else if(Ls){if(n)return uw(n,s)}else if(r)return hw(r,s)},has:function(s){if(Ns&&s&&(typeof s=="object"||typeof s=="function")){if(t)return cw(t,s)}else if(Ls){if(n)return dw(n,s)}else if(r)return mw(r,s);return!1},set:function(s,i){Ns&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Ns),lw(t,s,i)):Ls?(n||(n=new Ls),fw(n,s,i)):(r||(r={key:{},next:null}),pw(r,s,i))}};return o},Uf=e=>Array.isArray(e),Aa=e=>e===void 0,Oa=e=>e===null,yw=Function.bind.call(Function.call,Object.prototype.toString),vw=e=>!!e&&yw(e)==="[object Error]"||e instanceof Error,km=(e,t)=>e instanceof t,bw=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},xw=e=>Object.prototype.toString.call(e)==="[object Date]"&&km(e,Date),vn={array:Uf,date:xw,empty:e=>Oa(e)||Aa(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:km,isError:vw,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Oa(e)||Aa(e),null:Oa,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Uf(e)&&typeof e=="object",primitive:bw,string:e=>typeof e=="string",undefined:Aa},jl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=jl(s?[]:{},o,n)}else e[r]=jl(e[r],o,n)}else e[r]=n;return e},ww=e=>Object.keys(e),Tw=e=>e.replace("[",".").replace("]","").split("."),Da=(e,t,n)=>{const r=Array.isArray(t)?t:Tw(t),o=structuredClone(e);return jl(o,r,n),o};const Wc="-";function Sw(e){const t=Cw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Wc);return a[0]===""&&a.length!==1&&a.shift(),Fm(a,t)||Ew(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Fm(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Fm(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Wc);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Gf=/^\[(.+)\]$/;function Ew(e){if(Gf.test(e)){const t=Gf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Cw(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Rw(Object.entries(e.classGroups),n).forEach(([s,i])=>{Nl(i,r,s,t)}),r}function Nl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Yf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Pw(o)){Nl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Nl(i,Yf(t,s),n,r)})})}function Yf(e,t){let n=e;return t.split(Wc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Pw(e){return e.isThemeGetter}function Rw(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function Iw(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const jm="!";function Aw(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,f;for(let g=0;g<a.length;g++){let y=a[g];if(c===0){if(y===o&&(r||a.slice(g,g+s)===t)){l.push(a.slice(u,g)),u=g+s;continue}if(y==="/"){f=g;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),d=h.startsWith(jm),p=d?h.substring(1):h,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function Ow(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Dw(e){return{cache:Iw(e.cacheSize),parseClassName:Aw(e),...Sw(e)}}const Mw=/\s+/;function kw(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(Mw).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let f=!!u,h=r(f?c.substring(0,u):c);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const d=Ow(a).join(":");return{isTailwindClass:!0,modifierId:l?d+jm:d,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(f=>s.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Fw(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Nm(t))&&(r&&(r+=" "),r+=n);return r}function Nm(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Nm(e[r]))&&(n&&(n+=" "),n+=t);return n}function jw(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=Dw(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=kw(l,n);return o(l,u),u}return function(){return s(Fw.apply(null,arguments))}}function Le(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Lm=/^\[(?:([a-z-]+):)?(.+)\]$/i,Nw=/^\d+\/\d+$/,Lw=new Set(["px","full","screen"]),_w=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vw=/\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$/,$w=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Bw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ww=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function gn(e){return ar(e)||Lw.has(e)||Nw.test(e)}function En(e){return ho(e,"length",Xw)}function ar(e){return!!e&&!Number.isNaN(Number(e))}function _s(e){return ho(e,"number",ar)}function Fo(e){return!!e&&Number.isInteger(Number(e))}function Hw(e){return e.endsWith("%")&&ar(e.slice(0,-1))}function ue(e){return Lm.test(e)}function Cn(e){return _w.test(e)}const zw=new Set(["length","size","percentage"]);function Uw(e){return ho(e,zw,_m)}function Gw(e){return ho(e,"position",_m)}const Yw=new Set(["image","url"]);function Kw(e){return ho(e,Yw,Zw)}function qw(e){return ho(e,"",Qw)}function jo(){return!0}function ho(e,t,n){const r=Lm.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Xw(e){return Vw.test(e)&&!$w.test(e)}function _m(){return!1}function Qw(e){return Bw.test(e)}function Zw(e){return Ww.test(e)}function Jw(){const e=Le("colors"),t=Le("spacing"),n=Le("blur"),r=Le("brightness"),o=Le("borderColor"),s=Le("borderRadius"),i=Le("borderSpacing"),a=Le("borderWidth"),l=Le("contrast"),c=Le("grayscale"),u=Le("hueRotate"),f=Le("invert"),h=Le("gap"),d=Le("gradientColorStops"),p=Le("gradientColorStopPositions"),m=Le("inset"),g=Le("margin"),y=Le("opacity"),b=Le("padding"),v=Le("saturate"),S=Le("scale"),T=Le("sepia"),E=Le("skew"),R=Le("space"),I=Le("translate"),M=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ue,t],k=()=>[ue,t],j=()=>["",gn,En],P=()=>["auto",ar,ue],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],_=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ue],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[ar,_s],q=()=>[ar,ue];return{cacheSize:500,separator:":",theme:{colors:[jo],spacing:[gn,En],blur:["none","",Cn,ue],brightness:$(),borderColor:[e],borderRadius:["none","","full",Cn,ue],borderSpacing:k(),borderWidth:j(),contrast:$(),grayscale:U(),hueRotate:q(),invert:U(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Hw,En],inset:N(),margin:N(),opacity:$(),padding:k(),saturate:$(),scale:$(),sepia:U(),skew:q(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Cn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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"],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:[...O(),ue]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fo,ue]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",Fo,ue]}],"grid-cols":[{"grid-cols":[jo]}],"col-start-end":[{col:["auto",{span:["full",Fo,ue]},ue]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[jo]}],"row-start-end":[{row:["auto",{span:[Fo,ue]},ue]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Cn]},Cn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Cn,En]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_s]}],"font-family":[{font:[jo]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ue]}],"line-clamp":[{"line-clamp":["none",ar,_s]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gn,En]}],"underline-offset":[{"underline-offset":["auto",gn,ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],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",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),Gw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Uw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Kw]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[gn,ue]}],"outline-w":[{outline:[gn,En]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[gn,En]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cn,qw]}],"shadow-color":[{shadow:[jo]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Cn,ue]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[v]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Fo,ue]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gn,En,_s]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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"],"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"]}}}const e1=jw(Jw),Hc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},t1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),n1=e=>vn.function(e),De=(...e)=>e1(A0(e)),Vm=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},zi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},po=x.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return w.jsx(s,{ref:o,...r,children:n})}),r1=co("relative overflow-hidden inline-flex duration-500 enabled:hover: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 ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Ur=x.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return w.jsxs(po,{...l,ref:c,type:s,"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:De(r1({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),$m=e=>{const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t};function o1(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 s1=({children:e,...t})=>{const n=$m(t.onIntersection),r=x.useRef(null),[o,s]=x.useState(()=>r.current===null?!1:o1(r.current));return x.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(f=>c.isIntersecting?!0:f)});return a.observe(i),()=>a.disconnect()},[]),w.jsx("div",{...t,ref:r,children:o?e:null})},i1=co("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),a1=co("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{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:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),l1=x.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return w.jsxs(po,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:De(a1({size:i,theme:s}),t),children:[n?w.jsx("span",{className:i1({theme:n})}):null,r,a.children]})}),Gr=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ui=x.createContext({}),Gi=x.createContext(null),zc=typeof document<"u",Yi=zc?x.useLayoutEffect:x.useEffect,Bm=x.createContext({strict:!1}),Ki=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),c1="framerAppearId",Wm="data-"+Ki(c1),u1={skipAnimations:!1,useManualTiming:!1};function f1(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,f=!1)=>{const d=f&&r?t:n;return u&&s.add(c),d.has(c)||d.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const Vs=["read","resolveKeyframes","update","preRender","render","postRender"],d1=40;function Hm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Vs.reduce((y,b)=>(y[b]=f1(s),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:h}=i,d=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,d1),1),o.timestamp=y,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(d))},p=()=>{n=!0,r=!0,o.isProcessing||e(d)};return{schedule:Vs.reduce((y,b)=>{const v=i[b];return y[b]=(S,T=!1,E=!1)=>(n||p(),v.schedule(S,T,E)),y},{}),cancel:y=>{for(let b=0;b<Vs.length;b++)i[Vs[b]].cancel(y)},state:o,steps:i}}const{schedule:Uc,cancel:AL}=Hm(queueMicrotask,!1);function Dr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const zm=x.createContext({});let Kf=!1;function h1(e,t,n,r,o){const{visualElement:s}=x.useContext(Ui),i=x.useContext(Bm),a=x.useContext(Gi),l=x.useContext(Gr).reducedMotion,c=x.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=x.useContext(zm);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&m1(c.current,n,o,f),x.useInsertionEffect(()=>{u&&u.update(n,a)});const h=x.useRef(!!(n[Wm]&&!window.HandoffComplete));return Yi(()=>{u&&(u.updateFeatures(),Uc.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),x.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,Kf||(Kf=!0,queueMicrotask(p1))))}),u}function p1(){window.HandoffComplete=!0}function m1(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Um(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&Dr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Um(e){if(e)return e.options.allowProjection!==!1?e.projection:Um(e.parent)}function g1(e,t,n){return x.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Dr(n)&&(n.current=r))},[t])}function ns(e){return typeof e=="string"||Array.isArray(e)}function rs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Gc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yc=["initial",...Gc];function qi(e){return rs(e.animate)||Yc.some(t=>ns(e[t]))}function Gm(e){return!!(qi(e)||e.variants)}function y1(e,t){if(qi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ns(n)?n:void 0,animate:ns(r)?r:void 0}}return e.inherit!==!1?t:{}}function v1(e){const{initial:t,animate:n}=y1(e,x.useContext(Ui));return x.useMemo(()=>({initial:t,animate:n}),[qf(t),qf(n)])}function qf(e){return Array.isArray(e)?e.join(" "):e}const Xf={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"]},Yr={};for(const e in Xf)Yr[e]={isEnabled:t=>Xf[e].some(n=>!!t[n])};function b1(e){for(const t in e)Yr[t]={...Yr[t],...e[t]}}const os=x.createContext({}),x1=Symbol.for("motionComponentSymbol"),yt=e=>e;let mo=yt,Lt=yt;process.env.NODE_ENV!=="production"&&(mo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Lt=(e,t)=>{if(!e)throw new Error(t)});function w1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&b1(e);function s(a,l){let c;const u={...x.useContext(Gr),...a,layoutId:T1(a)},{isStatic:f}=u,h=v1(a),d=r(a,f);if(!f&&zc){S1(u,e);const p=E1(u);c=p.MeasureLayout,h.visualElement=h1(o,d,u,t,p.ProjectionNode)}return w.jsxs(Ui.Provider,{value:h,children:[c&&h.visualElement?w.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,g1(d,h.visualElement,l),d,f,h.visualElement)]})}const i=x.forwardRef(s);return i[x1]=o,i}function T1({layoutId:e}){const t=x.useContext(os).id;return t&&e!==void 0?t+"-"+e:e}function S1(e,t){const n=x.useContext(Bm).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?mo(!1,r):Lt(!1,r)}}function E1(e){const{drag:t,layout:n}=Yr;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}}function C1(e){function t(r,o={}){return w1(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const P1=["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 Kc(e){return typeof e!="string"||e.includes("-")?!1:!!(P1.indexOf(e)>-1||/[A-Z]/u.test(e))}const mi={};function R1(e){Object.assign(mi,e)}const xs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hn=new Set(xs);function Ym(e,{layout:t,layoutId:n}){return Hn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mi[e]||e==="opacity")}const lt=e=>!!(e&&e.getVelocity),I1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},A1=xs.length;function O1(e,t,n){let r="";for(let o=0;o<A1;o++){const s=xs[o];if(e[s]!==void 0){const i=I1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Km=e=>t=>typeof t=="string"&&t.startsWith(e),qm=Km("--"),D1=Km("var(--"),qc=e=>D1(e)?M1.test(e.split("/*")[0].trim()):!1,M1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,k1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Nn=(e,t,n)=>n>t?t:n<e?e:n,go={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Uo={...go,transform:e=>Nn(0,1,e)},$s={...go,default:1},Go=e=>Math.round(e*1e5)/1e5,Xc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,F1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,j1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ws(e){return typeof e=="string"}function N1(e){return e==null}const Ts=e=>({test:t=>ws(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Rn=Ts("deg"),sn=Ts("%"),ae=Ts("px"),L1=Ts("vh"),_1=Ts("vw"),Qf={...sn,parse:e=>sn.parse(e)/100,transform:e=>sn.transform(e*100)},Zf={...go,transform:Math.round},Xm={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,size:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,rotate:Rn,rotateX:Rn,rotateY:Rn,rotateZ:Rn,scale:$s,scaleX:$s,scaleY:$s,scaleZ:$s,skew:Rn,skewX:Rn,skewY:Rn,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:Uo,originX:Qf,originY:Qf,originZ:ae,zIndex:Zf,backgroundPositionX:ae,backgroundPositionY:ae,fillOpacity:Uo,strokeOpacity:Uo,numOctaves:Zf};function Qc(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const f=t[u];if(qm(u)){o[u]=f;continue}const h=Xm[u],d=k1(f,h);if(Hn.has(u)){if(a=!0,s[u]=d,!c)continue;f!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=d):r[u]=d}if(t.transform||(a||n?r.transform=O1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${f} ${h}`}}const Zc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qm(e,t,n){for(const r in t)!lt(t[r])&&!Ym(r,n)&&(e[r]=t[r])}function V1({transformTemplate:e},t){return x.useMemo(()=>{const n=Zc();return Qc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function $1(e,t){const n=e.style||{},r={};return Qm(r,n,e),Object.assign(r,V1(e,t)),r}function B1(e,t){const n={},r=$1(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 W1=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 gi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||W1.has(e)}let Zm=e=>!gi(e);function Jm(e){e&&(Zm=t=>t.startsWith("on")?!gi(t):e(t))}try{Jm(require("@emotion/is-prop-valid").default)}catch{}function H1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Zm(o)||n===!0&&gi(o)||!t&&!gi(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Jf(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function z1(e,t,n){const r=Jf(t,e.x,e.width),o=Jf(n,e.y,e.height);return`${r} ${o}`}const U1={offset:"stroke-dashoffset",array:"stroke-dasharray"},G1={offset:"strokeDashoffset",array:"strokeDasharray"};function Y1(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?U1:G1;e[s.offset]=ae.transform(-r);const i=ae.transform(t),a=ae.transform(n);e[s.array]=`${i} ${a}`}function Jc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Qc(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:d,dimensions:p}=e;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(o!==void 0||s!==void 0||d.transform)&&(d.transformOrigin=z1(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&Y1(h,i,a,l,!1)}const eg=()=>({...Zc(),attrs:{}}),eu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function K1(e,t,n,r){const o=x.useMemo(()=>{const s=eg();return Jc(s,t,eu(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Qm(s,e.style,e),o.style={...s,...o.style}}return o}function q1(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Kc(n)?K1:B1)(r,s,i,n),c=H1(r,typeof n=="string",e),u=n!==x.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=x.useMemo(()=>lt(f)?f.get():f,[f]);return x.createElement(n,{...u,children:h})}}function tg(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ng=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 rg(e,t,n,r){tg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ng.has(o)?o:Ki(o),t.attrs[o])}function tu(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(lt(o[i])||t.style&&lt(t.style[i])||Ym(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function og(e,t,n){const r=tu(e,t,n);for(const o in e)if(lt(e[o])||lt(t[o])){const s=xs.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function ed(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function nu(e,t,n,r){if(typeof t=="function"){const[o,s]=ed(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ed(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function cn(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ll=e=>Array.isArray(e),X1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Q1=e=>Ll(e)?e[e.length-1]||0:e;function ti(e){const t=lt(e)?e.get():e;return X1(t)?t.toValue():t}const sg=new Set(["opacity","clipPath","filter","transform"]);function ig(e){if(Hn.has(e))return"transform";if(sg.has(e))return Ki(e)}function Xi(e,t){e.indexOf(t)===-1&&e.push(t)}function Ss(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Z1([...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,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function J1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:tT(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const ag=e=>(t,n)=>{const r=x.useContext(Ui),o=x.useContext(Gi),s=()=>J1(e,t,r,o,n);return n?s():cn(s)};function eT(e,t){const n=ig(t);n&&Xi(e,n)}function td(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=nu(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function tT(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const g in c)i[g]=ti(c[g]);let{initial:u,animate:f}=e;const h=qi(e),d=Gm(e);t&&d&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!rs(m)&&td(e,m,(g,y)=>{for(const b in g){let v=g[b];if(Array.isArray(v)){const S=p?v.length-1:0;v=v[S]}v!==null&&(i[b]=v)}for(const b in y)i[b]=y[b]}),l&&(f&&u!==!1&&!rs(f)&&td(e,f,g=>{for(const y in g)eT(a,y)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Te,cancel:un,state:pt,steps:Ma}=Hm(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),nT={useVisualState:ag({scrapeMotionValuesFromProps:og,createRenderState:eg,onMount:(e,t,{renderState:n,latestValues:r})=>{Te.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Te.render(()=>{Jc(n,r,eu(t.tagName),e.transformTemplate),rg(t,n)})}})},rT={useVisualState:ag({applyWillChange:!0,scrapeMotionValuesFromProps:tu,createRenderState:Zc})};function oT(e,{forwardMotionProps:t=!1},n,r){return{...Kc(e)?nT:rT,preloadedFeatures:n,useRender:q1(t),createVisualElement:r,Component:e}}function yn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const lg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Qi(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const sT=e=>t=>lg(t)&&e(t,Qi(t));function bn(e,t,n,r){return yn(e,t,sT(n),r)}const iT=(e,t)=>n=>t(e(n)),xn=(...e)=>e.reduce(iT);function cg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const nd=cg("dragHorizontal"),rd=cg("dragVertical");function ug(e){let t=!1;if(e==="y")t=rd();else if(e==="x")t=nd();else{const n=nd(),r=rd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function fg(){const e=ug(!0);return e?(e(),!1):!0}class zn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function od(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||fg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Te.postRender(()=>l(s,i))};return bn(e.current,n,o,{passive:!e.getProps()[r]})}class aT extends zn{mount(){this.unmount=xn(od(this.node,!0),od(this.node,!1))}unmount(){}}class lT extends zn{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=xn(yn(this.node.current,"focus",()=>this.onFocus()),yn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dg=(e,t)=>t?e===t?!0:dg(e,t.parentElement):!1;function ka(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Qi(n))}class cT extends zn{constructor(){super(...arguments),this.removeStartListeners=yt,this.removeEndListeners=yt,this.removeAccessibleListeners=yt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=bn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),h=!f&&!dg(this.node.current,a.target)?u:c;h&&Te.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=bn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||ka("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Te.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=yn(this.node.current,"keyup",i),ka("down",(a,l)=>{this.startPress(a,l)})},n=yn(this.node.current,"keydown",t),r=()=>{this.isPressing&&ka("cancel",(s,i)=>this.cancelPress(s,i))},o=yn(this.node.current,"blur",r);this.removeAccessibleListeners=xn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Te.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!fg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Te.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=bn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=yn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,Fa=new WeakMap,uT=e=>{const t=_l.get(e.target);t&&t(e)},fT=e=>{e.forEach(uT)};function dT({root:e,...t}){const n=e||document;Fa.has(n)||Fa.set(n,{});const r=Fa.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(fT,{root:e,...t})),r[o]}function hT(e,t,n){const r=dT(t);return _l.set(e,n),r.observe(e),()=>{_l.delete(e),r.unobserve(e)}}const pT={some:0,all:1};class mT extends zn{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:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:pT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return hT(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(gT(t,n))&&this.startObserver()}unmount(){}}function gT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const yT={inView:{Feature:mT},tap:{Feature:cT},focus:{Feature:lT},hover:{Feature:aT}};function hg(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}function Zi(e,t,n){const r=e.getProps();return nu(r,t,n!==void 0?n:r.custom,e)}const an=e=>e*1e3,ln=e=>e/1e3,vT={type:"spring",stiffness:500,damping:25,restSpeed:10},bT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xT={type:"keyframes",duration:.8},wT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TT=(e,{keyframes:t})=>t.length>2?xT:Hn.has(e)?e.startsWith("scale")?bT(t[1]):vT:wT;function ST({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function ru(e,t){return e[t]||e.default||e}const ET=e=>e!==null;function Ji(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ET),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let ni;function CT(){ni=void 0}const kn={now:()=>(ni===void 0&&kn.set(pt.isProcessing||u1.useManualTiming?pt.timestamp:performance.now()),ni),set:e=>{ni=e,queueMicrotask(CT)}},pg=e=>/^0[^.\s]+$/u.test(e);function PT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||pg(e):!0}const mg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),RT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function IT(e){const t=RT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const AT=4;function gg(e,t,n=1){Lt(n<=AT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=IT(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return mg(i)?parseFloat(i):i}return qc(o)?gg(o,t,n+1):o}const OT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),sd=e=>e===go||e===ae,id=(e,t)=>parseFloat(e.split(", ")[t]),ad=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return id(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?id(s[1],e):0}},DT=new Set(["x","y","z"]),MT=xs.filter(e=>!DT.has(e));function kT(e){const t=[];return MT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Kr={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:ad(4,13),y:ad(5,14)};Kr.translateX=Kr.x;Kr.translateY=Kr.y;const yg=e=>t=>t.test(e),FT={test:e=>e==="auto",parse:e=>e},vg=[go,ae,sn,Rn,_1,L1,FT],ld=e=>vg.find(yg(e)),dr=new Set;let Vl=!1,$l=!1;function bg(){if($l){const e=Array.from(dr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=kT(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(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}$l=!1,Vl=!1,dr.forEach(e=>e.complete()),dr.clear()}function xg(){dr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($l=!0)})}function jT(){xg(),bg()}class ou{constructor(t,n,r,o,s,i=!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=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(dr.add(this),Vl||(Vl=!0,Te.read(xg),Te.resolveKeyframes(bg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),dr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,dr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const su=(e,t)=>n=>!!(ws(n)&&j1.test(n)&&n.startsWith(e)||t&&!N1(n)&&Object.prototype.hasOwnProperty.call(n,t)),wg=(e,t,n)=>r=>{if(!ws(r))return r;const[o,s,i,a]=r.match(Xc);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},NT=e=>Nn(0,255,e),ja={...go,transform:e=>Math.round(NT(e))},lr={test:su("rgb","red"),parse:wg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ja.transform(e)+", "+ja.transform(t)+", "+ja.transform(n)+", "+Go(Uo.transform(r))+")"};function LT(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 Bl={test:su("#"),parse:LT,transform:lr.transform},Mr={test:su("hsl","hue"),parse:wg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+sn.transform(Go(t))+", "+sn.transform(Go(n))+", "+Go(Uo.transform(r))+")"},bt={test:e=>lr.test(e)||Bl.test(e)||Mr.test(e),parse:e=>lr.test(e)?lr.parse(e):Mr.test(e)?Mr.parse(e):Bl.parse(e),transform:e=>ws(e)?e:e.hasOwnProperty("red")?lr.transform(e):Mr.transform(e)};function _T(e){var t,n;return isNaN(e)&&ws(e)&&(((t=e.match(Xc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(F1))===null||n===void 0?void 0:n.length)||0)>0}const Tg="number",Sg="color",VT="var",$T="var(",cd="${}",BT=/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 ss(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(BT,l=>(bt.test(l)?(r.color.push(s),o.push(Sg),n.push(bt.parse(l))):l.startsWith($T)?(r.var.push(s),o.push(VT),n.push(l)):(r.number.push(s),o.push(Tg),n.push(parseFloat(l))),++s,cd)).split(cd);return{values:n,split:a,indexes:r,types:o}}function Eg(e){return ss(e).values}function Cg(e){const{split:t,types:n}=ss(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Tg?s+=Go(o[i]):a===Sg?s+=bt.transform(o[i]):s+=o[i]}return s}}const WT=e=>typeof e=="number"?0:e;function HT(e){const t=Eg(e);return Cg(e)(t.map(WT))}const Ln={test:_T,parse:Eg,createTransformer:Cg,getAnimatableNone:HT},zT=new Set(["brightness","contrast","saturate","opacity"]);function UT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xc)||[];if(!r)return e;const o=n.replace(r,"");let s=zT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const GT=/\b([a-z-]*)\(.*?\)/gu,Wl={...Ln,getAnimatableNone:e=>{const t=e.match(GT);return t?t.map(UT).join(" "):e}},YT={...Xm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Wl,WebkitFilter:Wl},iu=e=>YT[e];function Pg(e,t){let n=iu(e);return n!==Wl&&(n=Ln),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const KT=new Set(["auto","none","0"]);function qT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!KT.has(s)&&ss(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Pg(n,o)}class Rg extends ou{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),qc(c))){const u=gg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!OT.has(r)||t.length!==2)return;const[o,s]=t,i=ld(o),a=ld(s);if(i!==a)if(sd(i)&&sd(a))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++)PT(t[o])&&r.push(o);r.length&&qT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Kr[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.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Kr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Ig(e){let t;return()=>(t===void 0&&(t=e()),t)}const ud=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ln.test(e)||e==="0")&&!e.startsWith("url("));function XT(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 QT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=ud(o,t),a=ud(s,t);return mo(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:XT(e)||n==="spring"&&r}class Ag{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&jT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!QT(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(Ji(t,this.options,n)),a==null||a(),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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Og(e,t){return t?e*(1e3/t):0}const ZT=5;function Dg(e,t,n){const r=Math.max(t-ZT,0);return Og(n-e(r),t-r)}const Na=.001,JT=.01,fd=10,eS=.05,tS=1;function nS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;mo(e<=an(fd),"Spring duration must be 10 seconds or less");let i=1-t;i=Nn(eS,tS,i),e=Nn(JT,fd,ln(e)),i<1?(o=c=>{const u=c*i,f=u*e,h=u-n,d=Hl(c,i),p=Math.exp(-f);return Na-h/d*p},s=c=>{const f=c*i*e,h=f*n+n,d=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=Hl(Math.pow(c,2),i);return(-o(c)+Na>0?-1:1)*((h-d)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Na+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=oS(o,s,a);if(e=an(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const rS=12;function oS(e,t,n){let r=n;for(let o=1;o<rS;o++)r=r-e(r)/t(r);return r}function Hl(e,t){return e*Math.sqrt(1-t*t)}const sS=["duration","bounce"],iS=["stiffness","damping","mass"];function dd(e,t){return t.some(n=>e[n]!==void 0)}function aS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!dd(e,iS)&&dd(e,sS)){const n=nS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function au({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:h}=aS({...r,velocity:-ln(r.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=s-o,g=ln(Math.sqrt(a/c)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let b;if(p<1){const v=Hl(g,p);b=S=>{const T=Math.exp(-p*g*S);return s-T*((d+p*g*m)/v*Math.sin(v*S)+m*Math.cos(v*S))}}else if(p===1)b=v=>s-Math.exp(-g*v)*(m+(d+g*m)*v);else{const v=g*Math.sqrt(p*p-1);b=S=>{const T=Math.exp(-p*g*S),E=Math.min(v*S,300);return s-T*((d+p*g*m)*Math.sinh(E)+v*m*Math.cosh(E))/v}}return{calculatedDuration:h&&u||null,next:v=>{const S=b(v);if(h)i.done=v>=u;else{let T=d;v!==0&&(p<1?T=Dg(b,v,S):T=0);const E=Math.abs(T)<=n,R=Math.abs(s-S)<=t;i.done=E&&R}return i.value=i.done?s:S,i}}}function hd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},d=I=>a!==void 0&&I<a||l!==void 0&&I>l,p=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let m=n*t;const g=f+m,y=i===void 0?g:i(g);y!==g&&(m=y-f);const b=I=>-m*Math.exp(-I/r),v=I=>y+b(I),S=I=>{const M=b(I),A=v(I);h.done=Math.abs(M)<=c,h.value=h.done?y:A};let T,E;const R=I=>{d(h.value)&&(T=I,E=au({keyframes:[h.value,p(h.value)],velocity:Dg(v,I,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return R(0),{calculatedDuration:null,next:I=>{let M=!1;return!E&&T===void 0&&(M=!0,S(I),R(I)),T!==void 0&&I>=T?E.next(I-T):(!M&&S(I),h)}}}const Mg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lS=1e-7,cS=12;function uS(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Mg(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>lS&&++a<cS);return i}function Es(e,t,n,r){if(e===t&&n===r)return yt;const o=s=>uS(s,0,1,e,n);return s=>s===0||s===1?s:Mg(o(s),t,r)}const fS=Es(.42,0,1,1),dS=Es(0,0,.58,1),kg=Es(.42,0,.58,1),Fg=e=>Array.isArray(e)&&typeof e[0]!="number",jg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ng=e=>t=>1-e(1-t),lu=e=>1-Math.sin(Math.acos(e)),Lg=Ng(lu),hS=jg(lu),_g=Es(.33,1.53,.69,.99),cu=Ng(_g),pS=jg(cu),mS=e=>(e*=2)<1?.5*cu(e):.5*(2-Math.pow(2,-10*(e-1))),pd={linear:yt,easeIn:fS,easeInOut:kg,easeOut:dS,circIn:lu,circInOut:hS,circOut:Lg,backIn:cu,backInOut:pS,backOut:_g,anticipate:mS},zl=e=>{if(Array.isArray(e)){Lt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Es(t,n,r,o)}else if(typeof e=="string")return Lt(pd[e]!==void 0,`Invalid easing type '${e}'`),pd[e];return e},qr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ve=(e,t,n)=>e+(t-e)*n;function La(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 gS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=La(l,a,e+1/3),s=La(l,a,e),i=La(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function yi(e,t){return n=>n>0?t:e}const _a=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},yS=[Bl,lr,Mr],vS=e=>yS.find(t=>t.test(e));function md(e){const t=vS(e);if(mo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Mr&&(n=gS(n)),n}const gd=(e,t)=>{const n=md(e),r=md(t);if(!n||!r)return yi(e,t);const o={...n};return s=>(o.red=_a(n.red,r.red,s),o.green=_a(n.green,r.green,s),o.blue=_a(n.blue,r.blue,s),o.alpha=Ve(n.alpha,r.alpha,s),lr.transform(o))},Ul=new Set(["none","hidden"]);function bS(e,t){return Ul.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function xS(e,t){return n=>Ve(e,t,n)}function uu(e){return typeof e=="number"?xS:typeof e=="string"?qc(e)?yi:bt.test(e)?gd:SS:Array.isArray(e)?Vg:typeof e=="object"?bt.test(e)?gd:wS:yi}function Vg(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>uu(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function wS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=uu(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function TS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const SS=(e,t)=>{const n=Ln.createTransformer(t),r=ss(e),o=ss(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?Ul.has(e)&&!o.values.length||Ul.has(t)&&!r.values.length?bS(e,t):xn(Vg(TS(r,o),o.values),n):(mo(!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.`),yi(e,t))};function $g(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):uu(e)(e,t)}function ES(e,t,n){const r=[],o=n||$g,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||yt:t;a=xn(l,a)}r.push(a)}return r}function Bg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Lt(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=ES(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=qr(e[u],e[u+1],c);return i[u](f)};return n?c=>l(Nn(e[0],e[s-1],c)):l}function Wg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=qr(0,t,r);e.push(Ve(n,1,o))}}function Hg(e){const t=[0];return Wg(t,e.length-1),t}function CS(e,t){return e.map(n=>n*t)}function PS(e,t){return e.map(()=>t||kg).splice(0,e.length-1)}function vi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Fg(r)?r.map(zl):zl(r),s={done:!1,value:t[0]},i=CS(n&&n.length===t.length?n:Hg(t),e),a=Bg(i,t,{ease:Array.isArray(o)?o:PS(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Gl=2e4;function zg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Gl;)t+=n,r=e.next(t);return t>=Gl?1/0:t}const RS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Te.update(t,!0),stop:()=>un(t),now:()=>pt.isProcessing?pt.timestamp:kn.now()}},IS={decay:hd,inertia:hd,tween:vi,keyframes:vi,spring:au},AS=e=>e/100;class fu extends Ag{constructor({KeyframeResolver:t=ou,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=IS[n]||vi;let l,c;a!==vi&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Lt(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=xn(AS,$g(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=zg(u));const{calculatedDuration:f}=u,h=f+o,d=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:d}}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:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:g}=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-h*(this.speed>=0?1:-1),b=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let v=this.currentTime,S=s;if(d){const I=Math.min(this.currentTime,u)/f;let M=Math.floor(I),A=I%1;!A&&I>=1&&(A=1),A===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/f)):p==="mirror"&&(S=i)),v=Nn(0,1,A)*f}const T=b?{done:!1,value:l[0]}:S.next(v);a&&(T.value=a(T.value));let{done:E}=T;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return R&&o!==void 0&&(T.value=Ji(l,this.options,o)),g&&g(T.value),R&&this.finish(),T}get duration(){const{resolved:t}=this;return t?ln(t.calculatedDuration):0}get time(){return ln(this.currentTime)}set time(t){t=an(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=ln(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=RS,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),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 Ug=e=>Array.isArray(e)&&typeof e[0]=="number";function Gg(e){return!!(!e||typeof e=="string"&&e in du||Ug(e)||Array.isArray(e)&&e.every(Gg))}const $o=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,du={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$o([0,.65,.55,1]),circOut:$o([.55,0,1,.45]),backIn:$o([.31,.01,.66,-.59]),backOut:$o([.33,1.53,.69,.99])};function OS(e){return Yg(e)||du.easeOut}function Yg(e){if(e)return Ug(e)?$o(e):Array.isArray(e)?e.map(OS):du[e]}function DS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Yg(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const MS=Ig(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),bi=10,kS=2e4;function FS(e){return e.type==="spring"||!Gg(e.ease)}function jS(e,t){const n=new fu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<kS;)r=n.sample(s),o.push(r.value),s+=bi;return{times:void 0,keyframes:o,duration:s-bi,ease:"linear"}}class yd extends Ag{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Rg(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(FS(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=jS(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=DS(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=kn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(Ji(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ln(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ln(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=an(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}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return yt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return yt}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;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...h}=this.options,d=new fu({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=an(this.time);c.setWithVelocity(d.sample(p-bi).value,d.sample(p).value,bi)}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:s,damping:i,type:a}=t;return MS()&&r&&sg.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function NS(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Te.update(r,!0),()=>un(r)}const LS=Ig(()=>window.ScrollTimeline!==void 0);class hu{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(LS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),NS(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get 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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const pu=(e,t,n,r={},o,s,i)=>a=>{const l=ru(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-an(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};ST(l)||(f={...f,...TT(e,f)}),f.duration&&(f.duration=an(f.duration)),f.repeatDelay&&(f.repeatDelay=an(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(h=!0)),h&&!s&&t.get()!==void 0){const d=Ji(f.keyframes,l);if(d!==void 0)return Te.update(()=>{f.onUpdate(d),f.onComplete()}),new hu([])}return!s&&yd.supports(f)?new yd(f):new fu(f)};class mu{constructor(){this.subscriptions=[]}add(t){return Xi(this.subscriptions,t),()=>Ss(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 s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vd=new Set;function gu(e,t,n){e||vd.has(t)||(console.warn(t),vd.add(t))}const bd=30,_S=e=>!isNaN(parseFloat(e)),Yo={current:void 0};class Kg{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=kn.now();this.updatedAt!==s&&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=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=_S(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gu(!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 mu);const r=this.events[t].add(n);return t==="change"?()=>{r(),Te.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 Yo.current&&Yo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bd);return Og(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 Xr(e,t){return new Kg(e,t)}function VS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xr(n))}function $S(e,t){const n=Zi(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=Q1(s[i]);VS(e,i,a)}}function qg(e){return e.getProps()[Wm]}class BS extends Kg{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=ig(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Ss(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function WS(e){return!!(lt(e)&&e.add)}function Yl(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new BS("auto"),e.addValue("willChange",r)),WS(r))return r.add(t)}function HS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function yu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),d=l[f];if(d===void 0||u&&HS(u,f))continue;const p={delay:n,elapsed:0,...ru(i||{},f)};let m=!1;if(window.HandoffAppearAnimations){const y=qg(e);if(y){const b=window.HandoffAppearAnimations(y,f,h,Te);b!==null&&(p.elapsed=b,m=!0)}}h.start(pu(f,h,d,e.shouldReduceMotion&&Hn.has(f)?{type:!1}:p,e,m,Yl(e,f)));const g=h.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Te.update(()=>{a&&$S(e,a)})}),c}function Kl(e,t,n={}){var r;const o=Zi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(yu(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=s;return zS(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function zS(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(US).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Kl(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function US(e,t){return e.sortNodePosition(t)}function GS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Kl(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Kl(e,t,n);else{const o=typeof t=="function"?Zi(e,t,n.custom):t;r=Promise.all(yu(e,o,n))}return r.then(()=>{Te.postRender(()=>{e.notify("AnimationComplete",t)})})}const YS=[...Gc].reverse(),KS=Gc.length;function qS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>GS(e,n,r)))}function XS(e){let t=qS(e),n=xd(),r=!0;const o=l=>(c,u)=>{var f;const h=Zi(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let d={},p=1/0;for(let g=0;g<KS;g++){const y=YS[g],b=n[y],v=c[y]!==void 0?c[y]:u[y],S=ns(v),T=y===l?b.isActive:null;T===!1&&(p=g);let E=v===u[y]&&v!==c[y]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...d},!b.isActive&&T===null||!v&&!b.prevProp||rs(v)||typeof v=="boolean")continue;let I=QS(b.prevProp,v)||y===l&&b.isActive&&!E&&S||g>p&&S,M=!1;const A=Array.isArray(v)?v:[v];let N=A.reduce(o(y),{});T===!1&&(N={});const{prevResolvedValues:k={}}=b,j={...k,...N},P=O=>{I=!0,h.has(O)&&(M=!0,h.delete(O)),b.needsAnimating[O]=!0;const F=e.getValue(O);F&&(F.liveStyle=!1)};for(const O in j){const F=N[O],_=k[O];if(d.hasOwnProperty(O))continue;let W=!1;Ll(F)&&Ll(_)?W=!hg(F,_):W=F!==_,W?F!=null?P(O):h.add(O):F!==void 0&&h.has(O)?P(O):b.protectedKeys[O]=!0}b.prevProp=v,b.prevResolvedValues=N,b.isActive&&(d={...d,...N}),r&&e.blockInitialAnimation&&(I=!1),I&&(!E||M)&&f.push(...A.map(O=>({animation:O,options:{type:y}})))}if(h.size){const g={};h.forEach(y=>{const b=e.getBaseTarget(y),v=e.getValue(y);v&&(v.liveStyle=!0),g[y]=b??null}),f.push({animation:g})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var d;return(d=h.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=xd(),r=!0}}}function QS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hg(t,e):!1}function Zn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xd(){return{animate:Zn(!0),whileInView:Zn(),whileHover:Zn(),whileTap:Zn(),whileDrag:Zn(),whileFocus:Zn(),exit:Zn()}}class ZS extends zn{constructor(t){super(t),t.animationState||(t.animationState=XS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();rs(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 JS=0;class eE extends zn{constructor(){super(...arguments),this.id=JS++}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}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const tE={animation:{Feature:ZS},exit:{Feature:eE}},wd=(e,t)=>Math.abs(e-t);function nE(e,t){const n=wd(e.x,t.x),r=wd(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xg{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!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 f=$a(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=nE(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=pt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:y}=this.handlers;h||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Va(h,this.transformPagePoint),Te.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=$a(f.type==="pointercancel"?this.lastMoveEventInfo:Va(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,g),p&&p(f,g)},!lg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=Qi(t),a=Va(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=pt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,$a(a,this.history)),this.removeListeners=xn(bn(this.contextWindow,"pointermove",this.handlePointerMove),bn(this.contextWindow,"pointerup",this.handlePointerUp),bn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),un(this.updatePoint)}}function Va(e,t){return t?{point:t(e.point)}:e}function Td(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $a({point:e},t){return{point:e,delta:Td(e,Qg(t)),offset:Td(e,rE(t)),velocity:oE(t,.1)}}function rE(e){return e[0]}function Qg(e){return e[e.length-1]}function oE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Qg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>an(t)));)n--;if(!r)return{x:0,y:0};const s=ln(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const Zg=1e-4,sE=1-Zg,iE=1+Zg,Jg=.01,aE=0-Jg,lE=0+Jg;function _t(e){return e.max-e.min}function cE(e,t,n){return Math.abs(e-t)<=n}function Sd(e,t,n,r=.5){e.origin=r,e.originPoint=Ve(t.min,t.max,e.origin),e.scale=_t(n)/_t(t),e.translate=Ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=sE&&e.scale<=iE||isNaN(e.scale))&&(e.scale=1),(e.translate>=aE&&e.translate<=lE||isNaN(e.translate))&&(e.translate=0)}function Ko(e,t,n,r){Sd(e.x,t.x,n.x,r?r.originX:void 0),Sd(e.y,t.y,n.y,r?r.originY:void 0)}function Ed(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function uE(e,t,n){Ed(e.x,t.x,n.x),Ed(e.y,t.y,n.y)}function Cd(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function qo(e,t,n){Cd(e.x,t.x,n.x),Cd(e.y,t.y,n.y)}function fE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ve(n,e,r.max):Math.min(e,n)),e}function Pd(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 dE(e,{top:t,left:n,bottom:r,right:o}){return{x:Pd(e.x,n,o),y:Pd(e.y,t,r)}}function Rd(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 hE(e,t){return{x:Rd(e.x,t.x),y:Rd(e.y,t.y)}}function pE(e,t){let n=.5;const r=_t(e),o=_t(t);return o>r?n=qr(t.min,t.max-r,e.min):r>o&&(n=qr(e.min,e.max-o,t.min)),Nn(0,1,n)}function mE(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 ql=.35;function gE(e=ql){return e===!1?e=0:e===!0&&(e=ql),{x:Id(e,"left","right"),y:Id(e,"top","bottom")}}function Id(e,t,n){return{min:Ad(e,t),max:Ad(e,n)}}function Ad(e,t){return typeof e=="number"?e:e[t]||0}const Od=()=>({translate:0,scale:1,origin:0,originPoint:0}),kr=()=>({x:Od(),y:Od()}),Dd=()=>({min:0,max:0}),Je=()=>({x:Dd(),y:Dd()});function Bt(e){return[e("x"),e("y")]}function ey({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function yE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function vE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ba(e){return e===void 0||e===1}function Xl({scale:e,scaleX:t,scaleY:n}){return!Ba(e)||!Ba(t)||!Ba(n)}function er(e){return Xl(e)||ty(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ty(e){return Md(e.x)||Md(e.y)}function Md(e){return e&&e!=="0%"}function xi(e,t,n){const r=e-n,o=t*r;return n+o}function kd(e,t,n,r,o){return o!==void 0&&(e=xi(e,o,r)),xi(e,n,r)+t}function Ql(e,t=0,n=1,r,o){e.min=kd(e.min,t,n,r,o),e.max=kd(e.max,t,n,r,o)}function ny(e,{x:t,y:n}){Ql(e.x,t.translate,t.scale,t.originPoint),Ql(e.y,n.translate,n.scale,n.originPoint)}const Fd=.999999999999,jd=1.0000000000001;function bE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Fr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,ny(e,i)),r&&er(s.latestValues)&&Fr(e,s.latestValues))}t.x<jd&&t.x>Fd&&(t.x=1),t.y<jd&&t.y>Fd&&(t.y=1)}function An(e,t){e.min=e.min+t,e.max=e.max+t}function Nd(e,t,n,r,o=.5){const s=Ve(e.min,e.max,o);Ql(e,t,n,s,r)}function Fr(e,t){Nd(e.x,t.x,t.scaleX,t.scale,t.originX),Nd(e.y,t.y,t.scaleY,t.scale,t.originY)}function ry(e,t){return ey(vE(e.getBoundingClientRect(),t))}function xE(e,t,n){const r=ry(e,n),{scroll:o}=t;return o&&(An(r.x,o.offset.x),An(r.y,o.offset.y)),r}const oy=({current:e})=>e?e.ownerDocument.defaultView:null,wE=new WeakMap;class TE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Je(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Qi(u,"page").point)},s=(u,f)=>{var h;const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ug(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bt(y=>{let b=this.getAxisMotionValue(y).get()||0;if(sn.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[y];S&&(b=_t(S)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&Te.postRender(()=>m(u,f)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=Yl(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:g}=f;if(d&&this.currentDirection===null){this.currentDirection=SE(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Bt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Xg(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:oy(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Te.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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Bs(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=fE(i,this.constraints[t],this.elastic[t])),s.set(i)}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,s=this.constraints;n&&Dr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=dE(o.layoutBox,n):this.constraints=!1,this.elastic=gE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Bt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=mE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Dr(t))return!1;const r=t.current;Lt(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 s=xE(r,o.root,this.visualElement.getTransformPagePoint());let i=hE(o.layout.layoutBox,s);if(n){const a=n(yE(i));this.hasMutatedConstraints=!!a,a&&(i=ey(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Bt(u=>{if(!Bs(u,n,this.currentDirection))return;let f=l&&l[u]||{};i&&(f={min:0,max:0});const h=o?200:1e6,d=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(pu(t,r,0,n,this.visualElement,!1,Yl(this.visualElement,t)))}stopAnimation(){Bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Bt(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){Bt(n=>{const{drag:r}=this.getProps();if(!Bs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ve(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Dr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=pE({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Bt(i=>{if(!Bs(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ve(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;wE.set(this.visualElement,this);const t=this.visualElement.current,n=bn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Dr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Te.read(r);const i=yn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Bt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=ql,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Bs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function SE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class EE extends zn{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new TE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ld=e=>(t,n)=>{e&&Te.postRender(()=>e(t,n))};class CE extends zn{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Xg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:oy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ld(t),onStart:Ld(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Te.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=bn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function PE(){const e=x.useContext(Gi);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=x.useId();return x.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const ri={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _d(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const No={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=_d(e,t.target.x),r=_d(e,t.target.y);return`${n}% ${r}%`}},RE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ln.parse(e);if(o.length>5)return r;const s=Ln.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ve(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class IE extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;R1(AE),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ri.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Te.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Uc.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 sy(e){const[t,n]=PE(),r=x.useContext(os);return w.jsx(IE,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(zm),isPresent:t,safeToRemove:n})}const AE={borderRadius:{...No,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:No,borderTopRightRadius:No,borderBottomLeftRadius:No,borderBottomRightRadius:No,boxShadow:RE},iy=["TopLeft","TopRight","BottomLeft","BottomRight"],OE=iy.length,Vd=e=>typeof e=="string"?parseFloat(e):e,$d=e=>typeof e=="number"||ae.test(e);function DE(e,t,n,r,o,s){o?(e.opacity=Ve(0,n.opacity!==void 0?n.opacity:1,ME(r)),e.opacityExit=Ve(t.opacity!==void 0?t.opacity:1,0,kE(r))):s&&(e.opacity=Ve(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<OE;i++){const a=`border${iy[i]}Radius`;let l=Bd(t,a),c=Bd(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||$d(l)===$d(c)?(e[a]=Math.max(Ve(Vd(l),Vd(c),r),0),(sn.test(c)||sn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,r))}function Bd(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ME=ay(0,.5,Lg),kE=ay(.5,.95,yt);function ay(e,t,n){return r=>r<e?0:r>t?1:n(qr(e,t,r))}function Wd(e,t){e.min=t.min,e.max=t.max}function $t(e,t){Wd(e.x,t.x),Wd(e.y,t.y)}function Hd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zd(e,t,n,r,o){return e-=t,e=xi(e,1/n,r),o!==void 0&&(e=xi(e,1/o,r)),e}function FE(e,t=0,n=1,r=.5,o,s=e,i=e){if(sn.test(t)&&(t=parseFloat(t),t=Ve(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ve(s.min,s.max,r);e===s&&(a-=t),e.min=zd(e.min,t,n,a,o),e.max=zd(e.max,t,n,a,o)}function Ud(e,t,[n,r,o],s,i){FE(e,t[n],t[r],t[o],t.scale,s,i)}const jE=["x","scaleX","originX"],NE=["y","scaleY","originY"];function Gd(e,t,n,r){Ud(e.x,t,jE,n?n.x:void 0,r?r.x:void 0),Ud(e.y,t,NE,n?n.y:void 0,r?r.y:void 0)}function Yd(e){return e.translate===0&&e.scale===1}function ly(e){return Yd(e.x)&&Yd(e.y)}function LE(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function cy(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Kd(e){return _t(e.x)/_t(e.y)}function qd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class _E{constructor(){this.members=[]}add(t){Xi(this.members,t),t.scheduleRender()}remove(t){if(Ss(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 s=this.members[o];if(s.isPresent!==!1){r=s;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 VE(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),d&&(r+=`skewX(${d}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $E=(e,t)=>e.depth-t.depth;class BE{constructor(){this.children=[],this.isDirty=!1}add(t){Xi(this.children,t),this.isDirty=!0}remove(t){Ss(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($E),this.isDirty=!1,this.children.forEach(t)}}function WE(e,t){const n=kn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(un(r),e(s-t))};return Te.read(r,!0),()=>un(r)}function uy(e){return e instanceof SVGElement&&e.tagName!=="svg"}function vu(e,t,n){const r=lt(e)?e:Xr(e);return r.start(pu("",r,t,n)),r.animation}const tr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Wa=["","X","Y","Z"],HE={visibility:"hidden"},Xd=1e3;let zE=0;function Ha(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?qg(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?fy(e.parent):!1:!1}function dy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=zE++,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,window.MotionDebug&&(tr.totalNodes=tr.resolvedTargetDeltas=tr.recalculatedProjection=0),this.nodes.forEach(YE),this.nodes.forEach(ZE),this.nodes.forEach(JE),this.nodes.forEach(KE),window.MotionDebug&&window.MotionDebug.record(tr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new BE)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new mu),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=uy(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=WE(h,250),ri.hasAnimatedSinceResize&&(ri.hasAnimatedSinceResize=!1,this.nodes.forEach(Zd))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||oC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!cy(this.targetLayout,p)||d,v=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const S={...ru(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||Zd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.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(eC),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&fy(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qd);return}this.isUpdating||this.nodes.forEach(XE),this.isUpdating=!1,this.nodes.forEach(QE),this.nodes.forEach(UE),this.nodes.forEach(GE),this.clearAllSnapshots();const a=kn.now();pt.delta=Nn(0,1e3/60,a-pt.timestamp),pt.timestamp=a,pt.isProcessing=!0,Ma.update.process(pt),Ma.preRender.process(pt),Ma.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Uc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qE),this.sharedNodes.forEach(tC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Je(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ly(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||er(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),sC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return Je();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(An(a.x,l.offset.x),An(a.y,l.offset.y)),a}removeElementScroll(i){const a=Je();$t(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){$t(a,i);const{scroll:h}=this.root;h&&(An(a.x,-h.offset.x),An(a.y,-h.offset.y))}An(a.x,u.offset.x),An(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=Je();$t(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Fr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),er(u.latestValues)&&Fr(l,u.latestValues)}return er(this.latestValues)&&Fr(l,this.latestValues),l}removeTransform(i){const a=Je();$t(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!er(c.latestValues))continue;Xl(c.latestValues)&&c.updateSnapshot();const u=Je(),f=c.measurePageBox();$t(u,f),Gd(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return er(this.latestValues)&&Gd(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;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(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=pt.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),qo(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Je(),this.targetWithTransforms=Je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),ny(this.target,this.targetDelta)):$t(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),qo(this.relativeTargetOrigin,this.target,d.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&tr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Xl(this.parent.latestValues)||ty(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 i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===pt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=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||f))return;$t(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;bE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Je());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Hd(this.prevProjectionDelta.x,this.projectionDelta.x),Hd(this.prevProjectionDelta.y,this.projectionDelta.y)),Ko(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!qd(this.projectionDelta.x,this.prevProjectionDelta.x)||!qd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&tr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=kr(),this.projectionDelta=kr(),this.projectionDeltaWithTransform=kr()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=kr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Je(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),y=!g||g.members.length<=1,b=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(rC));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const T=S/1e3;Jd(f.x,i.x,T),Jd(f.y,i.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qo(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nC(this.relativeTarget,this.relativeTargetOrigin,h,T),v&&LE(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Je()),$t(v,this.relativeTarget)),m&&(this.animationValues=u,DE(u,c,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){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=Te.update(()=>{ri.hasAnimatedSinceResize=!0,this.currentAnimation=vu(0,Xd,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&hy(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Je();const f=_t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const h=_t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}$t(a,l),Fr(a,u),Ko(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new _E),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ha("z",i,c,this.animationValues);for(let u=0;u<Wa.length;u++)Ha(`rotate${Wa[u]}`,i,c,this.animationValues),Ha(`skew${Wa[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return HE;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ti(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ti(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!er(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=VE(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in mi){if(h[m]===void 0)continue;const{correct:g,applyTo:y}=mi[m],b=c.transform==="none"?h[m]:g(h[m],f);if(y){const v=y.length;for(let S=0;S<v;S++)c[y[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?ti(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Qd),this.root.sharedNodes.clear()}}}function UE(e){e.updateLayout()}function GE(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:s}=e.options,i=n.source!==e.layout.source;s==="size"?Bt(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=_t(h);h.min=r[f].min,h.max=h.min+d}):hy(s,n.layoutBox,r)&&Bt(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],d=_t(r[f]);h.max=h.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});const a=kr();Ko(a,r,n.layoutBox);const l=kr();i?Ko(l,e.applyTransform(o,!0),n.measuredBox):Ko(l,r,n.layoutBox);const c=!ly(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=Je();qo(p,n.layoutBox,h.layoutBox);const m=Je();qo(m,r,d.layoutBox),cy(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function YE(e){window.MotionDebug&&tr.totalNodes++,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 KE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qE(e){e.clearSnapshot()}function Qd(e){e.clearMeasurements()}function XE(e){e.isLayoutDirty=!1}function QE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ZE(e){e.resolveTargetDelta()}function JE(e){e.calcProjection()}function eC(e){e.resetSkewAndRotation()}function tC(e){e.removeLeadSnapshot()}function Jd(e,t,n){e.translate=Ve(t.translate,0,n),e.scale=Ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function eh(e,t,n,r){e.min=Ve(t.min,n.min,r),e.max=Ve(t.max,n.max,r)}function nC(e,t,n,r){eh(e.x,t.x,n.x,r),eh(e.y,t.y,n.y,r)}function rC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oC={duration:.45,ease:[.4,0,.1,1]},th=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nh=th("applewebkit/")&&!th("chrome/")?Math.round:yt;function rh(e){e.min=nh(e.min),e.max=nh(e.max)}function sC(e){rh(e.x),rh(e.y)}function hy(e,t,n){return e==="position"||e==="preserve-aspect"&&!cE(Kd(t),Kd(n),.2)}const iC=dy({attachResizeListener:(e,t)=>yn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),za={current:void 0},py=dy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!za.current){const e=new iC({});e.mount(window),e.setOptions({layoutScroll:!0}),za.current=e}return za.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),aC={pan:{Feature:CE},drag:{Feature:EE,ProjectionNode:py,MeasureLayout:sy}},Zl={current:null},my={current:!1};function lC(){if(my.current=!0,!!zc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zl.current=e.matches;e.addListener(t),t()}else Zl.current=!1}function cC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(lt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&gu(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(lt(s))e.addValue(r,Xr(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Xr(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const is=new WeakMap,uC=[...vg,bt,Ln],fC=e=>uC.find(yg(e)),oh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],dC=Yc.length;class hC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,d,p,m)=>new this.KeyframeResolver(h,d,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ou,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Te.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;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=a,this.blockInitialAnimation=!!s,this.isControllingVariants=qi(n),this.isVariantNode=Gm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];l[h]!==void 0&&lt(d)&&d.set(l[h],!1)}}mount(t){this.current=t,is.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)),my.current||lC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zl.current,process.env.NODE_ENV!=="production"&&gu(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(){is.delete(this.current),this.projection&&this.projection.unmount(),un(this.notifyUpdate),un(this.render),this.valueSubscriptions.forEach(t=>t()),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){const r=Hn.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),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 Yr){const n=Yr[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 s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}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<oh.length;r++){const o=oh[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=cC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<dC;r++){const o=Yc[r],s=this.props[o];(ns(s)||s===!1)&&(n[o]=s)}return n}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=Xr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(mg(o)||pg(o))?o=parseFloat(o):!fC(o)&&Ln.test(n)&&(o=Pg(t,n)),this.setBaseTarget(t,lt(o)?o.get():o)),lt(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 i=nu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!lt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class gy extends hC{constructor(){super(...arguments),this.KeyframeResolver=Rg}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]}}function pC(e){return window.getComputedStyle(e)}class yy extends gy{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=tg}readValueFromInstance(t,n){if(Hn.has(n)){const r=iu(n);return r&&r.default||0}else{const r=pC(t),o=(qm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ry(t,n)}build(t,n,r){Qc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tu(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;lt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class vy extends gy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Hn.has(n)){const r=iu(n);return r&&r.default||0}return n=ng.has(n)?n:Ki(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return og(t,n,r)}build(t,n,r){Jc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){rg(t,n,r,o)}mount(t){this.isSVGTag=eu(t.tagName),super.mount(t)}}const mC=(e,t)=>Kc(e)?new vy(t):new yy(t,{allowProjection:e!==x.Fragment}),gC={layout:{ProjectionNode:py,MeasureLayout:sy}},yC={...tE,...yT,...aC,...gC},ft=C1((e,t)=>oT(e,t,yC,mC));function by(){const e=x.useRef(!1);return Yi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xy(){const e=by(),[t,n]=x.useState(0),r=x.useCallback(()=>{e.current&&n(t+1)},[t]);return[x.useCallback(()=>Te.postRender(r),[r]),t]}class vC extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bC({children:e,isPresent:t}){const n=x.useId(),r=x.useRef(null),o=x.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=x.useContext(Gr);return x.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
5
5
  [data-motion-pop-id="${n}"] {
6
6
  position: absolute !important;
7
7
  width: ${i}px !important;
@@ -9,7 +9,7 @@
9
9
  top: ${l}px !important;
10
10
  left: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(u)}},[t]),x.jsx(vC,{isPresent:t,childRef:r,sizeRef:o,children:P.cloneElement(e,{ref:r})})}const Ua=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=cn(xC),l=w.useId(),c=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return w.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),P.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(bC,{isPresent:n,children:e})),x.jsx(Ui.Provider,{value:c,children:e})};function xC(){return new Map}function wy(e){return w.useEffect(()=>()=>e(),[])}const nr=e=>e.key||"";function wC(e,t){e.forEach(n=>{const r=nr(n);t.set(r,n)})}function TC(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const yo=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{Lt(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(os).forceRender||xy()[0],l=by(),c=TC(e);let u=c;const f=w.useRef(new Map).current,h=w.useRef(u),d=w.useRef(new Map).current,p=w.useRef(!0);if(Gi(()=>{p.current=!1,wC(c,d),h.current=u}),wy(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(b=>x.jsx(Ua,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:b},nr(b)))});u=[...u];const m=h.current.map(nr),g=c.map(nr),v=m.length;for(let b=0;b<v;b++){const y=m[b];g.indexOf(y)===-1&&!f.has(y)&&f.set(y,void 0)}return i==="wait"&&f.size&&(u=[]),f.forEach((b,y)=>{if(g.indexOf(y)!==-1)return;const S=d.get(y);if(!S)return;const T=m.indexOf(y);let E=b;if(!E){const R=()=>{f.delete(y);const A=Array.from(d.keys()).filter(O=>!g.includes(O));if(A.forEach(O=>d.delete(O)),h.current=c.filter(O=>{const I=nr(O);return I===y||A.includes(I)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Ua,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:s,mode:i,children:S},nr(S)),f.set(y,E)}u.splice(T,0,E)}),u=u.map(b=>{const y=b.key;return f.has(y)?b:x.jsx(Ua,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:b},nr(b))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.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.`),x.jsx(x.Fragment,{children:f.size?u:u.map(b=>w.cloneElement(b))})};function SC({children:e,isValidProp:t,...n}){t&&Jm(t),n={...w.useContext(Gr),...n},n.isStatic=cn(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(Gr.Provider,{value:r,children:e})}const EC=w.createContext(null),CC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function sh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(CC);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 Ty=e=>e===!0,PC=e=>Ty(e===!0)||e==="id",RC=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(os),o=w.useContext(EC),[s,i]=xy(),a=w.useRef(null),l=r.id||o;a.current===null&&(PC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Ty(n)&&r.group||sh()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(os.Provider,{value:c,children:e})},Sy=w.createContext(null);function IC(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Ve(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?Z1(e,o,o+s):e}function AC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=cn(()=>ft(t)),l=[],c=w.useRef(!1);Lt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,h)=>{const d=l.findIndex(p=>f===p.value);d!==-1?l[d].layout=h[n]:l.push({value:f,layout:h[n]}),l.sort(MC)},updateOrder:(f,h,d)=>{if(c.current)return;const p=IC(l,f,h,d);l!==p&&(c.current=!0,r(p.map(DC).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(Sy.Provider,{value:u,children:e})})}const OC=w.forwardRef(AC);function DC(e){return e.value}function MC(e,t){return e.layout.min-t.layout.min}function pr(e){const t=cn(()=>Xr(e)),{isStatic:n}=w.useContext(Gr);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}const kC=e=>e&&typeof e=="object"&&e.mix,FC=e=>kC(e)?e.mix:void 0;function jC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Bg(o,s,{mixer:FC(s[0]),...i});return t?a(r):a}function Ey(e,t){const n=pr(t()),r=()=>n.set(t());return r(),Gi(()=>{const o=()=>Te.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),un(r)}}),n}function NC(e){Yo.current=[],e();const t=Ey(Yo.current,e);return Yo.current=void 0,t}function LC(e,t,n,r){if(typeof e=="function")return NC(e);const o=typeof t=="function"?t:jC(t,n,r);return Array.isArray(e)?ih(e,o):ih([e],([s])=>o(s))}function ih(e,t){const n=cn(()=>[]);return Ey(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ah(e,t=0){return lt(e)?e:pr(t)}function _C({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=cn(()=>ft(r)),c=w.useContext(Sy),u={x:ah(t.x),y:ah(t.y)},f=LC([u.x,u.y],([m,g])=>m||g?1:"unset");Lt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:d,updateOrder:p}=c;return x.jsx(l,{drag:h,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:s,onDrag:(m,g)=>{const{velocity:v}=g;v[h]&&p(n,u[h].get(),v[h]),o&&o(m,g)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:e})}const VC=w.forwardRef(_C),Ji={Group:OC,Item:VC};function Cy(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Lt(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function $C(e){return typeof e=="object"&&!Array.isArray(e)}function BC(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=uy(e)?new vy(t):new yy(t);n.mount(e),is.set(e,n)}function WC(e,t=100){const n=au({keyframes:[0,t],...e}),r=Math.min(zg(n),Gl);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:ln(r)}}function lh(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}const HC=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function zC(e,t){return Fg(e)?e[HC(0,e.length,t)]:e}function UC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ss(e,o),r--)}}function GC(e,t,n,r,o,s){UC(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ve(o,s,r[i]),easing:zC(n,i)})}function YC(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const KC="easeInOut";function qC(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,s=new Map,i=new Map,a={},l=new Map;let c=0,u=0,f=0;for(let h=0;h<e.length;h++){const d=e[h];if(typeof d=="string"){l.set(d,u);continue}else if(!Array.isArray(d)){l.set(d.name,lh(u,d.at,c,l));continue}let[p,m,g={}]=d;g.at!==void 0&&(u=lh(u,g.at,c,l));let v=0;const b=(y,S,T,E=0,R=0)=>{const A=XC(y),{delay:O=0,times:I=Hg(A),type:F="keyframes",...k}=S;let{ease:L=t.ease||"easeOut",duration:C}=S;const M=typeof O=="function"?O(E,R):O,j=A.length;if(j<=2&&F==="spring"){let D=100;if(j===2&&JC(A)){const J=A[1]-A[0];D=Math.abs(J)}const $={...k};C!==void 0&&($.duration=an(C));const q=WC($,D);L=q.ease,C=q.duration}C??(C=o);const _=u+M,H=_+C;I.length===1&&I[0]===0&&(I[1]=1);const U=I.length-A.length;U>0&&Wg(I,U),A.length===1&&A.unshift(null),GC(T,A,L,I,_,H),v=Math.max(M+C,v),f=Math.max(H,f)};if(lt(p)){const y=ch(p,i);b(m,g,uh("default",y))}else{const y=Cy(p,r,a),S=y.length;for(let T=0;T<S;T++){m=m,g=g;const E=y[T],R=ch(E,i);for(const A in m)b(m[A],QC(g,A),uh(A,R),T,S)}}c=u,u+=v}return i.forEach((h,d)=>{for(const p in h){const m=h[p];m.sort(YC);const g=[],v=[],b=[];for(let S=0;S<m.length;S++){const{at:T,value:E,easing:R}=m[S];g.push(E),v.push(qr(0,f,T)),b.push(R||"easeOut")}v[0]!==0&&(v.unshift(0),g.unshift(g[0]),b.unshift(KC)),v[v.length-1]!==1&&(v.push(1),g.push(null)),s.has(d)||s.set(d,{keyframes:{},transition:{}});const y=s.get(d);y.keyframes[p]=g,y.transition[p]={...t,duration:f,ease:b,times:v,...n}}}),s}function ch(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function uh(e,t){return t[e]||(t[e]=[]),t[e]}function XC(e){return Array.isArray(e)?e:[e]}function QC(e,t){return e[t]?{...e,...e[t]}:{...e}}const ZC=e=>typeof e=="number",JC=e=>e.every(ZC);function Py(e,t,n,r){const o=Cy(e,r),s=o.length;Lt(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];is.has(l)||BC(l);const c=is.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...yu(c,{...t,transition:u},{}))}return new hu(i)}const eP=e=>Array.isArray(e)&&Array.isArray(e[0]);function tP(e,t,n){const r=[];return qC(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;lt(a)?l=vu(a,s.default,i.default):l=Py(a,s,i),r.push(l)}),new hu(r)}const nP=e=>{function t(n,r,o){let s;return eP(n)?s=tP(n,r,e):$C(r)?s=Py(n,r,o,e):s=vu(n,r,o),e&&e.animations.push(s),s}return t};function rP(){const e=cn(()=>({current:null,animations:[]})),t=cn(()=>nP(e));return wy(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class oP{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 sP=()=>new oP;function iP(){return cn(sP)}function aP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function lP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:aP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=zl(r)(l/c)*c}return t+l}}/**
12
+ `),()=>{document.head.removeChild(u)}},[t]),w.jsx(vC,{isPresent:t,childRef:r,sizeRef:o,children:C.cloneElement(e,{ref:r})})}const Ua=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=cn(xC),l=x.useId(),c=x.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return x.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),C.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=w.jsx(bC,{isPresent:n,children:e})),w.jsx(Gi.Provider,{value:c,children:e})};function xC(){return new Map}function wy(e){return x.useEffect(()=>()=>e(),[])}const nr=e=>e.key||"";function wC(e,t){e.forEach(n=>{const r=nr(n);t.set(r,n)})}function TC(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const yo=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{Lt(!o,"Replace exitBeforeEnter with mode='wait'");const a=x.useContext(os).forceRender||xy()[0],l=by(),c=TC(e);let u=c;const f=x.useRef(new Map).current,h=x.useRef(u),d=x.useRef(new Map).current,p=x.useRef(!0);if(Yi(()=>{p.current=!1,wC(c,d),h.current=u}),wy(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return w.jsx(w.Fragment,{children:u.map(b=>w.jsx(Ua,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:b},nr(b)))});u=[...u];const m=h.current.map(nr),g=c.map(nr),y=m.length;for(let b=0;b<y;b++){const v=m[b];g.indexOf(v)===-1&&!f.has(v)&&f.set(v,void 0)}return i==="wait"&&f.size&&(u=[]),f.forEach((b,v)=>{if(g.indexOf(v)!==-1)return;const S=d.get(v);if(!S)return;const T=m.indexOf(v);let E=b;if(!E){const R=()=>{f.delete(v);const I=Array.from(d.keys()).filter(M=>!g.includes(M));if(I.forEach(M=>d.delete(M)),h.current=c.filter(M=>{const A=nr(M);return A===v||I.includes(A)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=w.jsx(Ua,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:s,mode:i,children:S},nr(S)),f.set(v,E)}u.splice(T,0,E)}),u=u.map(b=>{const v=b.key;return f.has(v)?b:w.jsx(Ua,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:b},nr(b))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.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.`),w.jsx(w.Fragment,{children:f.size?u:u.map(b=>x.cloneElement(b))})};function SC({children:e,isValidProp:t,...n}){t&&Jm(t),n={...x.useContext(Gr),...n},n.isStatic=cn(()=>n.isStatic);const r=x.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(Gr.Provider,{value:r,children:e})}const EC=x.createContext(null),CC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function sh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(CC);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 Ty=e=>e===!0,PC=e=>Ty(e===!0)||e==="id",RC=({children:e,id:t,inherit:n=!0})=>{const r=x.useContext(os),o=x.useContext(EC),[s,i]=xy(),a=x.useRef(null),l=r.id||o;a.current===null&&(PC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Ty(n)&&r.group||sh()});const c=x.useMemo(()=>({...a.current,forceRender:s}),[i]);return w.jsx(os.Provider,{value:c,children:e})},Sy=x.createContext(null);function IC(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Ve(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?Z1(e,o,o+s):e}function AC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=cn(()=>ft(t)),l=[],c=x.useRef(!1);Lt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,h)=>{const d=l.findIndex(p=>f===p.value);d!==-1?l[d].layout=h[n]:l.push({value:f,layout:h[n]}),l.sort(MC)},updateOrder:(f,h,d)=>{if(c.current)return;const p=IC(l,f,h,d);l!==p&&(c.current=!0,r(p.map(DC).filter(m=>o.indexOf(m)!==-1)))}};return x.useEffect(()=>{c.current=!1}),w.jsx(a,{...s,ref:i,ignoreStrict:!0,children:w.jsx(Sy.Provider,{value:u,children:e})})}const OC=x.forwardRef(AC);function DC(e){return e.value}function MC(e,t){return e.layout.min-t.layout.min}function pr(e){const t=cn(()=>Xr(e)),{isStatic:n}=x.useContext(Gr);if(n){const[,r]=x.useState(e);x.useEffect(()=>t.on("change",r),[])}return t}const kC=e=>e&&typeof e=="object"&&e.mix,FC=e=>kC(e)?e.mix:void 0;function jC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Bg(o,s,{mixer:FC(s[0]),...i});return t?a(r):a}function Ey(e,t){const n=pr(t()),r=()=>n.set(t());return r(),Yi(()=>{const o=()=>Te.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),un(r)}}),n}function NC(e){Yo.current=[],e();const t=Ey(Yo.current,e);return Yo.current=void 0,t}function LC(e,t,n,r){if(typeof e=="function")return NC(e);const o=typeof t=="function"?t:jC(t,n,r);return Array.isArray(e)?ih(e,o):ih([e],([s])=>o(s))}function ih(e,t){const n=cn(()=>[]);return Ey(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ah(e,t=0){return lt(e)?e:pr(t)}function _C({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=cn(()=>ft(r)),c=x.useContext(Sy),u={x:ah(t.x),y:ah(t.y)},f=LC([u.x,u.y],([m,g])=>m||g?1:"unset");Lt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:d,updateOrder:p}=c;return w.jsx(l,{drag:h,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:s,onDrag:(m,g)=>{const{velocity:y}=g;y[h]&&p(n,u[h].get(),y[h]),o&&o(m,g)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:e})}const VC=x.forwardRef(_C),ea={Group:OC,Item:VC};function Cy(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Lt(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function $C(e){return typeof e=="object"&&!Array.isArray(e)}function BC(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=uy(e)?new vy(t):new yy(t);n.mount(e),is.set(e,n)}function WC(e,t=100){const n=au({keyframes:[0,t],...e}),r=Math.min(zg(n),Gl);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:ln(r)}}function lh(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}const HC=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function zC(e,t){return Fg(e)?e[HC(0,e.length,t)]:e}function UC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ss(e,o),r--)}}function GC(e,t,n,r,o,s){UC(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ve(o,s,r[i]),easing:zC(n,i)})}function YC(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const KC="easeInOut";function qC(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,s=new Map,i=new Map,a={},l=new Map;let c=0,u=0,f=0;for(let h=0;h<e.length;h++){const d=e[h];if(typeof d=="string"){l.set(d,u);continue}else if(!Array.isArray(d)){l.set(d.name,lh(u,d.at,c,l));continue}let[p,m,g={}]=d;g.at!==void 0&&(u=lh(u,g.at,c,l));let y=0;const b=(v,S,T,E=0,R=0)=>{const I=XC(v),{delay:M=0,times:A=Hg(I),type:N="keyframes",...k}=S;let{ease:j=t.ease||"easeOut",duration:P}=S;const O=typeof M=="function"?M(E,R):M,F=I.length;if(F<=2&&N==="spring"){let D=100;if(F===2&&JC(I)){const J=I[1]-I[0];D=Math.abs(J)}const $={...k};P!==void 0&&($.duration=an(P));const q=WC($,D);j=q.ease,P=q.duration}P??(P=o);const _=u+O,W=_+P;A.length===1&&A[0]===0&&(A[1]=1);const U=A.length-I.length;U>0&&Wg(A,U),I.length===1&&I.unshift(null),GC(T,I,j,A,_,W),y=Math.max(O+P,y),f=Math.max(W,f)};if(lt(p)){const v=ch(p,i);b(m,g,uh("default",v))}else{const v=Cy(p,r,a),S=v.length;for(let T=0;T<S;T++){m=m,g=g;const E=v[T],R=ch(E,i);for(const I in m)b(m[I],QC(g,I),uh(I,R),T,S)}}c=u,u+=y}return i.forEach((h,d)=>{for(const p in h){const m=h[p];m.sort(YC);const g=[],y=[],b=[];for(let S=0;S<m.length;S++){const{at:T,value:E,easing:R}=m[S];g.push(E),y.push(qr(0,f,T)),b.push(R||"easeOut")}y[0]!==0&&(y.unshift(0),g.unshift(g[0]),b.unshift(KC)),y[y.length-1]!==1&&(y.push(1),g.push(null)),s.has(d)||s.set(d,{keyframes:{},transition:{}});const v=s.get(d);v.keyframes[p]=g,v.transition[p]={...t,duration:f,ease:b,times:y,...n}}}),s}function ch(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function uh(e,t){return t[e]||(t[e]=[]),t[e]}function XC(e){return Array.isArray(e)?e:[e]}function QC(e,t){return e[t]?{...e,...e[t]}:{...e}}const ZC=e=>typeof e=="number",JC=e=>e.every(ZC);function Py(e,t,n,r){const o=Cy(e,r),s=o.length;Lt(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];is.has(l)||BC(l);const c=is.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...yu(c,{...t,transition:u},{}))}return new hu(i)}const eP=e=>Array.isArray(e)&&Array.isArray(e[0]);function tP(e,t,n){const r=[];return qC(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;lt(a)?l=vu(a,s.default,i.default):l=Py(a,s,i),r.push(l)}),new hu(r)}const nP=e=>{function t(n,r,o){let s;return eP(n)?s=tP(n,r,e):$C(r)?s=Py(n,r,o,e):s=vu(n,r,o),e&&e.animations.push(s),s}return t};function rP(){const e=cn(()=>({current:null,animations:[]})),t=cn(()=>nP(e));return wy(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class oP{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 sP=()=>new oP;function iP(){return cn(sP)}function aP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function lP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:aP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=zl(r)(l/c)*c}return t+l}}/**
13
13
  * @license lucide-react v0.414.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
@@ -24,12 +24,12 @@
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const fP=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>w.createElement("svg",{ref:l,...uP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ry("lucide",o),...a},[...i.map(([c,u])=>w.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
27
+ */const fP=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>x.createElement("svg",{ref:l,...uP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ry("lucide",o),...a},[...i.map(([c,u])=>x.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
28
28
  * @license lucide-react v0.414.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const Xe=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(fP,{ref:s,iconNode:t,className:Ry(`lucide-${cP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
32
+ */const Xe=(e,t)=>{const n=x.forwardRef(({className:r,...o},s)=>x.createElement(fP,{ref:s,iconNode:t,className:Ry(`lucide-${cP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
33
33
  * @license lucide-react v0.414.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
@@ -139,7 +139,7 @@
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const wu=Xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fh={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},PP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},My=e=>x.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:fh,exit:fh.false,transition:PP,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:De("aria-hidden:pointer-events-none",e.className),children:e.children}),RP=co("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),IP=w.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:De("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(My,{"data-open":!!s,open:!!s,children:x.jsxs(po,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:De(RP({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(Oy,{size:20}):null,!r&&n==="info"?x.jsx(Dy,{size:20}):null,!r&&n==="danger"?x.jsx(SP,{size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?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(wu,{size:20})}):null]})})})});function Se(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function _e(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function vo(e,t){const n=Se(e);return isNaN(t)?_e(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ea(e,t){const n=Se(e);if(isNaN(t))return _e(e,NaN);if(!t)return n;const r=n.getDate(),o=_e(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const ky=6048e5,AP=864e5,OP=6e4,DP=36e5,MP=1e3;let kP={};function br(){return kP}function fn(e,t){var a,l,c,u;const n=br(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Se(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Zr(e){return fn(e,{weekStartsOn:1})}function Fy(e){const t=Se(e),n=t.getFullYear(),r=_e(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Zr(r),s=_e(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Zr(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Jr(e){const t=Se(e);return t.setHours(0,0,0,0),t}function xi(e){const t=Se(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 FP(e,t){const n=Jr(e),r=Jr(t),o=+n-xi(n),s=+r-xi(r);return Math.round((o-s)/AP)}function jP(e){const t=Fy(e),n=_e(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Zr(n)}function jy(e,t){const n=t*7;return vo(e,n)}function Ny(e,t){return ea(e,t*12)}function NP(e){return _e(e,Date.now())}function LP(e,t){const n=Jr(e),r=Jr(t);return+n==+r}function _P(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ly(e){if(!_P(e)&&typeof e!="number")return!1;const t=Se(e);return!isNaN(Number(t))}function _y(e,t){const n=Se(e.start),r=Se(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Se(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Vy(e){const t=Se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function VP(e){const t=Se(e),n=_e(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $P(e,t){var a,l;const n=br(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Se(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const BP={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"}},WP=(e,t,n)=>{let r;const o=BP[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 Ga(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const HP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},UP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},GP={date:Ga({formats:HP,defaultWidth:"full"}),time:Ga({formats:zP,defaultWidth:"full"}),dateTime:Ga({formats:UP,defaultWidth:"full"})},YP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},KP=(e,t,n,r)=>YP[e];function Lo(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const qP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},XP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QP={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"]},ZP={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"]},JP={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"}},eR={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"}},tR=(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"},nR={ordinalNumber:tR,era:Lo({values:qP,defaultWidth:"wide"}),quarter:Lo({values:XP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Lo({values:QP,defaultWidth:"wide"}),day:Lo({values:ZP,defaultWidth:"wide"}),dayPeriod:Lo({values:JP,defaultWidth:"wide",formattingValues:eR,defaultFormattingWidth:"wide"})};function _o(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?oR(a,f=>f.test(i)):rR(a,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function rR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function oR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function sR(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const iR=/^(\d+)(th|st|nd|rd)?/i,aR=/\d+/i,lR={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},cR={any:[/^b/i,/^(a|c)/i]},uR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fR={any:[/1/i,/2/i,/3/i,/4/i]},dR={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},hR={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]},pR={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},mR={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]},gR={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},yR={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}},vR={ordinalNumber:sR({matchPattern:iR,parsePattern:aR,valueCallback:e=>parseInt(e,10)}),era:_o({matchPatterns:lR,defaultMatchWidth:"wide",parsePatterns:cR,defaultParseWidth:"any"}),quarter:_o({matchPatterns:uR,defaultMatchWidth:"wide",parsePatterns:fR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_o({matchPatterns:dR,defaultMatchWidth:"wide",parsePatterns:hR,defaultParseWidth:"any"}),day:_o({matchPatterns:pR,defaultMatchWidth:"wide",parsePatterns:mR,defaultParseWidth:"any"}),dayPeriod:_o({matchPatterns:gR,defaultMatchWidth:"any",parsePatterns:yR,defaultParseWidth:"any"})},$y={code:"en-US",formatDistance:WP,formatLong:GP,formatRelative:KP,localize:nR,match:vR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bR(e){const t=Se(e);return FP(t,VP(t))+1}function By(e){const t=Se(e),n=+Zr(t)-+jP(t);return Math.round(n/ky)+1}function Tu(e,t){var u,f,h,d;const n=Se(e),r=n.getFullYear(),o=br(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((d=(h=o.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,i=_e(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=fn(i,t),l=_e(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=fn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function xR(e,t){var a,l,c,u;const n=br(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Tu(e,t),s=_e(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),fn(s,t)}function Wy(e,t){const n=Se(e),r=+fn(n,t)-+xR(n,t);return Math.round(r/ky)+1}function Ae(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Pn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ae(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ae(n+1,2)},d(e,t){return Ae(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 Ae(e.getHours()%12||12,t.length)},H(e,t){return Ae(e.getHours(),t.length)},m(e,t){return Ae(e.getMinutes(),t.length)},s(e,t){return Ae(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ae(o,t.length)}},Pr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dh={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 Pn.y(e,t)},Y:function(e,t,n,r){const o=Tu(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ae(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ae(s,t.length)},R:function(e,t){const n=Fy(e);return Ae(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ae(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 Ae(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 Ae(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 Pn.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 Ae(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=Wy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ae(o,t.length)},I:function(e,t,n){const r=By(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ae(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Pn.d(e,t)},D:function(e,t,n){const r=bR(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ae(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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ae(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ae(s,t.length);case"co":return n.ordinalNumber(s,{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 Ae(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=Pr.noon:r===0?o=Pr.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=Pr.evening:r>=12?o=Pr.afternoon:r>=4?o=Pr.morning:o=Pr.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 Pn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Pn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ae(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ae(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Pn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Pn.s(e,t)},S:function(e,t){return Pn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ph(r);case"XXXX":case"XX":return rr(r);case"XXXXX":case"XXX":default:return rr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ph(r);case"xxxx":case"xx":return rr(r);case"xxxxx":case"xxx":default:return rr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hh(r,":");case"OOOO":default:return"GMT"+rr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hh(r,":");case"zzzz":default:return"GMT"+rr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ae(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ae(r,t.length)}};function hh(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ae(s,2)}function ph(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):rr(e,t)}function rr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ae(Math.trunc(r/60),2),s=Ae(r%60,2);return n+o+t+s}const mh=(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"})}},Hy=(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"})}},wR=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return mh(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",mh(r,t)).replace("{{time}}",Hy(o,t))},Jl={p:Hy,P:wR},TR=/^D+$/,SR=/^Y+$/,ER=["D","DD","YY","YYYY"];function zy(e){return TR.test(e)}function Uy(e){return SR.test(e)}function ec(e,t,n){const r=CR(e,t,n);if(console.warn(r),ER.includes(e))throw new RangeError(r)}function CR(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 PR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IR=/^'([^]*?)'?$/,AR=/''/g,OR=/[a-zA-Z]/;function DR(e,t,n){var u,f,h,d;const r=br(),o=r.locale??$y,s=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=Se(e);if(!Ly(a))throw new RangeError("Invalid time value");let l=t.match(RR).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=Jl[m];return g(p,o.formatLong)}return p}).join("").match(PR).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:MR(p)};if(dh[m])return{isToken:!0,value:p};if(m.match(OR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Uy(m)||zy(m))&&ec(m,t,String(e));const g=dh[m[0]];return g(a,m,o.localize,c)}).join("")}function MR(e){const t=e.match(IR);return t?t[1].replace(AR,"'"):e}function kR(){return Object.assign({},br())}function FR(e){let n=Se(e).getDay();return n===0&&(n=7),n}function jR(e,t){const n=Se(e),r=Se(t);return n.getTime()>r.getTime()}function NR(e,t){const n=Se(e),r=Se(t);return+n<+r}function LR(e,t){const n=t instanceof Date?_e(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const _R=10;class Gy{constructor(){te(this,"subPriority",0)}validate(t,n){return!0}}class VR extends Gy{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class $R extends Gy{constructor(){super(...arguments);te(this,"priority",_R);te(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:_e(n,LR(n,Date))}}class Ee{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new VR(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class BR extends Ee{constructor(){super(...arguments);te(this,"priority",140);te(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 tt={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}/},en={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 nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ze(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function tn(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,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*DP+s*OP+i*MP),rest:t.slice(n[0].length)}}function Yy(e){return ze(tt.anyDigitsSigned,e)}function qe(e,t){switch(e){case 1:return ze(tt.singleDigit,t);case 2:return ze(tt.twoDigits,t);case 3:return ze(tt.threeDigits,t);case 4:return ze(tt.fourDigits,t);default:return ze(new RegExp("^\\d{1,"+e+"}"),t)}}function wi(e,t){switch(e){case 1:return ze(tt.singleDigitSigned,t);case 2:return ze(tt.twoDigitsSigned,t);case 3:return ze(tt.threeDigitsSigned,t);case 4:return ze(tt.fourDigitsSigned,t);default:return ze(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Su(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 Ky(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function qy(e){return e%400===0||e%4===0&&e%100!==0}class WR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return nt(qe(4,n),s);case"yo":return nt(o.ordinalNumber(n,{unit:"year"}),s);default:return nt(qe(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=Ky(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class HR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return nt(qe(4,n),s);case"Yo":return nt(o.ordinalNumber(n,{unit:"year"}),s);default:return nt(qe(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Tu(n,s);if(o.isTwoDigitYear){const l=Ky(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),fn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),fn(n,s)}}class zR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return wi(r==="R"?4:r.length,n)}set(n,r,o){const s=_e(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Zr(s)}}class UR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return wi(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class GR extends Ee{constructor(){super(...arguments);te(this,"priority",120);te(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 qe(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 YR extends Ee{constructor(){super(...arguments);te(this,"priority",120);te(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 qe(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 KR extends Ee{constructor(){super(...arguments);te(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);te(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return nt(ze(tt.month,n),s);case"MM":return nt(qe(2,n),s);case"Mo":return nt(o.ordinalNumber(n,{unit:"month"}),s);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 qR extends Ee{constructor(){super(...arguments);te(this,"priority",110);te(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return nt(ze(tt.month,n),s);case"LL":return nt(qe(2,n),s);case"Lo":return nt(o.ordinalNumber(n,{unit:"month"}),s);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 XR(e,t,n){const r=Se(e),o=Wy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class QR extends Ee{constructor(){super(...arguments);te(this,"priority",100);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ze(tt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return fn(XR(n,o,s),s)}}function ZR(e,t){const n=Se(e),r=By(n)-t;return n.setDate(n.getDate()-r*7),n}class JR extends Ee{constructor(){super(...arguments);te(this,"priority",100);te(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 ze(tt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Zr(ZR(n,o))}}const eI=[31,28,31,30,31,30,31,31,30,31,30,31],tI=[31,29,31,30,31,30,31,31,30,31,30,31];class nI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"subPriority",1);te(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ze(tt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=qy(o),i=n.getMonth();return s?r>=1&&r<=tI[i]:r>=1&&r<=eI[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class rI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"subpriority",1);te(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 ze(tt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear();return qy(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 Eu(e,t,n){var f,h,d,p;const r=br(),o=(n==null?void 0:n.weekStartsOn)??((h=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(d=r.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,s=Se(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return vo(s,u)}class oI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(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,s){return n=Eu(n,o,s),n.setHours(0,0,0,0),n}}class sI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return nt(qe(r.length,n),i);case"eo":return nt(o.ordinalNumber(n,{unit:"day"}),i);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,s){return n=Eu(n,o,s),n.setHours(0,0,0,0),n}}class iI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return nt(qe(r.length,n),i);case"co":return nt(o.ordinalNumber(n,{unit:"day"}),i);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,s){return n=Eu(n,o,s),n.setHours(0,0,0,0),n}}function aI(e,t){const n=Se(e),r=FR(n),o=t-r;return vo(n,o)}class lI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return qe(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return nt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return nt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return nt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return nt(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"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=aI(n,o),n.setHours(0,0,0,0),n}}class cI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Su(o),0,0,0),n}}class uI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Su(o),0,0,0),n}}class fI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Su(o),0,0,0),n}}class dI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ze(tt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class hI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ze(tt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class pI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ze(tt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(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 mI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ze(tt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class gI extends Ee{constructor(){super(...arguments);te(this,"priority",60);te(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ze(tt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class yI extends Ee{constructor(){super(...arguments);te(this,"priority",50);te(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ze(tt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class vI extends Ee{constructor(){super(...arguments);te(this,"priority",30);te(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return nt(qe(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class bI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return tn(en.basicOptionalMinutes,n);case"XX":return tn(en.basic,n);case"XXXX":return tn(en.basicOptionalSeconds,n);case"XXXXX":return tn(en.extendedOptionalSeconds,n);case"XXX":default:return tn(en.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-xi(n)-o)}}class xI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return tn(en.basicOptionalMinutes,n);case"xx":return tn(en.basic,n);case"xxxx":return tn(en.basicOptionalSeconds,n);case"xxxxx":return tn(en.extendedOptionalSeconds,n);case"xxx":default:return tn(en.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-xi(n)-o)}}class wI extends Ee{constructor(){super(...arguments);te(this,"priority",40);te(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[_e(n,o*1e3),{timestampIsSet:!0}]}}class TI extends Ee{constructor(){super(...arguments);te(this,"priority",20);te(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[_e(n,o),{timestampIsSet:!0}]}}const SI={G:new BR,y:new WR,Y:new HR,R:new zR,u:new UR,Q:new GR,q:new YR,M:new KR,L:new qR,w:new QR,I:new JR,d:new nI,D:new rI,E:new oI,e:new sI,c:new iI,i:new lI,a:new cI,b:new uI,B:new fI,h:new dI,H:new hI,K:new pI,k:new mI,m:new gI,s:new yI,S:new vI,X:new bI,x:new xI,t:new wI,T:new TI},EI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PI=/^'([^]*?)'?$/,RI=/''/g,II=/\S/,AI=/[a-zA-Z]/;function OI(e,t,n,r){var m,g,v,b;const o=kR(),s=o.locale??$y,i=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((b=(v=o.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?Se(n):_e(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new $R],u=t.match(CI).map(y=>{const S=y[0];if(S in Jl){const T=Jl[S];return T(y,s.formatLong)}return y}).join("").match(EI),f=[];for(let y of u){Uy(y)&&ec(y,t,e),zy(y)&&ec(y,t,e);const S=y[0],T=SI[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const A=f.find(O=>E.includes(O.token)||O.token===S);if(A)throw new RangeError(`The format string mustn't contain \`${A.fullToken}\` and \`${y}\` at the same time`)}else if(T.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);f.push({token:S,fullToken:y});const R=T.run(e,y,s.match,l);if(!R)return _e(n,NaN);c.push(R.setter),e=R.rest}else{if(S.match(AI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(y==="''"?y="'":S==="'"&&(y=DI(y)),e.indexOf(y)===0)e=e.slice(y.length);else return _e(n,NaN)}}if(e.length>0&&II.test(e))return _e(n,NaN);const h=c.map(y=>y.priority).sort((y,S)=>S-y).filter((y,S,T)=>T.indexOf(y)===S).map(y=>c.filter(S=>S.priority===y).sort((S,T)=>T.subPriority-S.subPriority)).map(y=>y[0]);let d=Se(n);if(isNaN(d.getTime()))return _e(n,NaN);const p={};for(const y of h){if(!y.validate(d,l))return _e(n,NaN);const S=y.set(d,p,l);Array.isArray(S)?(d=S[0],Object.assign(p,S[1])):d=S}return _e(n,d)}function DI(e){return e.match(PI)[1].replace(RI,"'")}function MI(e,t){const n=Se(e),r=Se(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function kI(e){return LP(e,NP(e))}function FI(e,t){return vo(e,-t)}function Xy(e,t){return ea(e,-t)}function jI(e,t){return jy(e,-t)}function NI(e,t){return Ny(e,-t)}var rt=function(){return rt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},rt.apply(this,arguments)};function Cu(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 tc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}var as=function(e){return e.replace(new RegExp(" ","g")," ")},Qy=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},LI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Zy=function(e,t,n){var r=e.length-2,o=LI(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},Jy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ti=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},_I=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ya=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},VI=function(e){return e==="money"||e==="currency"},$I=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return rt(rt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Bs=function(e,t){var n=Qy(Jy(e),t.fraction.length),r="".concat(t.currency).concat(Zy(n,t.group,t.decimal));return as(r)},BI=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=Cu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var f=w.useMemo(function(){var p=$I(r,s,a);return p.currency=as("".concat(p.currency.trim()," ")),p.literal=as(p.literal.trim()),p},[r,s]),h=function(p){var m=Bs(p.target.value,f),g=Ti(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)};w.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Bs(p,f),g=Ti(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var v=new InputEvent("change",{});l==null||l(rt(rt({},v),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=c.defaultValue?Bs(c.defaultValue,f):void 0;return w.createElement("input",rt({},c,{value:typeof c.value=="string"?Bs(c.value,f):c.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),WI=1,HI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},zI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return rt(rt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Ws=function(e,t){var n=Qy(Jy(e),t.fraction.length),r="".concat(Zy(n,t.group,t.decimal)," ").concat(t.percentSign);return as(r)},UI=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=Cu(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=tc(w.useState(function(){var v,b;return(b=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var v,b=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(Ws(b,f))},[i.value]);var f=w.useMemo(function(){var v=zI(r);return v.percentSign=as("".concat(v.percentSign)),v},[r]),h=c.length-f.percentSign.length-WI,d=function(v){var b,y=a.current;y&&(y.setSelectionRange(h,h),v&&((b=i.onFocus)===null||b===void 0||b.call(i,v)))},p=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var y=b.selectionStart,S=b.selectionEnd,T=y!==S,E=h<y;!T&&E&&d()}s==null||s(v)},m=function(v){var b=Ws(v.target.value,f),y=Ti(b);u(b),v.target.value=b,v.target.setAttribute("data-number",y.toString()),o==null||o(v)};w.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=Ws(v,f),y=Ti(b);u(b),a.current.value=b,a.current.setAttribute("data-number",y.toString());var S=new InputEvent("change",{});o==null||o(rt(rt({},S),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return d()},[c]);var g=i.defaultValue?Ws(i.defaultValue,f):void 0;return w.createElement("input",rt({},i,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),Bo={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},GI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Si[s];i===void 0?r.push(s.replace(Bo.dots,"\\.").replace(Bo.openParenthesis,"\\(").replace(Bo.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Bo.leadingBars,"\\")},Xo=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return nc(o,n);var s=GI(o);return n?"^".concat(s,"$"):s},YI=function(e){return e.replace(Bo.escape,"\\$&")},nc=function(e,t){var n=e.map(function(r){return typeof r=="string"?YI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Si={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]/}},KI=/\d/,gh="(dd) 9dddd-dddd",yh="(dd) dddd-dddd",vh="ddd.ddd.ddd-dd",bh="dd.ddd.ddd/dddd-dd",ri=function(e){return e.replace(/\D/g,"")},qI=["2",/[0-3]/,":",/[0-5]/,/\d/],XI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],It={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:vh,isoDate:"dddd-dd-dd",cnpj:bh,telephone:yh,cellphone:gh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ri(e).length<=11?vh:bh},int:function(e){return e===void 0&&(e=""),KI.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=ri(e);return t.length<11?yh:gh},time:function(e){var t=ri(e),n=t[0];return n==="2"?qI:XI}},At=function(e,t,n){var r;return n===void 0&&(n={}),rt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Xo(e,"",!0),infinity:n.infinity},n)},Et={cellTelephone:At(It.cellTelephone,"tel"),cellphone:At(It.cellphone,"tel"),cep:At(It.cep,"decimal"),cnpj:At(It.cnpj,"decimal"),color:At(It.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:At(It.cpf,"decimal"),cpfCnpj:At(It.cpfCnpj,"decimal",{transform:ri}),creditCard:At(It.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:At(It.date,"decimal"),int:At(It.int,"decimal",{pattern:"[0-9]+"}),isoDate:At(It.isoDate,"decimal"),telephone:At(It.telephone,"tel"),time:At(It.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:At(It.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function xh(e,t,n,r){var o,s;r===void 0&&(r=Si);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],f=u instanceof RegExp?u:r[u],h=i[c];if(f===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var d=f instanceof RegExp?{regex:f}:f;d.regex.test(h)&&(a+=(s=(o=d.parse)===null||o===void 0?void 0:o.call(d,h))!==null&&s!==void 0?s:h),c+=1,l+=1}return a}var wh=function(e){return e},QI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Xo(e,n,t));return r.test(n)};function ZI(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var JI=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,f=e.onChangeText,h=e.as,d=Cu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=Ya(a),g=Ya(f),v=Ya(u),b=w.useRef(QI(u,s,d.value||d.defaultValue)),y=h??"input",S=tc(w.useState(""),2),T=S[0],E=S[1],R=ZI(T),A=w.useCallback(function(M,j){var _,H,U=(_=M??j)!==null&&_!==void 0?_:"";if(u===void 0)return U;var D=(H=U==null?void 0:U.toString())!==null&&H!==void 0?H:"";return xh(D,typeof u=="function"?u(D):u,i??wh,c??Si)},[i,u,c]),O=tc(w.useState(function(){return A(d.value,d.defaultValue)}),2),I=O[0],F=O[1],k=A(d.defaultValue,d.defaultValue),L=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var M=u(I);return Array.isArray(M)?nc(M,s):Xo(u,I,s)}return typeof u=="string"?Xo(u,I,s):nc(u,s)},[l,I,s,u]);w.useEffect(function(){if(d.value!==void 0){var M=A(d.value,d.defaultValue);F(M),p.current!==null&&(p.current.value=M)}},[d.value,u,i,d.defaultValue]);var C=function(M){var j,_,H,U,D,$=M.currentTarget,q=M.target.value;if(v.current===void 0)return F(q),(j=g.current)===null||j===void 0||j.call(g,q),(_=m.current)===null||_===void 0||_.call(m,M),f==null?void 0:f(q);var J=new RegExp(Xo(v.current,q,s)),X=(H=$.selectionEnd)!==null&&H!==void 0?H:0,G=function(Y,ee,W){if(Y.type!=="number")return Y.setSelectionRange(ee,W)};if(r&&b.current&&q.length>=I.length)return $.value=I,G($,X-1,X-1);var N=!1;q.length<R.length&&(b.current=!1,N=!0),J.test(q)&&(b.current=!0);var B=X,z=q[B-1],V=xh(q,typeof v.current=="function"?v.current(q):v.current,i??wh,c??Si);for($.value=V,F(V);B<V.length&&V.charAt(B-1)!==z;)B+=1;N?G($,X,X):G($,B,B),M.target.value=V,E(V),(U=g.current)===null||U===void 0||U.call(g,V),(D=m.current)===null||D===void 0||D.call(m,M)};return w.createElement(y,rt({},d,{ref:p,pattern:L,onChange:C,defaultValue:Th(d.defaultValue)?k:void 0,value:Th(d.value)?A(d.value,d.value):d.value}))}),Th=function(e){return typeof e=="string"},ev=w.forwardRef(function(e,t){return VI(e.mask)?w.createElement(BI,rt({},e,{mask:void 0,ref:t})):HI(e.mask)?w.createElement(UI,rt({},e,{mask:void 0,ref:t})):w.createElement(JI,rt({},e,{ref:t}))}),Ot=function(e){return function(t){return w.createElement(ev,rt({},e,t))}};Ot(Et.cellTelephone);Ot(Et.cellphone);Ot(Et.cep);Ot(Et.cnpj);Ot(Et.color);Ot(Et.cpf);Ot(Et.cpfCnpj);Ot(Et.creditCard);Ot(Et.date);Ot(Et.int);Ot(Et.isoDate);Ot(Et.telephone);Ot(Et.time);Ot(Et.uuid);var tv=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&_I(Et,t.mask)?Et[t.mask]:{mask:t.mask}},[t.mask]),o=rt(rt({},t),r);return w.createElement(ev,rt({},o,{ref:n}))}),Ka={},qa={exports:{}},Xa={};/**
142
+ */const wu=Xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fh={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},PP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},My=e=>w.jsx(ft.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:fh,exit:fh.false,transition:PP,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:De("aria-hidden:pointer-events-none",e.className),children:e.children}),RP=co("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),IP=x.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return w.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:De("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:w.jsx(My,{"data-open":!!s,open:!!s,children:w.jsxs(po,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:De(RP({theme:n}),t),children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(Oy,{size:20}):null,!r&&n==="info"?w.jsx(Dy,{size:20}):null,!r&&n==="danger"?w.jsx(SP,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?w.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:w.jsx(wu,{size:20})}):null]})})})});function Se(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function _e(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function vo(e,t){const n=Se(e);return isNaN(t)?_e(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ta(e,t){const n=Se(e);if(isNaN(t))return _e(e,NaN);if(!t)return n;const r=n.getDate(),o=_e(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const ky=6048e5,AP=864e5,OP=6e4,DP=36e5,MP=1e3;let kP={};function br(){return kP}function fn(e,t){var a,l,c,u;const n=br(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Se(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Zr(e){return fn(e,{weekStartsOn:1})}function Fy(e){const t=Se(e),n=t.getFullYear(),r=_e(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Zr(r),s=_e(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Zr(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Jr(e){const t=Se(e);return t.setHours(0,0,0,0),t}function wi(e){const t=Se(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 FP(e,t){const n=Jr(e),r=Jr(t),o=+n-wi(n),s=+r-wi(r);return Math.round((o-s)/AP)}function jP(e){const t=Fy(e),n=_e(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Zr(n)}function jy(e,t){const n=t*7;return vo(e,n)}function Ny(e,t){return ta(e,t*12)}function NP(e){return _e(e,Date.now())}function LP(e,t){const n=Jr(e),r=Jr(t);return+n==+r}function _P(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ly(e){if(!_P(e)&&typeof e!="number")return!1;const t=Se(e);return!isNaN(Number(t))}function _y(e,t){const n=Se(e.start),r=Se(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Se(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Vy(e){const t=Se(e);return t.setDate(1),t.setHours(0,0,0,0),t}function VP(e){const t=Se(e),n=_e(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $P(e,t){var a,l;const n=br(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Se(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const BP={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"}},WP=(e,t,n)=>{let r;const o=BP[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 Ga(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const HP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},UP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},GP={date:Ga({formats:HP,defaultWidth:"full"}),time:Ga({formats:zP,defaultWidth:"full"}),dateTime:Ga({formats:UP,defaultWidth:"full"})},YP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},KP=(e,t,n,r)=>YP[e];function Lo(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const qP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},XP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QP={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"]},ZP={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"]},JP={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"}},eR={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"}},tR=(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"},nR={ordinalNumber:tR,era:Lo({values:qP,defaultWidth:"wide"}),quarter:Lo({values:XP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Lo({values:QP,defaultWidth:"wide"}),day:Lo({values:ZP,defaultWidth:"wide"}),dayPeriod:Lo({values:JP,defaultWidth:"wide",formattingValues:eR,defaultFormattingWidth:"wide"})};function _o(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?oR(a,f=>f.test(i)):rR(a,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function rR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function oR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function sR(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const iR=/^(\d+)(th|st|nd|rd)?/i,aR=/\d+/i,lR={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},cR={any:[/^b/i,/^(a|c)/i]},uR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fR={any:[/1/i,/2/i,/3/i,/4/i]},dR={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},hR={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]},pR={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},mR={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]},gR={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},yR={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}},vR={ordinalNumber:sR({matchPattern:iR,parsePattern:aR,valueCallback:e=>parseInt(e,10)}),era:_o({matchPatterns:lR,defaultMatchWidth:"wide",parsePatterns:cR,defaultParseWidth:"any"}),quarter:_o({matchPatterns:uR,defaultMatchWidth:"wide",parsePatterns:fR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_o({matchPatterns:dR,defaultMatchWidth:"wide",parsePatterns:hR,defaultParseWidth:"any"}),day:_o({matchPatterns:pR,defaultMatchWidth:"wide",parsePatterns:mR,defaultParseWidth:"any"}),dayPeriod:_o({matchPatterns:gR,defaultMatchWidth:"any",parsePatterns:yR,defaultParseWidth:"any"})},$y={code:"en-US",formatDistance:WP,formatLong:GP,formatRelative:KP,localize:nR,match:vR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bR(e){const t=Se(e);return FP(t,VP(t))+1}function By(e){const t=Se(e),n=+Zr(t)-+jP(t);return Math.round(n/ky)+1}function Tu(e,t){var u,f,h,d;const n=Se(e),r=n.getFullYear(),o=br(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((d=(h=o.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,i=_e(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=fn(i,t),l=_e(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=fn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function xR(e,t){var a,l,c,u;const n=br(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Tu(e,t),s=_e(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),fn(s,t)}function Wy(e,t){const n=Se(e),r=+fn(n,t)-+xR(n,t);return Math.round(r/ky)+1}function Ae(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Pn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ae(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ae(n+1,2)},d(e,t){return Ae(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 Ae(e.getHours()%12||12,t.length)},H(e,t){return Ae(e.getHours(),t.length)},m(e,t){return Ae(e.getMinutes(),t.length)},s(e,t){return Ae(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ae(o,t.length)}},Pr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dh={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 Pn.y(e,t)},Y:function(e,t,n,r){const o=Tu(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ae(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ae(s,t.length)},R:function(e,t){const n=Fy(e);return Ae(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ae(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 Ae(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 Ae(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 Pn.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 Ae(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=Wy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ae(o,t.length)},I:function(e,t,n){const r=By(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ae(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Pn.d(e,t)},D:function(e,t,n){const r=bR(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ae(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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ae(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ae(s,t.length);case"co":return n.ordinalNumber(s,{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 Ae(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=Pr.noon:r===0?o=Pr.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=Pr.evening:r>=12?o=Pr.afternoon:r>=4?o=Pr.morning:o=Pr.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 Pn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Pn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ae(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ae(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Pn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Pn.s(e,t)},S:function(e,t){return Pn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ph(r);case"XXXX":case"XX":return rr(r);case"XXXXX":case"XXX":default:return rr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ph(r);case"xxxx":case"xx":return rr(r);case"xxxxx":case"xxx":default:return rr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hh(r,":");case"OOOO":default:return"GMT"+rr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hh(r,":");case"zzzz":default:return"GMT"+rr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ae(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ae(r,t.length)}};function hh(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ae(s,2)}function ph(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):rr(e,t)}function rr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ae(Math.trunc(r/60),2),s=Ae(r%60,2);return n+o+t+s}const mh=(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"})}},Hy=(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"})}},wR=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return mh(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",mh(r,t)).replace("{{time}}",Hy(o,t))},Jl={p:Hy,P:wR},TR=/^D+$/,SR=/^Y+$/,ER=["D","DD","YY","YYYY"];function zy(e){return TR.test(e)}function Uy(e){return SR.test(e)}function ec(e,t,n){const r=CR(e,t,n);if(console.warn(r),ER.includes(e))throw new RangeError(r)}function CR(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 PR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IR=/^'([^]*?)'?$/,AR=/''/g,OR=/[a-zA-Z]/;function DR(e,t,n){var u,f,h,d;const r=br(),o=r.locale??$y,s=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=Se(e);if(!Ly(a))throw new RangeError("Invalid time value");let l=t.match(RR).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=Jl[m];return g(p,o.formatLong)}return p}).join("").match(PR).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:MR(p)};if(dh[m])return{isToken:!0,value:p};if(m.match(OR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Uy(m)||zy(m))&&ec(m,t,String(e));const g=dh[m[0]];return g(a,m,o.localize,c)}).join("")}function MR(e){const t=e.match(IR);return t?t[1].replace(AR,"'"):e}function kR(){return Object.assign({},br())}function FR(e){let n=Se(e).getDay();return n===0&&(n=7),n}function jR(e,t){const n=Se(e),r=Se(t);return n.getTime()>r.getTime()}function NR(e,t){const n=Se(e),r=Se(t);return+n<+r}function LR(e,t){const n=t instanceof Date?_e(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const _R=10;class Gy{constructor(){te(this,"subPriority",0)}validate(t,n){return!0}}class VR extends Gy{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class $R extends Gy{constructor(){super(...arguments);te(this,"priority",_R);te(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:_e(n,LR(n,Date))}}class Ee{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new VR(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class BR extends Ee{constructor(){super(...arguments);te(this,"priority",140);te(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 tt={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}/},en={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 nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ze(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function tn(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,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*DP+s*OP+i*MP),rest:t.slice(n[0].length)}}function Yy(e){return ze(tt.anyDigitsSigned,e)}function qe(e,t){switch(e){case 1:return ze(tt.singleDigit,t);case 2:return ze(tt.twoDigits,t);case 3:return ze(tt.threeDigits,t);case 4:return ze(tt.fourDigits,t);default:return ze(new RegExp("^\\d{1,"+e+"}"),t)}}function Ti(e,t){switch(e){case 1:return ze(tt.singleDigitSigned,t);case 2:return ze(tt.twoDigitsSigned,t);case 3:return ze(tt.threeDigitsSigned,t);case 4:return ze(tt.fourDigitsSigned,t);default:return ze(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Su(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 Ky(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function qy(e){return e%400===0||e%4===0&&e%100!==0}class WR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return nt(qe(4,n),s);case"yo":return nt(o.ordinalNumber(n,{unit:"year"}),s);default:return nt(qe(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=Ky(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class HR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return nt(qe(4,n),s);case"Yo":return nt(o.ordinalNumber(n,{unit:"year"}),s);default:return nt(qe(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Tu(n,s);if(o.isTwoDigitYear){const l=Ky(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),fn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),fn(n,s)}}class zR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Ti(r==="R"?4:r.length,n)}set(n,r,o){const s=_e(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Zr(s)}}class UR extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Ti(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class GR extends Ee{constructor(){super(...arguments);te(this,"priority",120);te(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 qe(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 YR extends Ee{constructor(){super(...arguments);te(this,"priority",120);te(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 qe(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 KR extends Ee{constructor(){super(...arguments);te(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);te(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return nt(ze(tt.month,n),s);case"MM":return nt(qe(2,n),s);case"Mo":return nt(o.ordinalNumber(n,{unit:"month"}),s);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 qR extends Ee{constructor(){super(...arguments);te(this,"priority",110);te(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return nt(ze(tt.month,n),s);case"LL":return nt(qe(2,n),s);case"Lo":return nt(o.ordinalNumber(n,{unit:"month"}),s);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 XR(e,t,n){const r=Se(e),o=Wy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class QR extends Ee{constructor(){super(...arguments);te(this,"priority",100);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ze(tt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return fn(XR(n,o,s),s)}}function ZR(e,t){const n=Se(e),r=By(n)-t;return n.setDate(n.getDate()-r*7),n}class JR extends Ee{constructor(){super(...arguments);te(this,"priority",100);te(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 ze(tt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Zr(ZR(n,o))}}const eI=[31,28,31,30,31,30,31,31,30,31,30,31],tI=[31,29,31,30,31,30,31,31,30,31,30,31];class nI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"subPriority",1);te(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ze(tt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=qy(o),i=n.getMonth();return s?r>=1&&r<=tI[i]:r>=1&&r<=eI[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class rI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"subpriority",1);te(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 ze(tt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return qe(r.length,n)}}validate(n,r){const o=n.getFullYear();return qy(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 Eu(e,t,n){var f,h,d,p;const r=br(),o=(n==null?void 0:n.weekStartsOn)??((h=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(d=r.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,s=Se(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return vo(s,u)}class oI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(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,s){return n=Eu(n,o,s),n.setHours(0,0,0,0),n}}class sI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return nt(qe(r.length,n),i);case"eo":return nt(o.ordinalNumber(n,{unit:"day"}),i);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,s){return n=Eu(n,o,s),n.setHours(0,0,0,0),n}}class iI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return nt(qe(r.length,n),i);case"co":return nt(o.ordinalNumber(n,{unit:"day"}),i);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,s){return n=Eu(n,o,s),n.setHours(0,0,0,0),n}}function aI(e,t){const n=Se(e),r=FR(n),o=t-r;return vo(n,o)}class lI extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return qe(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return nt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return nt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return nt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return nt(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"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=aI(n,o),n.setHours(0,0,0,0),n}}class cI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Su(o),0,0,0),n}}class uI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Su(o),0,0,0),n}}class fI extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(Su(o),0,0,0),n}}class dI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ze(tt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class hI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ze(tt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class pI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ze(tt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(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 mI extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ze(tt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return qe(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class gI extends Ee{constructor(){super(...arguments);te(this,"priority",60);te(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ze(tt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class yI extends Ee{constructor(){super(...arguments);te(this,"priority",50);te(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ze(tt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return qe(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class vI extends Ee{constructor(){super(...arguments);te(this,"priority",30);te(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return nt(qe(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class bI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return tn(en.basicOptionalMinutes,n);case"XX":return tn(en.basic,n);case"XXXX":return tn(en.basicOptionalSeconds,n);case"XXXXX":return tn(en.extendedOptionalSeconds,n);case"XXX":default:return tn(en.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-wi(n)-o)}}class xI extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return tn(en.basicOptionalMinutes,n);case"xx":return tn(en.basic,n);case"xxxx":return tn(en.basicOptionalSeconds,n);case"xxxxx":return tn(en.extendedOptionalSeconds,n);case"xxx":default:return tn(en.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-wi(n)-o)}}class wI extends Ee{constructor(){super(...arguments);te(this,"priority",40);te(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[_e(n,o*1e3),{timestampIsSet:!0}]}}class TI extends Ee{constructor(){super(...arguments);te(this,"priority",20);te(this,"incompatibleTokens","*")}parse(n){return Yy(n)}set(n,r,o){return[_e(n,o),{timestampIsSet:!0}]}}const SI={G:new BR,y:new WR,Y:new HR,R:new zR,u:new UR,Q:new GR,q:new YR,M:new KR,L:new qR,w:new QR,I:new JR,d:new nI,D:new rI,E:new oI,e:new sI,c:new iI,i:new lI,a:new cI,b:new uI,B:new fI,h:new dI,H:new hI,K:new pI,k:new mI,m:new gI,s:new yI,S:new vI,X:new bI,x:new xI,t:new wI,T:new TI},EI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PI=/^'([^]*?)'?$/,RI=/''/g,II=/\S/,AI=/[a-zA-Z]/;function OI(e,t,n,r){var m,g,y,b;const o=kR(),s=o.locale??$y,i=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((b=(y=o.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?Se(n):_e(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new $R],u=t.match(CI).map(v=>{const S=v[0];if(S in Jl){const T=Jl[S];return T(v,s.formatLong)}return v}).join("").match(EI),f=[];for(let v of u){Uy(v)&&ec(v,t,e),zy(v)&&ec(v,t,e);const S=v[0],T=SI[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const I=f.find(M=>E.includes(M.token)||M.token===S);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${v}\` at the same time`)}else if(T.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${v}\` and any other token at the same time`);f.push({token:S,fullToken:v});const R=T.run(e,v,s.match,l);if(!R)return _e(n,NaN);c.push(R.setter),e=R.rest}else{if(S.match(AI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(v==="''"?v="'":S==="'"&&(v=DI(v)),e.indexOf(v)===0)e=e.slice(v.length);else return _e(n,NaN)}}if(e.length>0&&II.test(e))return _e(n,NaN);const h=c.map(v=>v.priority).sort((v,S)=>S-v).filter((v,S,T)=>T.indexOf(v)===S).map(v=>c.filter(S=>S.priority===v).sort((S,T)=>T.subPriority-S.subPriority)).map(v=>v[0]);let d=Se(n);if(isNaN(d.getTime()))return _e(n,NaN);const p={};for(const v of h){if(!v.validate(d,l))return _e(n,NaN);const S=v.set(d,p,l);Array.isArray(S)?(d=S[0],Object.assign(p,S[1])):d=S}return _e(n,d)}function DI(e){return e.match(PI)[1].replace(RI,"'")}function MI(e,t){const n=Se(e),r=Se(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function kI(e){return LP(e,NP(e))}function FI(e,t){return vo(e,-t)}function Xy(e,t){return ta(e,-t)}function jI(e,t){return jy(e,-t)}function NI(e,t){return Ny(e,-t)}var rt=function(){return rt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},rt.apply(this,arguments)};function Cu(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 tc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}var as=function(e){return e.replace(new RegExp(" ","g")," ")},Qy=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},LI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Zy=function(e,t,n){var r=e.length-2,o=LI(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},Jy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Si=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},_I=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ya=function(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t},VI=function(e){return e==="money"||e==="currency"},$I=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return rt(rt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ws=function(e,t){var n=Qy(Jy(e),t.fraction.length),r="".concat(t.currency).concat(Zy(n,t.group,t.decimal));return as(r)},BI=x.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=Cu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=x.useRef(null);x.useImperativeHandle(t,function(){return u.current});var f=x.useMemo(function(){var p=$I(r,s,a);return p.currency=as("".concat(p.currency.trim()," ")),p.literal=as(p.literal.trim()),p},[r,s]),h=function(p){var m=Ws(p.target.value,f),g=Si(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)};x.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Ws(p,f),g=Si(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var y=new InputEvent("change",{});l==null||l(rt(rt({},y),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=c.defaultValue?Ws(c.defaultValue,f):void 0;return x.createElement("input",rt({},c,{value:typeof c.value=="string"?Ws(c.value,f):c.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),WI=1,HI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},zI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return rt(rt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Hs=function(e,t){var n=Qy(Jy(e),t.fraction.length),r="".concat(Zy(n,t.group,t.decimal)," ").concat(t.percentSign);return as(r)},UI=x.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=Cu(e,["locale","mask","onChange","onKeyUp"]),a=x.useRef(null),l=tc(x.useState(function(){var y,b;return(b=(y=i.value)===null||y===void 0?void 0:y.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];x.useImperativeHandle(t,function(){return a.current}),x.useEffect(function(){var y,b=Number.parseFloat("".concat((y=i.value)!==null&&y!==void 0?y:"0")).toFixed(f.fraction.length);u(Hs(b,f))},[i.value]);var f=x.useMemo(function(){var y=zI(r);return y.percentSign=as("".concat(y.percentSign)),y},[r]),h=c.length-f.percentSign.length-WI,d=function(y){var b,v=a.current;v&&(v.setSelectionRange(h,h),y&&((b=i.onFocus)===null||b===void 0||b.call(i,y)))},p=function(y){var b=y.currentTarget;if(b.selectionStart!==null){var v=b.selectionStart,S=b.selectionEnd,T=v!==S,E=h<v;!T&&E&&d()}s==null||s(y)},m=function(y){var b=Hs(y.target.value,f),v=Si(b);u(b),y.target.value=b,y.target.setAttribute("data-number",v.toString()),o==null||o(y)};x.useEffect(function(){if(a.current!==null){var y=a.current.value;if(y!==""){var b=Hs(y,f),v=Si(b);u(b),a.current.value=b,a.current.setAttribute("data-number",v.toString());var S=new InputEvent("change",{});o==null||o(rt(rt({},S),{target:a.current,currentTarget:a.current}))}}},[]),x.useEffect(function(){return d()},[c]);var g=i.defaultValue?Hs(i.defaultValue,f):void 0;return x.createElement("input",rt({},i,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),Bo={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},GI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Ei[s];i===void 0?r.push(s.replace(Bo.dots,"\\.").replace(Bo.openParenthesis,"\\(").replace(Bo.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Bo.leadingBars,"\\")},Xo=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return nc(o,n);var s=GI(o);return n?"^".concat(s,"$"):s},YI=function(e){return e.replace(Bo.escape,"\\$&")},nc=function(e,t){var n=e.map(function(r){return typeof r=="string"?YI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ei={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]/}},KI=/\d/,gh="(dd) 9dddd-dddd",yh="(dd) dddd-dddd",vh="ddd.ddd.ddd-dd",bh="dd.ddd.ddd/dddd-dd",oi=function(e){return e.replace(/\D/g,"")},qI=["2",/[0-3]/,":",/[0-5]/,/\d/],XI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],At={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:vh,isoDate:"dddd-dd-dd",cnpj:bh,telephone:yh,cellphone:gh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return oi(e).length<=11?vh:bh},int:function(e){return e===void 0&&(e=""),KI.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=oi(e);return t.length<11?yh:gh},time:function(e){var t=oi(e),n=t[0];return n==="2"?qI:XI}},Ot=function(e,t,n){var r;return n===void 0&&(n={}),rt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Xo(e,"",!0),infinity:n.infinity},n)},Et={cellTelephone:Ot(At.cellTelephone,"tel"),cellphone:Ot(At.cellphone,"tel"),cep:Ot(At.cep,"decimal"),cnpj:Ot(At.cnpj,"decimal"),color:Ot(At.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ot(At.cpf,"decimal"),cpfCnpj:Ot(At.cpfCnpj,"decimal",{transform:oi}),creditCard:Ot(At.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ot(At.date,"decimal"),int:Ot(At.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ot(At.isoDate,"decimal"),telephone:Ot(At.telephone,"tel"),time:Ot(At.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ot(At.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function xh(e,t,n,r){var o,s;r===void 0&&(r=Ei);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],f=u instanceof RegExp?u:r[u],h=i[c];if(f===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var d=f instanceof RegExp?{regex:f}:f;d.regex.test(h)&&(a+=(s=(o=d.parse)===null||o===void 0?void 0:o.call(d,h))!==null&&s!==void 0?s:h),c+=1,l+=1}return a}var wh=function(e){return e},QI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Xo(e,n,t));return r.test(n)};function ZI(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t.current}var JI=x.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,f=e.onChangeText,h=e.as,d=Cu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=x.useRef(null);x.useImperativeHandle(t,function(){return p.current});var m=Ya(a),g=Ya(f),y=Ya(u),b=x.useRef(QI(u,s,d.value||d.defaultValue)),v=h??"input",S=tc(x.useState(""),2),T=S[0],E=S[1],R=ZI(T),I=x.useCallback(function(O,F){var _,W,U=(_=O??F)!==null&&_!==void 0?_:"";if(u===void 0)return U;var D=(W=U==null?void 0:U.toString())!==null&&W!==void 0?W:"";return xh(D,typeof u=="function"?u(D):u,i??wh,c??Ei)},[i,u,c]),M=tc(x.useState(function(){return I(d.value,d.defaultValue)}),2),A=M[0],N=M[1],k=I(d.defaultValue,d.defaultValue),j=x.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(A);return Array.isArray(O)?nc(O,s):Xo(u,A,s)}return typeof u=="string"?Xo(u,A,s):nc(u,s)},[l,A,s,u]);x.useEffect(function(){if(d.value!==void 0){var O=I(d.value,d.defaultValue);N(O),p.current!==null&&(p.current.value=O)}},[d.value,u,i,d.defaultValue]);var P=function(O){var F,_,W,U,D,$=O.currentTarget,q=O.target.value;if(y.current===void 0)return N(q),(F=g.current)===null||F===void 0||F.call(g,q),(_=m.current)===null||_===void 0||_.call(m,O),f==null?void 0:f(q);var J=new RegExp(Xo(y.current,q,s)),X=(W=$.selectionEnd)!==null&&W!==void 0?W:0,G=function(Y,ee,H){if(Y.type!=="number")return Y.setSelectionRange(ee,H)};if(r&&b.current&&q.length>=A.length)return $.value=A,G($,X-1,X-1);var L=!1;q.length<R.length&&(b.current=!1,L=!0),J.test(q)&&(b.current=!0);var B=X,z=q[B-1],V=xh(q,typeof y.current=="function"?y.current(q):y.current,i??wh,c??Ei);for($.value=V,N(V);B<V.length&&V.charAt(B-1)!==z;)B+=1;L?G($,X,X):G($,B,B),O.target.value=V,E(V),(U=g.current)===null||U===void 0||U.call(g,V),(D=m.current)===null||D===void 0||D.call(m,O)};return x.createElement(v,rt({},d,{ref:p,pattern:j,onChange:P,defaultValue:Th(d.defaultValue)?k:void 0,value:Th(d.value)?I(d.value,d.value):d.value}))}),Th=function(e){return typeof e=="string"},ev=x.forwardRef(function(e,t){return VI(e.mask)?x.createElement(BI,rt({},e,{mask:void 0,ref:t})):HI(e.mask)?x.createElement(UI,rt({},e,{mask:void 0,ref:t})):x.createElement(JI,rt({},e,{ref:t}))}),Dt=function(e){return function(t){return x.createElement(ev,rt({},e,t))}};Dt(Et.cellTelephone);Dt(Et.cellphone);Dt(Et.cep);Dt(Et.cnpj);Dt(Et.color);Dt(Et.cpf);Dt(Et.cpfCnpj);Dt(Et.creditCard);Dt(Et.date);Dt(Et.int);Dt(Et.isoDate);Dt(Et.telephone);Dt(Et.time);Dt(Et.uuid);var tv=x.forwardRef(function(t,n){var r=x.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&_I(Et,t.mask)?Et[t.mask]:{mask:t.mask}},[t.mask]),o=rt(rt({},t),r);return x.createElement(ev,rt({},o,{ref:n}))}),Ka={},qa={exports:{}},Xa={};/**
143
143
  * @license React
144
144
  * use-sync-external-store-shim.production.min.js
145
145
  *
@@ -147,7 +147,7 @@
147
147
  *
148
148
  * This source code is licensed under the MIT license found in the
149
149
  * LICENSE file in the root directory of this source tree.
150
- */var Sh;function eA(){if(Sh)return Xa;Sh=1;var e=w;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var d=h(),p=r({inst:{value:d,getSnapshot:h}}),m=p[0].inst,g=p[1];return s(function(){m.value=d,m.getSnapshot=h,l(m)&&g({inst:m})},[f,d,h]),o(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),i(d),d}function l(f){var h=f.getSnapshot;f=f.value;try{var d=h();return!n(f,d)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Xa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Xa}var Eh={};/**
150
+ */var Sh;function eA(){if(Sh)return Xa;Sh=1;var e=x;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var d=h(),p=r({inst:{value:d,getSnapshot:h}}),m=p[0].inst,g=p[1];return s(function(){m.value=d,m.getSnapshot=h,l(m)&&g({inst:m})},[f,d,h]),o(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),i(d),d}function l(f){var h=f.getSnapshot;f=f.value;try{var d=h();return!n(f,d)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Xa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Xa}var Eh={};/**
151
151
  * @license React
152
152
  * use-sync-external-store-shim.development.js
153
153
  *
@@ -155,7 +155,7 @@
155
155
  *
156
156
  * This source code is licensed under the MIT license found in the
157
157
  * LICENSE file in the root directory of this source tree.
158
- */var Ch;function tA(){return Ch||(Ch=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(y){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",y,T)}}function r(y,S,T){{var E=t.ReactDebugCurrentFrame,R=E.getStackAddendum();R!==""&&(S+="%s",T=T.concat([R]));var A=T.map(function(O){return String(O)});A.unshift("Warning: "+S),Function.prototype.apply.call(console[y],console,A)}}function o(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function h(y,S,T){u||e.startTransition!==void 0&&(u=!0,n("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 E=S();if(!f){var R=S();s(E,R)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var A=i({inst:{value:E,getSnapshot:S}}),O=A[0].inst,I=A[1];return l(function(){O.value=E,O.getSnapshot=S,d(O)&&I({inst:O})},[y,E,S]),a(function(){d(O)&&I({inst:O});var F=function(){d(O)&&I({inst:O})};return y(F)},[y]),c(E),E}function d(y){var S=y.getSnapshot,T=y.value;try{var E=S();return!s(T,E)}catch{return!0}}function p(y,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,v=g?p:h,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;Eh.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Eh}var Ph;function nv(){return Ph||(Ph=1,process.env.NODE_ENV==="production"?qa.exports=eA():qa.exports=tA()),qa.exports}/**
158
+ */var Ch;function tA(){return Ch||(Ch=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=x,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(v){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",v,T)}}function r(v,S,T){{var E=t.ReactDebugCurrentFrame,R=E.getStackAddendum();R!==""&&(S+="%s",T=T.concat([R]));var I=T.map(function(M){return String(M)});I.unshift("Warning: "+S),Function.prototype.apply.call(console[v],console,I)}}function o(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function h(v,S,T){u||e.startTransition!==void 0&&(u=!0,n("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 E=S();if(!f){var R=S();s(E,R)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var I=i({inst:{value:E,getSnapshot:S}}),M=I[0].inst,A=I[1];return l(function(){M.value=E,M.getSnapshot=S,d(M)&&A({inst:M})},[v,E,S]),a(function(){d(M)&&A({inst:M});var N=function(){d(M)&&A({inst:M})};return v(N)},[v]),c(E),E}function d(v){var S=v.getSnapshot,T=v.value;try{var E=S();return!s(T,E)}catch{return!0}}function p(v,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,y=g?p:h,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;Eh.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Eh}var Ph;function nv(){return Ph||(Ph=1,process.env.NODE_ENV==="production"?qa.exports=eA():qa.exports=tA()),qa.exports}/**
159
159
  * @license React
160
160
  * use-sync-external-store-shim/with-selector.production.min.js
161
161
  *
@@ -163,7 +163,7 @@
163
163
  *
164
164
  * This source code is licensed under the MIT license found in the
165
165
  * LICENSE file in the root directory of this source tree.
166
- */var Rh;function nA(){if(Rh)return Ka;Rh=1;var e=w,t=nv();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,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Ka.useSyncExternalStoreWithSelector=function(c,u,f,h,d){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!b){if(b=!0,y=E,E=h(E),d!==void 0&&m.hasValue){var R=m.value;if(d(R,E))return S=R}return S=E}if(R=S,r(y,E))return R;var A=h(E);return d!==void 0&&d(R,A)?R:(y=E,S=A)}var b=!1,y,S,T=f===void 0?null:f;return[function(){return v(u())},T===null?void 0:function(){return v(T())}]},[u,f,h,d]);var g=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Ka}var Ih={};/**
166
+ */var Rh;function nA(){if(Rh)return Ka;Rh=1;var e=x,t=nv();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,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Ka.useSyncExternalStoreWithSelector=function(c,u,f,h,d){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(E){if(!b){if(b=!0,v=E,E=h(E),d!==void 0&&m.hasValue){var R=m.value;if(d(R,E))return S=R}return S=E}if(R=S,r(v,E))return R;var I=h(E);return d!==void 0&&d(R,I)?R:(v=E,S=I)}var b=!1,v,S,T=f===void 0?null:f;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,f,h,d]);var g=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Ka}var Ih={};/**
167
167
  * @license React
168
168
  * use-sync-external-store-shim/with-selector.development.js
169
169
  *
@@ -171,32 +171,32 @@
171
171
  *
172
172
  * This source code is licensed under the MIT license found in the
173
173
  * LICENSE file in the root directory of this source tree.
174
- */var Ah;function rA(){return Ah||(Ah=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=nv();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,f,h,d,p){var m=s(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var v=a(function(){var T=!1,E,R,A=function(k){if(!T){T=!0,E=k;var L=d(k);if(p!==void 0&&g.hasValue){var C=g.value;if(p(C,L))return R=C,C}return R=L,L}var M=E,j=R;if(r(M,k))return j;var _=d(k);return p!==void 0&&p(j,_)?j:(E=k,R=_,_)},O=h===void 0?null:h,I=function(){return A(f())},F=O===null?void 0:function(){return A(O())};return[I,F]},[f,h,d,p]),b=v[0],y=v[1],S=o(u,b,y);return i(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}Ih.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ih}process.env.NODE_ENV==="production"?nA():rA();const Rr=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},oA=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},sA=e=>Object.entries(e),rv=e=>e instanceof Promise,ov=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),iA=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,f)=>n(h=>ov(u,h,s,f));return rv(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},aA=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>ov(c,u,s,o.current));return rv(a)?a.then(c=>l(c)):l(a)},Pu=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=Rr(r),i=Rr((n==null?void 0:n.props)??{}),a=Rr(t),l=Rr((n==null?void 0:n.postMiddleware)??[]),c=Rr((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),f=oA(r),h=Rr(f),d=w.useRef(null);w.useEffect(()=>{if(d.current===null)return;const m=d.current;l.current.forEach(g=>{g(r,f,m)})},[r,l,f]);const[p]=w.useState(()=>{const m=()=>i.current,g=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>h.current});return sA(g).reduce((v,[b,y])=>({...v,[b]:n!=null&&n.debug?iA(b,y,o,m,d,c.current):aA(b,y,o,m,d,c.current)}),{})});return[r,p,i.current]},lA=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function cA(e,t){return w.useRef(lA(e,t)).current}const Ru={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},jr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(jr(i,t,n,a))},[]),sv=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:sv(i,t,n,a)}},{}),Oh={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},rc=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},uA={default:e=>rc(e,{result:Oh.default}),dark:e=>rc(e,{result:Oh.dark})},fA=(e,t)=>{const n=(a,l,c)=>({key:`--${c}`,value:`${a}`}),r=jr(e.colors,n),o=jr(e.spacing,n),s=jr(e.rounded,n),i=e.custom?jr(e.custom,n):[];return rc(r.concat(o,s,i),{result:a=>`html${t?`.${t}`:""} {${a}}`,value:(a,l)=>l.replace("hsla(","").replace(")","")})},iv={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},av={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},dA={name:"dark",rounded:iv,spacing:av,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%)",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:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{header:"hsla(0, 0%, 12%)",background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"},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%)"},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%)"}},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%)"}}}},hA={name:"light",rounded:iv,spacing:av,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"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",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%, 35%)",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:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{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:{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:{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%)"}}}},pA=dA,mA=hA,Iu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(w.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To"},Au=w.createContext({colorTokenParser:Ru.hsla,translations:Iu,locale:void 0}),gA=e=>{const t=w.useMemo(()=>({locale:e.locale,translations:{...Iu,...e.map},colorTokenParser:e.parser||Ru.hsla}),[e]);return x.jsx(Au.Provider,{value:t,children:e.children})},yA=()=>{const e=w.useContext(Au);if(e)return e.locale},Dt=()=>{const e=w.useContext(Au);return e?e.translations:Iu},ta=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Dh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Mh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ou=(e,t)=>{const n=Dh(t,Mh.basic,e)||Dh(t,Mh.extend,e);return n===void 0||n===e?void 0:n},Ei=()=>typeof window>"u",oc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),lv=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},vA={type:"spring",bounce:.3,duration:.6},kh=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),cv={middle:{x:"0%",opacity:1},enter:kh(1),exit:kh(-1)},Fh={exit:{visibility:"hidden"}},bA=e=>{const t=fn(Vy(e));return _y({start:t,end:vo(t,41)})},uv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),xA=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Vy(new Date(e).setMonth(r)),s=uv(o,t);return x.jsx("option",{value:s,"data-index":r,children:s},s)}),Qa={ArrowLeft:(e,t)=>t==="days"?FI(e,1):Xy(e,1),ArrowRight:(e,t)=>t==="days"?vo(e,1):ea(e,1),ArrowUp:(e,t)=>t==="days"?jI(e,1):NI(e,1),ArrowDown:(e,t)=>t==="days"?jy(e,1):Ny(e,1)},jh=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},Jn=e=>e.getFullYear().toString().padStart(4,"0"),wA=(e,t,n)=>e===void 0||n===void 0?!1:jR(t,e)&&NR(t,n),TA=e=>{var n;const t=Dt();return x.jsx(ft.tbody,{layout:!0,variants:cv,custom:e.direction,onKeyDown:e.onKeyDown,className:De((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var s;return x.jsx("tr",{className:(s=e.styles)==null?void 0:s.week,children:r.map(i=>{var d,p,m,g,v,b,y,S,T,E,R,A,O,I;const a=i.toISOString(),l=e.rangeMode?a===((p=(d=e.range)==null?void 0:d.to)==null?void 0:p.toISOString())||a===((g=(m=e.range)==null?void 0:m.from)==null?void 0:g.toISOString()):a===((v=e.date)==null?void 0:v.toISOString()),c=kI(i)&&e.markToday,u=((b=e.disabledDate)==null?void 0:b.call(e,i))||!1,f=!MI(i,e.stateDate)||u,h=e.rangeMode?wA((y=e.range)==null?void 0:y.from,i,(S=e.range)==null?void 0:S.to):!1;return x.jsxs("td",{align:"center",className:De("relative",(T=e.styles)==null?void 0:T.dayFrame),children:[x.jsxs("button",{type:"button","data-date":a,disabled:u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:De(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${f?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,h&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((R=e.stateRange.from)==null?void 0:R.toISOString())===a?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((A=e.labelRange)==null?void 0:A.from)??t.calendarFromDate})}):null,l&&((O=e.stateRange.to)==null?void 0:O.toISOString())===a?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((I=e.labelRange)==null?void 0:I.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},fv=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:f=!0,...h})=>{const d=w.useRef(null),{date:p,range:m}=h,g=p||new Date,v=w.useRef(null),[b,y]=Pu({date:g,isAnimating:!1,year:Jn(g),direction:void 0,range:{from:m==null?void 0:m.from,to:m==null?void 0:m.to},months:xA(g,o),selectMode:l?"from":void 0,week:_y({start:fn(g),end:$P(g)})},O=>({onChangeYear:I=>({year:I}),setToday:()=>({date:Jr(new Date)}),onExitComplete:()=>(jh(v.current||null,d,O.state().date,200),v.current=null,{isAnimating:!1}),date:I=>{const F=I(O.state().date);return{date:F,year:Jn(F)}},nextMonth:I=>{v.current=I.currentTarget;const F=O.state();if(F.isAnimating)return F;const k=ea(F.date,1);return{date:k,isAnimating:!0,direction:1,year:Jn(k)}},previousMonth:I=>{v.current=I.currentTarget;const F=O.state();if(F.isAnimating)return F;const k=Xy(F.date,1);return{date:k,isAnimating:!0,direction:-1,year:Jn(k)}},onSelectDate:I=>{const F=O.state(),k=I.currentTarget.dataset.range==="true",L=I.currentTarget.dataset.date||"",C=new Date(L);return{date:C,year:Jn(C),selectMode:F.selectMode===void 0?void 0:F.selectMode==="from"?"to":"from",range:k?{from:F.selectMode==="from"?C:F.range.from,to:F.selectMode==="to"?C:F.range.to}:F.range}},onChangeMonth:I=>{const F=I.target.value,L=Array.from(I.target.options).find(M=>M.value===F),C=O.state();if(L){const M=L.dataset.index||"",j=new Date(O.state().date);return j.setMonth(+M),{...C,date:j,year:Jn(j)}}return C},onKeyDown:I=>{const F=I.key,k=O.state();if(F in Qa){(F==="ArrowUp"||F==="ArrowDown")&&I.preventDefault();const L=O.state().date,C=vn.keyof(Qa,F)?Qa[F](L,I.shiftKey?"month":"days"):null;if(C!==null)return jh(I.target,d,C),{...k,date:C,year:Jn(C)}}return O.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(O,I,F)=>{var L,C;return(F.method==="onChangeMonth"||F.method==="previousMonth"||F.method==="nextMonth")&&((C=(L=F.props).onChangeMonth)==null||C.call(L,O.date)),O},(O,I,F)=>{var L,C;return F.method==="onChangeYear"&&((C=(L=F.props).onChangeYear)==null||C.call(L,O.date)),O},(O,I,F)=>{const k=F.method==="onSelectDate"||F.method==="setToday"||F.method==="onKeyDown";return l&&k&&t?(c==null||c(O.range),O):(k&&t&&(c==null||c(O.date)),O)}]}),S=lv(bA(b.date),7),T=b.date.toISOString(),E=uv(b.date,o);w.useEffect(()=>{t||c==null||c(b.date)},[T]);const R=cA(O=>{y.date(I=>{const F=new Date(I);return F.setFullYear(+O),F})},1200),A=O=>{const I=O.currentTarget.value;y.onChangeYear(I),a==null||a(new Date(I)),R(I)};return x.jsx(SC,{transition:vA,children:x.jsxs("div",{"data-component":"calendar",ref:d,className:De("relative overflow-hidden",u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(yo,{initial:!1,mode:"popLayout",custom:b.direction,onExitComplete:y.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,"data-focustrap":"prev",variants:Fh,onClick:y.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(gP,{className:"h-4 w-4"})}),x.jsx(ft.span,{layout:!0,variants:cv,custom:b.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",{style:{width:`${E.length}ch`},value:E,onChange:y.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:b.months}),x.jsx(tv,{mask:"int",value:b.year,maxLength:4,placeholder:"YYYY",onChange:A,style:{width:`${b.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(ft.button,{layout:!0,"data-focustrap":"next",variants:Fh,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:y.nextMonth,children:x.jsx(bu,{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:b.week.map(O=>x.jsx("th",{className:De("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:O.toLocaleDateString(o,{weekday:"short"})},O.toString()))})}),x.jsx(TA,{stateRange:b.range,stateDate:b.date,disabledDate:r,markRange:f,zip:S,range:m,styles:u,dispatch:y,date:p||null,markToday:s,rangeMode:l,labelRange:n,RenderOnDay:e,direction:b.direction,onKeyDown:y.onKeyDown})]})]},E)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:y.setToday,children:"Today"})})]})})},dv=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>x.jsxs(po,{...a,as:r,"data-componen":"card",className:De("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",{className:De("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,x.jsx("div",{className:De("min-w-full px-8",i),children:e})]});function kt(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 SA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function hv(...e){return t=>e.forEach(n=>SA(n,t))}function mr(...e){return P.useCallback(hv(...e),e)}function pv(e,t=[]){let n=[];function r(s,i){const a=P.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:h,children:d,...p}=f,m=(h==null?void 0:h[e][l])||a,g=P.useMemo(()=>p,Object.values(p));return x.jsx(m.Provider,{value:g,children:d})}function u(f,h){const d=(h==null?void 0:h[e][l])||a,p=P.useContext(d);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>P.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return P.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,EA(o,...t)]}function EA(...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(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var eo=P.forwardRef((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),s=o.find(PA);if(s){const i=s.props.children,a=o.map(l=>l===s?P.Children.count(i)>1?P.Children.only(null):P.isValidElement(i)?i.props.children:null:l);return x.jsx(sc,{...r,ref:t,children:P.isValidElement(i)?P.cloneElement(i,void 0,a):null})}return x.jsx(sc,{...r,ref:t,children:n})});eo.displayName="Slot";var sc=P.forwardRef((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const o=IA(n);return P.cloneElement(n,{...RA(r,n.props),ref:t?hv(t,o):o})}return P.Children.count(n)>1?P.Children.only(null):null});sc.displayName="SlotClone";var CA=({children:e})=>x.jsx(x.Fragment,{children:e});function PA(e){return P.isValidElement(e)&&e.type===CA}function RA(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function IA(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 AA(e){const t=e+"CollectionProvider",[n,r]=pv(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=d=>{const{scope:p,children:m}=d,g=w.useRef(null),v=w.useRef(new Map).current;return x.jsx(o,{scope:p,itemMap:v,collectionRef:g,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((d,p)=>{const{scope:m,children:g}=d,v=s(a,m),b=mr(p,v.collectionRef);return x.jsx(eo,{ref:b,children:g})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=w.forwardRef((d,p)=>{const{scope:m,children:g,...v}=d,b=w.useRef(null),y=mr(p,b),S=s(c,m);return w.useEffect(()=>(S.itemMap.set(b,{ref:b,...v}),()=>void S.itemMap.delete(b))),x.jsx(eo,{[u]:"",ref:y,children:g})});f.displayName=c;function h(d){const p=s(e+"CollectionConsumer",d);return w.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const v=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,T)=>v.indexOf(S.ref.current)-v.indexOf(T.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},h,r]}var OA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pn=OA.reduce((e,t)=>{const n=P.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?eo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mv(e,t){e&&ys.flushSync(()=>e.dispatchEvent(t))}function wn(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function DA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e);P.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var MA="DismissableLayer",ic="dismissableLayer.update",kA="dismissableLayer.pointerDownOutside",FA="dismissableLayer.focusOutside",Nh,gv=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yv=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=P.useContext(gv),[u,f]=P.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=P.useState({}),p=mr(t,R=>f(R)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),b=u?m.indexOf(u):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=v,T=NA(R=>{const A=R.target,O=[...c.branches].some(I=>I.contains(A));!S||O||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},h),E=LA(R=>{const A=R.target;[...c.branches].some(I=>I.contains(A))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},h);return DA(R=>{b===c.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),P.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Nh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Lh(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Nh)}},[u,h,n,c]),P.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Lh())},[u,c]),P.useEffect(()=>{const R=()=>d({});return document.addEventListener(ic,R),()=>document.removeEventListener(ic,R)},[]),x.jsx(pn.div,{...l,ref:p,style:{pointerEvents:y?S?"auto":"none":void 0,...e.style},onFocusCapture:kt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:kt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:kt(e.onPointerDownCapture,T.onPointerDownCapture)})});yv.displayName=MA;var jA="DismissableLayerBranch",vv=P.forwardRef((e,t)=>{const n=P.useContext(gv),r=P.useRef(null),o=mr(t,r);return P.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(pn.div,{...e,ref:o})});vv.displayName=jA;function NA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){bv(kA,n,c,{discrete:!0})};const c={originalEvent:a};a.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function LA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e),r=P.useRef(!1);return P.useEffect(()=>{const o=s=>{s.target&&!r.current&&bv(FA,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lh(){const e=new CustomEvent(ic);document.dispatchEvent(e)}function bv(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mv(o,s):o.dispatchEvent(s)}var _A=yv,VA=vv,Ci=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},$A="Portal",xv=P.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=P.useState(!1);Ci(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?jc.createPortal(x.jsx(pn.div,{...r,ref:t}),i):null});xv.displayName=$A;function BA(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var wv=e=>{const{present:t,children:n}=e,r=WA(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),s=mr(r.ref,HA(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:s}):null};wv.displayName="Presence";function WA(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),s=P.useRef("none"),i=e?"mounted":"unmounted",[a,l]=BA(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=Hs(r.current);s.current=a==="mounted"?c:"none"},[a]),Ci(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,d=Hs(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ci(()=>{if(t){const c=f=>{const d=Hs(r.current).includes(f.animationName);f.target===t&&d&&ys.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(s.current=Hs(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:P.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Hs(e){return(e==null?void 0:e.animationName)||"none"}function HA(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 zA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=UA({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=wn(n),l=P.useCallback(c=>{if(s){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else o(c)},[s,e,o,a]);return[i,l]}function UA({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),s=wn(t);return P.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var GA="VisuallyHidden",Du=P.forwardRef((e,t)=>x.jsx(pn.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}}));Du.displayName=GA;var Mu="ToastProvider",[ku,YA,KA]=AA("Toast"),[Tv,DL]=pv("Toast",[KA]),[qA,na]=Tv(Mu),Sv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=P.useState(null),[c,u]=P.useState(0),f=P.useRef(!1),h=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Mu}\`. Expected non-empty \`string\`.`),x.jsx(ku.Provider,{scope:t,children:x.jsx(qA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:P.useCallback(()=>u(d=>d+1),[]),onToastRemove:P.useCallback(()=>u(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};Sv.displayName=Mu;var Ev="ToastViewport",XA=["F8"],ac="toast.viewportPause",lc="toast.viewportResume",Cv=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=XA,label:o="Notifications ({hotkey})",...s}=e,i=na(Ev,n),a=YA(n),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),f=P.useRef(null),h=mr(t,f,i.onViewportChange),d=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;P.useEffect(()=>{const g=v=>{var y;r.every(S=>v[S]||v.code===S)&&((y=f.current)==null||y.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),P.useEffect(()=>{const g=l.current,v=f.current;if(p&&g&&v){const b=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(ac);v.dispatchEvent(E),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(lc);v.dispatchEvent(E),i.isClosePausedRef.current=!1}},S=E=>{!g.contains(E.relatedTarget)&&y()},T=()=>{g.contains(document.activeElement)||y()};return g.addEventListener("focusin",b),g.addEventListener("focusout",S),g.addEventListener("pointermove",b),g.addEventListener("pointerleave",T),window.addEventListener("blur",b),window.addEventListener("focus",y),()=>{g.removeEventListener("focusin",b),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",b),g.removeEventListener("pointerleave",T),window.removeEventListener("blur",b),window.removeEventListener("focus",y)}}},[p,i.isClosePausedRef]);const m=P.useCallback(({tabbingDirection:g})=>{const b=a().map(y=>{const S=y.ref.current,T=[S,...uO(S)];return g==="forwards"?T:T.reverse()});return(g==="forwards"?b.reverse():b).flat()},[a]);return P.useEffect(()=>{const g=f.current;if(g){const v=b=>{var T,E,R;const y=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!y){const A=document.activeElement,O=b.shiftKey;if(b.target===g&&O){(T=c.current)==null||T.focus();return}const k=m({tabbingDirection:O?"backwards":"forwards"}),L=k.findIndex(C=>C===A);Za(k.slice(L+1))?b.preventDefault():O?(E=c.current)==null||E.focus():(R=u.current)==null||R.focus()}};return g.addEventListener("keydown",v),()=>g.removeEventListener("keydown",v)}},[a,m]),x.jsxs(VA,{ref:l,role:"region","aria-label":o.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&x.jsx(cc,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Za(g)}}),x.jsx(ku.Slot,{scope:n,children:x.jsx(pn.ol,{tabIndex:-1,...s,ref:h})}),p&&x.jsx(cc,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Za(g)}})]})});Cv.displayName=Ev;var Pv="ToastFocusProxy",cc=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=na(Pv,n);return x.jsx(Du,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});cc.displayName=Pv;var ra="Toast",QA="toast.swipeStart",ZA="toast.swipeMove",JA="toast.swipeCancel",eO="toast.swipeEnd",Rv=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=zA({prop:r,defaultProp:o,onChange:s});return x.jsx(wv,{present:n||a,children:x.jsx(rO,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:wn(e.onPause),onResume:wn(e.onResume),onSwipeStart:kt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:kt(e.onSwipeMove,c=>{const{x:u,y:f}=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",`${f}px`)}),onSwipeCancel:kt(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:kt(e.onSwipeEnd,c=>{const{x:u,y:f}=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",`${f}px`),l(!1)})})})});Rv.displayName=ra;var[tO,nO]=Tv(ra,{onClose(){}}),rO=P.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:d,...p}=e,m=na(ra,n),[g,v]=P.useState(null),b=mr(t,C=>v(C)),y=P.useRef(null),S=P.useRef(null),T=o||m.duration,E=P.useRef(0),R=P.useRef(T),A=P.useRef(0),{onToastAdd:O,onToastRemove:I}=m,F=wn(()=>{var M;(g==null?void 0:g.contains(document.activeElement))&&((M=m.viewport)==null||M.focus()),i()}),k=P.useCallback(C=>{!C||C===1/0||(window.clearTimeout(A.current),E.current=new Date().getTime(),A.current=window.setTimeout(F,C))},[F]);P.useEffect(()=>{const C=m.viewport;if(C){const M=()=>{k(R.current),c==null||c()},j=()=>{const _=new Date().getTime()-E.current;R.current=R.current-_,window.clearTimeout(A.current),l==null||l()};return C.addEventListener(ac,j),C.addEventListener(lc,M),()=>{C.removeEventListener(ac,j),C.removeEventListener(lc,M)}}},[m.viewport,T,l,c,k]),P.useEffect(()=>{s&&!m.isClosePausedRef.current&&k(T)},[s,T,m.isClosePausedRef,k]),P.useEffect(()=>(O(),()=>I()),[O,I]);const L=P.useMemo(()=>g?kv(g):null,[g]);return m.viewport?x.jsxs(x.Fragment,{children:[L&&x.jsx(oO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),x.jsx(tO,{scope:n,onClose:F,children:ys.createPortal(x.jsx(ku.ItemSlot,{scope:n,children:x.jsx(_A,{asChild:!0,onEscapeKeyDown:kt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||F(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(pn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:kt(e.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:kt(e.onPointerDown,C=>{C.button===0&&(y.current={x:C.clientX,y:C.clientY})}),onPointerMove:kt(e.onPointerMove,C=>{if(!y.current)return;const M=C.clientX-y.current.x,j=C.clientY-y.current.y,_=!!S.current,H=["left","right"].includes(m.swipeDirection),U=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=H?U(0,M):0,$=H?0:U(0,j),q=C.pointerType==="touch"?10:2,J={x:D,y:$},X={originalEvent:C,delta:J};_?(S.current=J,zs(ZA,f,X,{discrete:!1})):_h(J,m.swipeDirection,q)?(S.current=J,zs(QA,u,X,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(M)>q||Math.abs(j)>q)&&(y.current=null)}),onPointerUp:kt(e.onPointerUp,C=>{const M=S.current,j=C.target;if(j.hasPointerCapture(C.pointerId)&&j.releasePointerCapture(C.pointerId),S.current=null,y.current=null,M){const _=C.currentTarget,H={originalEvent:C,delta:M};_h(M,m.swipeDirection,m.swipeThreshold)?zs(eO,d,H,{discrete:!0}):zs(JA,h,H,{discrete:!0}),_.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),oO=e=>{const{__scopeToast:t,children:n,...r}=e,o=na(ra,t),[s,i]=P.useState(!1),[a,l]=P.useState(!1);return lO(()=>i(!0)),P.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(xv,{asChild:!0,children:x.jsx(Du,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},sO="ToastTitle",Iv=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(pn.div,{...r,ref:t})});Iv.displayName=sO;var iO="ToastDescription",Av=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(pn.div,{...r,ref:t})});Av.displayName=iO;var Ov="ToastAction",aO=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(Mv,{altText:n,asChild:!0,children:x.jsx(Fu,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ov}\`. Expected non-empty \`string\`.`),null)});aO.displayName=Ov;var Dv="ToastClose",Fu=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=nO(Dv,n);return x.jsx(Mv,{asChild:!0,children:x.jsx(pn.button,{type:"button",...r,ref:t,onClick:kt(e.onClick,o.onClose)})})});Fu.displayName=Dv;var Mv=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(pn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function kv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),cO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...kv(r))}}),t}function zs(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mv(o,s):o.dispatchEvent(s)}var _h=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function lO(e=()=>{}){const t=wn(e);Ci(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function cO(e){return e.nodeType===e.ELEMENT_NODE}function uO(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 Za(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var fO=Sv,dO=Cv,hO=Rv,pO=Iv,mO=Av,gO=Fu;const yO=e=>{const[t,n]=w.useState(!1),r=()=>n(!0),o=()=>n(!1);return w.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},vO=co("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"}}),Fv=w.createContext(()=>{throw new Error("Not implemented")}),bO=()=>w.useContext(Fv),Vh={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]}},xO=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=vO({theme:t.theme||"default"});return x.jsx(hO,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:s,"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:Vh[t.reversedIndex]||Vh.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:i,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(pO,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(mO,{className:"select-text truncate",children:t.text})]}),r?x.jsx(gO,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(wu,{className:"h-5 w-5"})}):null]})})})});function wO({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=yO(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const f=window.crypto.randomUUID();return i(d=>{const p=[...d,{...u,id:f,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(d=>d.filter(p=>p.id!==f))}},[t]);return x.jsxs(fO,{duration:n,swipeThreshold:150,children:[x.jsx(Fv.Provider,{value:l,children:e}),x.jsx(yo,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,f)=>{const h=()=>i(d=>d.filter(p=>p.id!==c.id));return w.createElement(xO,{...c,key:c.id,hover:o,index:u,onClose:h,isLast:f.length-1===u,reversedIndex:f.length-(u+1)})})}),x.jsx(dO,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.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 TO=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:De("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square 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]}),jv=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},Nv=w.createContext(""),SO=e=>{const[t,n]=jv(e.active),r=pr(0),o=pr(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const f=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void f(m)};window.addEventListener("resize",h);let d=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(d=u.querySelector(`li[data-id="${p}"]`),n(p)),d===null){d=u.querySelector("li[data-id]");const m=d.getAttribute("data-id")||"";n(m)}return f(d),()=>window.removeEventListener("resize",h)},[]);const a=$m(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.Children.toArray(e.children),c=u=>{const f=u.currentTarget,h=f.getBoundingClientRect();o.set(h.width),r.set(f.offsetLeft),n(f.dataset.id||"")};return x.jsx(Nv.Provider,{value:t,children:x.jsx(dv,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const f=u.props;return x.jsx("li",{"data-id":f.id,"data-active":t===f.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:x.jsx(i,{"data-id":f.id,onClick:c,"aria-current":"page",href:e.useHash?`#${f.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:f.title})},`tab-header-${f.id}`)})})})}),children:e.children})})},EO=()=>w.useContext(Nv),CO=e=>{const t=EO();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function Un(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sn(e){var t;return(t=(Lv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lv(e){return e instanceof Node||e instanceof Pt(e).Node}function Me(e){return e instanceof Element||e instanceof Pt(e).Element}function et(e){return e instanceof HTMLElement||e instanceof Pt(e).HTMLElement}function uc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function Cs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function PO(e){return["table","td","th"].includes(Un(e))}function oa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ju(e){const t=Nu(),n=Me(e)?Vt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function RO(e){let t=Tn(e);for(;et(t)&&!_n(t);){if(ju(t))return t;if(oa(t))return null;t=Tn(t)}return null}function Nu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _n(e){return["html","body","#document"].includes(Un(e))}function Vt(e){return Pt(e).getComputedStyle(e)}function sa(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(Un(e)==="html")return e;const t=e.assignedSlot||e.parentNode||uc(e)&&e.host||Sn(e);return uc(t)?t.host:t}function _v(e){const t=Tn(e);return _n(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&Cs(t)?t:_v(t)}function Fn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_v(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Pt(o);if(s){const a=fc(i);return t.concat(i,i.visualViewport||[],Cs(o)?o:[],a&&n?Fn(a):[])}return t.concat(o,Fn(o,[],n))}function fc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ht(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 Ye(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&uc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Lu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Vv(){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 $v(e){return e.mozInputSource===0&&e.isTrusted?!0:dc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _u(e){return IO()?!1:!dc()&&e.width===0&&e.height===0||dc()&&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 Vu(){return/apple/i.test(navigator.vendor)}function dc(){const e=/android/i;return e.test(Lu())||e.test(Vv())}function Bv(){return Lu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function IO(){return Vv().includes("jsdom/")}function to(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function AO(e){return"nativeEvent"in e}function OO(e){return e.matches("html,body")}function ut(e){return(e==null?void 0:e.ownerDocument)||document}function Ja(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const DO="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function $u(e){return et(e)&&e.matches(DO)}function mt(e){e.preventDefault(),e.stopPropagation()}function Wv(e){return e?e.getAttribute("role")==="combobox"&&$u(e):!1}const rn=Math.min,Mt=Math.max,Pi=Math.round,Nr=Math.floor,Vn=e=>({x:e,y:e}),MO={left:"right",right:"left",bottom:"top",top:"bottom"},kO={start:"end",end:"start"};function hc(e,t,n){return Mt(e,rn(t,n))}function bo(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function xo(e){return e.split("-")[1]}function Hv(e){return e==="x"?"y":"x"}function Bu(e){return e==="y"?"height":"width"}function gr(e){return["top","bottom"].includes($n(e))?"y":"x"}function Wu(e){return Hv(gr(e))}function FO(e,t,n){n===void 0&&(n=!1);const r=xo(e),o=Wu(e),s=Bu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ri(i)),[i,Ri(i)]}function jO(e){const t=Ri(e);return[pc(e),t,pc(t)]}function pc(e){return e.replace(/start|end/g,t=>kO[t])}function NO(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function LO(e,t,n,r){const o=xo(e);let s=NO($n(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(pc)))),s}function Ri(e){return e.replace(/left|right|bottom|top/g,t=>MO[t])}function _O(e){return{top:0,right:0,bottom:0,left:0,...e}}function zv(e){return typeof e!="number"?_O(e):{top:e,right:e,bottom:e,left:e}}function Ii(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}}/*!
174
+ */var Ah;function rA(){return Ah||(Ah=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=x,t=nv();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,f,h,d,p){var m=s(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var y=a(function(){var T=!1,E,R,I=function(k){if(!T){T=!0,E=k;var j=d(k);if(p!==void 0&&g.hasValue){var P=g.value;if(p(P,j))return R=P,P}return R=j,j}var O=E,F=R;if(r(O,k))return F;var _=d(k);return p!==void 0&&p(F,_)?F:(E=k,R=_,_)},M=h===void 0?null:h,A=function(){return I(f())},N=M===null?void 0:function(){return I(M())};return[A,N]},[f,h,d,p]),b=y[0],v=y[1],S=o(u,b,v);return i(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}Ih.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ih}process.env.NODE_ENV==="production"?nA():rA();const Rr=e=>{const t=x.useRef(e??{});return x.useEffect(()=>void(t.current=e),[e]),t},oA=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current},sA=e=>Object.entries(e),rv=e=>e instanceof Promise,ov=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),iA=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,f)=>n(h=>ov(u,h,s,f));return rv(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},aA=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>ov(c,u,s,o.current));return rv(a)?a.then(c=>l(c)):l(a)},Pu=(e,t,n)=>{const[r,o]=x.useState(()=>e),s=Rr(r),i=Rr((n==null?void 0:n.props)??{}),a=Rr(t),l=Rr((n==null?void 0:n.postMiddleware)??[]),c=Rr((n==null?void 0:n.interceptor)??[]),u=x.useRef(e),f=oA(r),h=Rr(f),d=x.useRef(null);x.useEffect(()=>{if(d.current===null)return;const m=d.current;l.current.forEach(g=>{g(r,f,m)})},[r,l,f]);const[p]=x.useState(()=>{const m=()=>i.current,g=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>h.current});return sA(g).reduce((y,[b,v])=>({...y,[b]:n!=null&&n.debug?iA(b,v,o,m,d,c.current):aA(b,v,o,m,d,c.current)}),{})});return[r,p,i.current]},lA=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function cA(e,t){return x.useRef(lA(e,t)).current}const Ru={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},jr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(jr(i,t,n,a))},[]),sv=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:sv(i,t,n,a)}},{}),Oh={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},rc=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},uA={default:e=>rc(e,{result:Oh.default}),dark:e=>rc(e,{result:Oh.dark})},fA=(e,t)=>{const n=(a,l,c)=>({key:`--${c}`,value:`${a}`}),r=jr(e.colors,n),o=jr(e.spacing,n),s=jr(e.rounded,n),i=e.custom?jr(e.custom,n):[];return rc(r.concat(o,s,i),{result:a=>`html${t?`.${t}`:""} {${a}}`,value:(a,l)=>l.replace("hsla(","").replace(")","")})},iv={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},av={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},dA={name:"dark",rounded:iv,spacing:av,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%)",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:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{header:"hsla(0, 0%, 12%)",background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"},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%)"},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%)"}},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%)"}}}},hA={name:"light",rounded:iv,spacing:av,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"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",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%, 35%)",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:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{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:{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:{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%)"}}}},pA=dA,mA=hA,Iu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>w.jsxs(x.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today"},Au=x.createContext({colorTokenParser:Ru.hsla,translations:Iu,locale:void 0}),gA=e=>{const t=x.useMemo(()=>({locale:e.locale,translations:{...Iu,...e.map},colorTokenParser:e.parser||Ru.hsla}),[e]);return w.jsx(Au.Provider,{value:t,children:e.children})},yA=()=>{const e=x.useContext(Au);if(e)return e.locale},Rt=()=>{const e=x.useContext(Au);return e?e.translations:Iu},Cs=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Dh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Mh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ou=(e,t)=>{const n=Dh(t,Mh.basic,e)||Dh(t,Mh.extend,e);return n===void 0||n===e?void 0:n},Ci=()=>typeof window>"u",oc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),lv=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},vA={type:"spring",bounce:.3,duration:.6},kh=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),cv={middle:{x:"0%",opacity:1},enter:kh(1),exit:kh(-1)},Fh={exit:{visibility:"hidden"}},bA=e=>{const t=fn(Vy(e));return _y({start:t,end:vo(t,41)})},uv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),xA=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=Vy(new Date(1970,o,1).setMonth(o)),i=uv(s,n);return w.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),Qa={ArrowLeft:(e,t)=>t==="days"?FI(e,1):Xy(e,1),ArrowRight:(e,t)=>t==="days"?vo(e,1):ta(e,1),ArrowUp:(e,t)=>t==="days"?jI(e,1):NI(e,1),ArrowDown:(e,t)=>t==="days"?jy(e,1):Ny(e,1)},jh=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},Jn=e=>e.getFullYear().toString().padStart(4,"0"),wA=(e,t,n)=>e===void 0||n===void 0?!1:jR(t,e)&&NR(t,n),TA=e=>{var n;const t=Rt();return w.jsx(ft.tbody,{layout:!0,variants:cv,custom:e.direction,onKeyDown:e.onKeyDown,className:De((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var s;return w.jsx("tr",{className:(s=e.styles)==null?void 0:s.week,children:r.map(i=>{var d,p,m,g,y,b,v,S,T,E,R,I,M,A;const a=i.toISOString(),l=e.rangeMode?a===((p=(d=e.range)==null?void 0:d.to)==null?void 0:p.toISOString())||a===((g=(m=e.range)==null?void 0:m.from)==null?void 0:g.toISOString()):a===((y=e.date)==null?void 0:y.toISOString()),c=kI(i)&&e.markToday,u=((b=e.disabledDate)==null?void 0:b.call(e,i))||!1,f=!MI(i,e.stateDate)||u,h=e.rangeMode?wA((v=e.range)==null?void 0:v.from,i,(S=e.range)==null?void 0:S.to):!1;return w.jsxs("td",{align:"center",className:De("relative",(T=e.styles)==null?void 0:T.dayFrame),children:[w.jsxs("button",{type:"button","data-date":a,disabled:u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:De(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${f?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,h&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((R=e.stateRange.from)==null?void 0:R.toISOString())===a?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((I=e.labelRange)==null?void 0:I.from)??t.calendarFromDate})}):null,l&&((M=e.stateRange.to)==null?void 0:M.toISOString())===a?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((A=e.labelRange)==null?void 0:A.to)??t.calendarToDate})}):null]}),e.RenderOnDay?w.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},fv=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:f=!0,...h})=>{const d=x.useRef(Cs()),p=Rt(),m=x.useRef(null),{date:g,range:y}=h,b=g||new Date,v=x.useRef(null),[S,T]=Pu({date:b,isAnimating:!1,year:Jn(b),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:xA(d.current,b,o),selectMode:l?"from":void 0,week:_y({start:fn(b),end:$P(b)})},N=>({onChangeYear:k=>({year:k}),setToday:()=>({date:Jr(new Date)}),onExitComplete:()=>(jh(v.current||null,m,N.state().date,200),v.current=null,{isAnimating:!1}),date:k=>{const j=k(N.state().date);return{date:j,year:Jn(j)}},nextMonth:k=>{v.current=k.currentTarget;const j=N.state();if(j.isAnimating)return j;const P=ta(j.date,1);return{date:P,isAnimating:!0,direction:1,year:Jn(P)}},previousMonth:k=>{v.current=k.currentTarget;const j=N.state();if(j.isAnimating)return j;const P=Xy(j.date,1);return{date:P,isAnimating:!0,direction:-1,year:Jn(P)}},onSelectDate:k=>{const j=N.state(),P=k.currentTarget.dataset.range==="true",O=k.currentTarget.dataset.date||"",F=new Date(O);return{date:F,year:Jn(F),selectMode:j.selectMode===void 0?void 0:j.selectMode==="from"?"to":"from",range:P?{from:j.selectMode==="from"?F:j.range.from,to:j.selectMode==="to"?F:j.range.to}:j.range}},onChangeMonth:k=>{const j=k.target.value,O=Array.from(k.target.options).find(_=>_.value===j),F=N.state();if(O){const _=O.dataset.index||"",W=new Date(N.state().date);return W.setMonth(+_),{...F,date:W,year:Jn(W)}}return F},onKeyDown:k=>{const j=k.key,P=N.state();if(j in Qa){(j==="ArrowUp"||j==="ArrowDown")&&k.preventDefault();const O=N.state().date,F=vn.keyof(Qa,j)?Qa[j](O,k.shiftKey?"month":"days"):null;if(F!==null)return jh(k.target,m,F),{...P,date:F,year:Jn(F)}}return N.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(N,k,j)=>{var O,F;return(j.method==="onChangeMonth"||j.method==="previousMonth"||j.method==="nextMonth")&&((F=(O=j.props).onChangeMonth)==null||F.call(O,N.date)),N},(N,k,j)=>{var O,F;return j.method==="onChangeYear"&&((F=(O=j.props).onChangeYear)==null||F.call(O,N.date)),N},(N,k,j)=>{const P=j.method==="onSelectDate"||j.method==="setToday"||j.method==="onKeyDown";return l&&P&&t?(c==null||c(N.range),N):(P&&t&&(c==null||c(N.date)),N)}]}),E=lv(bA(S.date),7),R=S.date.toISOString(),I=uv(S.date,o);x.useEffect(()=>{t||c==null||c(S.date)},[R]);const M=cA(N=>{T.date(k=>{const j=new Date(k);return j.setFullYear(+N),j})},1200),A=N=>{const k=N.currentTarget.value;T.onChangeYear(k),a==null||a(new Date(k)),M(k)};return w.jsx(SC,{transition:vA,children:w.jsxs("div",{"data-component":"calendar",ref:m,className:De("relative overflow-hidden",u==null?void 0:u.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(yo,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:T.onExitComplete,children:w.jsxs(ft.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(ft.button,{layout:!0,"data-focustrap":"prev",variants:Fh,onClick:T.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(gP,{className:"h-4 w-4"})}),w.jsx(ft.span,{layout:!0,variants:cv,custom:S.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:w.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[w.jsx("select",{style:{width:`${I.length}ch`},value:I,onChange:T.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:S.months}),w.jsx(tv,{mask:"int",value:S.year,maxLength:4,placeholder:"YYYY",onChange:A,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(ft.button,{layout:!0,"data-focustrap":"next",variants:Fh,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:T.nextMonth,children:w.jsx(bu,{className:"h-4 w-4"})}),w.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%)"}})]}),w.jsxs(ft.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:S.week.map(N=>w.jsx("th",{className:De("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:N.toLocaleDateString(o,{weekday:"short"})},N.toString()))})}),w.jsx(TA,{stateRange:S.range,stateDate:S.date,disabledDate:r,markRange:f,zip:E,range:y,styles:u,dispatch:T,date:g||null,markToday:s,rangeMode:l,labelRange:n,RenderOnDay:e,direction:S.direction,onKeyDown:T.onKeyDown})]})]},I)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:T.setToday,children:p.calendarToday})})]})})},dv=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>w.jsxs(po,{...a,as:r,"data-componen":"card",className:De("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?w.jsx("header",{className:De("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,w.jsx("div",{className:De("min-w-full px-8",i),children:e})]});function kt(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 SA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function hv(...e){return t=>e.forEach(n=>SA(n,t))}function mr(...e){return C.useCallback(hv(...e),e)}function pv(e,t=[]){let n=[];function r(s,i){const a=C.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:h,children:d,...p}=f,m=(h==null?void 0:h[e][l])||a,g=C.useMemo(()=>p,Object.values(p));return w.jsx(m.Provider,{value:g,children:d})}function u(f,h){const d=(h==null?void 0:h[e][l])||a,p=C.useContext(d);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>C.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return C.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,EA(o,...t)]}function EA(...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(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var eo=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),s=o.find(PA);if(s){const i=s.props.children,a=o.map(l=>l===s?C.Children.count(i)>1?C.Children.only(null):C.isValidElement(i)?i.props.children:null:l);return w.jsx(sc,{...r,ref:t,children:C.isValidElement(i)?C.cloneElement(i,void 0,a):null})}return w.jsx(sc,{...r,ref:t,children:n})});eo.displayName="Slot";var sc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=IA(n);return C.cloneElement(n,{...RA(r,n.props),ref:t?hv(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});sc.displayName="SlotClone";var CA=({children:e})=>w.jsx(w.Fragment,{children:e});function PA(e){return C.isValidElement(e)&&e.type===CA}function RA(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function IA(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 AA(e){const t=e+"CollectionProvider",[n,r]=pv(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=d=>{const{scope:p,children:m}=d,g=x.useRef(null),y=x.useRef(new Map).current;return w.jsx(o,{scope:p,itemMap:y,collectionRef:g,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=x.forwardRef((d,p)=>{const{scope:m,children:g}=d,y=s(a,m),b=mr(p,y.collectionRef);return w.jsx(eo,{ref:b,children:g})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=x.forwardRef((d,p)=>{const{scope:m,children:g,...y}=d,b=x.useRef(null),v=mr(p,b),S=s(c,m);return x.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>void S.itemMap.delete(b))),w.jsx(eo,{[u]:"",ref:v,children:g})});f.displayName=c;function h(d){const p=s(e+"CollectionConsumer",d);return x.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,T)=>y.indexOf(S.ref.current)-y.indexOf(T.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},h,r]}var OA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pn=OA.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?eo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mv(e,t){e&&ys.flushSync(()=>e.dispatchEvent(t))}function wn(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function DA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e);C.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 MA="DismissableLayer",ic="dismissableLayer.update",kA="dismissableLayer.pointerDownOutside",FA="dismissableLayer.focusOutside",Nh,gv=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yv=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=C.useContext(gv),[u,f]=C.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),p=mr(t,R=>f(R)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,T=NA(R=>{const I=R.target,M=[...c.branches].some(A=>A.contains(I));!S||M||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},h),E=LA(R=>{const I=R.target;[...c.branches].some(A=>A.contains(I))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},h);return DA(R=>{b===c.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Nh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Lh(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Nh)}},[u,h,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Lh())},[u,c]),C.useEffect(()=>{const R=()=>d({});return document.addEventListener(ic,R),()=>document.removeEventListener(ic,R)},[]),w.jsx(pn.div,{...l,ref:p,style:{pointerEvents:v?S?"auto":"none":void 0,...e.style},onFocusCapture:kt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:kt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:kt(e.onPointerDownCapture,T.onPointerDownCapture)})});yv.displayName=MA;var jA="DismissableLayerBranch",vv=C.forwardRef((e,t)=>{const n=C.useContext(gv),r=C.useRef(null),o=mr(t,r);return C.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(pn.div,{...e,ref:o})});vv.displayName=jA;function NA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){bv(kA,n,c,{discrete:!0})};const c={originalEvent:a};a.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function LA(e,t=globalThis==null?void 0:globalThis.document){const n=wn(e),r=C.useRef(!1);return C.useEffect(()=>{const o=s=>{s.target&&!r.current&&bv(FA,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lh(){const e=new CustomEvent(ic);document.dispatchEvent(e)}function bv(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mv(o,s):o.dispatchEvent(s)}var _A=yv,VA=vv,Pi=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},$A="Portal",xv=C.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=C.useState(!1);Pi(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?jc.createPortal(w.jsx(pn.div,{...r,ref:t}),i):null});xv.displayName=$A;function BA(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var wv=e=>{const{present:t,children:n}=e,r=WA(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),s=mr(r.ref,HA(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:s}):null};wv.displayName="Presence";function WA(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),s=C.useRef("none"),i=e?"mounted":"unmounted",[a,l]=BA(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=zs(r.current);s.current=a==="mounted"?c:"none"},[a]),Pi(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,d=zs(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pi(()=>{if(t){const c=f=>{const d=zs(r.current).includes(f.animationName);f.target===t&&d&&ys.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(s.current=zs(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function zs(e){return(e==null?void 0:e.animationName)||"none"}function HA(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 zA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=UA({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=wn(n),l=C.useCallback(c=>{if(s){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else o(c)},[s,e,o,a]);return[i,l]}function UA({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),s=wn(t);return C.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var GA="VisuallyHidden",Du=C.forwardRef((e,t)=>w.jsx(pn.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}}));Du.displayName=GA;var Mu="ToastProvider",[ku,YA,KA]=AA("Toast"),[Tv,DL]=pv("Toast",[KA]),[qA,na]=Tv(Mu),Sv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=C.useState(null),[c,u]=C.useState(0),f=C.useRef(!1),h=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Mu}\`. Expected non-empty \`string\`.`),w.jsx(ku.Provider,{scope:t,children:w.jsx(qA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:C.useCallback(()=>u(d=>d+1),[]),onToastRemove:C.useCallback(()=>u(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};Sv.displayName=Mu;var Ev="ToastViewport",XA=["F8"],ac="toast.viewportPause",lc="toast.viewportResume",Cv=C.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=XA,label:o="Notifications ({hotkey})",...s}=e,i=na(Ev,n),a=YA(n),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=mr(t,f,i.onViewportChange),d=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;C.useEffect(()=>{const g=y=>{var v;r.every(S=>y[S]||y.code===S)&&((v=f.current)==null||v.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),C.useEffect(()=>{const g=l.current,y=f.current;if(p&&g&&y){const b=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(ac);y.dispatchEvent(E),i.isClosePausedRef.current=!0}},v=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(lc);y.dispatchEvent(E),i.isClosePausedRef.current=!1}},S=E=>{!g.contains(E.relatedTarget)&&v()},T=()=>{g.contains(document.activeElement)||v()};return g.addEventListener("focusin",b),g.addEventListener("focusout",S),g.addEventListener("pointermove",b),g.addEventListener("pointerleave",T),window.addEventListener("blur",b),window.addEventListener("focus",v),()=>{g.removeEventListener("focusin",b),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",b),g.removeEventListener("pointerleave",T),window.removeEventListener("blur",b),window.removeEventListener("focus",v)}}},[p,i.isClosePausedRef]);const m=C.useCallback(({tabbingDirection:g})=>{const b=a().map(v=>{const S=v.ref.current,T=[S,...uO(S)];return g==="forwards"?T:T.reverse()});return(g==="forwards"?b.reverse():b).flat()},[a]);return C.useEffect(()=>{const g=f.current;if(g){const y=b=>{var T,E,R;const v=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!v){const I=document.activeElement,M=b.shiftKey;if(b.target===g&&M){(T=c.current)==null||T.focus();return}const k=m({tabbingDirection:M?"backwards":"forwards"}),j=k.findIndex(P=>P===I);Za(k.slice(j+1))?b.preventDefault():M?(E=c.current)==null||E.focus():(R=u.current)==null||R.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[a,m]),w.jsxs(VA,{ref:l,role:"region","aria-label":o.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&w.jsx(cc,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Za(g)}}),w.jsx(ku.Slot,{scope:n,children:w.jsx(pn.ol,{tabIndex:-1,...s,ref:h})}),p&&w.jsx(cc,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Za(g)}})]})});Cv.displayName=Ev;var Pv="ToastFocusProxy",cc=C.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=na(Pv,n);return w.jsx(Du,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});cc.displayName=Pv;var ra="Toast",QA="toast.swipeStart",ZA="toast.swipeMove",JA="toast.swipeCancel",eO="toast.swipeEnd",Rv=C.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=zA({prop:r,defaultProp:o,onChange:s});return w.jsx(wv,{present:n||a,children:w.jsx(rO,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:wn(e.onPause),onResume:wn(e.onResume),onSwipeStart:kt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:kt(e.onSwipeMove,c=>{const{x:u,y:f}=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",`${f}px`)}),onSwipeCancel:kt(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:kt(e.onSwipeEnd,c=>{const{x:u,y:f}=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",`${f}px`),l(!1)})})})});Rv.displayName=ra;var[tO,nO]=Tv(ra,{onClose(){}}),rO=C.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:d,...p}=e,m=na(ra,n),[g,y]=C.useState(null),b=mr(t,P=>y(P)),v=C.useRef(null),S=C.useRef(null),T=o||m.duration,E=C.useRef(0),R=C.useRef(T),I=C.useRef(0),{onToastAdd:M,onToastRemove:A}=m,N=wn(()=>{var O;(g==null?void 0:g.contains(document.activeElement))&&((O=m.viewport)==null||O.focus()),i()}),k=C.useCallback(P=>{!P||P===1/0||(window.clearTimeout(I.current),E.current=new Date().getTime(),I.current=window.setTimeout(N,P))},[N]);C.useEffect(()=>{const P=m.viewport;if(P){const O=()=>{k(R.current),c==null||c()},F=()=>{const _=new Date().getTime()-E.current;R.current=R.current-_,window.clearTimeout(I.current),l==null||l()};return P.addEventListener(ac,F),P.addEventListener(lc,O),()=>{P.removeEventListener(ac,F),P.removeEventListener(lc,O)}}},[m.viewport,T,l,c,k]),C.useEffect(()=>{s&&!m.isClosePausedRef.current&&k(T)},[s,T,m.isClosePausedRef,k]),C.useEffect(()=>(M(),()=>A()),[M,A]);const j=C.useMemo(()=>g?kv(g):null,[g]);return m.viewport?w.jsxs(w.Fragment,{children:[j&&w.jsx(oO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:j}),w.jsx(tO,{scope:n,onClose:N,children:ys.createPortal(w.jsx(ku.ItemSlot,{scope:n,children:w.jsx(_A,{asChild:!0,onEscapeKeyDown:kt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||N(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(pn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:kt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:kt(e.onPointerDown,P=>{P.button===0&&(v.current={x:P.clientX,y:P.clientY})}),onPointerMove:kt(e.onPointerMove,P=>{if(!v.current)return;const O=P.clientX-v.current.x,F=P.clientY-v.current.y,_=!!S.current,W=["left","right"].includes(m.swipeDirection),U=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=W?U(0,O):0,$=W?0:U(0,F),q=P.pointerType==="touch"?10:2,J={x:D,y:$},X={originalEvent:P,delta:J};_?(S.current=J,Us(ZA,f,X,{discrete:!1})):_h(J,m.swipeDirection,q)?(S.current=J,Us(QA,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>q||Math.abs(F)>q)&&(v.current=null)}),onPointerUp:kt(e.onPointerUp,P=>{const O=S.current,F=P.target;if(F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),S.current=null,v.current=null,O){const _=P.currentTarget,W={originalEvent:P,delta:O};_h(O,m.swipeDirection,m.swipeThreshold)?Us(eO,d,W,{discrete:!0}):Us(JA,h,W,{discrete:!0}),_.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),oO=e=>{const{__scopeToast:t,children:n,...r}=e,o=na(ra,t),[s,i]=C.useState(!1),[a,l]=C.useState(!1);return lO(()=>i(!0)),C.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:w.jsx(xv,{asChild:!0,children:w.jsx(Du,{...r,children:s&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},sO="ToastTitle",Iv=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(pn.div,{...r,ref:t})});Iv.displayName=sO;var iO="ToastDescription",Av=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(pn.div,{...r,ref:t})});Av.displayName=iO;var Ov="ToastAction",aO=C.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(Mv,{altText:n,asChild:!0,children:w.jsx(Fu,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ov}\`. Expected non-empty \`string\`.`),null)});aO.displayName=Ov;var Dv="ToastClose",Fu=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=nO(Dv,n);return w.jsx(Mv,{asChild:!0,children:w.jsx(pn.button,{type:"button",...r,ref:t,onClick:kt(e.onClick,o.onClose)})})});Fu.displayName=Dv;var Mv=C.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return w.jsx(pn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function kv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),cO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...kv(r))}}),t}function Us(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mv(o,s):o.dispatchEvent(s)}var _h=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function lO(e=()=>{}){const t=wn(e);Pi(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function cO(e){return e.nodeType===e.ELEMENT_NODE}function uO(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 Za(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var fO=Sv,dO=Cv,hO=Rv,pO=Iv,mO=Av,gO=Fu;const yO=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),o=()=>n(!1);return x.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},vO=co("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"}}),Fv=x.createContext(()=>{throw new Error("Not implemented")}),bO=()=>x.useContext(Fv),Vh={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]}},xO=x.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=vO({theme:t.theme||"default"});return w.jsx(hO,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:w.jsx(ft.li,{layout:!0,layoutScroll:!0,animate:s,"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:Vh[t.reversedIndex]||Vh.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:w.jsxs("div",{className:i,children:[w.jsxs("div",{className:"flex flex-col p-4",children:[t.title?w.jsx(pO,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,w.jsx(mO,{className:"select-text truncate",children:t.text})]}),r?w.jsx(gO,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:w.jsx(wu,{className:"h-5 w-5"})}):null]})})})});function wO({children:e,max:t=5,duration:n=5e3}){const r=x.useRef(null),o=yO(r),[s,i]=x.useState([]),a=x.useCallback(()=>i([]),[]);x.useEffect(()=>()=>a(),[a]);const l=x.useCallback((c,u)=>{const f=window.crypto.randomUUID();return i(d=>{const p=[...d,{...u,id:f,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(d=>d.filter(p=>p.id!==f))}},[t]);return w.jsxs(fO,{duration:n,swipeThreshold:150,children:[w.jsx(Fv.Provider,{value:l,children:e}),w.jsx(yo,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,f)=>{const h=()=>i(d=>d.filter(p=>p.id!==c.id));return x.createElement(xO,{...c,key:c.id,hover:o,index:u,onClose:h,isLast:f.length-1===u,reversedIndex:f.length-(u+1)})})}),w.jsx(dO,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.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 TO=e=>w.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[w.jsxs("header",{className:"p-6 items-start flex gap-4",children:[w.jsx("div",{className:De("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:w.jsx("div",{children:w.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx("header",{children:w.jsx("h3",{className:"text-base leading-none",children:e.title})}),w.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?w.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),jv=(e,t)=>{const[n,r]=x.useState(()=>t||e);return x.useEffect(()=>{r(e)},[e]),[n,r]},Nv=x.createContext(""),SO=e=>{const[t,n]=jv(e.active),r=pr(0),o=pr(0),s=x.useRef(null),i=e.useHash?"a":"button";x.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const f=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void f(m)};window.addEventListener("resize",h);let d=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(d=u.querySelector(`li[data-id="${p}"]`),n(p)),d===null){d=u.querySelector("li[data-id]");const m=d.getAttribute("data-id")||"";n(m)}return f(d),()=>window.removeEventListener("resize",h)},[]);const a=$m(e.onChange);x.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=x.Children.toArray(e.children),c=u=>{const f=u.currentTarget,h=f.getBoundingClientRect();o.set(h.width),r.set(f.offsetLeft),n(f.dataset.id||"")};return w.jsx(Nv.Provider,{value:t,children:w.jsx(dv,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:w.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:w.jsx("nav",{className:"min-w-0",children:w.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const f=u.props;return w.jsx("li",{"data-id":f.id,"data-active":t===f.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:w.jsx(i,{"data-id":f.id,onClick:c,"aria-current":"page",href:e.useHash?`#${f.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:f.title})},`tab-header-${f.id}`)})})})}),children:e.children})})},EO=()=>x.useContext(Nv),CO=e=>{const t=EO();return w.jsx(x.Fragment,{children:e.id===t?e.children:null})};function Un(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sn(e){var t;return(t=(Lv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lv(e){return e instanceof Node||e instanceof Pt(e).Node}function Me(e){return e instanceof Element||e instanceof Pt(e).Element}function et(e){return e instanceof HTMLElement||e instanceof Pt(e).HTMLElement}function uc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function Ps(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function PO(e){return["table","td","th"].includes(Un(e))}function oa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ju(e){const t=Nu(),n=Me(e)?Vt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function RO(e){let t=Tn(e);for(;et(t)&&!_n(t);){if(ju(t))return t;if(oa(t))return null;t=Tn(t)}return null}function Nu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _n(e){return["html","body","#document"].includes(Un(e))}function Vt(e){return Pt(e).getComputedStyle(e)}function sa(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(Un(e)==="html")return e;const t=e.assignedSlot||e.parentNode||uc(e)&&e.host||Sn(e);return uc(t)?t.host:t}function _v(e){const t=Tn(e);return _n(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&Ps(t)?t:_v(t)}function Fn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_v(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Pt(o);if(s){const a=fc(i);return t.concat(i,i.visualViewport||[],Ps(o)?o:[],a&&n?Fn(a):[])}return t.concat(o,Fn(o,[],n))}function fc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ht(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 Ye(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&uc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Lu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Vv(){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 $v(e){return e.mozInputSource===0&&e.isTrusted?!0:dc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _u(e){return IO()?!1:!dc()&&e.width===0&&e.height===0||dc()&&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 Vu(){return/apple/i.test(navigator.vendor)}function dc(){const e=/android/i;return e.test(Lu())||e.test(Vv())}function Bv(){return Lu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function IO(){return Vv().includes("jsdom/")}function to(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function AO(e){return"nativeEvent"in e}function OO(e){return e.matches("html,body")}function ut(e){return(e==null?void 0:e.ownerDocument)||document}function Ja(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const DO="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function $u(e){return et(e)&&e.matches(DO)}function mt(e){e.preventDefault(),e.stopPropagation()}function Wv(e){return e?e.getAttribute("role")==="combobox"&&$u(e):!1}const rn=Math.min,Mt=Math.max,Ri=Math.round,Nr=Math.floor,Vn=e=>({x:e,y:e}),MO={left:"right",right:"left",bottom:"top",top:"bottom"},kO={start:"end",end:"start"};function hc(e,t,n){return Mt(e,rn(t,n))}function bo(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function xo(e){return e.split("-")[1]}function Hv(e){return e==="x"?"y":"x"}function Bu(e){return e==="y"?"height":"width"}function gr(e){return["top","bottom"].includes($n(e))?"y":"x"}function Wu(e){return Hv(gr(e))}function FO(e,t,n){n===void 0&&(n=!1);const r=xo(e),o=Wu(e),s=Bu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ii(i)),[i,Ii(i)]}function jO(e){const t=Ii(e);return[pc(e),t,pc(t)]}function pc(e){return e.replace(/start|end/g,t=>kO[t])}function NO(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function LO(e,t,n,r){const o=xo(e);let s=NO($n(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(pc)))),s}function Ii(e){return e.replace(/left|right|bottom|top/g,t=>MO[t])}function _O(e){return{top:0,right:0,bottom:0,left:0,...e}}function zv(e){return typeof e!="number"?_O(e):{top:e,right:e,bottom:e,left:e}}function Ai(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}}/*!
175
175
  * tabbable 6.2.0
176
176
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
177
- */var VO=["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])"],Ai=VO.join(","),Uv=typeof Element>"u",no=Uv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oi=!Uv&&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},Di=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"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},$O=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},BO=function(t,n,r){if(Di(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ai));return n&&no.call(t,Ai)&&o.unshift(t),o=o.filter(r),o},WO=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Di(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=no.call(i,Ai);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!Di(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&h){var d=e(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else s.unshift.apply(s,i.children)}}return o},Gv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Yv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$O(t))&&!Gv(t)?0:t.tabIndex},HO=function(t,n){var r=Yv(t);return r<0&&n&&!Gv(t)?0:r},zO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Kv=function(t){return t.tagName==="INPUT"},UO=function(t){return Kv(t)&&t.type==="hidden"},GO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},KO=function(t){if(!t.name)return!0;var n=t.form||Oi(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){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",i.message),!1}var s=YO(o,t.form);return!s||s===t},qO=function(t){return Kv(t)&&t.type==="radio"},XO=function(t){return qO(t)&&!KO(t)},QO=function(t){var n,r=t&&Oi(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,f;r=Oi(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},$h=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},ZO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=no.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(no.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Oi(t);if(l&&!l.shadowRoot&&o(l)===!0)return $h(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(QO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return $h(t);return!1},JO=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 no.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},eD=function(t,n){return!(n.disabled||Di(n)||UO(n)||ZO(n,t)||GO(n)||JO(n))},mc=function(t,n){return!(XO(n)||Yv(n)<0||!eD(t,n))},tD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},nD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=HO(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(zO).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ls=function(t,n){n=n||{};var r;return n.getShadowRoot?r=WO([t],n.includeContainer,{filter:mc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:tD}):r=BO(t,n.includeContainer,mc.bind(null,n)),nD(r)},rD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return no.call(t,Ai)===!1?!1:mc(n,t)};function Bh(e,t,n){let{reference:r,floating:o}=e;const s=gr(t),i=Wu(t),a=Bu(i),l=$n(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(xo(t)){case"start":d[i]-=h*(n&&c?-1:1);break;case"end":d[i]+=h*(n&&c?-1:1);break}return d}const oD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Bh(c,r,l),h=r,d={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x:b,y,data:S,reset:T}=await v({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,f=y??f,d={...d,[g]:{...d[g],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:f}=Bh(c,h,l)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Hu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=bo(t,e),p=zv(d),g=a[h?f==="floating"?"reference":"floating":f],v=Ii(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},T=Ii(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(v.top-T.top+p.top)/S.y,bottom:(T.bottom-v.bottom+p.bottom)/S.y,left:(v.left-T.left+p.left)/S.x,right:(T.right-v.right+p.right)/S.x}}const sD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=bo(e,t)||{};if(c==null)return{};const f=zv(u),h={x:n,y:r},d=Wu(o),p=Bu(d),m=await i.getDimensions(c),g=d==="y",v=g?"top":"left",b=g?"bottom":"right",y=g?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[d]-h[d]-s.floating[p],T=h[d]-s.reference[d],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let R=E?E[y]:0;(!R||!await(i.isElement==null?void 0:i.isElement(E)))&&(R=a.floating[y]||s.floating[p]);const A=S/2-T/2,O=R/2-m[p]/2-1,I=rn(f[v],O),F=rn(f[b],O),k=I,L=R-m[p]-F,C=R/2-m[p]/2+A,M=hc(k,C,L),j=!l.arrow&&xo(o)!=null&&C!==M&&s.reference[p]/2-(C<k?I:F)-m[p]/2<0,_=j?C<k?C-k:C-L:0;return{[d]:h[d]+_,data:{[d]:M,centerOffset:C-M-_,...j&&{alignmentOffset:_}},reset:j}}}),iD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=bo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=$n(o),b=gr(a),y=$n(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(y||!m?[Ri(a)]:jO(a)),E=p!=="none";!h&&E&&T.push(...LO(a,m,p,S));const R=[a,...T],A=await Hu(t,g),O=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&O.push(A[v]),f){const C=FO(o,i,S);O.push(A[C[0]],A[C[1]])}if(I=[...I,{placement:o,overflows:O}],!O.every(C=>C<=0)){var F,k;const C=(((F=s.flip)==null?void 0:F.index)||0)+1,M=R[C];if(M)return{data:{index:C,overflows:I},reset:{placement:M}};let j=(k=I.filter(_=>_.overflows[0]<=0).sort((_,H)=>_.overflows[1]-H.overflows[1])[0])==null?void 0:k.placement;if(!j)switch(d){case"bestFit":{var L;const _=(L=I.filter(H=>{if(E){const U=gr(H.placement);return U===b||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,D)=>U+D,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:L[0];_&&(j=_);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};async function aD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=$n(n),a=xo(n),l=gr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=bo(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(d=a==="end"?p*-1:p),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const lD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await aD(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},cD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:g=>{let{x:v,y:b}=g;return{x:v,y:b}}},...l}=bo(e,t),c={x:n,y:r},u=await Hu(t,l),f=gr($n(o)),h=Hv(f);let d=c[h],p=c[f];if(s){const g=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=d+u[g],y=d-u[v];d=hc(b,d,y)}if(i){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[g],y=p-u[v];p=hc(b,p,y)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},uD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=bo(e,t),l=await Hu(t,a),c=$n(n),u=xo(n),f=gr(n)==="y",{width:h,height:d}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=d-l.top-l.bottom,v=h-l.left-l.right,b=rn(d-l[p],g),y=rn(h-l[m],v),S=!t.middlewareData.shift;let T=b,E=y;if(f?E=u||S?rn(y,v):v:T=u||S?rn(b,g):g,S&&!u){const A=Mt(l.left,0),O=Mt(l.right,0),I=Mt(l.top,0),F=Mt(l.bottom,0);f?E=h-2*(A!==0||O!==0?A+O:Mt(l.left,l.right)):T=d-2*(I!==0||F!==0?I+F:Mt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const R=await o.getDimensions(s.floating);return h!==R.width||d!==R.height?{reset:{rects:!0}}:{}}}};function qv(e){const t=Vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Pi(n)!==s||Pi(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function zu(e){return Me(e)?e:e.contextElement}function Vr(e){const t=zu(e);if(!et(t))return Vn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=qv(t);let i=(s?Pi(n.width):n.width)/r,a=(s?Pi(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const fD=Vn(0);function Xv(e){const t=Pt(e);return!Nu()||!t.visualViewport?fD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=zu(e);let i=Vn(1);t&&(r?Me(r)&&(i=Vr(r)):i=Vr(e));const a=dD(s,n,r)?Xv(s):Vn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const h=Pt(s),d=r&&Me(r)?Pt(r):r;let p=h,m=fc(p);for(;m&&r&&d!==p;){const g=Vr(m),v=m.getBoundingClientRect(),b=Vt(m),y=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,S=v.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=y,c+=S,p=Pt(m),m=fc(p)}}return Ii({width:u,height:f,x:l,y:c})}function hD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Sn(r),a=t?oa(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Vn(1);const u=Vn(0),f=et(r);if((f||!f&&!s)&&((Un(r)!=="body"||Cs(i))&&(l=sa(r)),et(r))){const h=yr(r);c=Vr(r),u.x=h.x+r.clientLeft,u.y=h.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 pD(e){return Array.from(e.getClientRects())}function Qv(e){return yr(Sn(e)).left+sa(e).scrollLeft}function mD(e){const t=Sn(e),n=sa(e),r=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Qv(e);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(i+=Mt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function gD(e,t){const n=Pt(e),r=Sn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Nu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function yD(e,t){const n=yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=et(e)?Vr(e):Vn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Wh(e,t,n){let r;if(t==="viewport")r=gD(e,n);else if(t==="document")r=mD(Sn(e));else if(Me(t))r=yD(t,n);else{const o=Xv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ii(r)}function Zv(e,t){const n=Tn(e);return n===t||!Me(n)||_n(n)?!1:Vt(n).position==="fixed"||Zv(n,t)}function vD(e,t){const n=t.get(e);if(n)return n;let r=Fn(e,[],!1).filter(a=>Me(a)&&Un(a)!=="body"),o=null;const s=Vt(e).position==="fixed";let i=s?Tn(e):e;for(;Me(i)&&!_n(i);){const a=Vt(i),l=ju(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Cs(i)&&!l&&Zv(e,i))?r=r.filter(u=>u!==i):o=a,i=Tn(i)}return t.set(e,r),r}function bD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?oa(t)?[]:vD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=Wh(t,u,o);return c.top=Mt(f.top,c.top),c.right=rn(f.right,c.right),c.bottom=rn(f.bottom,c.bottom),c.left=Mt(f.left,c.left),c},Wh(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xD(e){const{width:t,height:n}=qv(e);return{width:t,height:n}}function wD(e,t,n){const r=et(t),o=Sn(t),s=n==="fixed",i=yr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Vn(0);if(r||!r&&!s)if((Un(t)!=="body"||Cs(o))&&(a=sa(t)),r){const f=yr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Qv(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function el(e){return Vt(e).position==="static"}function Hh(e,t){return!et(e)||Vt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Jv(e,t){const n=Pt(e);if(oa(e))return n;if(!et(e)){let o=Tn(e);for(;o&&!_n(o);){if(Me(o)&&!el(o))return o;o=Tn(o)}return n}let r=Hh(e,t);for(;r&&PO(r)&&el(r);)r=Hh(r,t);return r&&_n(r)&&el(r)&&!ju(r)?n:r||RO(e)||n}const TD=async function(e){const t=this.getOffsetParent||Jv,n=this.getDimensions,r=await n(e.floating);return{reference:wD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function SD(e){return Vt(e).direction==="rtl"}const ED={convertOffsetParentRelativeRectToViewportRelativeRect:hD,getDocumentElement:Sn,getClippingRect:bD,getOffsetParent:Jv,getElementRects:TD,getClientRects:pD,getDimensions:xD,getScale:Vr,isElement:Me,isRTL:SD};function CD(e,t){let n=null,r;const o=Sn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const d=Nr(u),p=Nr(o.clientWidth-(c+f)),m=Nr(o.clientHeight-(u+h)),g=Nr(c),b={rootMargin:-d+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Mt(0,rn(1,l))||1};let y=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!y)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return i(!0),s}function ia(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=zu(e),u=o||s?[...c?Fn(c):[],...Fn(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=c&&a?CD(c,n):null;let h=-1,d=null;i&&(d=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=d)==null||y.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,m=l?yr(e):null;l&&g();function g(){const v=yr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(v=d)==null||v.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const PD=lD,RD=cD,ID=iD,AD=uD,zh=sD,OD=(e,t,n)=>{const r=new Map,o={platform:ED,...n},s={...o.platform,_c:r};return oD(e,t,{...o,platform:s})};var oi=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Mi(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(!Mi(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Mi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function eb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uh(e,t){const n=eb(e);return Math.round(t*n)/n}function Gh(e){const t=P.useRef(e);return oi(()=>{t.current=e}),t}function DD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=P.useState(r);Mi(h,r)||d(r);const[p,m]=P.useState(null),[g,v]=P.useState(null),b=P.useCallback(_=>{_!==E.current&&(E.current=_,m(_))},[]),y=P.useCallback(_=>{_!==R.current&&(R.current=_,v(_))},[]),S=s||p,T=i||g,E=P.useRef(null),R=P.useRef(null),A=P.useRef(u),O=l!=null,I=Gh(l),F=Gh(o),k=P.useCallback(()=>{if(!E.current||!R.current)return;const _={placement:t,strategy:n,middleware:h};F.current&&(_.platform=F.current),OD(E.current,R.current,_).then(H=>{const U={...H,isPositioned:!0};L.current&&!Mi(A.current,U)&&(A.current=U,ys.flushSync(()=>{f(U)}))})},[h,t,n,F]);oi(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[c]);const L=P.useRef(!1);oi(()=>(L.current=!0,()=>{L.current=!1}),[]),oi(()=>{if(S&&(E.current=S),T&&(R.current=T),S&&T){if(I.current)return I.current(S,T,k);k()}},[S,T,k,I,O]);const C=P.useMemo(()=>({reference:E,floating:R,setReference:b,setFloating:y}),[b,y]),M=P.useMemo(()=>({reference:S,floating:T}),[S,T]),j=P.useMemo(()=>{const _={position:n,left:0,top:0};if(!M.floating)return _;const H=Uh(M.floating,u.x),U=Uh(M.floating,u.y);return a?{..._,transform:"translate("+H+"px, "+U+"px)",...eb(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:U}},[n,a,M.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:k,refs:C,elements:M,floatingStyles:j}),[u,k,C,M,j])}const MD=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?zh({element:r.current,padding:o}).fn(n):{}:r?zh({element:r,padding:o}).fn(n):{}}}},aa=(e,t)=>({...PD(e),options:[e,t]}),Uu=(e,t)=>({...RD(e),options:[e,t]}),Gu=(e,t)=>({...ID(e),options:[e,t]}),kD=(e,t)=>({...AD(e),options:[e,t]}),tb=(e,t)=>({...MD(e),options:[e,t]});function gc(e){return P.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const nb={...P},FD=nb.useInsertionEffect,jD=FD||(e=>e());function at(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jD(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Yu="ArrowUp",Ps="ArrowDown",ro="ArrowLeft",wo="ArrowRight";function Us(e,t,n){return Math.floor(e/t)!==n}function Qo(e,t){return t<0||t>=e.current.length}function tl(e,t){return xt(e,{disabledIndices:t})}function Yh(e,t){return xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&si(i,a,o));return a}function ND(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===Yu){if(u&&mt(n),c===-1)f=l;else if(f=xt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||f<0)){const h=c%s,d=l%s,p=l-(d-h);d===h?f=l:f=d>h?p:p-s}Qo(e,f)&&(f=c)}if(n.key===Ps&&(u&&mt(n),c===-1?f=a:(f=xt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(f=xt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Qo(e,f)&&(f=c)),r==="both"){const h=Nr(c/s);n.key===wo&&(u&&mt(n),c%s!==s-1?(f=xt(e,{startingIndex:c,disabledIndices:i}),o&&Us(f,s,h)&&(f=xt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(f=xt(e,{startingIndex:c-c%s-1,disabledIndices:i})),Us(f,s,h)&&(f=c)),n.key===ro&&(u&&mt(n),c%s!==0?(f=xt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Us(f,s,h)&&(f=xt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(f=xt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Us(f,s,h)&&(f=c));const d=Nr(l/s)===h;Qo(e,f)&&(o&&d?f=n.key===ro?l:xt(e,{startingIndex:c-c%s-1,disabledIndices:i}):f=c)}return f}function LD(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let h=0;h<l;h++)u.push(o+f+h*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=i}),c=!0):o++}}),[...r]}function _D(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function VD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function si(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 Kh=0;function On(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Kh);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Kh=requestAnimationFrame(s)}var be=typeof document<"u"?w.useLayoutEffect:w.useEffect;function $D(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 BD(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 rb=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function WD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=P.useState(()=>new Map),i=P.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=P.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return be(()=>{const l=new Map(o);Array.from(l.keys()).sort($D).forEach((u,f)=>{l.set(u,f)}),BD(o,l)||s(l)},[o]),P.createElement(rb.Provider,{value:P.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function ob(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=P.useContext(rb),[a,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(f=>{if(c.current=f,a!==null&&(s.current[a]=f,i)){var h;const d=t!==void 0;i.current[a]=d?t:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,s,i,t]);return be(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),be(()=>{const f=c.current?o.get(c.current):null;f!=null&&l(f)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function oo(){return oo=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},oo.apply(this,arguments)}let qh=!1,HD=0;const Xh=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+HD++;function zD(){const[e,t]=P.useState(()=>qh?Xh():void 0);return be(()=>{e==null&&t(Xh())},[]),P.useEffect(()=>{qh=!0},[]),e}const UD=nb.useId,To=UD||zD;let cs;process.env.NODE_ENV!=="production"&&(cs=new Set);function ii(){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=cs)!=null&&e.has(o))){var s;(s=cs)==null||s.add(o),console.warn(o)}}function GD(){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=cs)!=null&&e.has(o))){var s;(s=cs)==null||s.add(o),console.error(o)}}const sb=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d:h,style:{transform:d,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||ii("The `ref` prop is required for `FloatingArrow`."));const g=To(),[v,b]=P.useState(!1);if(be(()=>{if(!o)return;Vt(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const y=c*2,S=y/2,T=i/2*(l/-8+1),E=a/2*l/4,[R,A]=r.split("-"),O=!!h,I=R==="top"||R==="bottom",F=u&&A==="end"?"bottom":"top";let k=u&&A==="end"?"right":"left";u&&v&&(k=A==="end"?"left":"right");const L=(s==null?void 0:s.x)!=null?u||s.x:"",C=(s==null?void 0:s.y)!=null?u||s.y:"",M=h||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",j={top:O?"rotate(180deg)":"",left:O?"rotate(90deg)":"rotate(-90deg)",bottom:O?"":"rotate(180deg)",right:O?"rotate(-90deg)":"rotate(90deg)"}[R];return P.createElement("svg",oo({},m,{"aria-hidden":!0,ref:n,width:O?i:i+y,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[k]:L,[F]:C,[R]:I||O?"100%":"calc(100% - "+y/2+"px)",transform:""+j+(d??""),...p}}),y>0&&P.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:y+(h?0:1),d:M}),P.createElement("path",{stroke:y&&!h?m.fill:"none",d:M}),P.createElement("clipPath",{id:g},P.createElement("rect",{x:-S,y:S*(O?-1:1),width:i+y,height:i})))});function ib(){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 ab=P.createContext(null),lb=P.createContext(null),Gn=()=>{var e;return((e=P.useContext(ab))==null?void 0:e.id)||null},Yn=()=>P.useContext(lb);function YD(e){const t=To(),n=Yn(),o=Gn();return be(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function KD(e){const{children:t,id:n}=e,r=Gn();return P.createElement(ab.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function qD(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(i=>{n.current=[...n.current,i]},[]),o=P.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=P.useState(()=>ib())[0];return P.createElement(lb.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function Bn(e){return"data-floating-ui-"+e}function gt(e){const t=w.useRef(e);return be(()=>{t.current=e}),t}const Qh=Bn("safe-polygon");function nl(e,t,n){return n&&!to(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function cb(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=Yn(),p=Gn(),m=gt(c),g=gt(l),v=gt(n),b=P.useRef(),y=P.useRef(-1),S=P.useRef(),T=P.useRef(-1),E=P.useRef(!0),R=P.useRef(!1),A=P.useRef(()=>{}),O=P.useCallback(()=>{var M;const j=(M=o.current.openEvent)==null?void 0:M.type;return(j==null?void 0:j.includes("mouse"))&&j!=="mousedown"},[o]);P.useEffect(()=>{if(!a)return;function M(j){let{open:_}=j;_||(clearTimeout(y.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",M),()=>{s.off("openchange",M)}},[a,s]),P.useEffect(()=>{if(!a||!m.current||!n)return;function M(_){O()&&r(!1,_,"hover")}const j=ut(i.floating).documentElement;return j.addEventListener("mouseleave",M),()=>{j.removeEventListener("mouseleave",M)}},[i.floating,n,r,a,m,O]);const I=P.useCallback(function(M,j,_){j===void 0&&(j=!0),_===void 0&&(_="hover");const H=nl(g.current,"close",b.current);H&&!S.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,M,_),H)):j&&(clearTimeout(y.current),r(!1,M,_))},[g,r]),F=at(()=>{A.current(),S.current=void 0}),k=at(()=>{if(R.current){const M=ut(i.floating).body;M.style.pointerEvents="",M.removeAttribute(Qh),R.current=!1}});P.useEffect(()=>{if(!a)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function j(D){if(clearTimeout(y.current),E.current=!1,u&&!to(b.current)||f>0&&!nl(g.current,"open"))return;const $=nl(g.current,"open",b.current);$?y.current=window.setTimeout(()=>{v.current||r(!0,D,"hover")},$):r(!0,D,"hover")}function _(D){if(M())return;A.current();const $=ut(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),S.current=m.current({...o.current.floatingContext,tree:d,x:D.clientX,y:D.clientY,onClose(){k(),F(),I(D,!0,"safe-polygon")}});const J=S.current;$.addEventListener("mousemove",J),A.current=()=>{$.removeEventListener("mousemove",J)};return}(b.current==="touch"?!Ye(i.floating,D.relatedTarget):!0)&&I(D)}function H(D){M()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:D.clientX,y:D.clientY,onClose(){k(),F(),I(D)}})(D))}if(Me(i.domReference)){var U;const D=i.domReference;return n&&D.addEventListener("mouseleave",H),(U=i.floating)==null||U.addEventListener("mouseleave",H),h&&D.addEventListener("mousemove",j,{once:!0}),D.addEventListener("mouseenter",j),D.addEventListener("mouseleave",_),()=>{var $;n&&D.removeEventListener("mouseleave",H),($=i.floating)==null||$.removeEventListener("mouseleave",H),h&&D.removeEventListener("mousemove",j),D.removeEventListener("mouseenter",j),D.removeEventListener("mouseleave",_)}}},[i,a,e,u,f,h,I,F,k,r,n,v,d,g,m,o]),be(()=>{var M;if(a&&n&&(M=m.current)!=null&&M.__options.blockPointerEvents&&O()){const _=ut(i.floating).body;_.setAttribute(Qh,""),_.style.pointerEvents="none",R.current=!0;const H=i.floating;if(Me(i.domReference)&&H){var j;const U=i.domReference,D=d==null||(j=d.nodesRef.current.find($=>$.id===p))==null||(j=j.context)==null?void 0:j.elements.floating;return D&&(D.style.pointerEvents=""),U.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{U.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,i,d,m,O]),be(()=>{n||(b.current=void 0,F(),k())},[n,F,k]),P.useEffect(()=>()=>{F(),clearTimeout(y.current),clearTimeout(T.current),k()},[a,i.domReference,F,k]);const L=P.useMemo(()=>{function M(j){b.current=j.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(j){const{nativeEvent:_}=j;function H(){!E.current&&!v.current&&r(!0,_,"hover")}u&&!to(b.current)||n||f===0||(clearTimeout(T.current),b.current==="touch"?H():T.current=window.setTimeout(H,f))}}},[u,r,n,v,f]),C=P.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(M){I(M.nativeEvent,!1)}}),[I]);return P.useMemo(()=>a?{reference:L,floating:C}:{},[a,L,C])}function XD(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function hr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function QD(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),hr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Ir=new WeakMap,Gs=new WeakSet,Ys={},rl=0;const ZD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ub=e=>e&&(e.host||ub(e.parentNode)),JD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ub(n);return e.contains(r)?r:null}).filter(n=>n!=null);function eM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=JD(t,e),a=new Set,l=new Set(i),c=[];Ys[o]||(Ys[o]=new WeakMap);const u=Ys[o];i.forEach(f),h(t),a.clear();function f(d){!d||a.has(d)||(a.add(d),d.parentNode&&f(d.parentNode))}function h(d){!d||l.has(d)||[].forEach.call(d.children,p=>{if(Un(p)!=="script")if(a.has(p))h(p);else{const m=s?p.getAttribute(s):null,g=m!==null&&m!=="false",v=(Ir.get(p)||0)+1,b=(u.get(p)||0)+1;Ir.set(p,v),u.set(p,b),c.push(p),v===1&&g&&Gs.add(p),b===1&&p.setAttribute(o,""),!g&&s&&p.setAttribute(s,"true")}})}return rl++,()=>{c.forEach(d=>{const p=(Ir.get(d)||0)-1,m=(u.get(d)||0)-1;Ir.set(d,p),u.set(d,m),p||(!Gs.has(d)&&s&&d.removeAttribute(s),Gs.delete(d)),m||d.removeAttribute(o)}),rl--,rl||(Ir=new WeakMap,Ir=new WeakMap,Gs=new WeakSet,Ys={})}}function Zh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ut(e[0]).body;return eM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const so=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function fb(e,t){const n=ls(e,so());t==="prev"&&n.reverse();const r=n.indexOf(Ht(ut(e)));return n.slice(r+1)[0]}function db(){return fb(document.body,"next")}function hb(){return fb(document.body,"prev")}function Zo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ye(n,r)}function tM(e){ls(e,so()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function nM(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 rM(e,t,n){const r=e.indexOf(t);function o(i){const a=Bn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||Ye(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Ku={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 oM;function Jh(e){e.key==="Tab"&&(e.target,clearTimeout(oM))}const ki=P.forwardRef(function(t,n){const[r,o]=P.useState();be(()=>(Vu()&&o("button"),document.addEventListener("keydown",Jh),()=>{document.removeEventListener("keydown",Jh)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Bn("focus-guard")]:"",style:Ku};return P.createElement("span",oo({},t,s))}),pb=P.createContext(null),ep=Bn("portal");function sM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=To(),o=mb(),[s,i]=P.useState(null),a=P.useRef(null);return be(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),be(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(ep,""),l.appendChild(c),a.current=c,i(c)},[t,r]),be(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Me(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(ep,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function So(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=sM({id:n,root:r}),[i,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),f=P.useRef(null),h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return P.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function d(p){s&&Zo(p)&&(p.type==="focusin"?nM:tM)(s)}return s.addEventListener("focusin",d,!0),s.addEventListener("focusout",d,!0),()=>{s.removeEventListener("focusin",d,!0),s.removeEventListener("focusout",d,!0)}},[s,o,i==null?void 0:i.modal]),P.createElement(pb.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[o,s])},h&&s&&P.createElement(ki,{"data-type":"outside",ref:l,onFocus:d=>{if(Zo(d,s)){var p;(p=u.current)==null||p.focus()}else{const m=hb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),h&&s&&P.createElement("span",{"aria-owns":s.id,style:Ku}),s&&ys.createPortal(t,s),h&&s&&P.createElement(ki,{"data-type":"outside",ref:c,onFocus:d=>{if(Zo(d,s)){var p;(p=f.current)==null||p.focus()}else{const m=db()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,d.nativeEvent))}}}))}const mb=()=>P.useContext(pb),tp=20;let or=[];function ol(e){or=or.filter(n=>n.isConnected);let t=e;if(!(!t||Un(t)==="body")){if(!rD(t,so())){const n=ls(t,so())[0];n&&(t=n)}or.push(t),or.length>tp&&(or=or.slice(-tp))}}function np(){return or.slice().reverse().find(e=>e.isConnected)}const iM=P.forwardRef(function(t,n){return P.createElement("button",oo({},t,{type:"button",ref:n,tabIndex:-1,style:Ku}))});function Rs(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:h,refs:d,nodeId:p,onOpenChange:m,events:g,dataRef:v,floatingId:b,elements:{domReference:y,floating:S}}=t,T=typeof i=="number"&&i<0,E=Wv(y)&&T,R=ZD()?s:!0,A=gt(o),O=gt(i),I=gt(a),F=Yn(),k=mb(),L=P.useRef(null),C=P.useRef(null),M=P.useRef(!1),j=P.useRef(!1),_=P.useRef(-1),H=k!=null,U=S==null?void 0:S.firstElementChild,D=(U==null?void 0:U.id)===b?U:S,$=at(function(G){return G===void 0&&(G=D),G?ls(G,so()):[]}),q=at(G=>{const N=$(G);return A.current.map(B=>y&&B==="reference"?y:D&&B==="floating"?D:N).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){Ye(D,Ht(ut(D)))&&$().length===0&&!E&&mt(B);const z=q(),V=nn(B);A.current[0]==="reference"&&V===y&&(mt(B),B.shiftKey?On(z[z.length-1]):On(z[1])),A.current[1]==="floating"&&V===D&&B.shiftKey&&(mt(B),On(z[0]))}}const N=ut(D);return N.addEventListener("keydown",G),()=>{N.removeEventListener("keydown",G)}},[r,y,D,c,A,E,$,q]),P.useEffect(()=>{if(r||!S)return;function G(N){const B=nn(N),V=$().indexOf(B);V!==-1&&(_.current=V)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,$]),P.useEffect(()=>{if(r||!f)return;function G(){j.current=!0,setTimeout(()=>{j.current=!1})}function N(B){const z=B.relatedTarget;queueMicrotask(()=>{const V=!(Ye(y,z)||Ye(S,z)||Ye(z,S)||Ye(k==null?void 0:k.portalNode,z)||z!=null&&z.hasAttribute(Bn("focus-guard"))||F&&(hr(F.nodesRef.current,p).find(Y=>{var ee,W;return Ye((ee=Y.context)==null?void 0:ee.elements.floating,z)||Ye((W=Y.context)==null?void 0:W.elements.domReference,z)})||XD(F.nodesRef.current,p).find(Y=>{var ee,W;return((ee=Y.context)==null?void 0:ee.elements.floating)===z||((W=Y.context)==null?void 0:W.elements.domReference)===z})));if(l&&V&&Ht(ut(D))===ut(D).body){et(D)&&(D==null||D.focus());const Y=_.current,ee=$(),W=ee[Y]||ee[ee.length-1]||D;et(W)&&W.focus()}(E||!c)&&z&&V&&!j.current&&z!==np()&&(M.current=!0,m(!1,B))})}if(S&&et(y))return y.addEventListener("focusout",N),y.addEventListener("pointerdown",G),S.addEventListener("focusout",N),()=>{y.removeEventListener("focusout",N),y.removeEventListener("pointerdown",G),S.removeEventListener("focusout",N)}},[r,y,S,D,c,p,F,k,m,f,l,$,E]),P.useEffect(()=>{var G;if(r)return;const N=Array.from((k==null||(G=k.portalNode)==null?void 0:G.querySelectorAll("["+Bn("portal")+"]"))||[]);if(S){const B=[S,...N,L.current,C.current,A.current.includes("reference")||E?y:null].filter(V=>V!=null),z=c||E?Zh(B,R,!R):Zh(B);return()=>{z()}}},[r,y,S,c,A,k,E,R]),be(()=>{if(r||!et(D))return;const G=ut(D),N=Ht(G);queueMicrotask(()=>{const B=q(D),z=O.current,V=(typeof z=="number"?B[z]:z.current)||D,Y=Ye(D,N);!T&&!Y&&h&&On(V,{preventScroll:V===D})})},[r,h,D,T,q,O]),be(()=>{if(r||!D)return;let G=!1;const N=ut(D),B=Ht(N);let V=v.current.openEvent;const Y=d.domReference.current;ol(B);function ee(W){let{open:we,reason:Ue,event:je,nested:Ge}=W;we&&(V=je),Ue==="escape-key"&&d.domReference.current&&ol(d.domReference.current),Ue==="hover"&&je.type==="mouseleave"&&(M.current=!0),Ue==="outside-press"&&(Ge?(M.current=!1,G=!0):M.current=!($v(je)||_u(je)))}return g.on("openchange",ee),()=>{g.off("openchange",ee);const W=Ht(N),we=Ye(S,W)||F&&hr(F.nodesRef.current,p).some(se=>{var me;return Ye((me=se.context)==null?void 0:me.elements.floating,W)});(we||V&&["click","mousedown"].includes(V.type))&&d.domReference.current&&ol(d.domReference.current);const je=Y||B,Ge=ls(ut(je).body,so());queueMicrotask(()=>{let se=np();!se&&et(je)&&S&&(se=rM(Ge,je,S)),I.current&&!M.current&&et(se)&&(!(se!==W&&W!==N.body)||we)&&se.focus({preventScroll:G})})}},[r,S,D,I,v,d,g,F,p]),be(()=>{if(!r&&k)return k.setFocusManagerState({modal:c,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{k.setFocusManagerState(null)}},[r,k,c,h,m,d,f]),be(()=>{if(r||!D||typeof MutationObserver!="function"||T)return;const G=()=>{const B=D.getAttribute("tabindex"),z=$(),V=Ht(ut(S)),Y=z.indexOf(V);Y!==-1&&(_.current=Y),A.current.includes("floating")||V!==d.domReference.current&&z.length===0?B!=="0"&&D.setAttribute("tabindex","0"):B!=="-1"&&D.setAttribute("tabindex","-1")};G();const N=new MutationObserver(G);return N.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,S,D,d,A,$,T]);function J(G){return r||!u||!c?null:P.createElement(iM,{ref:G==="start"?L:C,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&R&&(c?!E:!0)&&(H||c);return P.createElement(P.Fragment,null,X&&P.createElement(ki,{"data-type":"inside",ref:k==null?void 0:k.beforeInsideRef,onFocus:G=>{if(c){const B=q();On(o[0]==="reference"?B[0]:B[B.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(M.current=!1,Zo(G,k.portalNode)){const B=db()||y;B==null||B.focus()}else{var N;(N=k.beforeOutsideRef.current)==null||N.focus()}}}),!E&&J("start"),n,J("end"),X&&P.createElement(ki,{"data-type":"inside",ref:k==null?void 0:k.afterInsideRef,onFocus:G=>{if(c)On(q()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(f&&(M.current=!0),Zo(G,k.portalNode)){const B=hb()||y;B==null||B.focus()}else{var N;(N=k.afterOutsideRef.current)==null||N.focus()}}}))}const sl=new Set,aM=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=To();return be(()=>{if(!r)return;sl.add(s);const i=/iP(hone|ad|od)|iOS/.test(Lu()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var d,p;const m=((d=window.visualViewport)==null?void 0:d.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(g))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{sl.delete(s),sl.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[s,r]),P.createElement("div",oo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function rp(e){return et(e.target)&&e.target.tagName==="BUTTON"}function op(e){return $u(e)}function la(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=P.useRef(),h=P.useRef(!1),d=P.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(to(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}to(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||rp(p))&&(p.key===" "&&!op(s)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||rp(p)||op(s)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return P.useMemo(()=>i?{reference:d}:{},[i,d])}function lM(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,f=i.height,h=i.x,d=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),h-=n||0,d-=r||0,u=0,f=0,!o||c?(u=t.axis==="y"?i.width:0,f=t.axis==="x"?i.height:0,h=a&&t.x!=null?t.x:h,d=l&&t.y!=null?t.y:d):o&&!c&&(f=t.axis==="x"?i.height:f,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:f,x:h,y:d,top:d,right:h+u,bottom:d+f,left:h}}}}function sp(e){return e!=null&&e.clientX!=null}function cM(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,f=P.useRef(!1),h=P.useRef(null),[d,p]=P.useState(),[m,g]=P.useState([]),v=at((E,R)=>{f.current||r.current.openEvent&&!sp(r.current.openEvent)||i.setPositionReference(lM(s,{x:E,y:R,axis:l,dataRef:r,pointerType:d}))}),b=at(E=>{c!=null||u!=null||(n?h.current||g([]):v(E.clientX,E.clientY))}),y=to(d)?o:n,S=P.useCallback(()=>{if(!y||!a||c!=null||u!=null)return;const E=Pt(o);function R(A){const O=nn(A);Ye(o,O)?(E.removeEventListener("mousemove",R),h.current=null):v(A.clientX,A.clientY)}if(!r.current.openEvent||sp(r.current.openEvent)){E.addEventListener("mousemove",R);const A=()=>{E.removeEventListener("mousemove",R),h.current=null};return h.current=A,A}i.setPositionReference(s)},[y,a,c,u,o,r,i,s,v]);P.useEffect(()=>S(),[S,m]),P.useEffect(()=>{a&&!o&&(f.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(f.current=!0)},[a,n]),be(()=>{a&&(c!=null||u!=null)&&(f.current=!1,v(c,u))},[a,c,u,v]);const T=P.useMemo(()=>{function E(R){let{pointerType:A}=R;p(A)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:b,onMouseEnter:b}},[b]);return P.useMemo(()=>a?{reference:T}:{},[a,T])}const uM={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},fM={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ip=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Eo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:p}=t,m=Yn(),g=at(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,b=P.useRef(!1),y=P.useRef(!1),{escapeKey:S,outsidePress:T}=ip(d),{escapeKey:E,outsidePress:R}=ip(p),A=at(C=>{var M;if(!n||!i||!a||C.key!=="Escape")return;const j=(M=s.current.floatingContext)==null?void 0:M.nodeId,_=m?hr(m.nodesRef.current,j):[];if(!S&&(C.stopPropagation(),_.length>0)){let H=!0;if(_.forEach(U=>{var D;if((D=U.context)!=null&&D.open&&!U.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,AO(C)?C.nativeEvent:C,"escape-key")}),O=at(C=>{var M;const j=()=>{var _;A(C),(_=nn(C))==null||_.removeEventListener("keydown",j)};(M=nn(C))==null||M.addEventListener("keydown",j)}),I=at(C=>{var M;const j=b.current;b.current=!1;const _=y.current;if(y.current=!1,c==="click"&&_||j||typeof v=="function"&&!v(C))return;const H=nn(C),U="["+Bn("inert")+"]",D=ut(o.floating).querySelectorAll(U);let $=Me(H)?H:null;for(;$&&!_n($);){const G=Tn($);if(_n(G)||!Me(G))break;$=G}if(D.length&&Me(H)&&!OO(H)&&!Ye(H,o.floating)&&Array.from(D).every(G=>!Ye($,G)))return;if(et(H)&&L){const G=H.clientWidth>0&&H.scrollWidth>H.clientWidth,N=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let B=N&&C.offsetX>H.clientWidth;if(N&&Vt(H).direction==="rtl"&&(B=C.offsetX<=H.offsetWidth-H.clientWidth),B||G&&C.offsetY>H.clientHeight)return}const q=(M=s.current.floatingContext)==null?void 0:M.nodeId,J=m&&hr(m.nodesRef.current,q).some(G=>{var N;return Ja(C,(N=G.context)==null?void 0:N.elements.floating)});if(Ja(C,o.floating)||Ja(C,o.domReference)||J)return;const X=m?hr(m.nodesRef.current,q):[];if(X.length>0){let G=!0;if(X.forEach(N=>{var B;if((B=N.context)!=null&&B.open&&!N.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,C,"outside-press")}),F=at(C=>{var M;const j=()=>{var _;I(C),(_=nn(C))==null||_.removeEventListener(c,j)};(M=nn(C))==null||M.addEventListener(c,j)});P.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function C(_){r(!1,_,"ancestor-scroll")}const M=ut(o.floating);a&&M.addEventListener("keydown",E?O:A,E),v&&M.addEventListener(c,R?F:I,R);let j=[];return h&&(Me(o.domReference)&&(j=Fn(o.domReference)),Me(o.floating)&&(j=j.concat(Fn(o.floating))),!Me(o.reference)&&o.reference&&o.reference.contextElement&&(j=j.concat(Fn(o.reference.contextElement)))),j=j.filter(_=>{var H;return _!==((H=M.defaultView)==null?void 0:H.visualViewport)}),j.forEach(_=>{_.addEventListener("scroll",C,{passive:!0})}),()=>{a&&M.removeEventListener("keydown",E?O:A,E),v&&M.removeEventListener(c,R?F:I,R),j.forEach(_=>{_.removeEventListener("scroll",C)})}},[s,o,a,v,c,n,r,h,i,S,T,A,E,O,I,R,F]),P.useEffect(()=>{b.current=!1},[v,c]);const k=P.useMemo(()=>({onKeyDown:A,[uM[f]]:C=>{u&&r(!1,C.nativeEvent,"reference-press")}}),[A,r,u,f]),L=P.useMemo(()=>({onKeyDown:A,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[fM[c]]:()=>{b.current=!0}}),[A,c]);return P.useMemo(()=>i?{reference:k,floating:L}:{},[i,k,L])}function dM(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=To(),s=P.useRef({}),[i]=P.useState(()=>ib()),a=Gn()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!Me(d)&&GD("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=P.useState(r.reference),u=at((d,p,m)=>{s.current.openEvent=d?p:void 0,i.emit("openchange",{open:d,event:p,reason:m,nested:a}),n==null||n(d,p,m)}),f=P.useMemo(()=>({setPositionReference:c}),[]),h=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:h,events:i,floatingId:o,refs:f}),[t,u,h,i,o,f])}function Co(e){e===void 0&&(e={});const{nodeId:t}=e,n=dM({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=P.useState(null),[a,l]=P.useState(null),u=(o==null?void 0:o.reference)||s,f=P.useRef(null),h=Yn();be(()=>{u&&(f.current=u)},[u]);const d=DD({...e,elements:{...o,...a&&{reference:a}}}),p=P.useCallback(y=>{const S=Me(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(S),d.refs.setReference(S)},[d.refs]),m=P.useCallback(y=>{(Me(y)||y===null)&&(f.current=y,i(y)),(Me(d.refs.reference.current)||d.refs.reference.current===null||y!==null&&!Me(y))&&d.refs.setReference(y)},[d.refs]),g=P.useMemo(()=>({...d.refs,setReference:m,setPositionReference:p,domReference:f}),[d.refs,m,p]),v=P.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),b=P.useMemo(()=>({...d,...r,refs:g,elements:v,nodeId:t}),[d,g,v,t,r]);return be(()=>{r.dataRef.current.floatingContext=b;const y=h==null?void 0:h.nodesRef.current.find(S=>S.id===t);y&&(y.context=b)}),P.useMemo(()=>({...d,context:b,refs:g,elements:v}),[d,g,v,b])}function hM(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(),f=P.useRef(!0);P.useEffect(()=>{if(!a)return;const d=Pt(i.domReference);function p(){!n&&et(i.domReference)&&i.domReference===Ht(ut(i.domReference))&&(c.current=!0)}function m(){f.current=!0}return d.addEventListener("blur",p),d.addEventListener("keydown",m,!0),()=>{d.removeEventListener("blur",p),d.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),P.useEffect(()=>{if(!a)return;function d(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,a]),P.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=P.useMemo(()=>({onPointerDown(d){_u(d.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const p=nn(d.nativeEvent);if(l&&Me(p))try{if(Vu()&&Bv())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!$u(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const p=d.relatedTarget,m=d.nativeEvent,g=Me(p)&&p.hasAttribute(Bn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=Ht(i.domReference?i.domReference.ownerDocument:document);!p&&b===i.domReference||Ye((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Ye(i.domReference,b)||g||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return P.useMemo(()=>a?{reference:h}:{},[a,h])}const ap="active",lp="selected";function il(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[ap]:i,[lp]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[ap,lp].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),i[c]=function(){for(var h,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(g=>g(...p)).find(g=>g!==void 0)}}}else i[c]=u}),i),{})}}function Po(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=P.useCallback(a=>il(a,e,"reference"),t),s=P.useCallback(a=>il(a,e,"floating"),n),i=P.useCallback(a=>il(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let cp=!1;function ca(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function up(e,t){return ca(t,e===Yu||e===Ps,e===ro||e===wo)}function al(e,t,n){return ca(t,e===Ps,n?e===ro:e===wo)||e==="Enter"||e===" "||e===""}function pM(e,t,n){return ca(t,n?e===ro:e===wo,e===Ps)}function fp(e,t,n){return ca(t,n?e===wo:e===ro,e===Yu)}function gb(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:h=!1,rtl:d=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:y="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:R,dense:A=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||ii("`useListNavigation` looping must be enabled to allow escaping."),p||ii("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&S>1&&ii("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const O=Gn(),I=Yn(),F=at(a),k=P.useRef(m),L=P.useRef(c??-1),C=P.useRef(null),M=P.useRef(!0),j=P.useRef(F),_=P.useRef(!!o.floating),H=P.useRef(n),U=P.useRef(!1),D=P.useRef(!1),$=gt(b),q=gt(n),J=gt(T),X=gt(o.floating),G=gt(c),[N,B]=P.useState(),[z,V]=P.useState(),Y=at(function(se,me,oe){oe===void 0&&(oe=!1);function ye(ve){p?(B(ve.id),I==null||I.events.emit("virtualfocus",ve),E&&(E.current=ve)):On(ve,{preventScroll:!0,sync:Bv()&&Vu()?cp||U.current:!1})}const Qe=se.current[me.current];Qe&&ye(Qe),requestAnimationFrame(()=>{const ve=se.current[me.current]||Qe;if(!ve)return;Qe||ye(ve);const ot=J.current;ot&&W&&(oe||!M.current)&&(ve.scrollIntoView==null||ve.scrollIntoView(typeof ot=="boolean"?{block:"nearest",inline:"nearest"}:ot))})});be(()=>{document.createElement("div").focus({get preventScroll(){return cp=!0,!1}})},[]),be(()=>{l&&(n&&o.floating?k.current&&c!=null&&(D.current=!0,L.current=c,F(c)):_.current&&(L.current=-1,j.current(null)))},[l,n,o.floating,c,F]),be(()=>{if(l&&n&&o.floating)if(i==null){if(U.current=!1,G.current!=null)return;if(_.current&&(L.current=-1,Y(s,L)),(!H.current||!_.current)&&k.current&&(C.current!=null||k.current===!0&&C.current==null)){let se=0;const me=()=>{s.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(me),se++):(L.current=C.current==null||al(C.current,y,d)||h?tl(s,$.current):Yh(s,$.current),C.current=null,F(L.current))};me()}}else Qo(s,i)||(L.current=i,Y(s,L,D.current),D.current=!1)},[l,n,o.floating,i,G,h,s,y,d,F,Y,$]),be(()=>{var se;if(!l||o.floating||!I||p||!_.current)return;const me=I.nodesRef.current,oe=(se=me.find(ve=>ve.id===O))==null||(se=se.context)==null?void 0:se.elements.floating,ye=Ht(ut(o.floating)),Qe=me.some(ve=>ve.context&&Ye(ve.context.elements.floating,ye));oe&&!Qe&&M.current&&oe.focus({preventScroll:!0})},[l,o.floating,I,O,p]),be(()=>{if(!l||!I||!p||O)return;function se(me){V(me.id),E&&(E.current=me)}return I.events.on("virtualfocus",se),()=>{I.events.off("virtualfocus",se)}},[l,I,p,O,E]),be(()=>{j.current=F,_.current=!!o.floating}),be(()=>{n||(C.current=null)},[n]),be(()=>{H.current=n},[n]);const ee=i!=null,W=P.useMemo(()=>{function se(oe){if(!n)return;const ye=s.current.indexOf(oe);ye!==-1&&F(ye)}return{onFocus(oe){let{currentTarget:ye}=oe;se(ye)},onClick:oe=>{let{currentTarget:ye}=oe;return ye.focus({preventScroll:!0})},...g&&{onMouseMove(oe){let{currentTarget:ye}=oe;se(ye)},onPointerLeave(oe){let{pointerType:ye}=oe;!M.current||ye==="touch"||(L.current=-1,Y(s,L),F(null),p||On(X.current,{preventScroll:!0}))}}}},[n,X,Y,g,s,F,p]),we=at(se=>{if(M.current=!1,U.current=!0,!q.current&&se.currentTarget===X.current)return;if(h&&fp(se.key,y,d)){mt(se),r(!1,se.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const me=L.current,oe=tl(s,b),ye=Yh(s,b);if(se.key==="Home"&&(mt(se),L.current=oe,F(L.current)),se.key==="End"&&(mt(se),L.current=ye,F(L.current)),S>1){const Qe=R||Array.from({length:s.current.length},()=>({width:1,height:1})),ve=LD(Qe,S,A),ot=ve.findIndex(re=>re!=null&&!si(s.current,re,b)),Z=ve.reduce((re,xe,Ne)=>xe!=null&&!si(s.current,xe,b)?Ne:re,-1);if(L.current=ve[ND({current:ve.map(re=>re!=null?s.current[re]:null)},{event:se,orientation:y,loop:f,cols:S,disabledIndices:VD([...b||s.current.map((re,xe)=>si(s.current,xe)?xe:void 0),void 0],ve),minIndex:ot,maxIndex:Z,prevIndex:_D(L.current>ye?oe:L.current,Qe,ve,S,se.key===Ps?"bl":se.key===wo?"tr":"tl"),stopEvent:!0})],F(L.current),y==="both")return}if(up(se.key,y)){if(mt(se),n&&!p&&Ht(se.currentTarget.ownerDocument)===se.currentTarget){L.current=al(se.key,y,d)?oe:ye,F(L.current);return}al(se.key,y,d)?f?L.current=me>=ye?u&&me!==s.current.length?-1:oe:xt(s,{startingIndex:me,disabledIndices:b}):L.current=Math.min(ye,xt(s,{startingIndex:me,disabledIndices:b})):f?L.current=me<=oe?u&&me!==-1?s.current.length:ye:xt(s,{startingIndex:me,decrement:!0,disabledIndices:b}):L.current=Math.max(oe,xt(s,{startingIndex:me,decrement:!0,disabledIndices:b})),Qo(s,L.current)?F(null):F(L.current)}}),Ue=P.useMemo(()=>p&&n&&ee&&{"aria-activedescendant":z||N},[p,n,ee,z,N]),je=P.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!Wv(o.domReference)&&Ue,onKeyDown:we,onPointerMove(){M.current=!0}}),[Ue,we,o.domReference,y]),Ge=P.useMemo(()=>{function se(oe){m==="auto"&&$v(oe.nativeEvent)&&(k.current=!0)}function me(oe){k.current=m,m==="auto"&&_u(oe.nativeEvent)&&(k.current=!0)}return{...Ue,onKeyDown(oe){M.current=!1;const ye=oe.key.indexOf("Arrow")===0,Qe=pM(oe.key,y,d),ve=fp(oe.key,y,d),ot=up(oe.key,y),Z=(h?Qe:ot)||oe.key==="Enter"||oe.key.trim()==="";if(p&&n){const ht=I==null?void 0:I.nodesRef.current.find(Ct=>Ct.parentId==null),vt=I&&ht?QD(I.nodesRef.current,ht.id):null;if(ye&&vt&&E){const Ct=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(Qe||ve){var re,xe;const Qn=((re=vt.context)==null?void 0:re.elements.domReference)===oe.currentTarget,Tr=ve&&!Qn?(xe=vt.context)==null?void 0:xe.elements.domReference:Qe?s.current.find(Sr=>(Sr==null?void 0:Sr.id)===N):null;Tr&&(mt(oe),Tr.dispatchEvent(Ct),V(void 0))}if(ot&&vt.context&&vt.context.open&&vt.parentId&&oe.currentTarget!==vt.context.elements.domReference){var Ne;mt(oe),(Ne=vt.context.elements.domReference)==null||Ne.dispatchEvent(Ct);return}}return we(oe)}if(!(!n&&!v&&ye)){if(Z&&(C.current=h&&ot?null:oe.key),h){Qe&&(mt(oe),n?(L.current=tl(s,$.current),F(L.current)):r(!0,oe.nativeEvent,"list-navigation"));return}ot&&(c!=null&&(L.current=c),mt(oe),!n&&v?r(!0,oe.nativeEvent,"list-navigation"):we(oe),n&&F(L.current))}},onFocus(){n&&!p&&F(null)},onPointerDown:me,onMouseDown:se,onClick:se}},[N,Ue,we,$,m,s,h,F,r,n,v,y,d,c,I,p,E]);return P.useMemo(()=>l?{reference:Ge,floating:je,item:W}:{},[l,Ge,je,W])}const mM=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Ro(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=mM.get(i))!=null?n:i,l=To(),u=Gn()!=null,f=P.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),h=P.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),d=P.useCallback(p=>{let{active:m,selected:g}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&g};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return P.useMemo(()=>s?{reference:f,floating:h,item:d}:{},[s,f,h,d])}const dp=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ar(e,t){return typeof e=="function"?e(t):e}function gM(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function yM(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=P.useState("unmounted"),c=gM(n,i);return!c&&a==="close"&&l("unmounted"),be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function vM(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=P.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",f=(u?i:i.open)||0,h=(u?i:i.close)||0,[d,p]=P.useState(()=>({...Ar(s,c),...Ar(n,c)})),{isMounted:m,status:g}=yM(e,{duration:i}),v=gt(n),b=gt(r),y=gt(o),S=gt(s);return be(()=>{const T=Ar(v.current,c),E=Ar(y.current,c),R=Ar(S.current,c),A=Ar(b.current,c)||Object.keys(T).reduce((O,I)=>(O[I]="",O),{});if(g==="initial"&&p(O=>({transitionProperty:O.transitionProperty,...R,...T})),g==="open"&&p({transitionProperty:Object.keys(A).map(dp).join(","),transitionDuration:f+"ms",...R,...A}),g==="close"){const O=E||T;p({transitionProperty:Object.keys(O).map(dp).join(","),transitionDuration:h+"ms",...R,...O})}},[h,y,v,b,S,f,g,c]),{isMounted:m,styles:d}}function bM(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:h=[],selectedIndex:d=null}=t,p=P.useRef(),m=P.useRef(""),g=P.useRef((n=d??i)!=null?n:-1),v=P.useRef(null),b=at(a),y=at(l),S=gt(u),T=gt(h);be(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),be(()=>{if(r&&m.current===""){var I;g.current=(I=d??i)!=null?I:-1}},[r,d,i]);const E=at(I=>{I?o.current.typing||(o.current.typing=I,y(I)):o.current.typing&&(o.current.typing=I,y(I))}),R=at(I=>{function F(j,_,H){const U=S.current?S.current(_,H):_.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return U?j.indexOf(U):-1}const k=s.current;if(m.current.length>0&&m.current[0]!==" "&&(F(k,k,m.current)===-1?E(!1):I.key===" "&&mt(I)),k==null||T.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(mt(I),E(!0)),k.every(j=>{var _,H;return j?((_=j[0])==null?void 0:_.toLocaleLowerCase())!==((H=j[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===I.key&&(m.current="",g.current=v.current),m.current+=I.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=v.current,E(!1)},f);const C=g.current,M=F(k,[...k.slice((C||0)+1),...k.slice(0,(C||0)+1)],m.current);M!==-1?(b(M),v.current=M):I.key!==" "&&(m.current="",E(!1))}),A=P.useMemo(()=>({onKeyDown:R}),[R]),O=P.useMemo(()=>({onKeyDown:R,onKeyUp(I){I.key===" "&&E(!1)}}),[R,E]);return P.useMemo(()=>c?{reference:A,floating:O}:{},[c,A,O])}function hp(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,f]=t[a]||[0,0];c>=r!=f>=r&&n<=(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function xM(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function wM(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(f,h){const d=performance.now(),p=d-l;if(i===null||a===null||p===0)return i=f,a=h,l=d,null;const m=f-i,g=h-a,b=Math.sqrt(m*m+g*g)/p;return i=f,a=h,l=d,b}const u=f=>{let{x:h,y:d,placement:p,elements:m,onClose:g,nodeId:v,tree:b}=f;return function(S){function T(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||d==null)return;const{clientX:E,clientY:R}=S,A=[E,R],O=nn(S),I=S.type==="mouseleave",F=Ye(m.floating,O),k=Ye(m.domReference,O),L=m.domReference.getBoundingClientRect(),C=m.floating.getBoundingClientRect(),M=p.split("-")[0],j=h>C.right-C.width/2,_=d>C.bottom-C.height/2,H=xM(A,L),U=C.width>L.width,D=C.height>L.height,$=(U?L:C).left,q=(U?L:C).right,J=(D?L:C).top,X=(D?L:C).bottom;if(F&&(s=!0,!I))return;if(k&&(s=!1),k&&!I){s=!0;return}if(I&&Me(S.relatedTarget)&&Ye(m.floating,S.relatedTarget)||b&&hr(b.nodesRef.current,v).some(B=>{let{context:z}=B;return z==null?void 0:z.open}))return;if(M==="top"&&d>=L.bottom-1||M==="bottom"&&d<=L.top+1||M==="left"&&h>=L.right-1||M==="right"&&h<=L.left+1)return T();let G=[];switch(M){case"top":G=[[$,L.top+1],[$,C.bottom-1],[q,C.bottom-1],[q,L.top+1]];break;case"bottom":G=[[$,C.top+1],[$,L.bottom-1],[q,L.bottom-1],[q,C.top+1]];break;case"left":G=[[C.right-1,X],[C.right-1,J],[L.left+1,J],[L.left+1,X]];break;case"right":G=[[L.right-1,X],[L.right-1,J],[C.left+1,J],[C.left+1,X]];break}function N(B){let[z,V]=B;switch(M){case"top":{const Y=[U?z+t/2:j?z+t*4:z-t*4,V+t+1],ee=[U?z-t/2:j?z+t*4:z-t*4,V+t+1],W=[[C.left,j||U?C.bottom-t:C.top],[C.right,j?U?C.bottom-t:C.top:C.bottom-t]];return[Y,ee,...W]}case"bottom":{const Y=[U?z+t/2:j?z+t*4:z-t*4,V-t],ee=[U?z-t/2:j?z+t*4:z-t*4,V-t],W=[[C.left,j||U?C.top+t:C.bottom],[C.right,j?U?C.top+t:C.bottom:C.top+t]];return[Y,ee,...W]}case"left":{const Y=[z+t+1,D?V+t/2:_?V+t*4:V-t*4],ee=[z+t+1,D?V-t/2:_?V+t*4:V-t*4];return[...[[_||D?C.right-t:C.left,C.top],[_?D?C.right-t:C.left:C.right-t,C.bottom]],Y,ee]}case"right":{const Y=[z-t,D?V+t/2:_?V+t*4:V-t*4],ee=[z-t,D?V-t/2:_?V+t*4:V-t*4],W=[[_||D?C.left+t:C.right,C.top],[_?D?C.left+t:C.right:C.left+t,C.bottom]];return[Y,ee,...W]}}}if(!hp([E,R],G)){if(s&&!H)return T();if(!I&&r){const B=c(S.clientX,S.clientY);if(B!==null&&B<.1)return T()}hp([E,R],N([h,d]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Io=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[aa(10),Gu({fallbackAxisSideDirection:"end"}),Uu(),tb({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Co({open:n,middleware:s,transform:!0,whileElementsMounted:ia,onOpenChange:(p,m)=>{var v;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=la(l),u=Eo(l),f=Ro(l),{getReferenceProps:h,getFloatingProps:d}=Po([c,u,f]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(So,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(Rs,{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-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...d(),children:[x.jsx(sb,{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]})})})]})},TM=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=Co({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=la(a),u=Ro(a),f=Eo(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=Po([c,u,f]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(Ur,{...d(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(ft.span,{layoutId:o,children:e.trigger})}),x.jsx(yo,{children:s?x.jsx(So,{root:t,children:x.jsx(Rs,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(ft.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},yb=300,SM=500,vb=(e="")=>De("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),yc=w.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),pp=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=Gn(),c=l!==null,[u,f]=w.useState(!1),[h,d]=w.useState(!1),[p,m]=w.useState(null),g=w.useRef([]),v=w.useRef([]),b=w.useContext(yc),y=Yn(),S=YD(),T=ob(),{floatingStyles:E,refs:R,context:A}=Co({nodeId:S,open:u,transform:!0,onOpenChange:f,whileElementsMounted:ia,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[aa({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Gu(),Uu()]}),O=Ro(A,{role:"menu",enabled:!0}),I=Eo(A,{bubbles:!0}),F=cb(A,{enabled:n,delay:{open:yb},handleClose:wM({blockPointerEvents:!0})}),k=la(A,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),L=gb(A,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:g,scrollItemIntoView:!0,onNavigate:m}),C=bM(A,{activeIndex:p,listRef:v,resetMs:SM,onMatch:u?m:void 0}),{getReferenceProps:M,getFloatingProps:j,getItemProps:_}=Po([F,k,O,I,L,C]);w.useEffect(()=>{if(!y)return;const U=()=>f(!1),D=$=>{$.nodeId!==S&&$.parentId===l&&f(!1)};return y.events.on("click",U),y.events.on("menuopen",D),()=>{y.events.off("click",U),y.events.off("menuopen",D)}},[y,S,l]),w.useEffect(()=>{u&&y&&y.events.emit("menuopen",{parentId:l,nodeId:S})},[y,u,S,l]);const H=r?i.className:De(vb(i.className));return x.jsxs(KD,{id:S,children:[x.jsx(w.Fragment,{children:i.asChild?x.jsx(eo,{children:s,ref:gc([R.setReference,T.ref,a]),tabIndex:c?b.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,...M(b.getItemProps({...i,onFocus(U){var D;(D=i.onFocus)==null||D.call(i,U),d(!1),b.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:gc([R.setReference,T.ref,a]),tabIndex:c?b.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,...M(b.getItemProps({...i,onFocus(U){var D;(D=i.onFocus)==null||D.call(i,U),d(!1),b.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(bu,{size:14})]})]})}),x.jsx(yc.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:_,setHasFocusInside:d,isOpen:u},children:x.jsx(WD,{elementsRef:g,labelsRef:v,children:u&&x.jsx(So,{preserveTabOrder:!0,children:x.jsx(Rs,{context:A,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...j(),ref:R.setFloating,style:{...i.style,...E},className:De("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),EM=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext(yc),a=ob({label:r?null:typeof e=="string"?e:t}),l=Yn(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:gc([a.ref,s]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:vb(o.className),...i.getItemProps({onClick(u){var f;(f=o.onClick)==null||f.call(o,u),l==null||l.events.emit("click")},onFocus(u){var f;(f=o.onFocus)==null||f.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),CM=w.forwardRef((e,t)=>Gn()!==null?x.jsx(pp,{...e,isParent:!1,ref:t}):x.jsx(qD,{children:x.jsx(pp,{...e,isParent:!0,ref:t})})),PM=(e,t)=>Ei()?t:window.matchMedia(e).matches,RM=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(PM(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},zt="600ms",IM={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:zt},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:zt},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:zt}},AM={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:zt},exit:{translateX:["0%","30%"],opacity:0,animationDuration:zt}},ll={drawer:e=>e==="left"?IM:AM,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:zt,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:zt,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:zt,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:zt},enter:{opacity:1,scale:[1.05,1],animationDuration:zt},exit:{opacity:0,scale:.97,animationDuration:zt}}},OM=co("isolate 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 h-[85vh] max-h-[85vh] max-h-[85svh] 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"}}),DM={top:0,left:0,right:0,bottom:-1},MM=e=>e*.62,kM=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,f=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+f))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=MM(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};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:DM,whileDrag:{cursor:"grabbing"},className:De("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:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},cl={drawer:"right",sheet:"none",dialog:"none"},FM=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=w.useId(),a=w.useId(),l=RM("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:cl[e]:r?cl[e]:cl.sheet,f=l||r?ll[e]:ll.sheet,h=typeof f=="function"?f(u):f,d=l||r?e:"sheet",{refs:p,context:m}=Co({open:s.open,onOpenChange:s.onChange}),g=la(m),v=Ro(m),b=Eo(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:S}=Po([g,v,b]),T=s.trigger,E=pr(void 0),R=()=>s.onChange(!1);return x.jsxs(w.Fragment,{children:[s.trigger?x.jsx(w.Fragment,{children:s.asChild?x.jsx(eo,{ref:p.setReference,...y({layoutId:s.layoutId}),children:T}):x.jsx(ft.button,{ref:p.setReference,...y(),layoutId:s.layoutId,type:"button",children:T})}):null,x.jsx(So,{children:x.jsx(yo,{presenceAffectsLayout:!0,children:s.open?x.jsx(aM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${d==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:x.jsx(Rs,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(ft.div,{exit:"exit",animate:"enter",initial:"initial",variants:h,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:OM({position:u,type:d}),style:d==="drawer"?{width:E}:{height:E},...S(),children:[s.title?x.jsx("header",{className:"relative w-full",children:s.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:R,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(wu,{})})}):null,c&&t?x.jsx(kM,{onChange:s.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},jM=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}),bb=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:s,...i})=>{const[a,l]=w.useState(!1),c=w.useRef(null),u=o||"span",{refs:f,floatingStyles:h,context:d}=Co({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:ia,middleware:[aa(5),Gu({fallbackAxisSideDirection:"start"}),Uu(),tb({element:c,padding:5})]}),p=cb(d,{move:!0,enabled:r,delay:{open:yb}}),m=hM(d,{enabled:r}),g=Eo(d,{enabled:r}),v=Ro(d,{role:"tooltip",enabled:r}),b=cM(d,{enabled:!!r&&!!t}),{getReferenceProps:y,getFloatingProps:S}=Po([p,m,g,v,b]);return x.jsxs(w.Fragment,{children:[x.jsx(u,{ref:f.setReference,...y(i),children:s}),x.jsx(So,{children:a&&x.jsxs(po,{...S(),ref:f.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(sb,{ref:c,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class Fi{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Fi.getDescendantProperty(a[l],s,r);else s&&Fi.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Lr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Lr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Fi.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Lr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Lr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Lr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const xb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:De("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(bb,{as:"button",type:"button",title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(Dy,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs(w.Fragment,{children:[x.jsx(Oy,{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(yP,{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]}),o]}),ua=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:f,labelClassName:h="",name:d,title:p,componentName:m,placeholder:g,hideLeft:v,required:b})=>{const y=f??d,S=Dt(),T=e??S.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-component":m,"data-interactive":!!s,className:De("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:y,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[!v&&!n?x.jsx(xb,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:g,children:T||n?x.jsxs(w.Fragment,{children:[b?null:x.jsx("span",{className:"text-opacity-70",children:T}),n?x.jsx(w.Fragment,{children:n}):null]}):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-error:border-danger ${h}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block 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})]})},NM=e=>x.jsx(w.Fragment,{children:e.children}),wb=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??NM,a=r.label??r.value;return r.hidden?null:x.jsx("li",{...o,ref:s,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsxs("button",{type:"button","aria-busy":r.disabled,"aria-checked":t,"aria-current":t,"aria-selected":t,onClick:n,"data-value":r.value,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary-hover text-primary-foreground":""} ${e?"bg-primary text-primary-foreground":""}`,children:[x.jsx(i,{...o,label:r.label,value:r.value,children:a}),t?x.jsx("span",{children:x.jsx(mP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),LM={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},_M={caseSensitive:!1,sort:!1},VM=[],$M=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:s,optionalText:i,container:a,hideLeft:l=!1,right:c,left:u,error:f,required:h=!1,...d},p)=>{const m=d.value??d.defaultValue??"",g=Dt(),[v,b]=w.useState(!1),[y,S]=w.useState(""),[T,E]=w.useState(m),[R,A]=w.useState(()=>{var V;return((V=e.find(Y=>Y.value===m))==null?void 0:V.label)??m}),[O,I]=w.useState(null),F=w.useRef(VM),k=t&&y!==""?[{value:y,label:y,"data-dynamic":"true"},...e]:e,L=new Lr(k,["value","label"],_M).search(y),C=t?void 0:`^(${e.map(V=>`${oc(V.value)}${V.label?"|"+oc(V.label):""}`).join("|")})$`;w.useEffect(()=>{if(d.value){const V=e.find(Y=>Y.value===d.value);E((V==null?void 0:V.label)??d.value)}},[d.value]);const{x:M,y:j,strategy:_,refs:H,context:U}=Co({open:v,transform:!0,strategy:"absolute",onOpenChange:b,whileElementsMounted:ia,middleware:[aa(4),kD({elementContext:"reference",padding:10,apply(V){const ee=V.elements.reference.parentElement,W=ee==null?void 0:ee.getBoundingClientRect().width;Object.assign(V.elements.floating.style,{width:`${W}px`,maxWidth:`${W}px`,minWidth:"max-content",maxHeight:`${Math.min(250,V.availableHeight)}px`})}})]}),D=vM(U,LM),{getReferenceProps:$,getFloatingProps:q,getItemProps:J}=Po([Ro(U,{role:"listbox"}),Eo(U),gb(U,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:O,selectedIndex:O,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:V=>I(Y=>V??Y)})]);w.useEffect(()=>{const V=H.reference.current;if(V)return Hi(V)},[]);const X=(V,Y)=>{E(V.value);const ee=H.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",V.value),ee.value=V.value;const W=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(W),d.onChange&&d.onChange(W),A(V.label??""),b(!1),S(""),I(Y)},G=V=>{var ee;const Y=V.target.value;return S(Y),!v&&Y===""?b(!0):(V.target.name=d.name||"",Y?b(!0):(ee=d.onChange)==null?void 0:ee.call(d,V))},N=()=>{b(!0),S("")},B=()=>{var V;S(""),E(""),(V=H.reference.current)==null||V.setAttribute("data-value",""),A(""),Vm(H.reference.current),b(!1)},z=d.id||d.name;return x.jsxs(ua,{...d,left:u,error:f,form:d.form,name:d.name,feedback:n,hideLeft:l,required:h,title:d.title,container:a,rightLabel:s,interactive:o,id:d.name||d.id,optionalText:i,componentName:"autocomplete",labelClassName:r,placeholder:d.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[x.jsx(Ay,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:B,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("input",{...$({...d,onChange:G,onFocus:N,pattern:C,ref:H.setReference,name:`${z}-shadow`,id:`${z}-shadow`,onClick:V=>V.currentTarget.focus(),onKeyDown(V){if(V.key==="Escape")return V.currentTarget.blur(),b(!1);if(V.key==="Enter"){if(O!==null&&L[O])return V.preventDefault(),X(L[O],O);if(L.length===1)return V.preventDefault(),X(L[0],0)}}}),"data-value":T,"data-error":!!f,"data-name":z,"data-target":z,required:h,value:v?y:R||T,"aria-autocomplete":"list",autoComplete:"off",className:De("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",d.className)}),x.jsx("input",{id:z,name:z,type:"hidden","data-origin":z,ref:p,required:h,defaultValue:d.value||T||void 0}),x.jsx(So,{preserveTabOrder:!0,children:v?x.jsx(Rs,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("ul",{...q({ref:H.setFloating,style:{position:_,left:(M??0)+(T?26:16),top:j??0,...D.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[L.map((V,Y)=>{const ee=T===V.value||T===V.label;return x.jsx(wb,{...J({onClick:()=>X(V,Y),ref:W=>void(F.current[Y]=W),selected:O===Y}),option:V,active:ee,selected:O===Y},`${V.value}-option`)}),L.length===0?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:g.autocompleteEmpty})}):null]})}):null})]})}),Tb=w.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>x.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:De("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[x.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:De("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",o)}),e,x.jsx("span",{"data-name":"checkbox-label",className:De("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Sb=(e,t,n,r)=>w.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:f,optionalText:h,container:d,hideLeft:p=!1,right:m,left:g,error:v,...b},y)=>{const S=e,T=b.id??b.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const R=E.current,A=Hi(E.current),O=r==null?void 0:r(R),I=F=>{const k=F;if(k.key==="Enter"&&R.enterKeyHint==="next"){const L=R.getAttribute("data-next");if(L){const C=document.getElementById(L);if(C)return C.focus(),void k.preventDefault()}}};return R.addEventListener("keydown",I),()=>{O==null||O(),A(),R.removeEventListener("keydown",I)}},[]),x.jsx(ua,{...n,componentName:t,info:a,container:d,error:v,feedback:i,hideLeft:p,left:g,optionalText:h,right:m,rightLabel:f,interactive:u,form:b.form,id:b.name||b.id,name:b.name,labelClassName:l,title:b.title,placeholder:b.placeholder,required:b.required,children:x.jsx(S,{...n,...b,id:T,name:T,type:s,"data-next":c,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Hc(y,E),className:De("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","resize-y group-focus-within:border-primary group-hover:border-primary",b.className)})})}),Is=Sb(tv,"input",{type:"text"}),mp=new Date(1970,11,31),ul={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},gp={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},BM={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")},fl=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},WM=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||yA(),l=w.useId(),c=Dt(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[f,h]=w.useState(e||void 0),[d,p]=w.useState(!1),m=fl(u,mp).flatMap(R=>vn.keyof(ul,R.type)?ul[R.type](R.value):[]),g=fl(u,mp).reduce((R,A)=>R+(vn.keyof(gp,A.type)?gp[A.type](A.value):""),""),[v,b]=w.useState(f?fl(u,f).reduce((R,A)=>R+(vn.keyof(ul,A.type)?BM[A.type](f,A.value):""),""):""),y=R=>{const A=R.target.value;if(b(A),m.length===A.length&&m.every((I,F)=>{const k=A.charAt(F);return typeof I=="string"?k===I:I.test(k)})){const I=Jr(OI(A,g,new Date));return h(I),r==null?void 0:r(I)}return h(void 0),r==null?void 0:r(void 0)},S=R=>(h(R),r==null||r(R),b(R?DR(R,g):"")),T=Ly(f),E=T?f.toISOString():void 0;return x.jsx(Is,{...s,mask:m,value:v,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!d,"data-target":s.name,"data-component":"date-picker",onChange:y,required:s.required??!0,error:d?void 0:s.error,placeholder:s.placeholder??g,right:x.jsxs(w.Fragment,{children:[x.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),x.jsx(Io,{open:d,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(pP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(fv,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?f:void 0})})]})})}),HM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],UM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],GM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],yp=(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 vp(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?GM:UM:t.binary?zM:HM,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=yp(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=yp(Number(e),t.locale,i),c=n[a];return s+l+r+c}var vc={exports:{}},Ks={exports:{}},Pe={};/** @license React v16.13.1
177
+ */var VO=["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])"],Oi=VO.join(","),Uv=typeof Element>"u",no=Uv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Di=!Uv&&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},Mi=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"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},$O=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},BO=function(t,n,r){if(Mi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Oi));return n&&no.call(t,Oi)&&o.unshift(t),o=o.filter(r),o},WO=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Mi(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=no.call(i,Oi);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!Mi(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&h){var d=e(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else s.unshift.apply(s,i.children)}}return o},Gv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Yv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$O(t))&&!Gv(t)?0:t.tabIndex},HO=function(t,n){var r=Yv(t);return r<0&&n&&!Gv(t)?0:r},zO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Kv=function(t){return t.tagName==="INPUT"},UO=function(t){return Kv(t)&&t.type==="hidden"},GO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},KO=function(t){if(!t.name)return!0;var n=t.form||Di(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){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",i.message),!1}var s=YO(o,t.form);return!s||s===t},qO=function(t){return Kv(t)&&t.type==="radio"},XO=function(t){return qO(t)&&!KO(t)},QO=function(t){var n,r=t&&Di(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,f;r=Di(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},$h=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},ZO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=no.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(no.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Di(t);if(l&&!l.shadowRoot&&o(l)===!0)return $h(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(QO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return $h(t);return!1},JO=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 no.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},eD=function(t,n){return!(n.disabled||Mi(n)||UO(n)||ZO(n,t)||GO(n)||JO(n))},mc=function(t,n){return!(XO(n)||Yv(n)<0||!eD(t,n))},tD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},nD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=HO(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(zO).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ls=function(t,n){n=n||{};var r;return n.getShadowRoot?r=WO([t],n.includeContainer,{filter:mc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:tD}):r=BO(t,n.includeContainer,mc.bind(null,n)),nD(r)},rD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return no.call(t,Oi)===!1?!1:mc(n,t)};function Bh(e,t,n){let{reference:r,floating:o}=e;const s=gr(t),i=Wu(t),a=Bu(i),l=$n(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(xo(t)){case"start":d[i]-=h*(n&&c?-1:1);break;case"end":d[i]+=h*(n&&c?-1:1);break}return d}const oD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Bh(c,r,l),h=r,d={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:y}=a[m],{x:b,y:v,data:S,reset:T}=await y({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,f=v??f,d={...d,[g]:{...d[g],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(h=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:f}=Bh(c,h,l)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Hu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=bo(t,e),p=zv(d),g=a[h?f==="floating"?"reference":"floating":f],y=Ai(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},T=Ai(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:l}):b);return{top:(y.top-T.top+p.top)/S.y,bottom:(T.bottom-y.bottom+p.bottom)/S.y,left:(y.left-T.left+p.left)/S.x,right:(T.right-y.right+p.right)/S.x}}const sD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=bo(e,t)||{};if(c==null)return{};const f=zv(u),h={x:n,y:r},d=Wu(o),p=Bu(d),m=await i.getDimensions(c),g=d==="y",y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[d]-h[d]-s.floating[p],T=h[d]-s.reference[d],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let R=E?E[v]:0;(!R||!await(i.isElement==null?void 0:i.isElement(E)))&&(R=a.floating[v]||s.floating[p]);const I=S/2-T/2,M=R/2-m[p]/2-1,A=rn(f[y],M),N=rn(f[b],M),k=A,j=R-m[p]-N,P=R/2-m[p]/2+I,O=hc(k,P,j),F=!l.arrow&&xo(o)!=null&&P!==O&&s.reference[p]/2-(P<k?A:N)-m[p]/2<0,_=F?P<k?P-k:P-j:0;return{[d]:h[d]+_,data:{[d]:O,centerOffset:P-O-_,...F&&{alignmentOffset:_}},reset:F}}}),iD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=bo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=$n(o),b=gr(a),v=$n(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(v||!m?[Ii(a)]:jO(a)),E=p!=="none";!h&&E&&T.push(...LO(a,m,p,S));const R=[a,...T],I=await Hu(t,g),M=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&M.push(I[y]),f){const P=FO(o,i,S);M.push(I[P[0]],I[P[1]])}if(A=[...A,{placement:o,overflows:M}],!M.every(P=>P<=0)){var N,k;const P=(((N=s.flip)==null?void 0:N.index)||0)+1,O=R[P];if(O)return{data:{index:P,overflows:A},reset:{placement:O}};let F=(k=A.filter(_=>_.overflows[0]<=0).sort((_,W)=>_.overflows[1]-W.overflows[1])[0])==null?void 0:k.placement;if(!F)switch(d){case"bestFit":{var j;const _=(j=A.filter(W=>{if(E){const U=gr(W.placement);return U===b||U==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(U=>U>0).reduce((U,D)=>U+D,0)]).sort((W,U)=>W[1]-U[1])[0])==null?void 0:j[0];_&&(F=_);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function aD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=$n(n),a=xo(n),l=gr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=bo(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(d=a==="end"?p*-1:p),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const lD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await aD(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},cD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...l}=bo(e,t),c={x:n,y:r},u=await Hu(t,l),f=gr($n(o)),h=Hv(f);let d=c[h],p=c[f];if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=d+u[g],v=d-u[y];d=hc(b,d,v)}if(i){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[g],v=p-u[y];p=hc(b,p,v)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},uD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=bo(e,t),l=await Hu(t,a),c=$n(n),u=xo(n),f=gr(n)==="y",{width:h,height:d}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=d-l.top-l.bottom,y=h-l.left-l.right,b=rn(d-l[p],g),v=rn(h-l[m],y),S=!t.middlewareData.shift;let T=b,E=v;if(f?E=u||S?rn(v,y):y:T=u||S?rn(b,g):g,S&&!u){const I=Mt(l.left,0),M=Mt(l.right,0),A=Mt(l.top,0),N=Mt(l.bottom,0);f?E=h-2*(I!==0||M!==0?I+M:Mt(l.left,l.right)):T=d-2*(A!==0||N!==0?A+N:Mt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const R=await o.getDimensions(s.floating);return h!==R.width||d!==R.height?{reset:{rects:!0}}:{}}}};function qv(e){const t=Vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ri(n)!==s||Ri(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function zu(e){return Me(e)?e:e.contextElement}function Vr(e){const t=zu(e);if(!et(t))return Vn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=qv(t);let i=(s?Ri(n.width):n.width)/r,a=(s?Ri(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const fD=Vn(0);function Xv(e){const t=Pt(e);return!Nu()||!t.visualViewport?fD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=zu(e);let i=Vn(1);t&&(r?Me(r)&&(i=Vr(r)):i=Vr(e));const a=dD(s,n,r)?Xv(s):Vn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const h=Pt(s),d=r&&Me(r)?Pt(r):r;let p=h,m=fc(p);for(;m&&r&&d!==p;){const g=Vr(m),y=m.getBoundingClientRect(),b=Vt(m),v=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=v,c+=S,p=Pt(m),m=fc(p)}}return Ai({width:u,height:f,x:l,y:c})}function hD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Sn(r),a=t?oa(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Vn(1);const u=Vn(0),f=et(r);if((f||!f&&!s)&&((Un(r)!=="body"||Ps(i))&&(l=sa(r)),et(r))){const h=yr(r);c=Vr(r),u.x=h.x+r.clientLeft,u.y=h.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 pD(e){return Array.from(e.getClientRects())}function Qv(e){return yr(Sn(e)).left+sa(e).scrollLeft}function mD(e){const t=Sn(e),n=sa(e),r=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Qv(e);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(i+=Mt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function gD(e,t){const n=Pt(e),r=Sn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Nu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function yD(e,t){const n=yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=et(e)?Vr(e):Vn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Wh(e,t,n){let r;if(t==="viewport")r=gD(e,n);else if(t==="document")r=mD(Sn(e));else if(Me(t))r=yD(t,n);else{const o=Xv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ai(r)}function Zv(e,t){const n=Tn(e);return n===t||!Me(n)||_n(n)?!1:Vt(n).position==="fixed"||Zv(n,t)}function vD(e,t){const n=t.get(e);if(n)return n;let r=Fn(e,[],!1).filter(a=>Me(a)&&Un(a)!=="body"),o=null;const s=Vt(e).position==="fixed";let i=s?Tn(e):e;for(;Me(i)&&!_n(i);){const a=Vt(i),l=ju(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ps(i)&&!l&&Zv(e,i))?r=r.filter(u=>u!==i):o=a,i=Tn(i)}return t.set(e,r),r}function bD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?oa(t)?[]:vD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=Wh(t,u,o);return c.top=Mt(f.top,c.top),c.right=rn(f.right,c.right),c.bottom=rn(f.bottom,c.bottom),c.left=Mt(f.left,c.left),c},Wh(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xD(e){const{width:t,height:n}=qv(e);return{width:t,height:n}}function wD(e,t,n){const r=et(t),o=Sn(t),s=n==="fixed",i=yr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Vn(0);if(r||!r&&!s)if((Un(t)!=="body"||Ps(o))&&(a=sa(t)),r){const f=yr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Qv(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function el(e){return Vt(e).position==="static"}function Hh(e,t){return!et(e)||Vt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Jv(e,t){const n=Pt(e);if(oa(e))return n;if(!et(e)){let o=Tn(e);for(;o&&!_n(o);){if(Me(o)&&!el(o))return o;o=Tn(o)}return n}let r=Hh(e,t);for(;r&&PO(r)&&el(r);)r=Hh(r,t);return r&&_n(r)&&el(r)&&!ju(r)?n:r||RO(e)||n}const TD=async function(e){const t=this.getOffsetParent||Jv,n=this.getDimensions,r=await n(e.floating);return{reference:wD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function SD(e){return Vt(e).direction==="rtl"}const ED={convertOffsetParentRelativeRectToViewportRelativeRect:hD,getDocumentElement:Sn,getClippingRect:bD,getOffsetParent:Jv,getElementRects:TD,getClientRects:pD,getDimensions:xD,getScale:Vr,isElement:Me,isRTL:SD};function CD(e,t){let n=null,r;const o=Sn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const d=Nr(u),p=Nr(o.clientWidth-(c+f)),m=Nr(o.clientHeight-(u+h)),g=Nr(c),b={rootMargin:-d+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Mt(0,rn(1,l))||1};let v=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!v)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return i(!0),s}function ia(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=zu(e),u=o||s?[...c?Fn(c):[],...Fn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&a?CD(c,n):null;let h=-1,d=null;i&&(d=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,m=l?yr(e):null;l&&g();function g(){const y=yr(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const PD=lD,RD=cD,ID=iD,AD=uD,zh=sD,OD=(e,t,n)=>{const r=new Map,o={platform:ED,...n},s={...o.platform,_c:r};return oD(e,t,{...o,platform:s})};var si=typeof document<"u"?x.useLayoutEffect:x.useEffect;function ki(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(!ki(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!ki(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function eb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uh(e,t){const n=eb(e);return Math.round(t*n)/n}function Gh(e){const t=C.useRef(e);return si(()=>{t.current=e}),t}function DD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=C.useState(r);ki(h,r)||d(r);const[p,m]=C.useState(null),[g,y]=C.useState(null),b=C.useCallback(_=>{_!==E.current&&(E.current=_,m(_))},[]),v=C.useCallback(_=>{_!==R.current&&(R.current=_,y(_))},[]),S=s||p,T=i||g,E=C.useRef(null),R=C.useRef(null),I=C.useRef(u),M=l!=null,A=Gh(l),N=Gh(o),k=C.useCallback(()=>{if(!E.current||!R.current)return;const _={placement:t,strategy:n,middleware:h};N.current&&(_.platform=N.current),OD(E.current,R.current,_).then(W=>{const U={...W,isPositioned:!0};j.current&&!ki(I.current,U)&&(I.current=U,ys.flushSync(()=>{f(U)}))})},[h,t,n,N]);si(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[c]);const j=C.useRef(!1);si(()=>(j.current=!0,()=>{j.current=!1}),[]),si(()=>{if(S&&(E.current=S),T&&(R.current=T),S&&T){if(A.current)return A.current(S,T,k);k()}},[S,T,k,A,M]);const P=C.useMemo(()=>({reference:E,floating:R,setReference:b,setFloating:v}),[b,v]),O=C.useMemo(()=>({reference:S,floating:T}),[S,T]),F=C.useMemo(()=>{const _={position:n,left:0,top:0};if(!O.floating)return _;const W=Uh(O.floating,u.x),U=Uh(O.floating,u.y);return a?{..._,transform:"translate("+W+"px, "+U+"px)",...eb(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:U}},[n,a,O.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:k,refs:P,elements:O,floatingStyles:F}),[u,k,P,O,F])}const MD=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?zh({element:r.current,padding:o}).fn(n):{}:r?zh({element:r,padding:o}).fn(n):{}}}},aa=(e,t)=>({...PD(e),options:[e,t]}),Uu=(e,t)=>({...RD(e),options:[e,t]}),Gu=(e,t)=>({...ID(e),options:[e,t]}),kD=(e,t)=>({...AD(e),options:[e,t]}),tb=(e,t)=>({...MD(e),options:[e,t]});function gc(e){return C.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const nb={...C},FD=nb.useInsertionEffect,jD=FD||(e=>e());function at(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jD(()=>{t.current=e}),C.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 Yu="ArrowUp",Rs="ArrowDown",ro="ArrowLeft",wo="ArrowRight";function Gs(e,t,n){return Math.floor(e/t)!==n}function Qo(e,t){return t<0||t>=e.current.length}function tl(e,t){return xt(e,{disabledIndices:t})}function Yh(e,t){return xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&ii(i,a,o));return a}function ND(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===Yu){if(u&&mt(n),c===-1)f=l;else if(f=xt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||f<0)){const h=c%s,d=l%s,p=l-(d-h);d===h?f=l:f=d>h?p:p-s}Qo(e,f)&&(f=c)}if(n.key===Rs&&(u&&mt(n),c===-1?f=a:(f=xt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(f=xt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Qo(e,f)&&(f=c)),r==="both"){const h=Nr(c/s);n.key===wo&&(u&&mt(n),c%s!==s-1?(f=xt(e,{startingIndex:c,disabledIndices:i}),o&&Gs(f,s,h)&&(f=xt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(f=xt(e,{startingIndex:c-c%s-1,disabledIndices:i})),Gs(f,s,h)&&(f=c)),n.key===ro&&(u&&mt(n),c%s!==0?(f=xt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Gs(f,s,h)&&(f=xt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(f=xt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Gs(f,s,h)&&(f=c));const d=Nr(l/s)===h;Qo(e,f)&&(o&&d?f=n.key===ro?l:xt(e,{startingIndex:c-c%s-1,disabledIndices:i}):f=c)}return f}function LD(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let h=0;h<l;h++)u.push(o+f+h*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=i}),c=!0):o++}}),[...r]}function _D(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function VD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ii(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 Kh=0;function On(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Kh);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Kh=requestAnimationFrame(s)}var be=typeof document<"u"?x.useLayoutEffect:x.useEffect;function $D(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 BD(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 rb=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function WD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=C.useState(()=>new Map),i=C.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=C.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return be(()=>{const l=new Map(o);Array.from(l.keys()).sort($D).forEach((u,f)=>{l.set(u,f)}),BD(o,l)||s(l)},[o]),C.createElement(rb.Provider,{value:C.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function ob(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=C.useContext(rb),[a,l]=C.useState(null),c=C.useRef(null),u=C.useCallback(f=>{if(c.current=f,a!==null&&(s.current[a]=f,i)){var h;const d=t!==void 0;i.current[a]=d?t:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,s,i,t]);return be(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),be(()=>{const f=c.current?o.get(c.current):null;f!=null&&l(f)},[o]),C.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function oo(){return oo=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},oo.apply(this,arguments)}let qh=!1,HD=0;const Xh=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+HD++;function zD(){const[e,t]=C.useState(()=>qh?Xh():void 0);return be(()=>{e==null&&t(Xh())},[]),C.useEffect(()=>{qh=!0},[]),e}const UD=nb.useId,To=UD||zD;let cs;process.env.NODE_ENV!=="production"&&(cs=new Set);function ai(){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=cs)!=null&&e.has(o))){var s;(s=cs)==null||s.add(o),console.warn(o)}}function GD(){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=cs)!=null&&e.has(o))){var s;(s=cs)==null||s.add(o),console.error(o)}}const sb=C.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d:h,style:{transform:d,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||ai("The `ref` prop is required for `FloatingArrow`."));const g=To(),[y,b]=C.useState(!1);if(be(()=>{if(!o)return;Vt(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const v=c*2,S=v/2,T=i/2*(l/-8+1),E=a/2*l/4,[R,I]=r.split("-"),M=!!h,A=R==="top"||R==="bottom",N=u&&I==="end"?"bottom":"top";let k=u&&I==="end"?"right":"left";u&&y&&(k=I==="end"?"left":"right");const j=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",O=h||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",F={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[R];return C.createElement("svg",oo({},m,{"aria-hidden":!0,ref:n,width:M?i:i+v,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[k]:j,[N]:P,[R]:A||M?"100%":"calc(100% - "+v/2+"px)",transform:""+F+(d??""),...p}}),v>0&&C.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:v+(h?0:1),d:O}),C.createElement("path",{stroke:v&&!h?m.fill:"none",d:O}),C.createElement("clipPath",{id:g},C.createElement("rect",{x:-S,y:S*(M?-1:1),width:i+v,height:i})))});function ib(){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 ab=C.createContext(null),lb=C.createContext(null),Gn=()=>{var e;return((e=C.useContext(ab))==null?void 0:e.id)||null},Yn=()=>C.useContext(lb);function YD(e){const t=To(),n=Yn(),o=Gn();return be(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function KD(e){const{children:t,id:n}=e,r=Gn();return C.createElement(ab.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function qD(e){const{children:t}=e,n=C.useRef([]),r=C.useCallback(i=>{n.current=[...n.current,i]},[]),o=C.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=C.useState(()=>ib())[0];return C.createElement(lb.Provider,{value:C.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function Bn(e){return"data-floating-ui-"+e}function gt(e){const t=x.useRef(e);return be(()=>{t.current=e}),t}const Qh=Bn("safe-polygon");function nl(e,t,n){return n&&!to(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function cb(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=Yn(),p=Gn(),m=gt(c),g=gt(l),y=gt(n),b=C.useRef(),v=C.useRef(-1),S=C.useRef(),T=C.useRef(-1),E=C.useRef(!0),R=C.useRef(!1),I=C.useRef(()=>{}),M=C.useCallback(()=>{var O;const F=(O=o.current.openEvent)==null?void 0:O.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);C.useEffect(()=>{if(!a)return;function O(F){let{open:_}=F;_||(clearTimeout(v.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",O),()=>{s.off("openchange",O)}},[a,s]),C.useEffect(()=>{if(!a||!m.current||!n)return;function O(_){M()&&r(!1,_,"hover")}const F=ut(i.floating).documentElement;return F.addEventListener("mouseleave",O),()=>{F.removeEventListener("mouseleave",O)}},[i.floating,n,r,a,m,M]);const A=C.useCallback(function(O,F,_){F===void 0&&(F=!0),_===void 0&&(_="hover");const W=nl(g.current,"close",b.current);W&&!S.current?(clearTimeout(v.current),v.current=window.setTimeout(()=>r(!1,O,_),W)):F&&(clearTimeout(v.current),r(!1,O,_))},[g,r]),N=at(()=>{I.current(),S.current=void 0}),k=at(()=>{if(R.current){const O=ut(i.floating).body;O.style.pointerEvents="",O.removeAttribute(Qh),R.current=!1}});C.useEffect(()=>{if(!a)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(D){if(clearTimeout(v.current),E.current=!1,u&&!to(b.current)||f>0&&!nl(g.current,"open"))return;const $=nl(g.current,"open",b.current);$?v.current=window.setTimeout(()=>{y.current||r(!0,D,"hover")},$):r(!0,D,"hover")}function _(D){if(O())return;I.current();const $=ut(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(v.current),S.current=m.current({...o.current.floatingContext,tree:d,x:D.clientX,y:D.clientY,onClose(){k(),N(),A(D,!0,"safe-polygon")}});const J=S.current;$.addEventListener("mousemove",J),I.current=()=>{$.removeEventListener("mousemove",J)};return}(b.current==="touch"?!Ye(i.floating,D.relatedTarget):!0)&&A(D)}function W(D){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:D.clientX,y:D.clientY,onClose(){k(),N(),A(D)}})(D))}if(Me(i.domReference)){var U;const D=i.domReference;return n&&D.addEventListener("mouseleave",W),(U=i.floating)==null||U.addEventListener("mouseleave",W),h&&D.addEventListener("mousemove",F,{once:!0}),D.addEventListener("mouseenter",F),D.addEventListener("mouseleave",_),()=>{var $;n&&D.removeEventListener("mouseleave",W),($=i.floating)==null||$.removeEventListener("mouseleave",W),h&&D.removeEventListener("mousemove",F),D.removeEventListener("mouseenter",F),D.removeEventListener("mouseleave",_)}}},[i,a,e,u,f,h,A,N,k,r,n,y,d,g,m,o]),be(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&M()){const _=ut(i.floating).body;_.setAttribute(Qh,""),_.style.pointerEvents="none",R.current=!0;const W=i.floating;if(Me(i.domReference)&&W){var F;const U=i.domReference,D=d==null||(F=d.nodesRef.current.find($=>$.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return D&&(D.style.pointerEvents=""),U.style.pointerEvents="auto",W.style.pointerEvents="auto",()=>{U.style.pointerEvents="",W.style.pointerEvents=""}}}},[a,n,p,i,d,m,M]),be(()=>{n||(b.current=void 0,N(),k())},[n,N,k]),C.useEffect(()=>()=>{N(),clearTimeout(v.current),clearTimeout(T.current),k()},[a,i.domReference,N,k]);const j=C.useMemo(()=>{function O(F){b.current=F.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(F){const{nativeEvent:_}=F;function W(){!E.current&&!y.current&&r(!0,_,"hover")}u&&!to(b.current)||n||f===0||(clearTimeout(T.current),b.current==="touch"?W():T.current=window.setTimeout(W,f))}}},[u,r,n,y,f]),P=C.useMemo(()=>({onMouseEnter(){clearTimeout(v.current)},onMouseLeave(O){A(O.nativeEvent,!1)}}),[A]);return C.useMemo(()=>a?{reference:j,floating:P}:{},[a,j,P])}function XD(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function hr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function QD(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),hr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Ir=new WeakMap,Ys=new WeakSet,Ks={},rl=0;const ZD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ub=e=>e&&(e.host||ub(e.parentNode)),JD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ub(n);return e.contains(r)?r:null}).filter(n=>n!=null);function eM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=JD(t,e),a=new Set,l=new Set(i),c=[];Ks[o]||(Ks[o]=new WeakMap);const u=Ks[o];i.forEach(f),h(t),a.clear();function f(d){!d||a.has(d)||(a.add(d),d.parentNode&&f(d.parentNode))}function h(d){!d||l.has(d)||[].forEach.call(d.children,p=>{if(Un(p)!=="script")if(a.has(p))h(p);else{const m=s?p.getAttribute(s):null,g=m!==null&&m!=="false",y=(Ir.get(p)||0)+1,b=(u.get(p)||0)+1;Ir.set(p,y),u.set(p,b),c.push(p),y===1&&g&&Ys.add(p),b===1&&p.setAttribute(o,""),!g&&s&&p.setAttribute(s,"true")}})}return rl++,()=>{c.forEach(d=>{const p=(Ir.get(d)||0)-1,m=(u.get(d)||0)-1;Ir.set(d,p),u.set(d,m),p||(!Ys.has(d)&&s&&d.removeAttribute(s),Ys.delete(d)),m||d.removeAttribute(o)}),rl--,rl||(Ir=new WeakMap,Ir=new WeakMap,Ys=new WeakSet,Ks={})}}function Zh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ut(e[0]).body;return eM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const so=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function fb(e,t){const n=ls(e,so());t==="prev"&&n.reverse();const r=n.indexOf(Ht(ut(e)));return n.slice(r+1)[0]}function db(){return fb(document.body,"next")}function hb(){return fb(document.body,"prev")}function Zo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ye(n,r)}function tM(e){ls(e,so()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function nM(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 rM(e,t,n){const r=e.indexOf(t);function o(i){const a=Bn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||Ye(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Ku={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 oM;function Jh(e){e.key==="Tab"&&(e.target,clearTimeout(oM))}const Fi=C.forwardRef(function(t,n){const[r,o]=C.useState();be(()=>(Vu()&&o("button"),document.addEventListener("keydown",Jh),()=>{document.removeEventListener("keydown",Jh)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Bn("focus-guard")]:"",style:Ku};return C.createElement("span",oo({},t,s))}),pb=C.createContext(null),ep=Bn("portal");function sM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=To(),o=mb(),[s,i]=C.useState(null),a=C.useRef(null);return be(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),be(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(ep,""),l.appendChild(c),a.current=c,i(c)},[t,r]),be(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Me(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(ep,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function So(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=sM({id:n,root:r}),[i,a]=C.useState(null),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return C.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function d(p){s&&Zo(p)&&(p.type==="focusin"?nM:tM)(s)}return s.addEventListener("focusin",d,!0),s.addEventListener("focusout",d,!0),()=>{s.removeEventListener("focusin",d,!0),s.removeEventListener("focusout",d,!0)}},[s,o,i==null?void 0:i.modal]),C.createElement(pb.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[o,s])},h&&s&&C.createElement(Fi,{"data-type":"outside",ref:l,onFocus:d=>{if(Zo(d,s)){var p;(p=u.current)==null||p.focus()}else{const m=hb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),h&&s&&C.createElement("span",{"aria-owns":s.id,style:Ku}),s&&ys.createPortal(t,s),h&&s&&C.createElement(Fi,{"data-type":"outside",ref:c,onFocus:d=>{if(Zo(d,s)){var p;(p=f.current)==null||p.focus()}else{const m=db()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,d.nativeEvent))}}}))}const mb=()=>C.useContext(pb),tp=20;let or=[];function ol(e){or=or.filter(n=>n.isConnected);let t=e;if(!(!t||Un(t)==="body")){if(!rD(t,so())){const n=ls(t,so())[0];n&&(t=n)}or.push(t),or.length>tp&&(or=or.slice(-tp))}}function np(){return or.slice().reverse().find(e=>e.isConnected)}const iM=C.forwardRef(function(t,n){return C.createElement("button",oo({},t,{type:"button",ref:n,tabIndex:-1,style:Ku}))});function Is(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:h,refs:d,nodeId:p,onOpenChange:m,events:g,dataRef:y,floatingId:b,elements:{domReference:v,floating:S}}=t,T=typeof i=="number"&&i<0,E=Wv(v)&&T,R=ZD()?s:!0,I=gt(o),M=gt(i),A=gt(a),N=Yn(),k=mb(),j=C.useRef(null),P=C.useRef(null),O=C.useRef(!1),F=C.useRef(!1),_=C.useRef(-1),W=k!=null,U=S==null?void 0:S.firstElementChild,D=(U==null?void 0:U.id)===b?U:S,$=at(function(G){return G===void 0&&(G=D),G?ls(G,so()):[]}),q=at(G=>{const L=$(G);return I.current.map(B=>v&&B==="reference"?v:D&&B==="floating"?D:L).filter(Boolean).flat()});C.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){Ye(D,Ht(ut(D)))&&$().length===0&&!E&&mt(B);const z=q(),V=nn(B);I.current[0]==="reference"&&V===v&&(mt(B),B.shiftKey?On(z[z.length-1]):On(z[1])),I.current[1]==="floating"&&V===D&&B.shiftKey&&(mt(B),On(z[0]))}}const L=ut(D);return L.addEventListener("keydown",G),()=>{L.removeEventListener("keydown",G)}},[r,v,D,c,I,E,$,q]),C.useEffect(()=>{if(r||!S)return;function G(L){const B=nn(L),V=$().indexOf(B);V!==-1&&(_.current=V)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,$]),C.useEffect(()=>{if(r||!f)return;function G(){F.current=!0,setTimeout(()=>{F.current=!1})}function L(B){const z=B.relatedTarget;queueMicrotask(()=>{const V=!(Ye(v,z)||Ye(S,z)||Ye(z,S)||Ye(k==null?void 0:k.portalNode,z)||z!=null&&z.hasAttribute(Bn("focus-guard"))||N&&(hr(N.nodesRef.current,p).find(Y=>{var ee,H;return Ye((ee=Y.context)==null?void 0:ee.elements.floating,z)||Ye((H=Y.context)==null?void 0:H.elements.domReference,z)})||XD(N.nodesRef.current,p).find(Y=>{var ee,H;return((ee=Y.context)==null?void 0:ee.elements.floating)===z||((H=Y.context)==null?void 0:H.elements.domReference)===z})));if(l&&V&&Ht(ut(D))===ut(D).body){et(D)&&(D==null||D.focus());const Y=_.current,ee=$(),H=ee[Y]||ee[ee.length-1]||D;et(H)&&H.focus()}(E||!c)&&z&&V&&!F.current&&z!==np()&&(O.current=!0,m(!1,B))})}if(S&&et(v))return v.addEventListener("focusout",L),v.addEventListener("pointerdown",G),S.addEventListener("focusout",L),()=>{v.removeEventListener("focusout",L),v.removeEventListener("pointerdown",G),S.removeEventListener("focusout",L)}},[r,v,S,D,c,p,N,k,m,f,l,$,E]),C.useEffect(()=>{var G;if(r)return;const L=Array.from((k==null||(G=k.portalNode)==null?void 0:G.querySelectorAll("["+Bn("portal")+"]"))||[]);if(S){const B=[S,...L,j.current,P.current,I.current.includes("reference")||E?v:null].filter(V=>V!=null),z=c||E?Zh(B,R,!R):Zh(B);return()=>{z()}}},[r,v,S,c,I,k,E,R]),be(()=>{if(r||!et(D))return;const G=ut(D),L=Ht(G);queueMicrotask(()=>{const B=q(D),z=M.current,V=(typeof z=="number"?B[z]:z.current)||D,Y=Ye(D,L);!T&&!Y&&h&&On(V,{preventScroll:V===D})})},[r,h,D,T,q,M]),be(()=>{if(r||!D)return;let G=!1;const L=ut(D),B=Ht(L);let V=y.current.openEvent;const Y=d.domReference.current;ol(B);function ee(H){let{open:we,reason:Ue,event:je,nested:Ge}=H;we&&(V=je),Ue==="escape-key"&&d.domReference.current&&ol(d.domReference.current),Ue==="hover"&&je.type==="mouseleave"&&(O.current=!0),Ue==="outside-press"&&(Ge?(O.current=!1,G=!0):O.current=!($v(je)||_u(je)))}return g.on("openchange",ee),()=>{g.off("openchange",ee);const H=Ht(L),we=Ye(S,H)||N&&hr(N.nodesRef.current,p).some(se=>{var me;return Ye((me=se.context)==null?void 0:me.elements.floating,H)});(we||V&&["click","mousedown"].includes(V.type))&&d.domReference.current&&ol(d.domReference.current);const je=Y||B,Ge=ls(ut(je).body,so());queueMicrotask(()=>{let se=np();!se&&et(je)&&S&&(se=rM(Ge,je,S)),A.current&&!O.current&&et(se)&&(!(se!==H&&H!==L.body)||we)&&se.focus({preventScroll:G})})}},[r,S,D,A,y,d,g,N,p]),be(()=>{if(!r&&k)return k.setFocusManagerState({modal:c,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{k.setFocusManagerState(null)}},[r,k,c,h,m,d,f]),be(()=>{if(r||!D||typeof MutationObserver!="function"||T)return;const G=()=>{const B=D.getAttribute("tabindex"),z=$(),V=Ht(ut(S)),Y=z.indexOf(V);Y!==-1&&(_.current=Y),I.current.includes("floating")||V!==d.domReference.current&&z.length===0?B!=="0"&&D.setAttribute("tabindex","0"):B!=="-1"&&D.setAttribute("tabindex","-1")};G();const L=new MutationObserver(G);return L.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{L.disconnect()}},[r,S,D,d,I,$,T]);function J(G){return r||!u||!c?null:C.createElement(iM,{ref:G==="start"?j:P,onClick:L=>m(!1,L.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&R&&(c?!E:!0)&&(W||c);return C.createElement(C.Fragment,null,X&&C.createElement(Fi,{"data-type":"inside",ref:k==null?void 0:k.beforeInsideRef,onFocus:G=>{if(c){const B=q();On(o[0]==="reference"?B[0]:B[B.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(O.current=!1,Zo(G,k.portalNode)){const B=db()||v;B==null||B.focus()}else{var L;(L=k.beforeOutsideRef.current)==null||L.focus()}}}),!E&&J("start"),n,J("end"),X&&C.createElement(Fi,{"data-type":"inside",ref:k==null?void 0:k.afterInsideRef,onFocus:G=>{if(c)On(q()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(f&&(O.current=!0),Zo(G,k.portalNode)){const B=hb()||v;B==null||B.focus()}else{var L;(L=k.afterOutsideRef.current)==null||L.focus()}}}))}const sl=new Set,aM=C.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=To();return be(()=>{if(!r)return;sl.add(s);const i=/iP(hone|ad|od)|iOS/.test(Lu()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var d,p;const m=((d=window.visualViewport)==null?void 0:d.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(g))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{sl.delete(s),sl.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[s,r]),C.createElement("div",oo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function rp(e){return et(e.target)&&e.target.tagName==="BUTTON"}function op(e){return $u(e)}function la(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),h=C.useRef(!1),d=C.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(to(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}to(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||rp(p))&&(p.key===" "&&!op(s)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||rp(p)||op(s)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return C.useMemo(()=>i?{reference:d}:{},[i,d])}function lM(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,f=i.height,h=i.x,d=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),h-=n||0,d-=r||0,u=0,f=0,!o||c?(u=t.axis==="y"?i.width:0,f=t.axis==="x"?i.height:0,h=a&&t.x!=null?t.x:h,d=l&&t.y!=null?t.y:d):o&&!c&&(f=t.axis==="x"?i.height:f,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:f,x:h,y:d,top:d,right:h+u,bottom:d+f,left:h}}}}function sp(e){return e!=null&&e.clientX!=null}function cM(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,f=C.useRef(!1),h=C.useRef(null),[d,p]=C.useState(),[m,g]=C.useState([]),y=at((E,R)=>{f.current||r.current.openEvent&&!sp(r.current.openEvent)||i.setPositionReference(lM(s,{x:E,y:R,axis:l,dataRef:r,pointerType:d}))}),b=at(E=>{c!=null||u!=null||(n?h.current||g([]):y(E.clientX,E.clientY))}),v=to(d)?o:n,S=C.useCallback(()=>{if(!v||!a||c!=null||u!=null)return;const E=Pt(o);function R(I){const M=nn(I);Ye(o,M)?(E.removeEventListener("mousemove",R),h.current=null):y(I.clientX,I.clientY)}if(!r.current.openEvent||sp(r.current.openEvent)){E.addEventListener("mousemove",R);const I=()=>{E.removeEventListener("mousemove",R),h.current=null};return h.current=I,I}i.setPositionReference(s)},[v,a,c,u,o,r,i,s,y]);C.useEffect(()=>S(),[S,m]),C.useEffect(()=>{a&&!o&&(f.current=!1)},[a,o]),C.useEffect(()=>{!a&&n&&(f.current=!0)},[a,n]),be(()=>{a&&(c!=null||u!=null)&&(f.current=!1,y(c,u))},[a,c,u,y]);const T=C.useMemo(()=>{function E(R){let{pointerType:I}=R;p(I)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:b,onMouseEnter:b}},[b]);return C.useMemo(()=>a?{reference:T}:{},[a,T])}const uM={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},fM={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ip=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Eo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:p}=t,m=Yn(),g=at(typeof l=="function"?l:()=>!1),y=typeof l=="function"?g:l,b=C.useRef(!1),v=C.useRef(!1),{escapeKey:S,outsidePress:T}=ip(d),{escapeKey:E,outsidePress:R}=ip(p),I=at(P=>{var O;if(!n||!i||!a||P.key!=="Escape")return;const F=(O=s.current.floatingContext)==null?void 0:O.nodeId,_=m?hr(m.nodesRef.current,F):[];if(!S&&(P.stopPropagation(),_.length>0)){let W=!0;if(_.forEach(U=>{var D;if((D=U.context)!=null&&D.open&&!U.context.dataRef.current.__escapeKeyBubbles){W=!1;return}}),!W)return}r(!1,AO(P)?P.nativeEvent:P,"escape-key")}),M=at(P=>{var O;const F=()=>{var _;I(P),(_=nn(P))==null||_.removeEventListener("keydown",F)};(O=nn(P))==null||O.addEventListener("keydown",F)}),A=at(P=>{var O;const F=b.current;b.current=!1;const _=v.current;if(v.current=!1,c==="click"&&_||F||typeof y=="function"&&!y(P))return;const W=nn(P),U="["+Bn("inert")+"]",D=ut(o.floating).querySelectorAll(U);let $=Me(W)?W:null;for(;$&&!_n($);){const G=Tn($);if(_n(G)||!Me(G))break;$=G}if(D.length&&Me(W)&&!OO(W)&&!Ye(W,o.floating)&&Array.from(D).every(G=>!Ye($,G)))return;if(et(W)&&j){const G=W.clientWidth>0&&W.scrollWidth>W.clientWidth,L=W.clientHeight>0&&W.scrollHeight>W.clientHeight;let B=L&&P.offsetX>W.clientWidth;if(L&&Vt(W).direction==="rtl"&&(B=P.offsetX<=W.offsetWidth-W.clientWidth),B||G&&P.offsetY>W.clientHeight)return}const q=(O=s.current.floatingContext)==null?void 0:O.nodeId,J=m&&hr(m.nodesRef.current,q).some(G=>{var L;return Ja(P,(L=G.context)==null?void 0:L.elements.floating)});if(Ja(P,o.floating)||Ja(P,o.domReference)||J)return;const X=m?hr(m.nodesRef.current,q):[];if(X.length>0){let G=!0;if(X.forEach(L=>{var B;if((B=L.context)!=null&&B.open&&!L.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),N=at(P=>{var O;const F=()=>{var _;A(P),(_=nn(P))==null||_.removeEventListener(c,F)};(O=nn(P))==null||O.addEventListener(c,F)});C.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function P(_){r(!1,_,"ancestor-scroll")}const O=ut(o.floating);a&&O.addEventListener("keydown",E?M:I,E),y&&O.addEventListener(c,R?N:A,R);let F=[];return h&&(Me(o.domReference)&&(F=Fn(o.domReference)),Me(o.floating)&&(F=F.concat(Fn(o.floating))),!Me(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(Fn(o.reference.contextElement)))),F=F.filter(_=>{var W;return _!==((W=O.defaultView)==null?void 0:W.visualViewport)}),F.forEach(_=>{_.addEventListener("scroll",P,{passive:!0})}),()=>{a&&O.removeEventListener("keydown",E?M:I,E),y&&O.removeEventListener(c,R?N:A,R),F.forEach(_=>{_.removeEventListener("scroll",P)})}},[s,o,a,y,c,n,r,h,i,S,T,I,E,M,A,R,N]),C.useEffect(()=>{b.current=!1},[y,c]);const k=C.useMemo(()=>({onKeyDown:I,[uM[f]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[I,r,u,f]),j=C.useMemo(()=>({onKeyDown:I,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[fM[c]]:()=>{b.current=!0}}),[I,c]);return C.useMemo(()=>i?{reference:k,floating:j}:{},[i,k,j])}function dM(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=To(),s=C.useRef({}),[i]=C.useState(()=>ib()),a=Gn()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!Me(d)&&GD("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]=C.useState(r.reference),u=at((d,p,m)=>{s.current.openEvent=d?p:void 0,i.emit("openchange",{open:d,event:p,reason:m,nested:a}),n==null||n(d,p,m)}),f=C.useMemo(()=>({setPositionReference:c}),[]),h=C.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return C.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:h,events:i,floatingId:o,refs:f}),[t,u,h,i,o,f])}function Co(e){e===void 0&&(e={});const{nodeId:t}=e,n=dM({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=C.useState(null),[a,l]=C.useState(null),u=(o==null?void 0:o.reference)||s,f=C.useRef(null),h=Yn();be(()=>{u&&(f.current=u)},[u]);const d=DD({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(v=>{const S=Me(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(S),d.refs.setReference(S)},[d.refs]),m=C.useCallback(v=>{(Me(v)||v===null)&&(f.current=v,i(v)),(Me(d.refs.reference.current)||d.refs.reference.current===null||v!==null&&!Me(v))&&d.refs.setReference(v)},[d.refs]),g=C.useMemo(()=>({...d.refs,setReference:m,setPositionReference:p,domReference:f}),[d.refs,m,p]),y=C.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),b=C.useMemo(()=>({...d,...r,refs:g,elements:y,nodeId:t}),[d,g,y,t,r]);return be(()=>{r.dataRef.current.floatingContext=b;const v=h==null?void 0:h.nodesRef.current.find(S=>S.id===t);v&&(v.context=b)}),C.useMemo(()=>({...d,context:b,refs:g,elements:y}),[d,g,y,b])}function hM(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=C.useRef(!1),u=C.useRef(),f=C.useRef(!0);C.useEffect(()=>{if(!a)return;const d=Pt(i.domReference);function p(){!n&&et(i.domReference)&&i.domReference===Ht(ut(i.domReference))&&(c.current=!0)}function m(){f.current=!0}return d.addEventListener("blur",p),d.addEventListener("keydown",m,!0),()=>{d.removeEventListener("blur",p),d.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),C.useEffect(()=>{if(!a)return;function d(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=C.useMemo(()=>({onPointerDown(d){_u(d.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const p=nn(d.nativeEvent);if(l&&Me(p))try{if(Vu()&&Bv())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!$u(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const p=d.relatedTarget,m=d.nativeEvent,g=Me(p)&&p.hasAttribute(Bn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const b=Ht(i.domReference?i.domReference.ownerDocument:document);!p&&b===i.domReference||Ye((y=s.current.floatingContext)==null?void 0:y.refs.floating.current,b)||Ye(i.domReference,b)||g||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return C.useMemo(()=>a?{reference:h}:{},[a,h])}const ap="active",lp="selected";function il(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[ap]:i,[lp]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[ap,lp].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),i[c]=function(){for(var h,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(g=>g(...p)).find(g=>g!==void 0)}}}else i[c]=u}),i),{})}}function Po(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=C.useCallback(a=>il(a,e,"reference"),t),s=C.useCallback(a=>il(a,e,"floating"),n),i=C.useCallback(a=>il(a,e,"item"),r);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let cp=!1;function ca(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function up(e,t){return ca(t,e===Yu||e===Rs,e===ro||e===wo)}function al(e,t,n){return ca(t,e===Rs,n?e===ro:e===wo)||e==="Enter"||e===" "||e===""}function pM(e,t,n){return ca(t,n?e===ro:e===wo,e===Rs)}function fp(e,t,n){return ca(t,n?e===wo:e===ro,e===Yu)}function gb(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:h=!1,rtl:d=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:b=void 0,orientation:v="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:R,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||ai("`useListNavigation` looping must be enabled to allow escaping."),p||ai("`useListNavigation` must be virtual to allow escaping.")),v==="vertical"&&S>1&&ai("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const M=Gn(),A=Yn(),N=at(a),k=C.useRef(m),j=C.useRef(c??-1),P=C.useRef(null),O=C.useRef(!0),F=C.useRef(N),_=C.useRef(!!o.floating),W=C.useRef(n),U=C.useRef(!1),D=C.useRef(!1),$=gt(b),q=gt(n),J=gt(T),X=gt(o.floating),G=gt(c),[L,B]=C.useState(),[z,V]=C.useState(),Y=at(function(se,me,oe){oe===void 0&&(oe=!1);function ye(ve){p?(B(ve.id),A==null||A.events.emit("virtualfocus",ve),E&&(E.current=ve)):On(ve,{preventScroll:!0,sync:Bv()&&Vu()?cp||U.current:!1})}const Qe=se.current[me.current];Qe&&ye(Qe),requestAnimationFrame(()=>{const ve=se.current[me.current]||Qe;if(!ve)return;Qe||ye(ve);const ot=J.current;ot&&H&&(oe||!O.current)&&(ve.scrollIntoView==null||ve.scrollIntoView(typeof ot=="boolean"?{block:"nearest",inline:"nearest"}:ot))})});be(()=>{document.createElement("div").focus({get preventScroll(){return cp=!0,!1}})},[]),be(()=>{l&&(n&&o.floating?k.current&&c!=null&&(D.current=!0,j.current=c,N(c)):_.current&&(j.current=-1,F.current(null)))},[l,n,o.floating,c,N]),be(()=>{if(l&&n&&o.floating)if(i==null){if(U.current=!1,G.current!=null)return;if(_.current&&(j.current=-1,Y(s,j)),(!W.current||!_.current)&&k.current&&(P.current!=null||k.current===!0&&P.current==null)){let se=0;const me=()=>{s.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(me),se++):(j.current=P.current==null||al(P.current,v,d)||h?tl(s,$.current):Yh(s,$.current),P.current=null,N(j.current))};me()}}else Qo(s,i)||(j.current=i,Y(s,j,D.current),D.current=!1)},[l,n,o.floating,i,G,h,s,v,d,N,Y,$]),be(()=>{var se;if(!l||o.floating||!A||p||!_.current)return;const me=A.nodesRef.current,oe=(se=me.find(ve=>ve.id===M))==null||(se=se.context)==null?void 0:se.elements.floating,ye=Ht(ut(o.floating)),Qe=me.some(ve=>ve.context&&Ye(ve.context.elements.floating,ye));oe&&!Qe&&O.current&&oe.focus({preventScroll:!0})},[l,o.floating,A,M,p]),be(()=>{if(!l||!A||!p||M)return;function se(me){V(me.id),E&&(E.current=me)}return A.events.on("virtualfocus",se),()=>{A.events.off("virtualfocus",se)}},[l,A,p,M,E]),be(()=>{F.current=N,_.current=!!o.floating}),be(()=>{n||(P.current=null)},[n]),be(()=>{W.current=n},[n]);const ee=i!=null,H=C.useMemo(()=>{function se(oe){if(!n)return;const ye=s.current.indexOf(oe);ye!==-1&&N(ye)}return{onFocus(oe){let{currentTarget:ye}=oe;se(ye)},onClick:oe=>{let{currentTarget:ye}=oe;return ye.focus({preventScroll:!0})},...g&&{onMouseMove(oe){let{currentTarget:ye}=oe;se(ye)},onPointerLeave(oe){let{pointerType:ye}=oe;!O.current||ye==="touch"||(j.current=-1,Y(s,j),N(null),p||On(X.current,{preventScroll:!0}))}}}},[n,X,Y,g,s,N,p]),we=at(se=>{if(O.current=!1,U.current=!0,!q.current&&se.currentTarget===X.current)return;if(h&&fp(se.key,v,d)){mt(se),r(!1,se.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const me=j.current,oe=tl(s,b),ye=Yh(s,b);if(se.key==="Home"&&(mt(se),j.current=oe,N(j.current)),se.key==="End"&&(mt(se),j.current=ye,N(j.current)),S>1){const Qe=R||Array.from({length:s.current.length},()=>({width:1,height:1})),ve=LD(Qe,S,I),ot=ve.findIndex(re=>re!=null&&!ii(s.current,re,b)),Z=ve.reduce((re,xe,Ne)=>xe!=null&&!ii(s.current,xe,b)?Ne:re,-1);if(j.current=ve[ND({current:ve.map(re=>re!=null?s.current[re]:null)},{event:se,orientation:v,loop:f,cols:S,disabledIndices:VD([...b||s.current.map((re,xe)=>ii(s.current,xe)?xe:void 0),void 0],ve),minIndex:ot,maxIndex:Z,prevIndex:_D(j.current>ye?oe:j.current,Qe,ve,S,se.key===Rs?"bl":se.key===wo?"tr":"tl"),stopEvent:!0})],N(j.current),v==="both")return}if(up(se.key,v)){if(mt(se),n&&!p&&Ht(se.currentTarget.ownerDocument)===se.currentTarget){j.current=al(se.key,v,d)?oe:ye,N(j.current);return}al(se.key,v,d)?f?j.current=me>=ye?u&&me!==s.current.length?-1:oe:xt(s,{startingIndex:me,disabledIndices:b}):j.current=Math.min(ye,xt(s,{startingIndex:me,disabledIndices:b})):f?j.current=me<=oe?u&&me!==-1?s.current.length:ye:xt(s,{startingIndex:me,decrement:!0,disabledIndices:b}):j.current=Math.max(oe,xt(s,{startingIndex:me,decrement:!0,disabledIndices:b})),Qo(s,j.current)?N(null):N(j.current)}}),Ue=C.useMemo(()=>p&&n&&ee&&{"aria-activedescendant":z||L},[p,n,ee,z,L]),je=C.useMemo(()=>({"aria-orientation":v==="both"?void 0:v,...!Wv(o.domReference)&&Ue,onKeyDown:we,onPointerMove(){O.current=!0}}),[Ue,we,o.domReference,v]),Ge=C.useMemo(()=>{function se(oe){m==="auto"&&$v(oe.nativeEvent)&&(k.current=!0)}function me(oe){k.current=m,m==="auto"&&_u(oe.nativeEvent)&&(k.current=!0)}return{...Ue,onKeyDown(oe){O.current=!1;const ye=oe.key.indexOf("Arrow")===0,Qe=pM(oe.key,v,d),ve=fp(oe.key,v,d),ot=up(oe.key,v),Z=(h?Qe:ot)||oe.key==="Enter"||oe.key.trim()==="";if(p&&n){const ht=A==null?void 0:A.nodesRef.current.find(Ct=>Ct.parentId==null),vt=A&&ht?QD(A.nodesRef.current,ht.id):null;if(ye&&vt&&E){const Ct=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(Qe||ve){var re,xe;const Qn=((re=vt.context)==null?void 0:re.elements.domReference)===oe.currentTarget,Tr=ve&&!Qn?(xe=vt.context)==null?void 0:xe.elements.domReference:Qe?s.current.find(Sr=>(Sr==null?void 0:Sr.id)===L):null;Tr&&(mt(oe),Tr.dispatchEvent(Ct),V(void 0))}if(ot&&vt.context&&vt.context.open&&vt.parentId&&oe.currentTarget!==vt.context.elements.domReference){var Ne;mt(oe),(Ne=vt.context.elements.domReference)==null||Ne.dispatchEvent(Ct);return}}return we(oe)}if(!(!n&&!y&&ye)){if(Z&&(P.current=h&&ot?null:oe.key),h){Qe&&(mt(oe),n?(j.current=tl(s,$.current),N(j.current)):r(!0,oe.nativeEvent,"list-navigation"));return}ot&&(c!=null&&(j.current=c),mt(oe),!n&&y?r(!0,oe.nativeEvent,"list-navigation"):we(oe),n&&N(j.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:me,onMouseDown:se,onClick:se}},[L,Ue,we,$,m,s,h,N,r,n,y,v,d,c,A,p,E]);return C.useMemo(()=>l?{reference:Ge,floating:je,item:H}:{},[l,Ge,je,H])}const mM=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Ro(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=mM.get(i))!=null?n:i,l=To(),u=Gn()!=null,f=C.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),h=C.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),d=C.useCallback(p=>{let{active:m,selected:g}=p;const y={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...y,"aria-selected":m&&g};case"combobox":return{...y,...m&&{"aria-selected":!0}}}return{}},[o,i]);return C.useMemo(()=>s?{reference:f,floating:h,item:d}:{},[s,f,h,d])}const dp=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ar(e,t){return typeof e=="function"?e(t):e}function gM(e,t){const[n,r]=C.useState(e);return e&&!n&&r(!0),C.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function yM(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=C.useState("unmounted"),c=gM(n,i);return!c&&a==="close"&&l("unmounted"),be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function vM(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=C.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",f=(u?i:i.open)||0,h=(u?i:i.close)||0,[d,p]=C.useState(()=>({...Ar(s,c),...Ar(n,c)})),{isMounted:m,status:g}=yM(e,{duration:i}),y=gt(n),b=gt(r),v=gt(o),S=gt(s);return be(()=>{const T=Ar(y.current,c),E=Ar(v.current,c),R=Ar(S.current,c),I=Ar(b.current,c)||Object.keys(T).reduce((M,A)=>(M[A]="",M),{});if(g==="initial"&&p(M=>({transitionProperty:M.transitionProperty,...R,...T})),g==="open"&&p({transitionProperty:Object.keys(I).map(dp).join(","),transitionDuration:f+"ms",...R,...I}),g==="close"){const M=E||T;p({transitionProperty:Object.keys(M).map(dp).join(","),transitionDuration:h+"ms",...R,...M})}},[h,v,y,b,S,f,g,c]),{isMounted:m,styles:d}}function bM(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:h=[],selectedIndex:d=null}=t,p=C.useRef(),m=C.useRef(""),g=C.useRef((n=d??i)!=null?n:-1),y=C.useRef(null),b=at(a),v=at(l),S=gt(u),T=gt(h);be(()=>{r&&(clearTimeout(p.current),y.current=null,m.current="")},[r]),be(()=>{if(r&&m.current===""){var A;g.current=(A=d??i)!=null?A:-1}},[r,d,i]);const E=at(A=>{A?o.current.typing||(o.current.typing=A,v(A)):o.current.typing&&(o.current.typing=A,v(A))}),R=at(A=>{function N(F,_,W){const U=S.current?S.current(_,W):_.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(W.toLocaleLowerCase()))===0);return U?F.indexOf(U):-1}const k=s.current;if(m.current.length>0&&m.current[0]!==" "&&(N(k,k,m.current)===-1?E(!1):A.key===" "&&mt(A)),k==null||T.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(mt(A),E(!0)),k.every(F=>{var _,W;return F?((_=F[0])==null?void 0:_.toLocaleLowerCase())!==((W=F[1])==null?void 0:W.toLocaleLowerCase()):!0})&&m.current===A.key&&(m.current="",g.current=y.current),m.current+=A.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=y.current,E(!1)},f);const P=g.current,O=N(k,[...k.slice((P||0)+1),...k.slice(0,(P||0)+1)],m.current);O!==-1?(b(O),y.current=O):A.key!==" "&&(m.current="",E(!1))}),I=C.useMemo(()=>({onKeyDown:R}),[R]),M=C.useMemo(()=>({onKeyDown:R,onKeyUp(A){A.key===" "&&E(!1)}}),[R,E]);return C.useMemo(()=>c?{reference:I,floating:M}:{},[c,I,M])}function hp(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,f]=t[a]||[0,0];c>=r!=f>=r&&n<=(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function xM(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function wM(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(f,h){const d=performance.now(),p=d-l;if(i===null||a===null||p===0)return i=f,a=h,l=d,null;const m=f-i,g=h-a,b=Math.sqrt(m*m+g*g)/p;return i=f,a=h,l=d,b}const u=f=>{let{x:h,y:d,placement:p,elements:m,onClose:g,nodeId:y,tree:b}=f;return function(S){function T(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||d==null)return;const{clientX:E,clientY:R}=S,I=[E,R],M=nn(S),A=S.type==="mouseleave",N=Ye(m.floating,M),k=Ye(m.domReference,M),j=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),O=p.split("-")[0],F=h>P.right-P.width/2,_=d>P.bottom-P.height/2,W=xM(I,j),U=P.width>j.width,D=P.height>j.height,$=(U?j:P).left,q=(U?j:P).right,J=(D?j:P).top,X=(D?j:P).bottom;if(N&&(s=!0,!A))return;if(k&&(s=!1),k&&!A){s=!0;return}if(A&&Me(S.relatedTarget)&&Ye(m.floating,S.relatedTarget)||b&&hr(b.nodesRef.current,y).some(B=>{let{context:z}=B;return z==null?void 0:z.open}))return;if(O==="top"&&d>=j.bottom-1||O==="bottom"&&d<=j.top+1||O==="left"&&h>=j.right-1||O==="right"&&h<=j.left+1)return T();let G=[];switch(O){case"top":G=[[$,j.top+1],[$,P.bottom-1],[q,P.bottom-1],[q,j.top+1]];break;case"bottom":G=[[$,P.top+1],[$,j.bottom-1],[q,j.bottom-1],[q,P.top+1]];break;case"left":G=[[P.right-1,X],[P.right-1,J],[j.left+1,J],[j.left+1,X]];break;case"right":G=[[j.right-1,X],[j.right-1,J],[P.left+1,J],[P.left+1,X]];break}function L(B){let[z,V]=B;switch(O){case"top":{const Y=[U?z+t/2:F?z+t*4:z-t*4,V+t+1],ee=[U?z-t/2:F?z+t*4:z-t*4,V+t+1],H=[[P.left,F||U?P.bottom-t:P.top],[P.right,F?U?P.bottom-t:P.top:P.bottom-t]];return[Y,ee,...H]}case"bottom":{const Y=[U?z+t/2:F?z+t*4:z-t*4,V-t],ee=[U?z-t/2:F?z+t*4:z-t*4,V-t],H=[[P.left,F||U?P.top+t:P.bottom],[P.right,F?U?P.top+t:P.bottom:P.top+t]];return[Y,ee,...H]}case"left":{const Y=[z+t+1,D?V+t/2:_?V+t*4:V-t*4],ee=[z+t+1,D?V-t/2:_?V+t*4:V-t*4];return[...[[_||D?P.right-t:P.left,P.top],[_?D?P.right-t:P.left:P.right-t,P.bottom]],Y,ee]}case"right":{const Y=[z-t,D?V+t/2:_?V+t*4:V-t*4],ee=[z-t,D?V-t/2:_?V+t*4:V-t*4],H=[[_||D?P.left+t:P.right,P.top],[_?D?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ee,...H]}}}if(!hp([E,R],G)){if(s&&!W)return T();if(!A&&r){const B=c(S.clientX,S.clientY);if(B!==null&&B<.1)return T()}hp([E,R],L([h,d]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Io=e=>{const t=x.useId(),[n,r]=x.useState(e.open),o=x.useRef(null),s=x.useMemo(()=>[aa(10),Gu({fallbackAxisSideDirection:"end"}),Uu(),tb({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Co({open:n,middleware:s,transform:!0,whileElementsMounted:ia,onOpenChange:(p,m)=>{var y;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(y=e.onChange)==null||y.call(e,p))}}),c=la(l),u=Eo(l),f=Ro(l),{getReferenceProps:h,getFloatingProps:d}=Po([c,u,f]);return w.jsxs(x.Fragment,{children:[w.jsx("button",{ref:i.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(So,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(Is,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:w.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...d(),children:[w.jsx(sb,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),w.jsx("header",{className:"mb-2",children:w.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},TM=e=>{const t=x.useRef(null),n=x.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=x.useState(!1),{context:a,refs:l}=Co({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=la(a),u=Ro(a),f=Eo(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=Po([c,u,f]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(Ur,{...d(e),as:ft.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:w.jsx(ft.span,{layoutId:o,children:e.trigger})}),w.jsx(yo,{children:s?w.jsx(So,{root:t,children:w.jsx(Is,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(ft.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},yb=300,SM=500,vb=(e="")=>De("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),yc=x.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),pp=x.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=Gn(),c=l!==null,[u,f]=x.useState(!1),[h,d]=x.useState(!1),[p,m]=x.useState(null),g=x.useRef([]),y=x.useRef([]),b=x.useContext(yc),v=Yn(),S=YD(),T=ob(),{floatingStyles:E,refs:R,context:I}=Co({nodeId:S,open:u,transform:!0,onOpenChange:f,whileElementsMounted:ia,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[aa({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Gu(),Uu()]}),M=Ro(I,{role:"menu",enabled:!0}),A=Eo(I,{bubbles:!0}),N=cb(I,{enabled:n,delay:{open:yb},handleClose:wM({blockPointerEvents:!0})}),k=la(I,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),j=gb(I,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:g,scrollItemIntoView:!0,onNavigate:m}),P=bM(I,{activeIndex:p,listRef:y,resetMs:SM,onMatch:u?m:void 0}),{getReferenceProps:O,getFloatingProps:F,getItemProps:_}=Po([N,k,M,A,j,P]);x.useEffect(()=>{if(!v)return;const U=()=>f(!1),D=$=>{$.nodeId!==S&&$.parentId===l&&f(!1)};return v.events.on("click",U),v.events.on("menuopen",D),()=>{v.events.off("click",U),v.events.off("menuopen",D)}},[v,S,l]),x.useEffect(()=>{u&&v&&v.events.emit("menuopen",{parentId:l,nodeId:S})},[v,u,S,l]);const W=r?i.className:De(vb(i.className));return w.jsxs(KD,{id:S,children:[w.jsx(x.Fragment,{children:i.asChild?w.jsx(eo,{children:s,ref:gc([R.setReference,T.ref,a]),tabIndex:c?b.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:W,...O(b.getItemProps({...i,onFocus(U){var D;(D=i.onFocus)==null||D.call(i,U),d(!1),b.setHasFocusInside(!0)}}))}):w.jsxs("button",{type:"button",ref:gc([R.setReference,T.ref,a]),tabIndex:c?b.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:W,...O(b.getItemProps({...i,onFocus(U){var D;(D=i.onFocus)==null||D.call(i,U),d(!1),b.setHasFocusInside(!0)}})),children:[s,c&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(bu,{size:14})]})]})}),w.jsx(yc.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:_,setHasFocusInside:d,isOpen:u},children:w.jsx(WD,{elementsRef:g,labelsRef:y,children:u&&w.jsx(So,{preserveTabOrder:!0,children:w.jsx(Is,{context:I,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:w.jsx(t,{...F(),ref:R.setFloating,style:{...i.style,...E},className:De("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),EM=x.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=x.useContext(yc),a=ob({label:r?null:typeof e=="string"?e:t}),l=Yn(),c=a.index===i.activeIndex;return w.jsxs("button",{...o,ref:gc([a.ref,s]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:vb(o.className),...i.getItemProps({onClick(u){var f;(f=o.onClick)==null||f.call(o,u),l==null||l.events.emit("click")},onFocus(u){var f;(f=o.onFocus)==null||f.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),CM=x.forwardRef((e,t)=>Gn()!==null?w.jsx(pp,{...e,isParent:!1,ref:t}):w.jsx(qD,{children:w.jsx(pp,{...e,isParent:!0,ref:t})})),PM=(e,t)=>Ci()?t:window.matchMedia(e).matches,RM=(e,t=!0)=>{const[n,r]=x.useState(t);return x.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(PM(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},zt="600ms",IM={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:zt},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:zt},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:zt}},AM={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:zt},exit:{translateX:["0%","30%"],opacity:0,animationDuration:zt}},ll={drawer:e=>e==="left"?IM:AM,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:zt,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:zt,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:zt,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:zt},enter:{opacity:1,scale:[1.05,1],animationDuration:zt},exit:{opacity:0,scale:.97,animationDuration:zt}}},OM=co("isolate 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 h-[85vh] max-h-[85vh] max-h-[85svh] 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"}}),DM={top:0,left:0,right:0,bottom:-1},MM=e=>e*.62,kM=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,f=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+f))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=MM(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.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:DM,whileDrag:{cursor:"grabbing"},className:De("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?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},cl={drawer:"right",sheet:"none",dialog:"none"},FM=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=x.useId(),a=x.useId(),l=RM("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:cl[e]:r?cl[e]:cl.sheet,f=l||r?ll[e]:ll.sheet,h=typeof f=="function"?f(u):f,d=l||r?e:"sheet",{refs:p,context:m}=Co({open:s.open,onOpenChange:s.onChange}),g=la(m),y=Ro(m),b=Eo(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:v,getFloatingProps:S}=Po([g,y,b]),T=s.trigger,E=pr(void 0),R=()=>s.onChange(!1);return w.jsxs(x.Fragment,{children:[s.trigger?w.jsx(x.Fragment,{children:s.asChild?w.jsx(eo,{ref:p.setReference,...v({layoutId:s.layoutId}),children:T}):w.jsx(ft.button,{ref:p.setReference,...v(),layoutId:s.layoutId,type:"button",children:T})}):null,w.jsx(So,{children:w.jsx(yo,{presenceAffectsLayout:!0,children:s.open?w.jsx(aM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${d==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:w.jsx(Is,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(ft.div,{exit:"exit",animate:"enter",initial:"initial",variants:h,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:OM({position:u,type:d}),style:d==="drawer"?{width:E}:{height:E},...S(),children:[s.title?w.jsx("header",{className:"relative w-full",children:s.title?w.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:R,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(wu,{})})}):null,c&&t?w.jsx(kM,{onChange:s.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},jM=e=>w.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}),bb=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:s,...i})=>{const[a,l]=x.useState(!1),c=x.useRef(null),u=o||"span",{refs:f,floatingStyles:h,context:d}=Co({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:ia,middleware:[aa(5),Gu({fallbackAxisSideDirection:"start"}),Uu(),tb({element:c,padding:5})]}),p=cb(d,{move:!0,enabled:r,delay:{open:yb}}),m=hM(d,{enabled:r}),g=Eo(d,{enabled:r}),y=Ro(d,{role:"tooltip",enabled:r}),b=cM(d,{enabled:!!r&&!!t}),{getReferenceProps:v,getFloatingProps:S}=Po([p,m,g,y,b]);return w.jsxs(x.Fragment,{children:[w.jsx(u,{ref:f.setReference,...v(i),children:s}),w.jsx(So,{children:a&&w.jsxs(po,{...S(),ref:f.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(sb,{ref:c,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class ji{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)ji.getDescendantProperty(a[l],s,r);else s&&ji.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Lr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Lr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=ji.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Lr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Lr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Lr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const xb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>w.jsxs("div",{className:De("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[s,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx(bb,{as:"button",type:"button",title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(Dy,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:w.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?w.jsxs(x.Fragment,{children:[w.jsx(Oy,{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}),w.jsx(yP,{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]}),o]}),ua=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:f,labelClassName:h="",name:d,title:p,componentName:m,placeholder:g,hideLeft:y=!1,required:b})=>{const v=f??d,S=Rt(),T=e??S.inputOptionalLabel;return w.jsxs("fieldset",{form:u,"data-error":!!c,"data-component":m,"data-interactive":!!s,className:De("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[w.jsxs("label",{form:u,htmlFor:v,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[w.jsx(xb,{info:a,hideLeft:y,reportStatus:!0,title:p,placeholder:g,children:T||n?w.jsxs(x.Fragment,{children:[b?null:w.jsx("span",{className:"text-opacity-70",children:T}),n?w.jsx(x.Fragment,{children:n}):null]}):null}),w.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-error:border-danger ${h}`,children:[t?w.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?w.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),w.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),w.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})]})},NM=e=>w.jsx(x.Fragment,{children:e.children}),wb=x.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??NM,a=r.label??r.value;return r.hidden?null:w.jsx("li",{...o,ref:s,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsxs("button",{type:"button","aria-busy":r.disabled,"aria-checked":t,"aria-current":t,"aria-selected":t,onClick:n,"data-value":r.value,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary-hover text-primary-foreground":""} ${e?"bg-primary text-primary-foreground":""}`,children:[w.jsx(i,{...o,label:r.label,value:r.value,children:a}),t?w.jsx("span",{children:w.jsx(mP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),LM={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},_M={caseSensitive:!1,sort:!1},VM=[],$M=x.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:s,optionalText:i,container:a,hideLeft:l=!1,right:c,left:u,error:f,required:h=!1,...d},p)=>{const m=d.value??d.defaultValue??"",g=Rt(),[y,b]=x.useState(!1),[v,S]=x.useState(""),[T,E]=x.useState(m),[R,I]=x.useState(()=>{var V;return((V=e.find(Y=>Y.value===m))==null?void 0:V.label)??m}),[M,A]=x.useState(null),N=x.useRef(VM),k=t&&v!==""?[{value:v,label:v,"data-dynamic":"true"},...e]:e,j=new Lr(k,["value","label"],_M).search(v),P=t?void 0:`^(${e.map(V=>`${oc(V.value)}${V.label?"|"+oc(V.label):""}`).join("|")})$`;x.useEffect(()=>{if(d.value){const V=e.find(Y=>Y.value===d.value);E((V==null?void 0:V.label)??d.value)}},[d.value]);const{x:O,y:F,strategy:_,refs:W,context:U}=Co({open:y,transform:!0,strategy:"absolute",onOpenChange:b,whileElementsMounted:ia,middleware:[aa(4),kD({elementContext:"reference",padding:10,apply(V){const ee=V.elements.reference.parentElement,H=ee==null?void 0:ee.getBoundingClientRect().width;Object.assign(V.elements.floating.style,{width:`${H}px`,maxWidth:`${H}px`,minWidth:"max-content",maxHeight:`${Math.min(250,V.availableHeight)}px`})}})]}),D=vM(U,LM),{getReferenceProps:$,getFloatingProps:q,getItemProps:J}=Po([Ro(U,{role:"listbox"}),Eo(U),gb(U,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:M,selectedIndex:M,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:V=>A(Y=>V??Y)})]);x.useEffect(()=>{const V=W.reference.current;if(V)return zi(V)},[]);const X=(V,Y)=>{E(V.value);const ee=W.reference.current;if(!ee)return;ee==null||ee.setAttribute("data-value",V.value),ee.value=V.value;const H=new Event("change",{bubbles:!1,cancelable:!0});ee.dispatchEvent(H),d.onChange&&d.onChange(H),I(V.label??""),b(!1),S(""),A(Y)},G=V=>{var ee;const Y=V.target.value;return S(Y),!y&&Y===""?b(!0):(V.target.name=d.name||"",Y?b(!0):(ee=d.onChange)==null?void 0:ee.call(d,V))},L=()=>{b(!0),S("")},B=()=>{var V;S(""),E(""),(V=W.reference.current)==null||V.setAttribute("data-value",""),I(""),Vm(W.reference.current),b(!1)},z=d.id||d.name;return w.jsxs(ua,{...d,left:u,error:f,form:d.form,name:d.name,feedback:n,hideLeft:l,required:h,title:d.title,container:a,rightLabel:s,interactive:o,id:d.name||d.id,optionalText:i,componentName:"autocomplete",labelClassName:r,placeholder:d.placeholder,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[w.jsx(Ay,{size:20}),w.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),T?w.jsx("button",{type:"button",onClick:B,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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:[w.jsx("input",{...$({...d,onChange:G,onFocus:L,pattern:P,ref:W.setReference,name:`${z}-shadow`,id:`${z}-shadow`,onClick:V=>V.currentTarget.focus(),onKeyDown(V){if(V.key==="Escape")return V.currentTarget.blur(),b(!1);if(V.key==="Enter"){if(M!==null&&j[M])return V.preventDefault(),X(j[M],M);if(j.length===1)return V.preventDefault(),X(j[0],0)}}}),"data-value":T,"data-error":!!f,"data-name":z,"data-target":z,required:h,value:y?v:R||T,"aria-autocomplete":"list",autoComplete:"off",className:De("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",d.className)}),w.jsx("input",{id:z,name:z,type:"hidden","data-origin":z,ref:p,required:h,defaultValue:d.value||T||void 0}),w.jsx(So,{preserveTabOrder:!0,children:y?w.jsx(Is,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsxs("ul",{...q({ref:W.setFloating,style:{position:_,left:(O??0)+(T?26:16),top:F??0,...D.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[j.map((V,Y)=>{const ee=T===V.value||T===V.label;return w.jsx(wb,{...J({onClick:()=>X(V,Y),ref:H=>void(N.current[Y]=H),selected:M===Y}),option:V,active:ee,selected:M===Y},`${V.value}-option`)}),j.length===0?w.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:g.autocompleteEmpty})}):null]})}):null})]})}),Tb=x.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>w.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:De("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[w.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:De("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",o)}),e,w.jsx("span",{"data-name":"checkbox-label",className:De("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Sb=(e,t,n,r)=>x.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:f,optionalText:h,container:d,hideLeft:p=!1,right:m,left:g,error:y,...b},v)=>{const S=e,T=b.id??b.name,E=x.useRef(null);return x.useEffect(()=>{if(E.current===null)return;const R=E.current,I=zi(E.current),M=r==null?void 0:r(R),A=N=>{const k=N;if(k.key==="Enter"&&R.enterKeyHint==="next"){const j=R.getAttribute("data-next");if(j){const P=document.getElementById(j);if(P)return P.focus(),void k.preventDefault()}}};return R.addEventListener("keydown",A),()=>{M==null||M(),I(),R.removeEventListener("keydown",A)}},[]),w.jsx(ua,{...n,componentName:t,info:a,container:d,error:y,feedback:i,hideLeft:p,left:g,optionalText:h,right:m,rightLabel:f,interactive:u,form:b.form,id:b.name||b.id,name:b.name,labelClassName:l,title:b.title,placeholder:b.placeholder,required:b.required,children:w.jsx(S,{...n,...b,id:T,name:T,type:s,"data-next":c,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:Hc(v,E),className:De("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","resize-y group-focus-within:border-primary group-hover:border-primary",b.className)})})}),As=Sb(tv,"input",{type:"text"}),mp=new Date(1970,11,31),ul={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},gp={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},BM={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")},fl=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},WM=x.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||yA(),l=x.useId(),c=Rt(),u=x.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[f,h]=x.useState(e||void 0),[d,p]=x.useState(!1),m=fl(u,mp).flatMap(R=>vn.keyof(ul,R.type)?ul[R.type](R.value):[]),g=fl(u,mp).reduce((R,I)=>R+(vn.keyof(gp,I.type)?gp[I.type](I.value):""),""),[y,b]=x.useState(f?fl(u,f).reduce((R,I)=>R+(vn.keyof(ul,I.type)?BM[I.type](f,I.value):""),""):""),v=R=>{const I=R.target.value;if(b(I),m.length===I.length&&m.every((A,N)=>{const k=I.charAt(N);return typeof A=="string"?k===A:A.test(k)})){const A=Jr(OI(I,g,new Date));return h(A),r==null?void 0:r(A)}return h(void 0),r==null?void 0:r(void 0)},S=R=>(h(R),r==null||r(R),b(R?DR(R,g):"")),T=Ly(f),E=T?f.toISOString():void 0;return w.jsx(As,{...s,mask:m,value:y,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!d,"data-target":s.name,"data-component":"date-picker",onChange:v,required:s.required??!0,error:d?void 0:s.error,placeholder:s.placeholder??g,right:w.jsxs(x.Fragment,{children:[w.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),w.jsx(Io,{open:d,onChange:p,trigger:w.jsxs("span",{"aria-labelledby":l,children:[w.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),w.jsx(pP,{})]}),buttonProps:{"aria-describedby":l},children:w.jsx(fv,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?f:void 0})})]})})}),HM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],UM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],GM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],yp=(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 vp(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?GM:UM:t.binary?zM:HM,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=yp(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=yp(Number(e),t.locale,i),c=n[a];return s+l+r+c}var vc={exports:{}},qs={exports:{}},Pe={};/** @license React v16.13.1
178
178
  * react-is.production.min.js
179
179
  *
180
180
  * Copyright (c) Facebook, Inc. and its affiliates.
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 bp;function YM(){if(bp)return Pe;bp=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,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case s:case o:case f:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case d:case i:return T;default:return E}}case n:return E}}}function S(T){return y(T)===c}return Pe.AsyncMode=l,Pe.ConcurrentMode=c,Pe.ContextConsumer=a,Pe.ContextProvider=i,Pe.Element=t,Pe.ForwardRef=u,Pe.Fragment=r,Pe.Lazy=p,Pe.Memo=d,Pe.Portal=n,Pe.Profiler=s,Pe.StrictMode=o,Pe.Suspense=f,Pe.isAsyncMode=function(T){return S(T)||y(T)===l},Pe.isConcurrentMode=S,Pe.isContextConsumer=function(T){return y(T)===a},Pe.isContextProvider=function(T){return y(T)===i},Pe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Pe.isForwardRef=function(T){return y(T)===u},Pe.isFragment=function(T){return y(T)===r},Pe.isLazy=function(T){return y(T)===p},Pe.isMemo=function(T){return y(T)===d},Pe.isPortal=function(T){return y(T)===n},Pe.isProfiler=function(T){return y(T)===s},Pe.isStrictMode=function(T){return y(T)===o},Pe.isSuspense=function(T){return y(T)===f},Pe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===o||T===f||T===h||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===d||T.$$typeof===i||T.$$typeof===a||T.$$typeof===u||T.$$typeof===g||T.$$typeof===v||T.$$typeof===b||T.$$typeof===m)},Pe.typeOf=y,Pe}var Re={};/** @license React v16.13.1
184
+ */var bp;function YM(){if(bp)return Pe;bp=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,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case s:case o:case f:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case d:case i:return T;default:return E}}case n:return E}}}function S(T){return v(T)===c}return Pe.AsyncMode=l,Pe.ConcurrentMode=c,Pe.ContextConsumer=a,Pe.ContextProvider=i,Pe.Element=t,Pe.ForwardRef=u,Pe.Fragment=r,Pe.Lazy=p,Pe.Memo=d,Pe.Portal=n,Pe.Profiler=s,Pe.StrictMode=o,Pe.Suspense=f,Pe.isAsyncMode=function(T){return S(T)||v(T)===l},Pe.isConcurrentMode=S,Pe.isContextConsumer=function(T){return v(T)===a},Pe.isContextProvider=function(T){return v(T)===i},Pe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Pe.isForwardRef=function(T){return v(T)===u},Pe.isFragment=function(T){return v(T)===r},Pe.isLazy=function(T){return v(T)===p},Pe.isMemo=function(T){return v(T)===d},Pe.isPortal=function(T){return v(T)===n},Pe.isProfiler=function(T){return v(T)===s},Pe.isStrictMode=function(T){return v(T)===o},Pe.isSuspense=function(T){return v(T)===f},Pe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===o||T===f||T===h||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===d||T.$$typeof===i||T.$$typeof===a||T.$$typeof===u||T.$$typeof===g||T.$$typeof===y||T.$$typeof===b||T.$$typeof===m)},Pe.typeOf=v,Pe}var Re={};/** @license React v16.13.1
185
185
  * react-is.development.js
186
186
  *
187
187
  * Copyright (c) Facebook, Inc. and its affiliates.
188
188
  *
189
189
  * This source code is licensed under the MIT license found in the
190
190
  * LICENSE file in the root directory of this source tree.
191
- */var xp;function KM(){return xp||(xp=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,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(W){return typeof W=="string"||typeof W=="function"||W===r||W===c||W===s||W===o||W===f||W===h||typeof W=="object"&&W!==null&&(W.$$typeof===p||W.$$typeof===d||W.$$typeof===i||W.$$typeof===a||W.$$typeof===u||W.$$typeof===g||W.$$typeof===v||W.$$typeof===b||W.$$typeof===m)}function S(W){if(typeof W=="object"&&W!==null){var we=W.$$typeof;switch(we){case t:var Ue=W.type;switch(Ue){case l:case c:case r:case s:case o:case f:return Ue;default:var je=Ue&&Ue.$$typeof;switch(je){case a:case u:case p:case d:case i:return je;default:return we}}case n:return we}}}var T=l,E=c,R=a,A=i,O=t,I=u,F=r,k=p,L=d,C=n,M=s,j=o,_=f,H=!1;function U(W){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(W)||S(W)===l}function D(W){return S(W)===c}function $(W){return S(W)===a}function q(W){return S(W)===i}function J(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function X(W){return S(W)===u}function G(W){return S(W)===r}function N(W){return S(W)===p}function B(W){return S(W)===d}function z(W){return S(W)===n}function V(W){return S(W)===s}function Y(W){return S(W)===o}function ee(W){return S(W)===f}Re.AsyncMode=T,Re.ConcurrentMode=E,Re.ContextConsumer=R,Re.ContextProvider=A,Re.Element=O,Re.ForwardRef=I,Re.Fragment=F,Re.Lazy=k,Re.Memo=L,Re.Portal=C,Re.Profiler=M,Re.StrictMode=j,Re.Suspense=_,Re.isAsyncMode=U,Re.isConcurrentMode=D,Re.isContextConsumer=$,Re.isContextProvider=q,Re.isElement=J,Re.isForwardRef=X,Re.isFragment=G,Re.isLazy=N,Re.isMemo=B,Re.isPortal=z,Re.isProfiler=V,Re.isStrictMode=Y,Re.isSuspense=ee,Re.isValidElementType=y,Re.typeOf=S}()),Re}var wp;function Eb(){return wp||(wp=1,process.env.NODE_ENV==="production"?Ks.exports=YM():Ks.exports=KM()),Ks.exports}/*
191
+ */var xp;function KM(){return xp||(xp=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,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===s||H===o||H===f||H===h||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===d||H.$$typeof===i||H.$$typeof===a||H.$$typeof===u||H.$$typeof===g||H.$$typeof===y||H.$$typeof===b||H.$$typeof===m)}function S(H){if(typeof H=="object"&&H!==null){var we=H.$$typeof;switch(we){case t:var Ue=H.type;switch(Ue){case l:case c:case r:case s:case o:case f:return Ue;default:var je=Ue&&Ue.$$typeof;switch(je){case a:case u:case p:case d:case i:return je;default:return we}}case n:return we}}}var T=l,E=c,R=a,I=i,M=t,A=u,N=r,k=p,j=d,P=n,O=s,F=o,_=f,W=!1;function U(H){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(H)||S(H)===l}function D(H){return S(H)===c}function $(H){return S(H)===a}function q(H){return S(H)===i}function J(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function X(H){return S(H)===u}function G(H){return S(H)===r}function L(H){return S(H)===p}function B(H){return S(H)===d}function z(H){return S(H)===n}function V(H){return S(H)===s}function Y(H){return S(H)===o}function ee(H){return S(H)===f}Re.AsyncMode=T,Re.ConcurrentMode=E,Re.ContextConsumer=R,Re.ContextProvider=I,Re.Element=M,Re.ForwardRef=A,Re.Fragment=N,Re.Lazy=k,Re.Memo=j,Re.Portal=P,Re.Profiler=O,Re.StrictMode=F,Re.Suspense=_,Re.isAsyncMode=U,Re.isConcurrentMode=D,Re.isContextConsumer=$,Re.isContextProvider=q,Re.isElement=J,Re.isForwardRef=X,Re.isFragment=G,Re.isLazy=L,Re.isMemo=B,Re.isPortal=z,Re.isProfiler=V,Re.isStrictMode=Y,Re.isSuspense=ee,Re.isValidElementType=v,Re.typeOf=S}()),Re}var wp;function Eb(){return wp||(wp=1,process.env.NODE_ENV==="production"?qs.exports=YM():qs.exports=KM()),qs.exports}/*
192
192
  object-assign
193
193
  (c) Sindre Sorhus
194
194
  @license MIT
195
- */var dl,Tp;function qM(){if(Tp)return dl;Tp=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[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 dl=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},dl}var hl,Sp;function qu(){if(Sp)return hl;Sp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hl=e,hl}var pl,Ep;function Cb(){return Ep||(Ep=1,pl=Function.call.bind(Object.prototype.hasOwnProperty)),pl}var ml,Cp;function XM(){if(Cp)return ml;Cp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=qu(),n={},r=Cb();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var f;try{if(typeof s[u]!="function"){var h=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=s[u](i,u,l,a,null,t)}catch(p){f=p}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=c?c():"";e("Failed "+a+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ml=o,ml}var gl,Pp;function QM(){if(Pp)return gl;Pp=1;var e=Eb(),t=qM(),n=qu(),r=Cb(),o=XM(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return gl=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(D){var $=D&&(c&&D[c]||D[u]);if(typeof $=="function")return $}var h="<<anonymous>>",d={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:y,element:S(),elementType:T(),instanceOf:E,node:I(),objectOf:A,oneOf:R,oneOfType:O,shape:k,exact:L};function p(D,$){return D===$?D!==0||1/D===1/$:D!==D&&$!==$}function m(D,$){this.message=D,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function g(D){if(process.env.NODE_ENV!=="production")var $={},q=0;function J(G,N,B,z,V,Y,ee){if(z=z||h,Y=Y||B,ee!==n){if(l){var W=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 W.name="Invariant Violation",W}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=z+":"+B;!$[we]&&q<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+z+"`. 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."),$[we]=!0,q++)}}return N[B]==null?G?N[B]===null?new m("The "+V+" `"+Y+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+V+" `"+Y+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:D(N,B,z,V,Y)}var X=J.bind(null,!1);return X.isRequired=J.bind(null,!0),X}function v(D){function $(q,J,X,G,N,B){var z=q[J],V=j(z);if(V!==D){var Y=_(z);return new m("Invalid "+G+" `"+N+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return g($)}function b(){return g(i)}function y(D){function $(q,J,X,G,N){if(typeof D!="function")return new m("Property `"+N+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var B=q[J];if(!Array.isArray(B)){var z=j(B);return new m("Invalid "+G+" `"+N+"` of type "+("`"+z+"` supplied to `"+X+"`, expected an array."))}for(var V=0;V<B.length;V++){var Y=D(B,V,X,G,N+"["+V+"]",n);if(Y instanceof Error)return Y}return null}return g($)}function S(){function D($,q,J,X,G){var N=$[q];if(!a(N)){var B=j(N);return new m("Invalid "+X+" `"+G+"` of type "+("`"+B+"` supplied to `"+J+"`, expected a single ReactElement."))}return null}return g(D)}function T(){function D($,q,J,X,G){var N=$[q];if(!e.isValidElementType(N)){var B=j(N);return new m("Invalid "+X+" `"+G+"` of type "+("`"+B+"` supplied to `"+J+"`, expected a single ReactElement type."))}return null}return g(D)}function E(D){function $(q,J,X,G,N){if(!(q[J]instanceof D)){var B=D.name||h,z=U(q[J]);return new m("Invalid "+G+" `"+N+"` of type "+("`"+z+"` supplied to `"+X+"`, expected ")+("instance of `"+B+"`."))}return null}return g($)}function R(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function $(q,J,X,G,N){for(var B=q[J],z=0;z<D.length;z++)if(p(B,D[z]))return null;var V=JSON.stringify(D,function(ee,W){var we=_(W);return we==="symbol"?String(W):W});return new m("Invalid "+G+" `"+N+"` of value `"+String(B)+"` "+("supplied to `"+X+"`, expected one of "+V+"."))}return g($)}function A(D){function $(q,J,X,G,N){if(typeof D!="function")return new m("Property `"+N+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var B=q[J],z=j(B);if(z!=="object")return new m("Invalid "+G+" `"+N+"` of type "+("`"+z+"` supplied to `"+X+"`, expected an object."));for(var V in B)if(r(B,V)){var Y=D(B,V,X,G,N+"."+V,n);if(Y instanceof Error)return Y}return null}return g($)}function O(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var $=0;$<D.length;$++){var q=D[$];if(typeof q!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(q)+" at index "+$+"."),i}function J(X,G,N,B,z){for(var V=[],Y=0;Y<D.length;Y++){var ee=D[Y],W=ee(X,G,N,B,z,n);if(W==null)return null;W.data&&r(W.data,"expectedType")&&V.push(W.data.expectedType)}var we=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new m("Invalid "+B+" `"+z+"` supplied to "+("`"+N+"`"+we+"."))}return g(J)}function I(){function D($,q,J,X,G){return C($[q])?null:new m("Invalid "+X+" `"+G+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return g(D)}function F(D,$,q,J,X){return new m((D||"React class")+": "+$+" type `"+q+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function k(D){function $(q,J,X,G,N){var B=q[J],z=j(B);if(z!=="object")return new m("Invalid "+G+" `"+N+"` of type `"+z+"` "+("supplied to `"+X+"`, expected `object`."));for(var V in D){var Y=D[V];if(typeof Y!="function")return F(X,G,N,V,_(Y));var ee=Y(B,V,X,G,N+"."+V,n);if(ee)return ee}return null}return g($)}function L(D){function $(q,J,X,G,N){var B=q[J],z=j(B);if(z!=="object")return new m("Invalid "+G+" `"+N+"` of type `"+z+"` "+("supplied to `"+X+"`, expected `object`."));var V=t({},q[J],D);for(var Y in V){var ee=D[Y];if(r(D,Y)&&typeof ee!="function")return F(X,G,N,Y,_(ee));if(!ee)return new m("Invalid "+G+" `"+N+"` key `"+Y+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(q[J],null," ")+`
196
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var W=ee(B,Y,X,G,N+"."+Y,n);if(W)return W}return null}return g($)}function C(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(C);if(D===null||a(D))return!0;var $=f(D);if($){var q=$.call(D),J;if($!==D.entries){for(;!(J=q.next()).done;)if(!C(J.value))return!1}else for(;!(J=q.next()).done;){var X=J.value;if(X&&!C(X[1]))return!1}}else return!1;return!0;default:return!1}}function M(D,$){return D==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function j(D){var $=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":M($,D)?"symbol":$}function _(D){if(typeof D>"u"||D===null)return""+D;var $=j(D);if($==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return $}function H(D){var $=_(D);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function U(D){return!D.constructor||!D.constructor.name?h:D.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},gl}var yl,Rp;function ZM(){if(Rp)return yl;Rp=1;var e=qu();function t(){}function n(){}return n.resetWarningCache=t,yl=function(){function r(i,a,l,c,u,f){if(f!==e){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}}r.isRequired=r;function o(){return r}var s={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 s.PropTypes=s,s},yl}if(process.env.NODE_ENV!=="production"){var JM=Eb(),ek=!0;vc.exports=QM()(JM.isElement,ek)}else vc.exports=ZM()();var tk=vc.exports;const ke=O0(tk);function Ao(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(f){i(f)}}function l(u){try{c(r.throw(u))}catch(f){i(f)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Oo(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ip(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Ap(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var nk=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function As(e,t){var n=rk(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function rk(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=nk.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var ok=[".DS_Store","Thumbs.db"];function sk(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return ji(e)&&ik(e.dataTransfer)?[2,uk(e.dataTransfer,e.type)]:ak(e)?[2,lk(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ck(e)]:[2,[]]})})}function ik(e){return ji(e)}function ak(e){return ji(e)&&ji(e.target)}function ji(e){return typeof e=="object"&&e!==null}function lk(e){return bc(e.target.files).map(function(t){return As(t)})}function ck(e){return Ao(this,void 0,void 0,function(){var t;return Oo(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return As(r)})]}})})}function uk(e,t){return Ao(this,void 0,void 0,function(){var n,r;return Oo(this,function(o){switch(o.label){case 0:return e.items?(n=bc(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(fk))]):[3,2];case 1:return r=o.sent(),[2,Op(Pb(r))];case 2:return[2,Op(bc(e.files).map(function(s){return As(s)}))]}})})}function Op(e){return e.filter(function(t){return ok.indexOf(t.name)===-1})}function bc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function fk(e){if(typeof e.webkitGetAsEntry!="function")return Dp(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Rb(t):Dp(e)}function Pb(e){return e.reduce(function(t,n){return Ap(Ap([],Ip(t),!1),Ip(Array.isArray(n)?Pb(n):[n]),!1)},[])}function Dp(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=As(t);return Promise.resolve(n)}function dk(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return[2,e.isDirectory?Rb(e):hk(e)]})})}function Rb(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Ao(i,void 0,void 0,function(){var l,c,u;return Oo(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(dk)),o.push(u),s(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function hk(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=As(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var pk=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function Mp(e){return yk(e)||gk(e)||Ab(e)||mk()}function mk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
195
+ */var dl,Tp;function qM(){if(Tp)return dl;Tp=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[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 dl=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},dl}var hl,Sp;function qu(){if(Sp)return hl;Sp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hl=e,hl}var pl,Ep;function Cb(){return Ep||(Ep=1,pl=Function.call.bind(Object.prototype.hasOwnProperty)),pl}var ml,Cp;function XM(){if(Cp)return ml;Cp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=qu(),n={},r=Cb();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var f;try{if(typeof s[u]!="function"){var h=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=s[u](i,u,l,a,null,t)}catch(p){f=p}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=c?c():"";e("Failed "+a+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ml=o,ml}var gl,Pp;function QM(){if(Pp)return gl;Pp=1;var e=Eb(),t=qM(),n=qu(),r=Cb(),o=XM(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return gl=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(D){var $=D&&(c&&D[c]||D[u]);if(typeof $=="function")return $}var h="<<anonymous>>",d={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:b(),arrayOf:v,element:S(),elementType:T(),instanceOf:E,node:A(),objectOf:I,oneOf:R,oneOfType:M,shape:k,exact:j};function p(D,$){return D===$?D!==0||1/D===1/$:D!==D&&$!==$}function m(D,$){this.message=D,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function g(D){if(process.env.NODE_ENV!=="production")var $={},q=0;function J(G,L,B,z,V,Y,ee){if(z=z||h,Y=Y||B,ee!==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 we=z+":"+B;!$[we]&&q<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+z+"`. 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."),$[we]=!0,q++)}}return L[B]==null?G?L[B]===null?new m("The "+V+" `"+Y+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+V+" `"+Y+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:D(L,B,z,V,Y)}var X=J.bind(null,!1);return X.isRequired=J.bind(null,!0),X}function y(D){function $(q,J,X,G,L,B){var z=q[J],V=F(z);if(V!==D){var Y=_(z);return new m("Invalid "+G+" `"+L+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return g($)}function b(){return g(i)}function v(D){function $(q,J,X,G,L){if(typeof D!="function")return new m("Property `"+L+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var B=q[J];if(!Array.isArray(B)){var z=F(B);return new m("Invalid "+G+" `"+L+"` of type "+("`"+z+"` supplied to `"+X+"`, expected an array."))}for(var V=0;V<B.length;V++){var Y=D(B,V,X,G,L+"["+V+"]",n);if(Y instanceof Error)return Y}return null}return g($)}function S(){function D($,q,J,X,G){var L=$[q];if(!a(L)){var B=F(L);return new m("Invalid "+X+" `"+G+"` of type "+("`"+B+"` supplied to `"+J+"`, expected a single ReactElement."))}return null}return g(D)}function T(){function D($,q,J,X,G){var L=$[q];if(!e.isValidElementType(L)){var B=F(L);return new m("Invalid "+X+" `"+G+"` of type "+("`"+B+"` supplied to `"+J+"`, expected a single ReactElement type."))}return null}return g(D)}function E(D){function $(q,J,X,G,L){if(!(q[J]instanceof D)){var B=D.name||h,z=U(q[J]);return new m("Invalid "+G+" `"+L+"` of type "+("`"+z+"` supplied to `"+X+"`, expected ")+("instance of `"+B+"`."))}return null}return g($)}function R(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function $(q,J,X,G,L){for(var B=q[J],z=0;z<D.length;z++)if(p(B,D[z]))return null;var V=JSON.stringify(D,function(ee,H){var we=_(H);return we==="symbol"?String(H):H});return new m("Invalid "+G+" `"+L+"` of value `"+String(B)+"` "+("supplied to `"+X+"`, expected one of "+V+"."))}return g($)}function I(D){function $(q,J,X,G,L){if(typeof D!="function")return new m("Property `"+L+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var B=q[J],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+L+"` of type "+("`"+z+"` supplied to `"+X+"`, expected an object."));for(var V in B)if(r(B,V)){var Y=D(B,V,X,G,L+"."+V,n);if(Y instanceof Error)return Y}return null}return g($)}function M(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var $=0;$<D.length;$++){var q=D[$];if(typeof q!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(q)+" at index "+$+"."),i}function J(X,G,L,B,z){for(var V=[],Y=0;Y<D.length;Y++){var ee=D[Y],H=ee(X,G,L,B,z,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&V.push(H.data.expectedType)}var we=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new m("Invalid "+B+" `"+z+"` supplied to "+("`"+L+"`"+we+"."))}return g(J)}function A(){function D($,q,J,X,G){return P($[q])?null:new m("Invalid "+X+" `"+G+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return g(D)}function N(D,$,q,J,X){return new m((D||"React class")+": "+$+" type `"+q+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function k(D){function $(q,J,X,G,L){var B=q[J],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+L+"` of type `"+z+"` "+("supplied to `"+X+"`, expected `object`."));for(var V in D){var Y=D[V];if(typeof Y!="function")return N(X,G,L,V,_(Y));var ee=Y(B,V,X,G,L+"."+V,n);if(ee)return ee}return null}return g($)}function j(D){function $(q,J,X,G,L){var B=q[J],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+L+"` of type `"+z+"` "+("supplied to `"+X+"`, expected `object`."));var V=t({},q[J],D);for(var Y in V){var ee=D[Y];if(r(D,Y)&&typeof ee!="function")return N(X,G,L,Y,_(ee));if(!ee)return new m("Invalid "+G+" `"+L+"` key `"+Y+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(q[J],null," ")+`
196
+ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var H=ee(B,Y,X,G,L+"."+Y,n);if(H)return H}return null}return g($)}function P(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(P);if(D===null||a(D))return!0;var $=f(D);if($){var q=$.call(D),J;if($!==D.entries){for(;!(J=q.next()).done;)if(!P(J.value))return!1}else for(;!(J=q.next()).done;){var X=J.value;if(X&&!P(X[1]))return!1}}else return!1;return!0;default:return!1}}function O(D,$){return D==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function F(D){var $=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":O($,D)?"symbol":$}function _(D){if(typeof D>"u"||D===null)return""+D;var $=F(D);if($==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return $}function W(D){var $=_(D);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function U(D){return!D.constructor||!D.constructor.name?h:D.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},gl}var yl,Rp;function ZM(){if(Rp)return yl;Rp=1;var e=qu();function t(){}function n(){}return n.resetWarningCache=t,yl=function(){function r(i,a,l,c,u,f){if(f!==e){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}}r.isRequired=r;function o(){return r}var s={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 s.PropTypes=s,s},yl}if(process.env.NODE_ENV!=="production"){var JM=Eb(),ek=!0;vc.exports=QM()(JM.isElement,ek)}else vc.exports=ZM()();var tk=vc.exports;const ke=O0(tk);function Ao(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(f){i(f)}}function l(u){try{c(r.throw(u))}catch(f){i(f)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Oo(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ip(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Ap(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var nk=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Os(e,t){var n=rk(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function rk(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=nk.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var ok=[".DS_Store","Thumbs.db"];function sk(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return Ni(e)&&ik(e.dataTransfer)?[2,uk(e.dataTransfer,e.type)]:ak(e)?[2,lk(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ck(e)]:[2,[]]})})}function ik(e){return Ni(e)}function ak(e){return Ni(e)&&Ni(e.target)}function Ni(e){return typeof e=="object"&&e!==null}function lk(e){return bc(e.target.files).map(function(t){return Os(t)})}function ck(e){return Ao(this,void 0,void 0,function(){var t;return Oo(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Os(r)})]}})})}function uk(e,t){return Ao(this,void 0,void 0,function(){var n,r;return Oo(this,function(o){switch(o.label){case 0:return e.items?(n=bc(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(fk))]):[3,2];case 1:return r=o.sent(),[2,Op(Pb(r))];case 2:return[2,Op(bc(e.files).map(function(s){return Os(s)}))]}})})}function Op(e){return e.filter(function(t){return ok.indexOf(t.name)===-1})}function bc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function fk(e){if(typeof e.webkitGetAsEntry!="function")return Dp(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Rb(t):Dp(e)}function Pb(e){return e.reduce(function(t,n){return Ap(Ap([],Ip(t),!1),Ip(Array.isArray(n)?Pb(n):[n]),!1)},[])}function Dp(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Os(t);return Promise.resolve(n)}function dk(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return[2,e.isDirectory?Rb(e):hk(e)]})})}function Rb(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Ao(i,void 0,void 0,function(){var l,c,u;return Oo(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(dk)),o.push(u),s(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function hk(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=Os(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var pk=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function Mp(e){return yk(e)||gk(e)||Ab(e)||mk()}function mk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
197
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yk(e){if(Array.isArray(e))return xc(e)}function kp(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 Fp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kp(Object(n),!0).forEach(function(r){Ib(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ib(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function us(e,t){return xk(e)||bk(e,t)||Ab(e,t)||vk()}function vk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
198
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ab(e,t){if(e){if(typeof e=="string")return xc(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 xc(e,t)}}function xc(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 bk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function xk(e){if(Array.isArray(e))return e}var wk="file-invalid-type",Tk="file-too-large",Sk="file-too-small",Ek="too-many-files",Ck=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:wk,message:"File type must be ".concat(n)}},jp=function(t){return{code:Tk,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Np=function(t){return{code:Sk,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Pk={code:Ek,message:"Too many files"};function Ob(e,t){var n=e.type==="application/x-moz-file"||pk(e,t);return[n,n?null:Ck(t)]}function Db(e,t,n){if(sr(e.size))if(sr(t)&&sr(n)){if(e.size>n)return[!1,jp(n)];if(e.size<t)return[!1,Np(t)]}else{if(sr(t)&&e.size<t)return[!1,Np(t)];if(sr(n)&&e.size>n)return[!1,jp(n)]}return[!0,null]}function sr(e){return e!=null}function Rk(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=Ob(l,n),u=us(c,1),f=u[0],h=Db(l,r,o),d=us(h,1),p=d[0],m=a?a(l):null;return f&&p&&!m})}function Ni(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function qs(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 Lp(e){e.preventDefault()}function Ik(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Ak(e){return e.indexOf("Edge/")!==-1}function Ok(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ik(e)||Ak(e)}function qt(){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,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!Ni(r)&&a&&a.apply(void 0,[r].concat(s)),Ni(r)})}}function Dk(){return"showOpenFilePicker"in window}function Mk(e){if(sr(e)){var t=Object.entries(e).filter(function(n){var r=us(n,2),o=r[0],s=r[1],i=!0;return Mb(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.')),i=!1),(!Array.isArray(s)||!s.every(kb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=us(r,2),s=o[0],i=o[1];return Fp(Fp({},n),{},Ib({},s,i))},{});return[{description:"Files",accept:t}]}return e}function kk(e){if(sr(e))return Object.entries(e).reduce(function(t,n){var r=us(n,2),o=r[0],s=r[1];return[].concat(Mp(t),[o],Mp(s))},[]).filter(function(t){return Mb(t)||kb(t)}).join(",")}function Fk(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function jk(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Mb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function kb(e){return/^.*\.[\w]+$/.test(e)}var Nk=["children"],Lk=["open"],_k=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Vk=["refKey","onChange","onClick"];function $k(e){return Hk(e)||Wk(e)||Fb(e)||Bk()}function Bk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
198
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ab(e,t){if(e){if(typeof e=="string")return xc(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 xc(e,t)}}function xc(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 bk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function xk(e){if(Array.isArray(e))return e}var wk="file-invalid-type",Tk="file-too-large",Sk="file-too-small",Ek="too-many-files",Ck=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:wk,message:"File type must be ".concat(n)}},jp=function(t){return{code:Tk,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Np=function(t){return{code:Sk,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Pk={code:Ek,message:"Too many files"};function Ob(e,t){var n=e.type==="application/x-moz-file"||pk(e,t);return[n,n?null:Ck(t)]}function Db(e,t,n){if(sr(e.size))if(sr(t)&&sr(n)){if(e.size>n)return[!1,jp(n)];if(e.size<t)return[!1,Np(t)]}else{if(sr(t)&&e.size<t)return[!1,Np(t)];if(sr(n)&&e.size>n)return[!1,jp(n)]}return[!0,null]}function sr(e){return e!=null}function Rk(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=Ob(l,n),u=us(c,1),f=u[0],h=Db(l,r,o),d=us(h,1),p=d[0],m=a?a(l):null;return f&&p&&!m})}function Li(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Xs(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 Lp(e){e.preventDefault()}function Ik(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Ak(e){return e.indexOf("Edge/")!==-1}function Ok(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ik(e)||Ak(e)}function qt(){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,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!Li(r)&&a&&a.apply(void 0,[r].concat(s)),Li(r)})}}function Dk(){return"showOpenFilePicker"in window}function Mk(e){if(sr(e)){var t=Object.entries(e).filter(function(n){var r=us(n,2),o=r[0],s=r[1],i=!0;return Mb(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.')),i=!1),(!Array.isArray(s)||!s.every(kb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=us(r,2),s=o[0],i=o[1];return Fp(Fp({},n),{},Ib({},s,i))},{});return[{description:"Files",accept:t}]}return e}function kk(e){if(sr(e))return Object.entries(e).reduce(function(t,n){var r=us(n,2),o=r[0],s=r[1];return[].concat(Mp(t),[o],Mp(s))},[]).filter(function(t){return Mb(t)||kb(t)}).join(",")}function Fk(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function jk(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Mb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function kb(e){return/^.*\.[\w]+$/.test(e)}var Nk=["children"],Lk=["open"],_k=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Vk=["refKey","onChange","onClick"];function $k(e){return Hk(e)||Wk(e)||Fb(e)||Bk()}function Bk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
199
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hk(e){if(Array.isArray(e))return wc(e)}function vl(e,t){return Gk(e)||Uk(e,t)||Fb(e,t)||zk()}function zk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fb(e,t){if(e){if(typeof e=="string")return wc(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 wc(e,t)}}function wc(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 Uk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function Gk(e){if(Array.isArray(e))return e}function _p(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 We(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_p(Object(n),!0).forEach(function(r){Tc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_p(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Li(e,t){if(e==null)return{};var n=Yk(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Xu=w.forwardRef(function(e,t){var n=e.children,r=Li(e,Nk),o=Nb(r),s=o.open,i=Li(o,Lk);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(We(We({},i),{},{open:s})))});Xu.displayName="Dropzone";var jb={disabled:!1,getFilesFromEvent:sk,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Xu.defaultProps=jb;Xu.propTypes={children:ke.func,accept:ke.objectOf(ke.arrayOf(ke.string)),multiple:ke.bool,preventDropOnDocument:ke.bool,noClick:ke.bool,noKeyboard:ke.bool,noDrag:ke.bool,noDragEventsBubbling:ke.bool,minSize:ke.number,maxSize:ke.number,maxFiles:ke.number,disabled:ke.bool,getFilesFromEvent:ke.func,onFileDialogCancel:ke.func,onFileDialogOpen:ke.func,useFsAccessApi:ke.bool,autoFocus:ke.bool,onDragEnter:ke.func,onDragLeave:ke.func,onDragOver:ke.func,onDrop:ke.func,onDropAccepted:ke.func,onDropRejected:ke.func,onError:ke.func,validator:ke.func};var Sc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Nb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=We(We({},jb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,h=t.onDrop,d=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,y=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,R=t.noDragEventsBubbling,A=t.onError,O=t.validator,I=w.useMemo(function(){return kk(n)},[n]),F=w.useMemo(function(){return Mk(n)},[n]),k=w.useMemo(function(){return typeof g=="function"?g:Vp},[g]),L=w.useMemo(function(){return typeof m=="function"?m:Vp},[m]),C=w.useRef(null),M=w.useRef(null),j=w.useReducer(Kk,Sc),_=vl(j,2),H=_[0],U=_[1],D=H.isFocused,$=H.isFileDialogActive,q=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&Dk()),J=function(){!q.current&&$&&setTimeout(function(){if(M.current){var re=M.current.files;re.length||(U({type:"closeDialog"}),L())}},300)};w.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[M,$,L,q]);var X=w.useRef([]),G=function(re){C.current&&C.current.contains(re.target)||(re.preventDefault(),X.current=[])};w.useEffect(function(){return y&&(document.addEventListener("dragover",Lp,!1),document.addEventListener("drop",G,!1)),function(){y&&(document.removeEventListener("dragover",Lp),document.removeEventListener("drop",G))}},[C,y]),w.useEffect(function(){return!r&&b&&C.current&&C.current.focus(),function(){}},[C,b,r]);var N=w.useCallback(function(Z){A?A(Z):console.error(Z)},[A]),B=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[].concat($k(X.current),[Z.target]),qs(Z)&&Promise.resolve(o(Z)).then(function(re){if(!(Ni(Z)&&!R)){var xe=re.length,Ne=xe>0&&Rk({files:re,accept:I,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:O}),ht=xe>0&&!Ne;U({isDragAccept:Ne,isDragReject:ht,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(re){return N(re)})},[o,c,N,R,I,i,s,a,l,O]),z=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=qs(Z);if(re&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return re&&f&&f(Z),!1},[f,R]),V=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=X.current.filter(function(Ne){return C.current&&C.current.contains(Ne)}),xe=re.indexOf(Z.target);xe!==-1&&re.splice(xe,1),X.current=re,!(re.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),qs(Z)&&u&&u(Z))},[C,u,R]),Y=w.useCallback(function(Z,re){var xe=[],Ne=[];Z.forEach(function(ht){var vt=Ob(ht,I),Ct=vl(vt,2),Qn=Ct[0],Tr=Ct[1],Sr=Db(ht,i,s),ks=vl(Sr,2),ya=ks[0],va=ks[1],ba=O?O(ht):null;if(Qn&&ya&&!ba)xe.push(ht);else{var xa=[Tr,va];ba&&(xa=xa.concat(ba)),Ne.push({file:ht,errors:xa.filter(function(C0){return C0})})}}),(!a&&xe.length>1||a&&l>=1&&xe.length>l)&&(xe.forEach(function(ht){Ne.push({file:ht,errors:[Pk]})}),xe.splice(0)),U({acceptedFiles:xe,fileRejections:Ne,type:"setFiles"}),h&&h(xe,Ne,re),Ne.length>0&&p&&p(Ne,re),xe.length>0&&d&&d(xe,re)},[U,a,I,i,s,l,h,d,p,O]),ee=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[],qs(Z)&&Promise.resolve(o(Z)).then(function(re){Ni(Z)&&!R||Y(re,Z)}).catch(function(re){return N(re)}),U({type:"reset"})},[o,Y,N,R]),W=w.useCallback(function(){if(q.current){U({type:"openDialog"}),k();var Z={multiple:a,types:F};window.showOpenFilePicker(Z).then(function(re){return o(re)}).then(function(re){Y(re,null),U({type:"closeDialog"})}).catch(function(re){Fk(re)?(L(re),U({type:"closeDialog"})):jk(re)?(q.current=!1,M.current?(M.current.value=null,M.current.click()):N(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."))):N(re)});return}M.current&&(U({type:"openDialog"}),k(),M.current.value=null,M.current.click())},[U,k,L,v,Y,N,F,a]),we=w.useCallback(function(Z){!C.current||!C.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),W())},[C,W]),Ue=w.useCallback(function(){U({type:"focus"})},[]),je=w.useCallback(function(){U({type:"blur"})},[]),Ge=w.useCallback(function(){S||(Ok()?setTimeout(W,0):W())},[S,W]),se=function(re){return r?null:re},me=function(re){return T?null:se(re)},oe=function(re){return E?null:se(re)},ye=function(re){R&&re.stopPropagation()},Qe=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,xe=re===void 0?"ref":re,Ne=Z.role,ht=Z.onKeyDown,vt=Z.onFocus,Ct=Z.onBlur,Qn=Z.onClick,Tr=Z.onDragEnter,Sr=Z.onDragOver,ks=Z.onDragLeave,ya=Z.onDrop,va=Li(Z,_k);return We(We(Tc({onKeyDown:me(qt(ht,we)),onFocus:me(qt(vt,Ue)),onBlur:me(qt(Ct,je)),onClick:se(qt(Qn,Ge)),onDragEnter:oe(qt(Tr,B)),onDragOver:oe(qt(Sr,z)),onDragLeave:oe(qt(ks,V)),onDrop:oe(qt(ya,ee)),role:typeof Ne=="string"&&Ne!==""?Ne:"presentation"},xe,C),!r&&!T?{tabIndex:0}:{}),va)}},[C,we,Ue,je,Ge,B,z,V,ee,T,E,r]),ve=w.useCallback(function(Z){Z.stopPropagation()},[]),ot=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,xe=re===void 0?"ref":re,Ne=Z.onChange,ht=Z.onClick,vt=Li(Z,Vk),Ct=Tc({accept:I,multiple:a,type:"file",style:{display:"none"},onChange:se(qt(Ne,ee)),onClick:se(qt(ht,ve)),tabIndex:-1},xe,M);return We(We({},Ct),vt)}},[M,n,a,ee,r]);return We(We({},H),{},{isFocused:D&&!r,getRootProps:Qe,getInputProps:ot,rootRef:C,inputRef:M,open:se(W)})}function Kk(e,t){switch(t.type){case"focus":return We(We({},e),{},{isFocused:!0});case"blur":return We(We({},e),{},{isFocused:!1});case"openDialog":return We(We({},Sc),{},{isFileDialogActive:!0});case"closeDialog":return We(We({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return We(We({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return We(We({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return We({},Sc);default:return e}}function Vp(){}const qk={isImage:e=>e.type.includes("image")},Xk=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(qk.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:vp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:vp(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(Ur,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Qr,{})})]}):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(vP,{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(Ur,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Qr,{className:"text-danger"})})]})},Qk=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(Xk,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),Zk=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(Qk,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),Jk=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(CP,{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"})]})]}),eF=({idle:e=Jk,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=f=>{n==null||n(f),s(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Nb({onDrop:i});return x.jsxs("div",{...a(),"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(Zk,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},tF=["INPUT","SELECT"],Ec=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{tF.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},nF=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})},rF=Sb("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
201
- `);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)}),oF=({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:De("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]}),vr=w.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:f,left:h,error:d,...p},m)=>{const g=Dt(),v=w.useRef(null),b=p.id??p.name;w.useImperativeHandle(m,()=>v.current),w.useEffect(()=>{if(v.current===null)return;const S=v.current,T=Hi(v.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const y=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return x.jsx(ua,{info:n,left:h,error:d,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:x.jsx("label",{htmlFor:b,children:x.jsxs("button",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(Ay,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:b,name:b,value:p.value,required:e,ref:Hc(m,v),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:De("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",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>x.jsx("option",{...S,children:S.label??S.value},`${b}-select-option-${S.value}`))]})})}),Cc=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},sF=w.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=w.useId(),[i,a]=w.useState(r.checked??!1),l=i,c=w.useRef(null),u=Cc(r.onChange);w.useImperativeHandle(o,()=>c.current),w.useEffect(()=>{if(c.current!==null&&u.current){const h=d=>{d.target.checked=!d.target.checked,u.current&&u.current(d)};return c.current.addEventListener("change",h),()=>{var d;return(d=c.current)==null?void 0:d.removeEventListener("change",h)}}},[]);const f=()=>{var d,p;const h=!((d=c.current)!=null&&d.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:De("flex flex-wrap items-center",t),"data-component":"switch",children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,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:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-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:n})]})}),iF=e=>{const[t,n]=rP();return w.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:lP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},fa=0,Kn=1,Do=2,Lb=4;function fs(e,t){return n=>e(t(n))}function aF(e,t){return t(e)}function _b(e,t){return n=>e(t,n)}function $p(e,t){return()=>e(t)}function da(e,t){return t(e),e}function Be(...e){return e}function lF(e){e()}function Bp(e){return()=>e}function cF(...e){return()=>{e.map(lF)}}function Qu(e){return e!==void 0}function xr(){}function Oe(e,t){return e(Kn,t)}function fe(e,t){e(fa,t)}function Zu(e){e(Do)}function wt(e){return e(Lb)}function ie(e,t){return Oe(e,_b(t,fa))}function dn(e,t){const n=e(Kn,r=>{n(),t(r)});return n}function ge(){const e=[];return(t,n)=>{switch(t){case Do:e.splice(0,e.length);return;case Kn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case fa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Q(e){let t=e;const n=ge();return(r,o)=>{switch(r){case Kn:o(t);break;case fa:t=o;break;case Lb:return t}return n(r,o)}}function uF(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Kn:return s?n===s?void 0:(r(),n=s,t=Oe(e,s),t):(r(),xr);case Do:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function jt(e){return da(ge(),t=>ie(e,t))}function Tt(e,t){return da(Q(t),n=>ie(e,n))}function fF(...e){return t=>e.reduceRight(aF,t)}function K(e,...t){const n=fF(...t);return(r,o)=>{switch(r){case Kn:return Oe(e,n(o));case Do:Zu(e);return}}}function Vb(e,t){return e===t}function $e(e=Vb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function le(e){return t=>n=>{e(n)&&t(n)}}function ne(e){return t=>fs(t,e)}function Jt(e){return t=>()=>t(e)}function on(e,t){return n=>r=>n(t=e(t,r))}function io(e){return t=>n=>{e>0?e--:t(n)}}function Mn(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Wp(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function de(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Oe(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function Hp(...e){return function(t,n){switch(t){case Kn:return cF(...e.map(r=>Oe(r,n)));case Do:return;default:throw new Error(`unrecognized action ${t}`)}}}function ce(e,t=Vb){return K(e,$e(t))}function dt(...e){const t=ge(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Oe(s,l=>{n[i]=l,r=r|a,r===o&&fe(t,n)})}),function(s,i){switch(s){case Kn:return r===o&&i(n),Oe(t,i);case Do:return Zu(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:dF(),constructor:e,dependencies:t,singleton:n}}const dF=()=>Symbol();function hF(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function pF(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const Xs=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Ju(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(v,b){v.propsReady&&fe(v.propsReady,!1);for(const y of r){const S=v[t.required[y]];fe(S,b[y])}for(const y of o)if(y in b){const S=v[t.optional[y]];fe(S,b[y])}v.propsReady&&fe(v.propsReady,!0)}function c(v){return s.reduce((b,y)=>(b[y]=S=>{const T=v[t.methods[y]];fe(T,S)},b),{})}function u(v){return i.reduce((b,y)=>(b[y]=uF(v[t.events[y]]),b),{})}const f=w.forwardRef((v,b)=>{const{children:y,...S}=v,[T]=w.useState(()=>da(hF(e),R=>l(R,S))),[E]=w.useState($p(u,T));return Xs(()=>{for(const R of i)R in S&&Oe(E[R],S[R]);return()=>{Object.values(E).map(Zu)}},[S,E,T]),Xs(()=>{l(T,S)}),w.useImperativeHandle(b,Bp(c(T))),w.createElement(a.Provider,{value:T},n?w.createElement(n,pF([...r,...o,...i],S),y):y)}),h=v=>w.useCallback(_b(fe,w.useContext(a)[v]),[v]),d=v=>{const y=w.useContext(a)[v],S=w.useCallback(T=>Oe(y,T),[y]);return w.useSyncExternalStore(S,()=>wt(y),()=>wt(y))},p=v=>{const y=w.useContext(a)[v],[S,T]=w.useState($p(wt,y));return Xs(()=>Oe(y,E=>{E!==S&&T(Bp(E))}),[y,S]),S},m=w.version.startsWith("18")?d:p;return{Component:f,usePublisher:h,useEmitterValue:m,useEmitter:(v,b)=>{const S=w.useContext(a)[v];Xs(()=>Oe(S,b),[b,S])}}}const mF=typeof document<"u"?w.useLayoutEffect:w.useEffect,gF=mF;var Nt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Nt||{});const yF={0:"debug",1:"log",2:"warn",3:"error"},vF=()=>typeof globalThis>"u"?window:globalThis,qn=Ce(()=>{const e=Q(3);return{log:Q((n,r,o=1)=>{var s;const i=(s=vF().VIRTUOSO_LOG_LEVEL)!=null?s:wt(e);o>=i&&console[yF[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function ef(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function hn(e,t=!0){return ef(e,t).callbackRef}function $b(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=bF(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",h=i?i.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,d=i?i.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:d,viewportHeight:p}),s==null||s(xF("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return ef(a,n)}function bF(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Nt.ERROR),u===c)continue;const f=s[s.length-1];s.length===0||f.size!==u||f.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function xF(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Nt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Yt(e,t){return Math.round(e.getBoundingClientRect()[t])}function Bb(e,t){return Math.abs(e-t)<1.01}function Wb(e,t,n,r=xr,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(f=>{const h=f.target,d=h===window||h===document,p=d?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=d?document.documentElement.scrollHeight:h.scrollHeight,g=d?window.innerHeight:h.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};f.suppressFlushSync?v():jc.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-g)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const f=o||s.current;return r(o||s.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(f){const h=s.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const d=f.behavior==="smooth";let p,m,g;h===window?(m=Math.max(Yt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=h.scrollHeight,p=Yt(h,"height"),g=h.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),Bb(p,m)||f.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),d&&t(!0);return}d?(i.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,h.scrollTo(f)}function u(f){s.current.scrollBy(f)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Rt=Ce(()=>{const e=ge(),t=ge(),n=Q(0),r=ge(),o=Q(0),s=ge(),i=ge(),a=Q(0),l=Q(0),c=Q(0),u=Q(0),f=ge(),h=ge(),d=Q(!1);return ie(K(e,ne(({scrollTop:p})=>p)),t),ie(K(e,ne(({scrollHeight:p})=>p)),i),ie(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:f,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),ds={lvl:0};function Hb(e,t,n,r=ds,o=ds){return{k:e,v:t,lvl:n,l:r,r:o}}function Fe(e){return e===ds}function $r(){return ds}function Pc(e,t){if(Fe(e))return ds;const{k:n,l:r,r:o}=e;if(t===n){if(Fe(r))return o;if(Fe(o))return r;{const[s,i]=zb(r);return ai(it(e,{k:s,v:i,l:Ub(r)}))}}else return t<n?ai(it(e,{l:Pc(r,t)})):ai(it(e,{r:Pc(o,t)}))}function hs(e,t){if(!Fe(e))return t===e.k?e.v:t<e.k?hs(e.l,t):hs(e.r,t)}function Kt(e,t,n="k"){if(Fe(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Kt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Kt(e.l,t,n)}function Ft(e,t,n){return Fe(e)?Hb(t,n,1):t===e.k?it(e,{k:t,v:n}):t<e.k?zp(it(e,{l:Ft(e.l,t,n)})):zp(it(e,{r:Ft(e.r,t,n)}))}function Rc(e,t,n){if(Fe(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Rc(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Rc(i,t,n))),a}function cr(e){return Fe(e)?[]:[...cr(e.l),{k:e.k,v:e.v},...cr(e.r)]}function zb(e){return Fe(e.r)?[e.k,e.v]:zb(e.r)}function Ub(e){return Fe(e.r)?e.l:ai(it(e,{r:Ub(e.r)}))}function it(e,t){return Hb(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 bl(e){return Fe(e)||e.lvl>e.r.lvl}function zp(e){return Ic(Yb(e))}function ai(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(bl(t))return Yb(it(e,{lvl:r-1}));if(!Fe(t)&&!Fe(t.r))return it(t.r,{l:it(t,{r:t.r.l}),r:it(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(bl(e))return Ic(it(e,{lvl:r-1}));if(!Fe(n)&&!Fe(n.l)){const o=n.l,s=bl(o)?n.lvl-1:n.lvl;return it(o,{l:it(e,{r:o.l,lvl:r-1}),r:Ic(it(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ha(e,t,n){if(Fe(e))return[];const r=Kt(e,t)[0];return wF(Rc(e,r,n))}function Gb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function wF(e){return Gb(e,({k:t,v:n})=>({index:t,value:n}))}function Ic(e){const{r:t,lvl:n}=e;return!Fe(t)&&!Fe(t.r)&&t.lvl===n&&t.r.lvl===n?it(t,{l:it(e,{r:t.l}),lvl:n+1}):e}function Yb(e){const{l:t}=e;return!Fe(t)&&t.lvl===e.lvl?it(t,{r:it(e,{l:t.r})}):e}function _i(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Kb(e,t,n){return e[_i(e,t,n)]}function TF(e,t,n,r){const o=_i(e,t,r),s=_i(e,n,r,o);return e.slice(o,s+1)}const tf=Ce(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function SF(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function Up(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 EF(e,t){let n=Fe(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Fe(e)){e=Ft(e,0,o);continue}const a=ha(e,s-1,i+1);if(a.some(SF(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:h}of a)l?(i>=u||o===h)&&(e=Pc(e,u)):(c=h!==o,l=!0),f>i&&i>=u&&h!==o&&(e=Ft(e,i+1,h));c&&(e=Ft(e,s,o))}return[e,n]}function CF(){return{offsetTree:[],sizeTree:$r(),groupOffsetTree:$r(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function nf({index:e},t){return t===e?0:t<e?-1:1}function PF({offset:e},t){return t===e?0:t<e?-1:1}function RF(e){return{index:e.index,value:e}}function IF(e,t,n,r=0){return r>0&&(t=Math.max(t,Kb(e,r,nf).offset)),Gb(TF(e,t,n,PF),RF)}function Ac(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=_i(o,t-1,nf),a=o[l].offset;const u=Kt(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===Kt(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ha(n,t,1/0)){const f=c-s,h=f*i+a+f*r;o.push({offset:h,size:u,index:c}),s=c,a=h,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function AF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Nt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Fe(s)&&t.length===2){const h=t[0].size,d=t[1].size;i=n.reduce((p,m)=>Ft(Ft(p,m,h),m+1,d),i)}else[i,a]=EF(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Ac(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Ft(h,d,ps(d,l,o)),$r()),groupIndices:n}}function ps(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Kb(t,e,nf),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function OF(e){return typeof e.groupIndex<"u"}function qb(e,t,n){if(OF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Xb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Xb(e,t){if(!pa(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function pa(e){return!Fe(e.groupOffsetTree)}function DF(e){return cr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const MF={offsetHeight:"height",offsetWidth:"width"},mn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ge(),r=ge(),o=Tt(r,0),s=ge(),i=ge(),a=Q(0),l=Q([]),c=Q(void 0),u=Q(void 0),f=Q((T,E)=>Yt(T,MF[E])),h=Q(void 0),d=Q(0),p=CF(),m=Tt(K(n,de(l,e,d),on(AF,p),$e()),p),g=Tt(K(l,$e(),on((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ne(({prev:T})=>T)),[]);ie(K(l,le(T=>T.length>0),de(m,d),ne(([T,E,R])=>{const A=T.reduce((O,I,F)=>Ft(O,I,ps(I,E.offsetTree,R)||F),$r());return{...E,groupIndices:T,groupOffsetTree:A}})),m),ie(K(r,de(m),le(([T,{lastIndex:E}])=>T<E),ne(([T,{lastIndex:E,lastSize:R}])=>[{startIndex:T,endIndex:E,size:R}])),n),ie(c,u);const v=Tt(K(c,ne(T=>T===void 0)),!0);ie(K(u,le(T=>T!==void 0&&Fe(wt(m).sizeTree)),ne(T=>[{startIndex:0,endIndex:0,size:T}])),n);const b=jt(K(n,de(m),on(({sizes:T},[E,R])=>({changed:R!==T,sizes:R}),{changed:!1,sizes:p}),ne(T=>T.changed)));Oe(K(a,on((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),ne(T=>T.diff)),T=>{const{groupIndices:E}=wt(m);if(T>0)fe(t,!0),fe(s,T+Up(T,E));else if(T<0){const R=wt(g);R.length>0&&(T-=Up(-T,R)),fe(i,T)}}),Oe(K(a,de(e)),([T,E])=>{T<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Nt.ERROR)});const y=jt(s);ie(K(s,de(m),ne(([T,E])=>{const R=E.groupIndices.length>0,A=[],O=E.lastSize;if(R){const I=hs(E.sizeTree,0);let F=0,k=0;for(;F<T;){const M=E.groupIndices[k],j=E.groupIndices.length===k+1?1/0:E.groupIndices[k+1]-M-1;A.push({startIndex:M,endIndex:M,size:I}),A.push({startIndex:M+1,endIndex:M+1+j-1,size:O}),k++,F+=j+1}const L=cr(E.sizeTree);return F!==T&&L.shift(),L.reduce((M,{k:j,v:_})=>{let H=M.ranges;return M.prevSize!==0&&(H=[...M.ranges,{startIndex:M.prevIndex,endIndex:j+T-1,size:M.prevSize}]),{ranges:H,prevIndex:j+T,prevSize:_}},{ranges:A,prevIndex:T,prevSize:0}).ranges}return cr(E.sizeTree).reduce((I,{k:F,v:k})=>({ranges:[...I.ranges,{startIndex:I.prevIndex,endIndex:F+T-1,size:I.prevSize}],prevIndex:F+T,prevSize:k}),{ranges:[],prevIndex:0,prevSize:O}).ranges})),n);const S=jt(K(i,de(m,d),ne(([T,{offsetTree:E},R])=>{const A=-T;return ps(A,E,R)})));return ie(K(i,de(m,d),ne(([T,E,R])=>{if(E.groupIndices.length>0){if(Fe(E.sizeTree))return E;let O=$r();const I=wt(g);let F=0,k=0,L=0;for(;F<-T;){L=I[k];const M=I[k+1]-L-1;k++,F+=M+1}if(O=cr(E.sizeTree).reduce((M,{k:j,v:_})=>Ft(M,Math.max(0,j+T),_),O),F!==-T){const M=hs(E.sizeTree,L);O=Ft(O,0,M);const j=Kt(E.sizeTree,-T+1)[1];O=Ft(O,1,j)}return{...E,sizeTree:O,...Ac(E.offsetTree,0,O,R)}}else{const O=cr(E.sizeTree).reduce((I,{k:F,v:k})=>Ft(I,Math.max(0,F+T),k),$r());return{...E,sizeTree:O,...Ac(E.offsetTree,0,O,R)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:y,firstItemIndex:a,gap:d,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},Be(qn,tf),{singleton:!0}),kF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Qb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!kF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Os=Ce(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:h}])=>{const d=ge(),p=ge(),m=Q(0);let g=null,v=null,b=null;function y(){g&&(g(),g=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),fe(o,!1)}return ie(K(d,de(e,s,t,m,l,c,h),de(r,u,f),ne(([[S,T,E,R,A,O,I,F],k,L,C])=>{const M=Qb(S),{align:j,behavior:_,offset:H}=M,U=R-1,D=qb(M,T,U);let $=ps(D,T.offsetTree,k)+O;j==="end"?($+=L+Kt(T.sizeTree,D)[1]-E+C,D===U&&($+=I)):j==="center"?$+=(L+Kt(T.sizeTree,D)[1]-E+C)/2:$-=A,H&&($+=H);const q=J=>{y(),J?(F("retrying to scroll to",{location:S},Nt.DEBUG),fe(d,S)):(fe(p,!0),F("list did not change, scroll successful",{},Nt.DEBUG))};if(y(),_==="smooth"){let J=!1;b=Oe(n,X=>{J=J||X}),g=dn(a,()=>{q(J)})}else g=dn(K(n,FF(150)),q);return v=setTimeout(()=>{y()},1200),fe(o,!0),F("scrolling from index to",{index:D,top:$,behavior:_},Nt.DEBUG),{top:$,behavior:_}})),i),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},Be(mn,Rt,qn),{singleton:!0});function FF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ms="up",Jo="down",jF="none",NF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},LF=0,Ds=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=Q(!1),a=Q(!0),l=ge(),c=ge(),u=Q(4),f=Q(LF),h=Tt(K(Hp(K(ce(t),io(1),Jt(!0)),K(ce(t),io(1),Jt(!1),Wp(100))),$e()),!1),d=Tt(K(Hp(K(s,Jt(!0)),K(s,Jt(!1),Wp(200))),$e()),!1);ie(K(dt(ce(t),ce(f)),ne(([b,y])=>b<=y),$e()),a),ie(K(a,Mn(50)),c);const p=jt(K(dt(e,ce(n),ce(r),ce(o),ce(u)),on((b,[{scrollTop:y,scrollHeight:S},T,E,R,A])=>{const O=y+T-S>-A,I={viewportHeight:T,scrollTop:y,scrollHeight:S};if(O){let k,L;return y>b.state.scrollTop?(k="SCROLLED_DOWN",L=b.state.scrollTop-y):(k="SIZE_DECREASED",L=b.state.scrollTop-y||b.scrollTopDelta),{atBottom:!0,state:I,atBottomBecause:k,scrollTopDelta:L}}let F;return I.scrollHeight>b.state.scrollHeight?F="SIZE_INCREASED":T<b.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":y<b.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:I}},NF),$e((b,y)=>b&&b.atBottom===y.atBottom))),m=Tt(K(e,on((b,{scrollTop:y,scrollHeight:S,viewportHeight:T})=>{if(Bb(b.scrollHeight,S))return{scrollTop:y,scrollHeight:S,jump:0,changed:!1};{const E=S-(y+T)<1;return b.scrollTop!==y&&E?{scrollHeight:S,scrollTop:y,jump:b.scrollTop-y,changed:!0}:{scrollHeight:S,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),le(b=>b.changed),ne(b=>b.jump)),0);ie(K(p,ne(b=>b.atBottom)),i),ie(K(i,Mn(50)),l);const g=Q(Jo);ie(K(e,ne(({scrollTop:b})=>b),$e(),on((b,y)=>wt(d)?{direction:b.direction,prevScrollTop:y}:{direction:y<b.prevScrollTop?ms:Jo,prevScrollTop:y},{direction:Jo,prevScrollTop:0}),ne(b=>b.direction)),g),ie(K(e,Mn(50),Jt(jF)),g);const v=Q(0);return ie(K(h,le(b=>!b),Jt(0)),v),ie(K(t,Mn(100),de(h),le(([b,y])=>!!y),on(([b,y],[S])=>[y,S],[0,0]),ne(([b,y])=>y-b)),v),{isScrolling:h,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},Be(Rt)),Xn=Ce(([{log:e}])=>{const t=Q(!1),n=jt(K(t,le(r=>r),$e()));return Oe(t,r=>{r&&wt(e)("props updated",{},Nt.DEBUG)}),{propsReady:t,didMount:n}},Be(qn),{singleton:!0});function rf(e,t){e==0?t():requestAnimationFrame(()=>rf(e-1,t))}function of(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ms=Ce(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=Q(!0),l=Q(0),c=Q(!0);return ie(K(i,de(l),le(([u,f])=>!!f),Jt(!1)),a),ie(K(i,de(l),le(([u,f])=>!!f),Jt(!1)),c),Oe(K(dt(t,i),de(a,e,n,c),le(([[,u],f,{sizeTree:h},d,p])=>u&&(!Fe(h)||Qu(d))&&!f&&!p),de(l)),([,u])=>{dn(s,()=>{fe(c,!0)}),rf(4,()=>{dn(r,()=>{fe(a,!0)}),fe(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Be(mn,Rt,Os,Xn),{singleton:!0});function Gp(e){return e?e==="smooth"?"smooth":"auto":!1}const _F=(e,t)=>typeof e=="function"?Gp(e(t)):t&&Gp(e),VF=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=Q(!1),f=ge();let h=null;function d(m){fe(o,{index:"LAST",align:"end",behavior:m})}Oe(K(dt(K(ce(e),io(1)),a),de(ce(u),n,s,c),ne(([[m,g],v,b,y,S])=>{let T=g&&y,E="auto";return T&&(E=_F(v,b||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),le(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{h&&(h(),h=null),h=dn(t,()=>{wt(l)("following output to ",{totalCount:m},Nt.DEBUG),d(g),h=null})});function p(m){const g=dn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(wt(l)("scrolling to bottom due to increased size",{},Nt.DEBUG),d("auto"))});setTimeout(g,100)}return Oe(K(dt(ce(u),e,i),le(([m,,g])=>m&&g),on(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),le(({refreshed:m})=>m),de(u,e)),([,m])=>{wt(s)&&p(m!==!1)}),Oe(f,()=>{p(wt(u)!==!1)}),Oe(dt(ce(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&d("auto")}),{followOutput:u,autoscrollToBottom:f}},Be(mn,Ds,Os,Ms,Xn,qn,Rt));function $F(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Zb=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=ge(),i=ge(),a=jt(K(s,ne($F)));return ie(K(a,ne(l=>l.totalCount)),e),ie(K(a,ne(l=>l.groupIndices)),t),ie(K(dt(r,n,o),le(([l,c])=>pa(c)),ne(([l,c,u])=>Kt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),$e(),ne(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Be(mn,Rt));function gs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Jb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Vi="top",$i="bottom",Yp="none";function Kp(e,t,n){return typeof e=="number"?n===ms&&t===Vi||n===Jo&&t===$i?e:0:n===ms?t===Vi?e.main:e.reverse:t===$i?e.main:e.reverse}function qp(e,t){return typeof e=="number"?e:e[t]||0}const sf=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=ge(),i=Q(0),a=Q(0),l=Q(0),c=Tt(K(dt(ce(e),ce(t),ce(r),ce(s,gs),ce(l),ce(i),ce(o),ce(n),ce(a)),ne(([u,f,h,[d,p],m,g,v,b,y])=>{const S=u-b,T=g+v,E=Math.max(h-S,0);let R=Yp;const A=qp(y,Vi),O=qp(y,$i);return d-=b,d+=h+v,p+=h+v,p-=b,d>u+T-A&&(R=ms),p<u-E+f+O&&(R=Jo),R!==Yp?[Math.max(S-h-Kp(m,Vi,R)-A,0),S-E-v+f+Kp(m,$i,R)+O]:null}),le(u=>u!=null),$e(gs)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Be(Rt),{singleton:!0});function BF(e,t,n){if(pa(t)){const r=Xb(e,t);return[{index:Kt(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const xl={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Xp(e,t,n){if(e.length===0)return[];if(!pa(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=ha(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function li(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-l,h=a+f*i+(f-1)*r,d=c,p=h-u;return{items:Xp(e,o,s),topItems:Xp(t,o,s),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:s}}function e0(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=of(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:s[f+l]}));return li(c,[],a,o,n,r)}const wr=Ce(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},h,{didMount:d},{recalcInProgress:p}])=>{const m=Q([]),g=Q(0),v=ge();ie(s.topItemsIndexes,m);const b=Tt(K(dt(d,p,ce(i,gs),ce(t),ce(e),ce(u),c,ce(m),ce(r),ce(o),n),le(([E,R,,A,,,,,,,O])=>{const I=O&&O.length!==A;return E&&!R&&!I}),ne(([,,[E,R],A,O,I,F,k,L,C,M])=>{const j=O,{sizeTree:_,offsetTree:H}=j,U=wt(g);if(A===0)return{...xl,totalCount:A};if(E===0&&R===0)return U===0?{...xl,totalCount:A}:e0(U,I,O,L,C,M||[]);if(Fe(_))return U>0?null:li(BF(of(I,A),j,M),[],A,C,j,L);const D=[];if(k.length>0){const G=k[0],N=k[k.length-1];let B=0;for(const z of ha(_,G,N)){const V=z.value,Y=Math.max(z.start,G),ee=Math.min(z.end,N);for(let W=Y;W<=ee;W++)D.push({index:W,size:V,offset:B,data:M&&M[W]}),B+=V}}if(!F)return li([],D,A,C,j,L);const $=k.length>0?k[k.length-1]+1:0,q=IF(H,E,R,$);if(q.length===0)return null;const J=A-1,X=da([],G=>{for(const N of q){const B=N.value;let z=B.offset,V=N.start;const Y=B.size;if(B.offset<E){V+=Math.floor((E-B.offset+C)/(Y+C));const W=V-N.start;z+=W*Y+W*C}V<$&&(z+=($-V)*Y,V=$);const ee=Math.min(N.end,J);for(let W=V;W<=ee&&!(z>=R);W++)G.push({index:W,size:Y,offset:z,data:M&&M[W]}),z+=Y+C}});return li(X,D,A,C,j,L)}),le(E=>E!==null),$e()),xl);ie(K(n,le(Qu),ne(E=>E==null?void 0:E.length)),t),ie(K(b,ne(E=>E.topListHeight)),f),ie(f,l),ie(K(b,ne(E=>[E.top,E.bottom])),a),ie(K(b,ne(E=>E.items)),v);const y=jt(K(b,le(({items:E})=>E.length>0),de(t,n),le(([{items:E},R])=>E[E.length-1].originalIndex===R-1),ne(([,E,R])=>[E-1,R]),$e(gs),ne(([E])=>E))),S=jt(K(b,Mn(200),le(({items:E,topItems:R})=>E.length>0&&E[0].originalIndex===R.length),ne(({items:E})=>E[0].index),$e())),T=jt(K(b,le(({items:E})=>E.length>0),ne(({items:E})=>{let R=0,A=E.length-1;for(;E[R].type==="group"&&R<A;)R++;for(;E[A].type==="group"&&A>R;)A--;return{startIndex:E[R].index,endIndex:E[A].index}}),$e(Jb)));return{listState:b,topItemsIndexes:m,endReached:y,startReached:S,rangeChanged:T,itemsRendered:v,initialItemCount:g,...h}},Be(mn,Zb,sf,Ms,Os,Ds,Xn,tf),{singleton:!0}),WF=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ie(K(a,de(s),le(([,l])=>l!==0),de(o,e,t,r,n),ne(([[,l],c,u,f,h,d=[]])=>e0(l,c,u,f,h,d))),i),{}),Be(mn,Ms,wr,Xn),{singleton:!0}),t0=Ce(([{scrollVelocity:e}])=>{const t=Q(!1),n=ge(),r=Q(!1);return ie(K(e,de(r,t,n),le(([o,s])=>!!s),ne(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),$e()),t),Oe(K(dt(t,e,n),de(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Be(Ds),{singleton:!0}),HF=Ce(([{topItemsIndexes:e}])=>{const t=Q(0);return ie(K(t,le(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Be(wr)),n0=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=ge(),i=Tt(K(dt(e,r,t,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ie(ce(i),s),{totalListHeight:i,totalListHeightChanged:s}},Be(Rt,wr),{singleton:!0});function r0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const zF=r0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),UF=Ce(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:h},{log:d},{recalcInProgress:p}])=>{const m=jt(K(l,de(a),on(([,v,b,y],[{items:S,totalCount:T,bottom:E,offsetBottom:R},A])=>{const O=E+R;let I=0;return b===T&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(I=O-y,I!==0&&(I+=A))),[I,S,T,O]},[0,[],0,0]),le(([v])=>v!==0),de(t,i,r,s,d,p),le(([,v,b,y,,,S])=>!S&&!y&&v!==0&&b===ms),ne(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},Nt.DEBUG),v))));function g(v){v>0?(fe(e,{top:-v,behavior:"auto"}),fe(n,0)):(fe(n,0),fe(e,{top:-v,behavior:"auto"}))}return Oe(K(m,de(n,o)),([v,b,y])=>{y&&zF()?fe(n,b-v):g(-v)}),Oe(K(dt(Tt(o,!1),n,p),le(([v,b,y])=>!v&&!y&&b!==0),ne(([v,b])=>b),Mn(1)),g),ie(K(u,ne(v=>({top:-v}))),e),Oe(K(c,de(f,h),ne(([v,{lastSize:b,groupIndices:y,sizeTree:S},T])=>{function E(R){return R*(b+T)}if(y.length===0)return E(v);{let R=0;const A=hs(S,0);let O=0,I=0;for(;O<v;){O++,R+=A;let F=y.length===I+1?1/0:y[I+1]-y[I]-1;O+F>v&&(R-=A,F=v-O+1),O+=F,R+=E(F),I++}return R}})),v=>{fe(n,v),requestAnimationFrame(()=>{fe(e,{top:v}),requestAnimationFrame(()=>{fe(n,0),fe(p,!1)})})}),{deviation:n}},Be(Rt,Ds,wr,mn,qn,tf)),GF=Ce(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Q(0);return Oe(K(e,de(r),le(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{dn(K(n,io(1),le(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{fe(t,o)})})}),{initialScrollTop:r}},Be(Xn,Rt,wr),{singleton:!0}),YF=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Q(!1),r=Tt(K(dt(n,e,t),le(([o])=>o),ne(([,o,s])=>Math.max(0,o-s)),Mn(0),$e()),0);return{alignToBottom:n,paddingTopAddition:r}},Be(Rt,n0),{singleton:!0}),af=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ge(),r=ge(),o=ge(),s=Q(!1),i=Q(void 0);return ie(K(dt(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ie(K(e,de(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Be(Rt)),KF=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,qF=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=ge();return ie(K(u,de(e,o,t,s,i,a,r),de(n),ne(([[f,h,d,p,m,g,v,b],y])=>{const{done:S,behavior:T,align:E,calculateViewLocation:R=KF,...A}=f,O=qb(f,h,p-1),I=ps(O,h.offsetTree,y)+m+g,F=I+Kt(h.sizeTree,O)[1],k=b+g,L=b+d-v,C=R({itemTop:I,itemBottom:F,viewportTop:k,viewportBottom:L,locationParams:{behavior:T,align:E,...A}});return C?S&&dn(K(l,le(M=>M===!1),io(wt(l)?1:2)),S):S&&S(),C}),le(f=>f!==null)),c),{scrollIntoView:u}},Be(mn,Rt,Os,wr,qn),{singleton:!0}),XF=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=ge(),u=Q(void 0),f=Q(null),h=Q(null);return ie(a,f),ie(l,h),Oe(K(c,de(e,n,i,f,h,r)),([d,p,m,g,v,b,y])=>{const S=DF(p.sizeTree);g&&v!==null&&b!==null&&(m=v.scrollTop-b.offsetTop),m-=y,d({ranges:S,scrollTop:m})}),ie(K(u,le(Qu),ne(QF)),o),ie(K(s,de(u),le(([,d])=>d!==void 0),$e(),ne(([,d])=>d.ranges)),t),{getState:c,restoreStateFrom:u}},Be(mn,Rt,Ms,Xn,af));function QF(e){return{offset:e.scrollTop,index:0,align:"start"}}const ZF=Ce(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Be(sf,WF,Xn,t0,n0,GF,YF,af,qF,qn)),o0=Ce(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p},m,g,v,{listState:b,topItemsIndexes:y,...S},{scrollToIndex:T},E,{topItemCount:R},{groupCounts:A},O])=>(ie(S.rangeChanged,O.scrollSeekRangeChanged),ie(K(O.windowViewportRect,ne(I=>I.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:R,groupCounts:A,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:b,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...O,...m,sizes:f,...g}),Be(mn,Ms,Rt,XF,VF,wr,Os,UF,HF,Zb,ZF)),wl="-webkit-sticky",Qp="sticky",s0=r0(()=>{if(typeof document>"u")return Qp;const e=document.createElement("div");return e.style.position=wl,e.style.position===wl?wl:Qp});function lf(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(t){const h=t.getBoundingClientRect(),d=l.top-h.top;u=h.height-Math.max(0,d),f=d+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=ef(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const ma=w.createContext(void 0),i0=w.createContext(void 0);function cf(e){return e}const JF=Ce(()=>{const e=Q(l=>`Item ${l}`),t=Q(null),n=Q(l=>`Group ${l}`),r=Q({}),o=Q(cf),s=Q("div"),i=Q(xr),a=(l,c=null)=>Tt(K(r,ne(u=>u[l]),$e()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),ej=Ce(([e,t])=>({...e,...t}),Be(o0,JF)),tj=({height:e})=>w.createElement("div",{style:{height:e}}),nj={position:s0(),zIndex:1,overflowAnchor:"none"},rj={overflowAnchor:"none"},Zp=w.memo(function({showTopList:t=!1}){const n=pe("listState"),r=Wt("sizeRanges"),o=pe("useWindowScroll"),s=pe("customScrollParent"),i=Wt("windowScrollContainerState"),a=Wt("scrollContainerState"),l=s||o?i:a,c=pe("itemContent"),u=pe("context"),f=pe("groupContent"),h=pe("trackItemSizes"),d=pe("itemSize"),p=pe("log"),m=Wt("gap"),{callbackRef:g}=$b(r,d,h,t?xr:l,p,m,s),[v,b]=w.useState(0);df("deviation",C=>{v!==C&&b(C)});const y=pe("EmptyPlaceholder"),S=pe("ScrollSeekPlaceholder")||tj,T=pe("ListComponent"),E=pe("ItemComponent"),R=pe("GroupComponent"),A=pe("computeItemKey"),O=pe("isSeeking"),I=pe("groupIndices").length>0,F=pe("alignToBottom"),k=pe("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:F?"auto":0,...k?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?w.createElement(y,Ke(y,u)):w.createElement(T,{...Ke(T,u),ref:g,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(C=>{const M=C.originalIndex,j=A(M+n.firstItemIndex,C.data,u);return O?w.createElement(S,{...Ke(S,u),key:j,index:C.index,height:C.size,type:C.type||"item",...C.type==="group"?{}:{groupIndex:C.groupIndex}}):C.type==="group"?w.createElement(R,{...Ke(R,u),key:j,"data-index":M,"data-known-size":C.size,"data-item-index":C.index,style:nj},f(C.index,u)):w.createElement(E,{...Ke(E,u),...a0(E,C.data),key:j,"data-index":M,"data-known-size":C.size,"data-item-index":C.index,"data-item-group-index":C.groupIndex,style:rj},I?c(C.index,C.groupIndex,C.data,u):c(C.index,C.data,u))}))}),oj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Mo=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),sj={width:"100%",position:s0(),top:0,zIndex:1};function Ke(e,t){if(typeof e!="string")return{context:t}}function a0(e,t){return{item:typeof e=="string"?void 0:t}}const ij=w.memo(function(){const t=pe("HeaderComponent"),n=Wt("headerHeight"),r=pe("headerFooterTag"),o=hn(w.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=pe("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),aj=w.memo(function(){const t=pe("FooterComponent"),n=Wt("footerHeight"),r=pe("headerFooterTag"),o=hn(w.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=pe("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null});function uf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:m}=Wb(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:d,style:{...oj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ke(c,h)},i)})}function ff({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),d=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:v}=Wb(l,u,c,xr,d);return gF(()=>(m.current=d||window,()=>{m.current=null}),[m,d]),t("windowScrollTo",v),t("scrollBy",g),w.createElement(c,{style:{position:"relative",...s,...f!==0?{height:f+h}:{}},"data-virtuoso-scroller":!0,...a,...Ke(c,p)},i)})}const lj=({children:e})=>{const t=w.useContext(ma),n=Wt("viewportHeight"),r=Wt("fixedItemHeight"),o=pe("alignToBottom"),s=hn(w.useMemo(()=>fs(n,i=>Yt(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:Mo(o),ref:s,"data-viewport-type":"element"},e)},cj=({children:e})=>{const t=w.useContext(ma),n=Wt("windowViewportRect"),r=Wt("fixedItemHeight"),o=pe("customScrollParent"),s=lf(n,o),i=pe("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:Mo(i),"data-viewport-type":"window"},e)},uj=({children:e})=>{const t=pe("TopItemListComponent")||"div",n=pe("headerHeight"),r={...sj,marginTop:`${n}px`},o=pe("context");return w.createElement(t,{style:r,...Ke(t,o)},e)},fj=w.memo(function(t){const n=pe("useWindowScroll"),r=pe("topItemsIndexes").length>0,o=pe("customScrollParent"),s=o||n?pj:hj,i=o||n?cj:lj;return w.createElement(s,{...t},r&&w.createElement(uj,null,w.createElement(Zp,{showTopList:!0})),w.createElement(i,null,w.createElement(ij,null),w.createElement(Zp,null),w.createElement(aj,null)))}),{Component:dj,usePublisher:Wt,useEmitterValue:pe,useEmitter:df}=Ju(ej,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},fj),hj=uf({usePublisher:Wt,useEmitterValue:pe,useEmitter:df}),pj=ff({usePublisher:Wt,useEmitterValue:pe,useEmitter:df}),mj=dj,Jp={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},gj={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:em,ceil:tm,floor:Bi,min:Tl,max:es}=Math;function yj(e){return{...gj,items:e}}function nm(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function vj(e,t){return e&&e.column===t.column&&e.row===t.row}function Qs(e,t){return e&&e.width===t.width&&e.height===t.height}const bj=Ce(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,h,{propsReady:d,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:b,windowScrollTo:y},S])=>{const T=Q(0),E=Q(0),R=Q(Jp),A=Q({height:0,width:0}),O=Q({height:0,width:0}),I=ge(),F=ge(),k=Q(0),L=Q(null),C=Q({row:0,column:0}),M=ge(),j=ge(),_=Q(!1),H=Q(0),U=Q(!0),D=Q(!1);Oe(K(p,de(H),le(([N,B])=>!!B)),()=>{fe(U,!1),fe(E,0)}),Oe(K(dt(p,U,O,A,H,D),le(([N,B,z,V,,Y])=>N&&!B&&z.height!==0&&V.height!==0&&!Y)),([,,,,N])=>{fe(D,!0),rf(1,()=>{fe(I,N)}),dn(K(r),()=>{fe(n,[0,0]),fe(U,!0)})}),ie(K(j,le(N=>N!=null&&N.scrollTop>0),Jt(0)),E),Oe(K(p,de(j),le(([,N])=>N!=null)),([,N])=>{N&&(fe(A,N.viewport),fe(O,N==null?void 0:N.item),fe(C,N.gap),N.scrollTop>0&&(fe(_,!0),dn(K(r,io(1)),B=>{fe(_,!1)}),fe(i,{top:N.scrollTop})))}),ie(K(A,ne(({height:N})=>N)),o),ie(K(dt(ce(A,Qs),ce(O,Qs),ce(C,(N,B)=>N&&N.column===B.column&&N.row===B.row),ce(r)),ne(([N,B,z,V])=>({viewport:N,item:B,gap:z,scrollTop:V}))),M),ie(K(dt(ce(T),t,ce(C,vj),ce(O,Qs),ce(A,Qs),ce(L),ce(E),ce(_),ce(U),ce(H)),le(([,,,,,,,N])=>!N),ne(([N,[B,z],V,Y,ee,W,we,,Ue,je])=>{const{row:Ge,column:se}=V,{height:me,width:oe}=Y,{width:ye}=ee;if(we===0&&(N===0||ye===0))return Jp;if(oe===0){const Ct=of(je,N),Qn=Ct===0?Math.max(we-1,0):Ct;return yj(nm(Ct,Qn,W))}const Qe=l0(ye,oe,se);let ve,ot;Ue?B===0&&z===0&&we>0?(ve=0,ot=we-1):(ve=Qe*Bi((B+Ge)/(me+Ge)),ot=Qe*tm((z+Ge)/(me+Ge))-1,ot=Tl(N-1,es(ot,Qe-1)),ve=Tl(ot,es(0,ve))):(ve=0,ot=-1);const Z=nm(ve,ot,W),{top:re,bottom:xe}=rm(ee,V,Y,Z),Ne=tm(N/Qe),vt=Ne*me+(Ne-1)*Ge-xe;return{items:Z,offsetTop:re,offsetBottom:vt,top:re,bottom:xe,itemHeight:me,itemWidth:oe}})),R),ie(K(L,le(N=>N!==null),ne(N=>N.length)),T),ie(K(dt(A,O,R,C),le(([N,B,{items:z}])=>z.length>0&&B.height!==0&&N.height!==0),ne(([N,B,{items:z},V])=>{const{top:Y,bottom:ee}=rm(N,V,B,z);return[Y,ee]}),$e(gs)),n);const $=Q(!1);ie(K(r,de($),ne(([N,B])=>B||N!==0)),$);const q=jt(K(ce(R),le(({items:N})=>N.length>0),de(T,$),le(([{items:N},B,z])=>z&&N[N.length-1].index===B-1),ne(([,N])=>N-1),$e())),J=jt(K(ce(R),le(({items:N})=>N.length>0&&N[0].index===0),Jt(0),$e())),X=jt(K(ce(R),de(_),le(([{items:N},B])=>N.length>0&&!B),ne(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),$e(Jb),Mn(0)));ie(X,h.scrollSeekRangeChanged),ie(K(I,de(A,O,T,C),ne(([N,B,z,V,Y])=>{const ee=Qb(N),{align:W,behavior:we,offset:Ue}=ee;let je=ee.index;je==="LAST"&&(je=V-1),je=es(0,je,Tl(V-1,je));let Ge=Oc(B,Y,z,je);return W==="end"?Ge=em(Ge-B.height+z.height):W==="center"&&(Ge=em(Ge-B.height/2+z.height/2)),Ue&&(Ge+=Ue),{top:Ge,behavior:we}})),i);const G=Tt(K(R,ne(N=>N.offsetBottom+N.bottom)),0);return ie(K(m,ne(N=>({width:N.visibleWidth,height:N.visibleHeight}))),A),{data:L,totalCount:T,viewportDimensions:A,itemDimensions:O,scrollTop:r,scrollHeight:F,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:I,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:b,deviation:k,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:C,restoreStateFrom:j,...h,initialTopMostItemIndex:H,gridState:R,totalListHeight:G,...f,startReached:J,endReached:q,rangeChanged:X,stateChanged:M,propsReady:d,stateRestoreInProgress:_,...S}},Be(sf,Rt,Ds,t0,Xn,af,qn));function rm(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Oc(e,t,n,r[0].index),i=Oc(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Oc(e,t,n,r){const o=l0(e.width,n.width,t.column),s=Bi(r/o),i=s*n.height+es(0,s-1)*t.row;return i>0?i+t.row:i}function l0(e,t,n){return es(1,Bi((e+n)/(Bi(t)+n)))}const xj=Ce(()=>{const e=Q(c=>`Item ${c}`),t=Q({}),n=Q(null),r=Q("virtuoso-grid-item"),o=Q("virtuoso-grid-list"),s=Q(cf),i=Q("div"),a=Q(xr),l=(c,u=null)=>Tt(K(t,ne(f=>f[c]),$e()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),wj=Ce(([e,t])=>({...e,...t}),Be(bj,xj)),Tj=w.memo(function(){const t=He("gridState"),n=He("listClassName"),r=He("itemClassName"),o=He("itemContent"),s=He("computeItemKey"),i=He("isSeeking"),a=Ut("scrollHeight"),l=He("ItemComponent"),c=He("ListComponent"),u=He("ScrollSeekPlaceholder"),f=He("context"),h=Ut("itemDimensions"),d=Ut("gap"),p=He("log"),m=He("stateRestoreInProgress"),g=hn(w.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const y=v.firstChild;if(y){const{width:S,height:T}=y.getBoundingClientRect();h({width:S,height:T})}d({row:om("row-gap",getComputedStyle(v).rowGap,p),column:om("column-gap",getComputedStyle(v).columnGap,p)})},[a,h,d,p]));return m?null:w.createElement(c,{ref:g,className:n,...Ke(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const b=s(v.index,v.data,f);return i?w.createElement(u,{key:b,...Ke(u,f),index:v.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...Ke(l,f),className:r,"data-index":v.index,key:b},o(v.index,v.data,f))}))}),Sj=w.memo(function(){const t=He("HeaderComponent"),n=Ut("headerHeight"),r=He("headerFooterTag"),o=hn(w.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=He("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),Ej=w.memo(function(){const t=He("FooterComponent"),n=Ut("footerHeight"),r=He("headerFooterTag"),o=hn(w.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=He("context");return t?w.createElement(r,{ref:o},w.createElement(t,Ke(t,s))):null}),Cj=({children:e})=>{const t=w.useContext(i0),n=Ut("itemDimensions"),r=Ut("viewportDimensions"),o=hn(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:Mo(!1),ref:o},e)},Pj=({children:e})=>{const t=w.useContext(i0),n=Ut("windowViewportRect"),r=Ut("itemDimensions"),o=He("customScrollParent"),s=lf(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:Mo(!1)},e)},Rj=w.memo(function({...t}){const n=He("useWindowScroll"),r=He("customScrollParent"),o=r||n?Aj:Ij,s=r||n?Pj:Cj;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(Sj,null),w.createElement(Tj,null),w.createElement(Ej,null)))}),{Component:ML,usePublisher:Ut,useEmitterValue:He,useEmitter:c0}=Ju(wj,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},Rj),Ij=uf({usePublisher:Ut,useEmitterValue:He,useEmitter:c0}),Aj=ff({usePublisher:Ut,useEmitterValue:He,useEmitter:c0});function om(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Nt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Oj=Ce(()=>{const e=Q(l=>w.createElement("td",null,"Item $",l)),t=Q(null),n=Q(null),r=Q(null),o=Q({}),s=Q(cf),i=Q(xr),a=(l,c=null)=>Tt(K(o,ne(u=>u[l]),$e()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}),Dj=Ce(([e,t])=>({...e,...t}),Be(o0,Oj)),Mj=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),kj=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),Fj={overflowAnchor:"none"},jj=w.memo(function(){const t=Ie("listState"),n=Gt("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),s=Gt("windowScrollContainerState"),i=Gt("scrollContainerState"),a=o||r?s:i,l=Ie("itemContent"),c=Ie("trackItemSizes"),u=Ie("itemSize"),f=Ie("log"),{callbackRef:h,ref:d}=$b(n,u,c,a,f,void 0,o),[p,m]=w.useState(0);hf("deviation",j=>{p!==j&&(d.current.style.marginTop=`${j}px`,m(j))});const g=Ie("EmptyPlaceholder"),v=Ie("ScrollSeekPlaceholder")||Mj,b=Ie("FillerRow")||kj,y=Ie("TableBodyComponent"),S=Ie("TableRowComponent"),T=Ie("computeItemKey"),E=Ie("isSeeking"),R=Ie("paddingTopAddition"),A=Ie("firstItemIndex"),O=Ie("statefulTotalCount"),I=Ie("context");if(O===0&&g)return w.createElement(g,Ke(g,I));const F=t.offsetTop+R+p,k=t.offsetBottom,L=F>0?w.createElement(b,{height:F,key:"padding-top",context:I}):null,C=k>0?w.createElement(b,{height:k,key:"padding-bottom",context:I}):null,M=t.items.map(j=>{const _=j.originalIndex,H=T(_+A,j.data,I);return E?w.createElement(v,{...Ke(v,I),key:H,index:j.index,height:j.size,type:j.type||"item"}):w.createElement(S,{...Ke(S,I),...a0(S,j.data),key:H,"data-index":_,"data-known-size":j.size,"data-item-index":j.index,style:Fj},l(j.index,j.data,I))});return w.createElement(y,{ref:h,"data-testid":"virtuoso-item-list",...Ke(y,I)},[L,...M,C])}),Nj=({children:e})=>{const t=w.useContext(ma),n=Gt("viewportHeight"),r=Gt("fixedItemHeight"),o=hn(w.useMemo(()=>fs(n,s=>Yt(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:Mo(!1),ref:o,"data-viewport-type":"element"},e)},Lj=({children:e})=>{const t=w.useContext(ma),n=Gt("windowViewportRect"),r=Gt("fixedItemHeight"),o=Ie("customScrollParent"),s=lf(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:Mo(!1),"data-viewport-type":"window"},e)},_j=w.memo(function(t){const n=Ie("useWindowScroll"),r=Ie("customScrollParent"),o=Gt("fixedHeaderHeight"),s=Gt("fixedFooterHeight"),i=Ie("fixedHeaderContent"),a=Ie("fixedFooterContent"),l=Ie("context"),c=hn(w.useMemo(()=>fs(o,b=>Yt(b,"height")),[o])),u=hn(w.useMemo(()=>fs(s,b=>Yt(b,"height")),[s])),f=r||n?Bj:$j,h=r||n?Lj:Nj,d=Ie("TableComponent"),p=Ie("TableHeadComponent"),m=Ie("TableFooterComponent"),g=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Ke(p,l)},i()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ke(m,l)},a()):null;return w.createElement(f,{...t},w.createElement(h,null,w.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...Ke(d,l)},[g,w.createElement(jj,{key:"TableBody"}),v])))}),{Component:Vj,usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}=Ju(Dj,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},_j),$j=uf({usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}),Bj=ff({usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}),Wj=Vj,Hj=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},zj={Item:w.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},Uj=e=>{const t=w.useRef(null),n=Hj(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(Is,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(mj,{height:n,useWindowScroll:!0,data:e.source,components:zj,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(Tb,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(Ur,{children:x.jsx(bu,{})})}),x.jsx("div",{})]})};var Gj=Object.defineProperty,sm=Object.getOwnPropertySymbols,Yj=Object.prototype.hasOwnProperty,Kj=Object.prototype.propertyIsEnumerable,im=(e,t,n)=>t in e?Gj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qj=(e,t)=>{for(var n in t||(t={}))Yj.call(t,n)&&im(e,n,t[n]);if(sm)for(var n of sm(t))Kj.call(t,n)&&im(e,n,t[n]);return e},pf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Xj=(e,t,n,r)=>ga(pf,e,t,n,r),ao=e=>typeof e=="object",jn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ao(e)&&!ao(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=>jn(e[r],t[r]))},Qj=(e,t)=>(ao(e)||Array.isArray(e))&&t?e[t]:e,Zj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Wi=e=>/[0-9.]+/.test(e),am=e=>["string","number"].includes(typeof e),lm=e=>e==null||(e==null?void 0:e.length)===0||e==="",cm={eq:jn,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:lm,notEmpty:e=>!lm(e),in:(e,t)=>pf(t,n=>jn(e,n)),notIn:(e,t)=>u0(t,n=>!jn(e,n))},Jj=e=>{if(e in cm)return cm[e];throw new Error("Linq - Symbol not found")},Br=(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},ga=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=Jj(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},eN=(e,t,n,r)=>ga(Br,e,t,n,r),u0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},tN=(e,t,n,r)=>ga(u0,e,t,n,r),f0=e=>{if(e===null)return null;const t=qj({},e);return Object.keys(t).forEach(n=>t[n]=ao(e[n])?f0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},um=(e,t)=>{if(ao(t)){for(let n=0;n<e.length;n++){const r=e[n];if(jn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(jn(t,r))return!0}return!1},nN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},rN=e=>Br(e,(t,n,r)=>ao(t)?n===r.findIndex(o=>jn(o,t)):n===r.indexOf(t)),oN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},d0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},sN=(e,t)=>d0(e,n=>n[t]),fm=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},iN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},aN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Wi(e)&&Wi(t)?r.map(i=>Number.parseInt(i)):r},Sl=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Wi(e)&&Wi(t)){const o=[],[s,i]=iN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return aN(e,t,r)},lN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Sl(r,o,1):Sl(r,s,Number.parseInt(o,10))}return am(e)&&am(t)?Sl(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},El=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},dm=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 s=t[n];t[n]=t[r],t[r]=s}return t},cN=(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)},uN=(e,t,n,r)=>ga(cN,e,t,n,r),hm=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Zj(t))},h0=(e=>(e.Asc="asc",e.Desc="desc",e))(h0||{}),fN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),dN=(e,t)=>e.sort(fN(t)),hN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Br(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},pN=class Dc{constructor(t=[]){this.array=t}static Range(...t){return lN(...t)}static New(t){return new Dc(t)}Where(t,n,r){return this.array=eN(this.array,t,n,r),this}Some(t,n,r){return Xj(this.array,t,n,r)}All(t,n,r){return tN(this.array,t,n,r)}Reverse(){return this.array=dm(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=uN(this.array,t,n,r),this}Distinct(){return this.array=rN(this.array),this}First(t){return t===void 0?this.array[0]:oN(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?El((n,r)=>n+r,0,this.array):El((n,r)=>n+Qj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return sN(this.array,t)}GroupWith(t){return d0(this.array,t)}Except(t){return Br(this.array,n=>!um(t,n))}Intersect(t){return Br(this.array,n=>um(t,n))}OrderBy(t,n){let r;return r=t?hm(this.array,t):this.array.toSorted(),this.array=n==="desc"?dm(r):r,this}Includes(t){return pf(this.array,n=>jn(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 El(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(fm(this.array,n=>[t,n]))}Zip(t,n){return fm(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Br(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Dc(f0(this.array))}ToObject(t){return nN(this.array,t)}Sort(t){return Array.isArray(t)?dN(this.array,t):hm(this.array,t)}Unique(t){return hN(this.array,t)}},p0=pN,Mc={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(b){window.console.log(b)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const b=v.getItem(g);try{return JSON.parse(b)}catch{return b??null}},s=g=>Object.keys(g).reduce((v,b)=>({...v,[b]:o(b,g)}),{}),i=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},f=[{name:"expires",parse:g=>`expires=${i(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${i(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],h={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=h.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,b={})=>{const y=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=f.reduce((T,E)=>{const R=E.parse(b);return R===""?T:T.concat(R)},[`${encodeURIComponent(g)}=${y}`]).join(";");document.cookie=S,u()}},d=g=>{const v=new Set,b=y=>{g().removeItem(y);const S=s(g());v.forEach(T=>T(S))};return{delete:b,listener:y=>(v.add(y),()=>v.delete(y)),clearListeners:()=>v.clear(),json:(y=!1)=>y?s(g()):g(),has:y=>{const S=g().getItem(y);return!n(S)},deleteAll:()=>{t(g(),b),v.forEach(y=>y(g()))},get:y=>o(y,g()),set:(y,S)=>{g().setItem(y,JSON.stringify(S)),v.forEach(T=>T(g()))}}},p=d(()=>window.sessionStorage),m=d(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=d})(Mc);const mf=e=>e.headerLabel??e.thead??e.id,gf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Wr=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Wr||{});const yf=e=>e.type==="number"?e.valueAsNumber:e.value,mN=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},gN={},yN=(e,t)=>{if(!Array.isArray(t))return e;const n=new Map(e.map(r=>[r.id,r]));return t.map(r=>{const o=n.get(r.id);return{...r,...o}})},vN=(e,t,n=gN)=>{const r=Ei()?null:Mc.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=Pu({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:yN(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Ei()||Mc.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},kc=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??Wr.Text,i=t[s]??[],a=((c=i.find(f=>f["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:ta(),operation:l,label:mf(e),name:o,type:s,value:"",...r}},vf=()=>{const e=Dt(),t=w.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:w.useMemo(()=>({[Wr.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Wr.Boolean]:[t.is,t.isNot],[Wr.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},bN=e=>{const t=Dt(),n=vf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,kc(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(f=>f.map(h=>{if(c!==h.id)return h;const d=e.cols.find(p=>u===p.id);return kc(d,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(f=>f.map(h=>h.id===c?{...h,operation:n.operations[u]}:h))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=yf(l.target);e.set(f=>f.map(h=>h.id===c?{...h,value:u}:h))};return x.jsx(w.Fragment,{children:x.jsx(Io,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(xP,{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(vr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(vr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Is,{"data-id":l.id,onChange:a,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:i,children:x.jsx(Qr,{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(xu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},xN=({filter:e,onDelete:t,set:n})=>{const r=Dt(),o=vf(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(f=>f.id===c?{...f,operation:o.operations[l]}:f))},i=a=>{const l=a.target.dataset.id||"",c=yf(a.target);n(u=>u.map(f=>f.id===l?{...f,value:c}:f))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(vr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Is,{"data-id":e.id,onChange:i,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(Qr,{className:"text-danger",size:14})})]})},wN=({item:e,onPointerDown:t})=>{const n=pr(0);return x.jsxs(Ji.Item,{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(bP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},TN=e=>{var l;const t=Dt(),n=gf(e.cols),r=iP(),[o,s]=w.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var g;const u=c.target,f=u.value,h=u.options.selectedIndex,d=((g=u.options.item(h))==null?void 0:g.label)||"";s(d);const p=new p0(e.rows).GroupBy(f),m=e.cols.find(v=>v.id===f);e.setGroups(ww(p).map((v,b)=>{const y=p[v];return{...m,groupId:ta(),groupKey:f,index:b,rows:y,groupName:v}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(Io,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(EP,{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(vr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(Ur,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Qr,{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(RC,{children:x.jsx(Ji.Group,{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(wN,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},SN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),EN=(e,t)=>e.toSorted(SN(t)),m0=(e,t,n)=>({id:ta(),type:n,value:e.id,label:t}),CN=e=>{const t=Dt(),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,m0(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,value:u}:h))},i=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))};return x.jsx(w.Fragment,{children:x.jsx(Io,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Iy,{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(vr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(vr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(Qr,{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(xu,{size:14})," ",t.tableSortAddButton]})})]})})})},PN=e=>{const t=Dt(),[n,r]=w.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");w.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=m0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=mf(e.col);return x.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?x.jsx(hP,{size:14}):null,n==="desc"?x.jsx(dP,{size:14}):null,n==="undefined"?x.jsx(Iy,{size:14}):null]})},RN=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(bN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(CN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(TN,{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=yf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function IN(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const AN=e=>{const t=w.useId(),n=Dt(),r=e.asLink||"button",o=w.useMemo(()=>IN(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(w.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(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:x.jsx(w.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},ON={top:0,left:0,right:0,bottom:-1},DN=e=>{var p;const t=Dt(),n=e.filters.filter(m=>m.name===e.header.id),o=n.length>0?wP:TP,s=e.header.allowSort??!0,i=e.header.allowFilter??!0,a=vf(),l=m=>{const g=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==g))},c=w.useCallback(m=>{if(m===null)return;const g=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),f=u!=null&&u.type?u.type===h0.Asc?"ascending":"descending":"none",h=mf(e.header),d=pr(void 0);return x.jsxs(Ji.Item,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:d},role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[x.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&i?x.jsx(Io,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",h]}),x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:h})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(m=>x.jsx("li",{className:"my-1",children:x.jsx(xN,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(m=>m.concat(kc(e.header,a.options,a.operations))),type:"button",className:"flex items-center gap-1 text-primary",children:[x.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&s?x.jsx(PN,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),x.jsx(ft.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",dragConstraints:ON,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,g)=>{const v=m.target,b=d.get()||v.getBoundingClientRect().width,y=g.delta.x;return d.set(Math.abs(b+y))}})]})},MN=e=>x.jsx(Ji.Group,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:x.jsx(yo,{children:e.headers.map(t=>x.jsx(DN,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),g0=w.createContext({}),kN=()=>w.useContext(g0),FN=w.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(yo,{children:n.children})})),jN=w.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),NN=w.forwardRef(({context:e,...t},n)=>{const r=kN(),o={...t==null?void 0:t.style,top:vn.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),LN=w.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),_N=w.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),VN={TableHead:NN,Table:jN,TableBody:FN,TableRow:LN,TableFoot:_N},$N=[0,0,0,0,0,0,0,0,0,0],BN=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{var f;const a=`${i},${e}`,l=Ou(t,s.id),c=s.Element,u=((f=s.cellProps)==null?void 0:f.className)||"";return w.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:vn.nil(l)?"":l}))})})},WN=()=>x.jsx(w.Fragment,{}),pm=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,border:l=!1,setSorters:c,...u})=>{const f=w.useRef(null),[h,d]=w.useState(!1),p=Cc(n),m=Cc(u.loadingMore),g=w.useMemo(()=>{if(u.loading)return $N;if(r)return u.rows;const v=new p0(u.rows);return e.length>0&&e.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:v.Where(b.name,b.operation.symbol,b.value)),i.length===0?v.Select():EN(v.Select(),i)},[u.rows,e,i,u.loading]);return w.useEffect(()=>{if(f.current===null)return()=>{};const v=f.current,b=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void d(!0)):d(!1)});return b.observe(v),()=>b.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${l?"border border-table-border":""}`,children:[x.jsx(Wj,{data:g,useWindowScroll:!0,followOutput:"smooth",components:VN,totalCount:g.length,itemContent:BN,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?WN:null,fixedHeaderContent:()=>x.jsx(MN,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:s,setSorters:c,sorters:i})}),x.jsx("div",{"aria-hidden":"true",ref:f,className:"h-0.5 w-full"})]}),t!==null?x.jsx(AN,{...t}):null]})},HN=(e,t)=>typeof t=="function"?t(e):t,Zs=(e,t,n)=>e===t||n==null?void 0:n(t),zN=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>gf(e.cols),[e.cols]),[o,s]=Pu({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:HN(u[l],c)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),Zs((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),Zs((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),Zs((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),Zs((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(g0.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(RN,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?x.jsx(pm,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>x.jsx("div",{className:"min-w-full",children:x.jsx(pm,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var UN=String.prototype.replace,GN=/%20/g,Cl={RFC1738:"RFC1738",RFC3986:"RFC3986"},bf={default:Cl.RFC3986,formatters:{RFC1738:function(e){return UN.call(e,GN,"+")},RFC3986:function(e){return String(e)}},RFC1738:Cl.RFC1738,RFC3986:Cl.RFC3986},YN=bf,Pl=Object.prototype.hasOwnProperty,ir=Array.isArray,Xt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),KN=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(ir(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},y0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},qN=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(ir(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Pl.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return ir(t)&&!ir(n)&&(o=y0(t,r)),ir(t)&&ir(n)?(n.forEach(function(s,i){if(Pl.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Pl.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},XN=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},QN=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Rl=1024,ZN=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Rl){for(var c=i.length>=Rl?i.slice(l,l+Rl):i,u=[],f=0;f<c.length;++f){var h=c.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===YN.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(f);continue}if(h<128){u[u.length]=Xt[h];continue}if(h<2048){u[u.length]=Xt[192|h>>6]+Xt[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=Xt[224|h>>12]+Xt[128|h>>6&63]+Xt[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=Xt[240|h>>18]+Xt[128|h>>12&63]+Xt[128|h>>6&63]+Xt[128|h&63]}a+=u.join("")}return a},JN=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return KN(n),t},eL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},tL=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},nL=function(t,n){return[].concat(t,n)},rL=function(t,n){if(ir(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},v0={arrayToObject:y0,assign:XN,combine:nL,compact:JN,decode:QN,encode:ZN,isBuffer:tL,isRegExp:eL,maybeMap:rL,merge:qN},b0=gw,ci=v0,ts=bf,oL=Object.prototype.hasOwnProperty,x0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Qt=Array.isArray,sL=Array.prototype.push,w0=function(e,t){sL.apply(e,Qt(t)?t:[t])},iL=Date.prototype.toISOString,mm=ts.default,st={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ci.encode,encodeValuesOnly:!1,format:mm,formatter:ts.formatters[mm],indices:!1,serializeDate:function(t){return iL.call(t)},skipNulls:!1,strictNullHandling:!1},aL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Il={},lL=function e(t,n,r,o,s,i,a,l,c,u,f,h,d,p,m,g,v,b){for(var y=t,S=b,T=0,E=!1;(S=S.get(Il))!==void 0&&!E;){var R=S.get(t);if(T+=1,typeof R<"u"){if(R===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Il)>"u"&&(T=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=d(y):r==="comma"&&Qt(y)&&(y=ci.maybeMap(y,function(D){return D instanceof Date?d(D):D})),y===null){if(i)return c&&!g?c(n,st.encoder,v,"key",p):n;y=""}if(aL(y)||ci.isBuffer(y)){if(c){var A=g?n:c(n,st.encoder,v,"key",p);return[m(A)+"="+m(c(y,st.encoder,v,"value",p))]}return[m(n)+"="+m(String(y))]}var O=[];if(typeof y>"u")return O;var I;if(r==="comma"&&Qt(y))g&&c&&(y=ci.maybeMap(y,c)),I=[{value:y.length>0?y.join(",")||null:void 0}];else if(Qt(u))I=u;else{var F=Object.keys(y);I=f?F.sort(f):F}var k=l?n.replace(/\./g,"%2E"):n,L=o&&Qt(y)&&y.length===1?k+"[]":k;if(s&&Qt(y)&&y.length===0)return L+"[]";for(var C=0;C<I.length;++C){var M=I[C],j=typeof M=="object"&&typeof M.value<"u"?M.value:y[M];if(!(a&&j===null)){var _=h&&l?M.replace(/\./g,"%2E"):M,H=Qt(y)?typeof r=="function"?r(L,_):L:L+(h?"."+_:"["+_+"]");b.set(t,T);var U=b0();U.set(Il,b),w0(O,e(j,H,r,o,s,i,a,l,r==="comma"&&g&&Qt(y)?null:c,u,f,h,d,p,m,g,v,U))}}return O},cL=function(t){if(!t)return st;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||st.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ts.default;if(typeof t.format<"u"){if(!oL.call(ts.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ts.formatters[r],s=st.filter;(typeof t.filter=="function"||Qt(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in x0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=st.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:st.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:st.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:st.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:st.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?st.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:st.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:st.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:st.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:st.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:st.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:st.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:st.strictNullHandling}},uL=function(e,t){var n=e,r=cL(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Qt(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=x0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=b0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||w0(i,lL(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var h=i.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),h.length>0?d+h:""},lo=v0,Fc=Object.prototype.hasOwnProperty,fL=Array.isArray,Ze={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:lo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},dL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},T0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},hL="utf8=%26%2310003%3B",pL="utf8=%E2%9C%93",mL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===pL?c="utf-8":i[l]===hL&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],f=u.indexOf("]="),h=f===-1?u.indexOf("="):f+1,d,p;h===-1?(d=n.decoder(u,Ze.decoder,c,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),Ze.decoder,c,"key"),p=lo.maybeMap(T0(u.slice(h+1),n),function(g){return n.decoder(g,Ze.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=dL(p)),u.indexOf("[]=")>-1&&(p=fL(p)?[p]:p);var m=Fc.call(r,d);m&&n.duplicates==="combine"?r[d]=lo.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},gL=function(e,t,n,r){for(var o=r?t:T0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},yL=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&Fc.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(s))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Fc.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),gL(u,n,r,o)}},vL=function(t){if(!t)return Ze;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Ze.charset:t.charset,r=typeof t.duplicates>"u"?Ze.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Ze.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ze.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ze.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ze.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ze.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ze.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ze.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Ze.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Ze.decoder,delimiter:typeof t.delimiter=="string"||lo.isRegExp(t.delimiter)?t.delimiter:Ze.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ze.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ze.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ze.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ze.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ze.strictNullHandling}},bL=function(e,t){var n=vL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?mL(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=yL(a,r[a],n,typeof e=="string");o=lo.merge(o,l,n)}return n.allowSparse===!0?o:lo.compact(o)},xL=uL,wL=bL,TL=bf,SL={formats:TL,parse:wL,stringify:xL};const EL=(e,t)=>e.localeCompare(t),CL={sort:EL,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},S0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return SL.parse(n.toString(),CL)},E0=e=>e.replace("[",".").replace("]","").split("."),Wo=(e,t)=>E0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),Vo=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),PL=(e,t)=>{const[n,r]=w.useState(null),o=w.useRef({}),[s,i]=w.useState({}),a=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:v=>{v!==null&&(o.current[p]={element:v,schema:g})}}},l=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:v=>{v!==null&&(o.current[p]={element:v,schema:g})}}},c=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:v=>{v!==null&&(o.current[p]={element:v,schema:g})}}},u=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,required:!g.isOptional(),form:t,type:g._def.typeName==="ZodNumber"?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:v=>{v!==null&&(o.current[p]={element:v,schema:g})}}};w.useEffect(()=>{const p=Object.values(o.current).map(g=>{const v=g.element.dataset.origin?document.querySelector(`[data-target="${g.element.name}"]`):g.element,b=g.schema.safeParse(Vo(v)),y=T=>{var O;const E=v.dataset.target||v.name;if(!E)return;const R=Vo(T.target)||(T.relatedTarget?Vo(T.relatedTarget):""),A=g.schema.safeParse(R);if(A.success)return v.setCustomValidity(""),i(I=>Da(I,E,A.data)),r(I=>{const{[E]:F,...k}=I||{};return k===null||vn.empty(k)?null:k});if(v.required){const I=((O=A.error.issues[0])==null?void 0:O.message)||"";v.setCustomValidity(I),r(F=>({...F,[E]:I}))}},S=v.getAttribute("data-trigger")||"blur";return v.addEventListener(S,y),v.tagName==="SELECT"&&v.addEventListener("change",y),{input:g,hasInitialError:v.required?!b.success:!1,unsubscribe:()=>{v.removeEventListener(S,y),v.tagName==="SELECT"&&v.addEventListener("change",y)}}});return p.some(g=>g.hasInitialError)&&r(g=>g===null?{}:g),()=>p.forEach(g=>g.unsubscribe())});const f=w.useCallback(p=>m=>{const g=m.currentTarget,v=Object.values(o.current).reduce((y,S)=>{var O;const T=S.element,E=S.schema.safeParse(Vo(T));if(T.dataset.ignore==="ignore"||E.success)return y;const R=(O=E.error.issues[0])==null?void 0:O.message;T.setAttribute("data-initialized","true");const A=T.dataset.name||T.name||"";return{...y,[A]:R}},{}),b=vn.empty(v)?null:v;r(b),p==null||p({form:g,errors:b||{}})},[]),h=w.useCallback(p=>m=>{m.preventDefault();const g=m.currentTarget;let v=S0(g);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(g.elements)).forEach(S=>{if(S.tagName==="SELECT"){const T=S;v=Da(v,T.name,T.value)}if(S.tagName==="INPUT"){const T=S;v=Da(v,T.name,Vo(T))}});const y=e.safeParse(s);return y.success?p({form:g,json:v,data:y.data,event:m,reset:()=>Ec(g),success:!0,errors:[]}):p({form:g,json:v,event:m,data:v,success:!1,reset:()=>Ec(g),errors:y.error.issues.map(S=>({message:S.message,path:S.path.map(T=>String(T))}))})},[t]);return{state:s,input:u,datepicker:a,checkbox:c,select:l,onSubmit:h,errors:n,onInvalid:f,disabled:n!==null,name:t,get:p=>Ou(s,p)||""}},RL=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=IP;exports.Autocomplete=$M;exports.Button=Ur;exports.Calendar=fv;exports.Card=dv;exports.Checkbox=Tb;exports.ColType=Wr;exports.Collapse=My;exports.ComponentsProvider=gA;exports.DatePicker=WM;exports.Dropdown=Io;exports.Expand=TM;exports.FileUpload=eF;exports.Form=nF;exports.Input=Is;exports.InputFeedback=xb;exports.InputField=ua;exports.Menu=CM;exports.MenuItem=EM;exports.Modal=FM;exports.Notifications=wO;exports.Option=wb;exports.Polymorph=po;exports.Radiobox=oF;exports.RenderOnView=s1;exports.Select=vr;exports.Stats=TO;exports.Switch=sF;exports.Tab=CO;exports.Table=zN;exports.Tabs=SO;exports.Tag=l1;exports.TaskList=iF;exports.Textarea=rF;exports.Toolbar=jM;exports.Tooltip=bb;exports.TransferList=Uj;exports.convertPath=E0;exports.createColumns=mN;exports.createDesignTokens=sv;exports.createOptionCols=gf;exports.createStyles=uA;exports.createTheme=fA;exports.css=De;exports.defaultDarkTheme=pA;exports.defaultLightTheme=mA;exports.dispatchInput=Vm;exports.formReset=Ec;exports.formToJson=S0;exports.getSchemaShape=Wo;exports.initializeInputDataset=Hi;exports.isReactComponent=t1;exports.isReactFC=n1;exports.isSsr=Ei;exports.mergeRefs=Hc;exports.parsers=Ru;exports.path=Ou;exports.reduceTokens=jr;exports.safeRegex=oc;exports.splitInto=lv;exports.useForm=PL;exports.useNotification=bO;exports.usePrevious=RL;exports.useReactive=jv;exports.useTablePreferences=vN;exports.useTranslations=Dt;exports.uuid=ta;
200
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fb(e,t){if(e){if(typeof e=="string")return wc(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 wc(e,t)}}function wc(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 Uk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function Gk(e){if(Array.isArray(e))return e}function _p(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 We(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_p(Object(n),!0).forEach(function(r){Tc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_p(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _i(e,t){if(e==null)return{};var n=Yk(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Xu=x.forwardRef(function(e,t){var n=e.children,r=_i(e,Nk),o=Nb(r),s=o.open,i=_i(o,Lk);return x.useImperativeHandle(t,function(){return{open:s}},[s]),x.createElement(x.Fragment,null,n(We(We({},i),{},{open:s})))});Xu.displayName="Dropzone";var jb={disabled:!1,getFilesFromEvent:sk,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Xu.defaultProps=jb;Xu.propTypes={children:ke.func,accept:ke.objectOf(ke.arrayOf(ke.string)),multiple:ke.bool,preventDropOnDocument:ke.bool,noClick:ke.bool,noKeyboard:ke.bool,noDrag:ke.bool,noDragEventsBubbling:ke.bool,minSize:ke.number,maxSize:ke.number,maxFiles:ke.number,disabled:ke.bool,getFilesFromEvent:ke.func,onFileDialogCancel:ke.func,onFileDialogOpen:ke.func,useFsAccessApi:ke.bool,autoFocus:ke.bool,onDragEnter:ke.func,onDragLeave:ke.func,onDragOver:ke.func,onDrop:ke.func,onDropAccepted:ke.func,onDropRejected:ke.func,onError:ke.func,validator:ke.func};var Sc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Nb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=We(We({},jb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,h=t.onDrop,d=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,v=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,R=t.noDragEventsBubbling,I=t.onError,M=t.validator,A=x.useMemo(function(){return kk(n)},[n]),N=x.useMemo(function(){return Mk(n)},[n]),k=x.useMemo(function(){return typeof g=="function"?g:Vp},[g]),j=x.useMemo(function(){return typeof m=="function"?m:Vp},[m]),P=x.useRef(null),O=x.useRef(null),F=x.useReducer(Kk,Sc),_=vl(F,2),W=_[0],U=_[1],D=W.isFocused,$=W.isFileDialogActive,q=x.useRef(typeof window<"u"&&window.isSecureContext&&y&&Dk()),J=function(){!q.current&&$&&setTimeout(function(){if(O.current){var re=O.current.files;re.length||(U({type:"closeDialog"}),j())}},300)};x.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[O,$,j,q]);var X=x.useRef([]),G=function(re){P.current&&P.current.contains(re.target)||(re.preventDefault(),X.current=[])};x.useEffect(function(){return v&&(document.addEventListener("dragover",Lp,!1),document.addEventListener("drop",G,!1)),function(){v&&(document.removeEventListener("dragover",Lp),document.removeEventListener("drop",G))}},[P,v]),x.useEffect(function(){return!r&&b&&P.current&&P.current.focus(),function(){}},[P,b,r]);var L=x.useCallback(function(Z){I?I(Z):console.error(Z)},[I]),B=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[].concat($k(X.current),[Z.target]),Xs(Z)&&Promise.resolve(o(Z)).then(function(re){if(!(Li(Z)&&!R)){var xe=re.length,Ne=xe>0&&Rk({files:re,accept:A,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:M}),ht=xe>0&&!Ne;U({isDragAccept:Ne,isDragReject:ht,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(re){return L(re)})},[o,c,L,R,A,i,s,a,l,M]),z=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=Xs(Z);if(re&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return re&&f&&f(Z),!1},[f,R]),V=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=X.current.filter(function(Ne){return P.current&&P.current.contains(Ne)}),xe=re.indexOf(Z.target);xe!==-1&&re.splice(xe,1),X.current=re,!(re.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Xs(Z)&&u&&u(Z))},[P,u,R]),Y=x.useCallback(function(Z,re){var xe=[],Ne=[];Z.forEach(function(ht){var vt=Ob(ht,A),Ct=vl(vt,2),Qn=Ct[0],Tr=Ct[1],Sr=Db(ht,i,s),Fs=vl(Sr,2),ya=Fs[0],va=Fs[1],ba=M?M(ht):null;if(Qn&&ya&&!ba)xe.push(ht);else{var xa=[Tr,va];ba&&(xa=xa.concat(ba)),Ne.push({file:ht,errors:xa.filter(function(C0){return C0})})}}),(!a&&xe.length>1||a&&l>=1&&xe.length>l)&&(xe.forEach(function(ht){Ne.push({file:ht,errors:[Pk]})}),xe.splice(0)),U({acceptedFiles:xe,fileRejections:Ne,type:"setFiles"}),h&&h(xe,Ne,re),Ne.length>0&&p&&p(Ne,re),xe.length>0&&d&&d(xe,re)},[U,a,A,i,s,l,h,d,p,M]),ee=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),X.current=[],Xs(Z)&&Promise.resolve(o(Z)).then(function(re){Li(Z)&&!R||Y(re,Z)}).catch(function(re){return L(re)}),U({type:"reset"})},[o,Y,L,R]),H=x.useCallback(function(){if(q.current){U({type:"openDialog"}),k();var Z={multiple:a,types:N};window.showOpenFilePicker(Z).then(function(re){return o(re)}).then(function(re){Y(re,null),U({type:"closeDialog"})}).catch(function(re){Fk(re)?(j(re),U({type:"closeDialog"})):jk(re)?(q.current=!1,O.current?(O.current.value=null,O.current.click()):L(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."))):L(re)});return}O.current&&(U({type:"openDialog"}),k(),O.current.value=null,O.current.click())},[U,k,j,y,Y,L,N,a]),we=x.useCallback(function(Z){!P.current||!P.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),H())},[P,H]),Ue=x.useCallback(function(){U({type:"focus"})},[]),je=x.useCallback(function(){U({type:"blur"})},[]),Ge=x.useCallback(function(){S||(Ok()?setTimeout(H,0):H())},[S,H]),se=function(re){return r?null:re},me=function(re){return T?null:se(re)},oe=function(re){return E?null:se(re)},ye=function(re){R&&re.stopPropagation()},Qe=x.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,xe=re===void 0?"ref":re,Ne=Z.role,ht=Z.onKeyDown,vt=Z.onFocus,Ct=Z.onBlur,Qn=Z.onClick,Tr=Z.onDragEnter,Sr=Z.onDragOver,Fs=Z.onDragLeave,ya=Z.onDrop,va=_i(Z,_k);return We(We(Tc({onKeyDown:me(qt(ht,we)),onFocus:me(qt(vt,Ue)),onBlur:me(qt(Ct,je)),onClick:se(qt(Qn,Ge)),onDragEnter:oe(qt(Tr,B)),onDragOver:oe(qt(Sr,z)),onDragLeave:oe(qt(Fs,V)),onDrop:oe(qt(ya,ee)),role:typeof Ne=="string"&&Ne!==""?Ne:"presentation"},xe,P),!r&&!T?{tabIndex:0}:{}),va)}},[P,we,Ue,je,Ge,B,z,V,ee,T,E,r]),ve=x.useCallback(function(Z){Z.stopPropagation()},[]),ot=x.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,xe=re===void 0?"ref":re,Ne=Z.onChange,ht=Z.onClick,vt=_i(Z,Vk),Ct=Tc({accept:A,multiple:a,type:"file",style:{display:"none"},onChange:se(qt(Ne,ee)),onClick:se(qt(ht,ve)),tabIndex:-1},xe,O);return We(We({},Ct),vt)}},[O,n,a,ee,r]);return We(We({},W),{},{isFocused:D&&!r,getRootProps:Qe,getInputProps:ot,rootRef:P,inputRef:O,open:se(H)})}function Kk(e,t){switch(t.type){case"focus":return We(We({},e),{},{isFocused:!0});case"blur":return We(We({},e),{},{isFocused:!1});case"openDialog":return We(We({},Sc),{},{isFileDialogActive:!0});case"closeDialog":return We(We({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return We(We({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return We(We({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return We({},Sc);default:return e}}function Vp(){}const qk={isImage:e=>e.type.includes("image")},Xk=e=>{const[t,n]=x.useState({url:"",type:"",size:""});return x.useEffect(()=>{if(qk.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:vp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:vp(e.file.size)})},[e.file]),t.type==="img"?w.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[w.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[w.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Ur,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Qr,{})})]}):w.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[w.jsxs("header",{className:"flex flex-row items-center gap-4",children:[w.jsx(vP,{size:48}),w.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Ur,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Qr,{className:"text-danger"})})]})},Qk=e=>w.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>w.jsx(Xk,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),Zk=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(Qk,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(x.Fragment,{children:e.idle}),Jk=w.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[w.jsx(CP,{size:64}),w.jsxs("p",{children:["You can drag your files or"," ",w.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),eF=({idle:e=Jk,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=x.useState([]),i=f=>{n==null||n(f),s(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Nb({onDrop:i});return w.jsxs("div",{...a(),"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:[w.jsx("input",{...l(r),name:r.name,id:r.name}),w.jsx(Zk,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},tF=["INPUT","SELECT"],Ec=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{tF.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},nF=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return w.jsx("form",{...e,onSubmit:t})},rF=Sb("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
201
+ `);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)}),oF=({children:e,className:t="",size:n,...r})=>w.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:[w.jsx("input",{...r,type:"radio",className:De("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]}),vr=x.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:f,left:h,error:d,...p},m)=>{const g=Rt(),y=x.useRef(null),b=p.id??p.name;x.useImperativeHandle(m,()=>y.current),x.useEffect(()=>{if(y.current===null)return;const S=y.current,T=zi(y.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const v=()=>{var S;return(S=y.current)==null?void 0:S.focus()};return w.jsx(ua,{info:n,left:h,error:d,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:w.jsx("label",{htmlFor:b,children:w.jsxs("button",{onClick:v,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(Ay,{size:20}),w.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:b,name:b,value:p.value,required:e,ref:Hc(m,y),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:De("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",p.className),children:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>w.jsx("option",{...S,children:S.label??S.value},`${b}-select-option-${S.value}`))]})})}),Cc=e=>{const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),t},sF=x.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=x.useId(),[i,a]=x.useState(r.checked??!1),l=i,c=x.useRef(null),u=Cc(r.onChange);x.useImperativeHandle(o,()=>c.current),x.useEffect(()=>{if(c.current!==null&&u.current){const h=d=>{d.target.checked=!d.target.checked,u.current&&u.current(d)};return c.current.addEventListener("change",h),()=>{var d;return(d=c.current)==null?void 0:d.removeEventListener("change",h)}}},[]);const f=()=>{var d,p;const h=!((d=c.current)!=null&&d.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:De("flex flex-wrap items-center",t),"data-component":"switch",children:[w.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),w.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,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:w.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"})}),w.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:w.jsx("span",{className:"font-medium text-foreground",children:e})}),w.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),iF=e=>{const[t,n]=rP();return x.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:lP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},fa=0,Kn=1,Do=2,Lb=4;function fs(e,t){return n=>e(t(n))}function aF(e,t){return t(e)}function _b(e,t){return n=>e(t,n)}function $p(e,t){return()=>e(t)}function da(e,t){return t(e),e}function Be(...e){return e}function lF(e){e()}function Bp(e){return()=>e}function cF(...e){return()=>{e.map(lF)}}function Qu(e){return e!==void 0}function xr(){}function Oe(e,t){return e(Kn,t)}function fe(e,t){e(fa,t)}function Zu(e){e(Do)}function wt(e){return e(Lb)}function ie(e,t){return Oe(e,_b(t,fa))}function dn(e,t){const n=e(Kn,r=>{n(),t(r)});return n}function ge(){const e=[];return(t,n)=>{switch(t){case Do:e.splice(0,e.length);return;case Kn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case fa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function Q(e){let t=e;const n=ge();return(r,o)=>{switch(r){case Kn:o(t);break;case fa:t=o;break;case Lb:return t}return n(r,o)}}function uF(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Kn:return s?n===s?void 0:(r(),n=s,t=Oe(e,s),t):(r(),xr);case Do:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function jt(e){return da(ge(),t=>ie(e,t))}function Tt(e,t){return da(Q(t),n=>ie(e,n))}function fF(...e){return t=>e.reduceRight(aF,t)}function K(e,...t){const n=fF(...t);return(r,o)=>{switch(r){case Kn:return Oe(e,n(o));case Do:Zu(e);return}}}function Vb(e,t){return e===t}function $e(e=Vb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function le(e){return t=>n=>{e(n)&&t(n)}}function ne(e){return t=>fs(t,e)}function Jt(e){return t=>()=>t(e)}function on(e,t){return n=>r=>n(t=e(t,r))}function io(e){return t=>n=>{e>0?e--:t(n)}}function Mn(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Wp(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function de(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Oe(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function Hp(...e){return function(t,n){switch(t){case Kn:return cF(...e.map(r=>Oe(r,n)));case Do:return;default:throw new Error(`unrecognized action ${t}`)}}}function ce(e,t=Vb){return K(e,$e(t))}function dt(...e){const t=ge(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Oe(s,l=>{n[i]=l,r=r|a,r===o&&fe(t,n)})}),function(s,i){switch(s){case Kn:return r===o&&i(n),Oe(t,i);case Do:return Zu(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:dF(),constructor:e,dependencies:t,singleton:n}}const dF=()=>Symbol();function hF(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function pF(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const Qs=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Ju(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=x.createContext({});function l(y,b){y.propsReady&&fe(y.propsReady,!1);for(const v of r){const S=y[t.required[v]];fe(S,b[v])}for(const v of o)if(v in b){const S=y[t.optional[v]];fe(S,b[v])}y.propsReady&&fe(y.propsReady,!0)}function c(y){return s.reduce((b,v)=>(b[v]=S=>{const T=y[t.methods[v]];fe(T,S)},b),{})}function u(y){return i.reduce((b,v)=>(b[v]=uF(y[t.events[v]]),b),{})}const f=x.forwardRef((y,b)=>{const{children:v,...S}=y,[T]=x.useState(()=>da(hF(e),R=>l(R,S))),[E]=x.useState($p(u,T));return Qs(()=>{for(const R of i)R in S&&Oe(E[R],S[R]);return()=>{Object.values(E).map(Zu)}},[S,E,T]),Qs(()=>{l(T,S)}),x.useImperativeHandle(b,Bp(c(T))),x.createElement(a.Provider,{value:T},n?x.createElement(n,pF([...r,...o,...i],S),v):v)}),h=y=>x.useCallback(_b(fe,x.useContext(a)[y]),[y]),d=y=>{const v=x.useContext(a)[y],S=x.useCallback(T=>Oe(v,T),[v]);return x.useSyncExternalStore(S,()=>wt(v),()=>wt(v))},p=y=>{const v=x.useContext(a)[y],[S,T]=x.useState($p(wt,v));return Qs(()=>Oe(v,E=>{E!==S&&T(Bp(E))}),[v,S]),S},m=x.version.startsWith("18")?d:p;return{Component:f,usePublisher:h,useEmitterValue:m,useEmitter:(y,b)=>{const S=x.useContext(a)[y];Qs(()=>Oe(S,b),[b,S])}}}const mF=typeof document<"u"?x.useLayoutEffect:x.useEffect,gF=mF;var Nt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Nt||{});const yF={0:"debug",1:"log",2:"warn",3:"error"},vF=()=>typeof globalThis>"u"?window:globalThis,qn=Ce(()=>{const e=Q(3);return{log:Q((n,r,o=1)=>{var s;const i=(s=vF().VIRTUOSO_LOG_LEVEL)!=null?s:wt(e);o>=i&&console[yF[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function ef(e,t=!0){const n=x.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=x.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function hn(e,t=!0){return ef(e,t).callbackRef}function $b(e,t,n,r,o,s,i){const a=x.useCallback(l=>{const c=bF(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",h=i?i.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,d=i?i.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:d,viewportHeight:p}),s==null||s(xF("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return ef(a,n)}function bF(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Nt.ERROR),u===c)continue;const f=s[s.length-1];s.length===0||f.size!==u||f.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function xF(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Nt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Yt(e,t){return Math.round(e.getBoundingClientRect()[t])}function Bb(e,t){return Math.abs(e-t)<1.01}function Wb(e,t,n,r=xr,o){const s=x.useRef(null),i=x.useRef(null),a=x.useRef(null),l=x.useCallback(f=>{const h=f.target,d=h===window||h===document,p=d?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=d?document.documentElement.scrollHeight:h.scrollHeight,g=d?window.innerHeight:h.offsetHeight,y=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};f.suppressFlushSync?y():jc.flushSync(y),i.current!==null&&(p===i.current||p<=0||p===m-g)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);x.useEffect(()=>{const f=o||s.current;return r(o||s.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(f){const h=s.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const d=f.behavior==="smooth";let p,m,g;h===window?(m=Math.max(Yt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=h.scrollHeight,p=Yt(h,"height"),g=h.scrollTop);const y=m-p;if(f.top=Math.ceil(Math.max(Math.min(y,f.top),0)),Bb(p,m)||f.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),d&&t(!0);return}d?(i.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,h.scrollTo(f)}function u(f){s.current.scrollBy(f)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const It=Ce(()=>{const e=ge(),t=ge(),n=Q(0),r=ge(),o=Q(0),s=ge(),i=ge(),a=Q(0),l=Q(0),c=Q(0),u=Q(0),f=ge(),h=ge(),d=Q(!1);return ie(K(e,ne(({scrollTop:p})=>p)),t),ie(K(e,ne(({scrollHeight:p})=>p)),i),ie(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:f,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),ds={lvl:0};function Hb(e,t,n,r=ds,o=ds){return{k:e,v:t,lvl:n,l:r,r:o}}function Fe(e){return e===ds}function $r(){return ds}function Pc(e,t){if(Fe(e))return ds;const{k:n,l:r,r:o}=e;if(t===n){if(Fe(r))return o;if(Fe(o))return r;{const[s,i]=zb(r);return li(it(e,{k:s,v:i,l:Ub(r)}))}}else return t<n?li(it(e,{l:Pc(r,t)})):li(it(e,{r:Pc(o,t)}))}function hs(e,t){if(!Fe(e))return t===e.k?e.v:t<e.k?hs(e.l,t):hs(e.r,t)}function Kt(e,t,n="k"){if(Fe(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Kt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Kt(e.l,t,n)}function Ft(e,t,n){return Fe(e)?Hb(t,n,1):t===e.k?it(e,{k:t,v:n}):t<e.k?zp(it(e,{l:Ft(e.l,t,n)})):zp(it(e,{r:Ft(e.r,t,n)}))}function Rc(e,t,n){if(Fe(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Rc(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Rc(i,t,n))),a}function cr(e){return Fe(e)?[]:[...cr(e.l),{k:e.k,v:e.v},...cr(e.r)]}function zb(e){return Fe(e.r)?[e.k,e.v]:zb(e.r)}function Ub(e){return Fe(e.r)?e.l:li(it(e,{r:Ub(e.r)}))}function it(e,t){return Hb(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 bl(e){return Fe(e)||e.lvl>e.r.lvl}function zp(e){return Ic(Yb(e))}function li(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(bl(t))return Yb(it(e,{lvl:r-1}));if(!Fe(t)&&!Fe(t.r))return it(t.r,{l:it(t,{r:t.r.l}),r:it(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(bl(e))return Ic(it(e,{lvl:r-1}));if(!Fe(n)&&!Fe(n.l)){const o=n.l,s=bl(o)?n.lvl-1:n.lvl;return it(o,{l:it(e,{r:o.l,lvl:r-1}),r:Ic(it(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ha(e,t,n){if(Fe(e))return[];const r=Kt(e,t)[0];return wF(Rc(e,r,n))}function Gb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function wF(e){return Gb(e,({k:t,v:n})=>({index:t,value:n}))}function Ic(e){const{r:t,lvl:n}=e;return!Fe(t)&&!Fe(t.r)&&t.lvl===n&&t.r.lvl===n?it(t,{l:it(e,{r:t.l}),lvl:n+1}):e}function Yb(e){const{l:t}=e;return!Fe(t)&&t.lvl===e.lvl?it(t,{r:it(e,{l:t.r})}):e}function Vi(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Kb(e,t,n){return e[Vi(e,t,n)]}function TF(e,t,n,r){const o=Vi(e,t,r),s=Vi(e,n,r,o);return e.slice(o,s+1)}const tf=Ce(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function SF(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function Up(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 EF(e,t){let n=Fe(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Fe(e)){e=Ft(e,0,o);continue}const a=ha(e,s-1,i+1);if(a.some(SF(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:h}of a)l?(i>=u||o===h)&&(e=Pc(e,u)):(c=h!==o,l=!0),f>i&&i>=u&&h!==o&&(e=Ft(e,i+1,h));c&&(e=Ft(e,s,o))}return[e,n]}function CF(){return{offsetTree:[],sizeTree:$r(),groupOffsetTree:$r(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function nf({index:e},t){return t===e?0:t<e?-1:1}function PF({offset:e},t){return t===e?0:t<e?-1:1}function RF(e){return{index:e.index,value:e}}function IF(e,t,n,r=0){return r>0&&(t=Math.max(t,Kb(e,r,nf).offset)),Gb(TF(e,t,n,PF),RF)}function Ac(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Vi(o,t-1,nf),a=o[l].offset;const u=Kt(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===Kt(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ha(n,t,1/0)){const f=c-s,h=f*i+a+f*r;o.push({offset:h,size:u,index:c}),s=c,a=h,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function AF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Nt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Fe(s)&&t.length===2){const h=t[0].size,d=t[1].size;i=n.reduce((p,m)=>Ft(Ft(p,m,h),m+1,d),i)}else[i,a]=EF(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Ac(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Ft(h,d,ps(d,l,o)),$r()),groupIndices:n}}function ps(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Kb(t,e,nf),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function OF(e){return typeof e.groupIndex<"u"}function qb(e,t,n){if(OF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Xb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Xb(e,t){if(!pa(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function pa(e){return!Fe(e.groupOffsetTree)}function DF(e){return cr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const MF={offsetHeight:"height",offsetWidth:"width"},mn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ge(),r=ge(),o=Tt(r,0),s=ge(),i=ge(),a=Q(0),l=Q([]),c=Q(void 0),u=Q(void 0),f=Q((T,E)=>Yt(T,MF[E])),h=Q(void 0),d=Q(0),p=CF(),m=Tt(K(n,de(l,e,d),on(AF,p),$e()),p),g=Tt(K(l,$e(),on((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ne(({prev:T})=>T)),[]);ie(K(l,le(T=>T.length>0),de(m,d),ne(([T,E,R])=>{const I=T.reduce((M,A,N)=>Ft(M,A,ps(A,E.offsetTree,R)||N),$r());return{...E,groupIndices:T,groupOffsetTree:I}})),m),ie(K(r,de(m),le(([T,{lastIndex:E}])=>T<E),ne(([T,{lastIndex:E,lastSize:R}])=>[{startIndex:T,endIndex:E,size:R}])),n),ie(c,u);const y=Tt(K(c,ne(T=>T===void 0)),!0);ie(K(u,le(T=>T!==void 0&&Fe(wt(m).sizeTree)),ne(T=>[{startIndex:0,endIndex:0,size:T}])),n);const b=jt(K(n,de(m),on(({sizes:T},[E,R])=>({changed:R!==T,sizes:R}),{changed:!1,sizes:p}),ne(T=>T.changed)));Oe(K(a,on((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),ne(T=>T.diff)),T=>{const{groupIndices:E}=wt(m);if(T>0)fe(t,!0),fe(s,T+Up(T,E));else if(T<0){const R=wt(g);R.length>0&&(T-=Up(-T,R)),fe(i,T)}}),Oe(K(a,de(e)),([T,E])=>{T<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Nt.ERROR)});const v=jt(s);ie(K(s,de(m),ne(([T,E])=>{const R=E.groupIndices.length>0,I=[],M=E.lastSize;if(R){const A=hs(E.sizeTree,0);let N=0,k=0;for(;N<T;){const O=E.groupIndices[k],F=E.groupIndices.length===k+1?1/0:E.groupIndices[k+1]-O-1;I.push({startIndex:O,endIndex:O,size:A}),I.push({startIndex:O+1,endIndex:O+1+F-1,size:M}),k++,N+=F+1}const j=cr(E.sizeTree);return N!==T&&j.shift(),j.reduce((O,{k:F,v:_})=>{let W=O.ranges;return O.prevSize!==0&&(W=[...O.ranges,{startIndex:O.prevIndex,endIndex:F+T-1,size:O.prevSize}]),{ranges:W,prevIndex:F+T,prevSize:_}},{ranges:I,prevIndex:T,prevSize:0}).ranges}return cr(E.sizeTree).reduce((A,{k:N,v:k})=>({ranges:[...A.ranges,{startIndex:A.prevIndex,endIndex:N+T-1,size:A.prevSize}],prevIndex:N+T,prevSize:k}),{ranges:[],prevIndex:0,prevSize:M}).ranges})),n);const S=jt(K(i,de(m,d),ne(([T,{offsetTree:E},R])=>{const I=-T;return ps(I,E,R)})));return ie(K(i,de(m,d),ne(([T,E,R])=>{if(E.groupIndices.length>0){if(Fe(E.sizeTree))return E;let M=$r();const A=wt(g);let N=0,k=0,j=0;for(;N<-T;){j=A[k];const O=A[k+1]-j-1;k++,N+=O+1}if(M=cr(E.sizeTree).reduce((O,{k:F,v:_})=>Ft(O,Math.max(0,F+T),_),M),N!==-T){const O=hs(E.sizeTree,j);M=Ft(M,0,O);const F=Kt(E.sizeTree,-T+1)[1];M=Ft(M,1,F)}return{...E,sizeTree:M,...Ac(E.offsetTree,0,M,R)}}else{const M=cr(E.sizeTree).reduce((A,{k:N,v:k})=>Ft(A,Math.max(0,N+T),k),$r());return{...E,sizeTree:M,...Ac(E.offsetTree,0,M,R)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:v,firstItemIndex:a,gap:d,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:y,itemSize:f}},Be(qn,tf),{singleton:!0}),kF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Qb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!kF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ds=Ce(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:h}])=>{const d=ge(),p=ge(),m=Q(0);let g=null,y=null,b=null;function v(){g&&(g(),g=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),fe(o,!1)}return ie(K(d,de(e,s,t,m,l,c,h),de(r,u,f),ne(([[S,T,E,R,I,M,A,N],k,j,P])=>{const O=Qb(S),{align:F,behavior:_,offset:W}=O,U=R-1,D=qb(O,T,U);let $=ps(D,T.offsetTree,k)+M;F==="end"?($+=j+Kt(T.sizeTree,D)[1]-E+P,D===U&&($+=A)):F==="center"?$+=(j+Kt(T.sizeTree,D)[1]-E+P)/2:$-=I,W&&($+=W);const q=J=>{v(),J?(N("retrying to scroll to",{location:S},Nt.DEBUG),fe(d,S)):(fe(p,!0),N("list did not change, scroll successful",{},Nt.DEBUG))};if(v(),_==="smooth"){let J=!1;b=Oe(n,X=>{J=J||X}),g=dn(a,()=>{q(J)})}else g=dn(K(n,FF(150)),q);return y=setTimeout(()=>{v()},1200),fe(o,!0),N("scrolling from index to",{index:D,top:$,behavior:_},Nt.DEBUG),{top:$,behavior:_}})),i),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},Be(mn,It,qn),{singleton:!0});function FF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ms="up",Jo="down",jF="none",NF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},LF=0,Ms=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=Q(!1),a=Q(!0),l=ge(),c=ge(),u=Q(4),f=Q(LF),h=Tt(K(Hp(K(ce(t),io(1),Jt(!0)),K(ce(t),io(1),Jt(!1),Wp(100))),$e()),!1),d=Tt(K(Hp(K(s,Jt(!0)),K(s,Jt(!1),Wp(200))),$e()),!1);ie(K(dt(ce(t),ce(f)),ne(([b,v])=>b<=v),$e()),a),ie(K(a,Mn(50)),c);const p=jt(K(dt(e,ce(n),ce(r),ce(o),ce(u)),on((b,[{scrollTop:v,scrollHeight:S},T,E,R,I])=>{const M=v+T-S>-I,A={viewportHeight:T,scrollTop:v,scrollHeight:S};if(M){let k,j;return v>b.state.scrollTop?(k="SCROLLED_DOWN",j=b.state.scrollTop-v):(k="SIZE_DECREASED",j=b.state.scrollTop-v||b.scrollTopDelta),{atBottom:!0,state:A,atBottomBecause:k,scrollTopDelta:j}}let N;return A.scrollHeight>b.state.scrollHeight?N="SIZE_INCREASED":T<b.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":v<b.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:A}},NF),$e((b,v)=>b&&b.atBottom===v.atBottom))),m=Tt(K(e,on((b,{scrollTop:v,scrollHeight:S,viewportHeight:T})=>{if(Bb(b.scrollHeight,S))return{scrollTop:v,scrollHeight:S,jump:0,changed:!1};{const E=S-(v+T)<1;return b.scrollTop!==v&&E?{scrollHeight:S,scrollTop:v,jump:b.scrollTop-v,changed:!0}:{scrollHeight:S,scrollTop:v,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),le(b=>b.changed),ne(b=>b.jump)),0);ie(K(p,ne(b=>b.atBottom)),i),ie(K(i,Mn(50)),l);const g=Q(Jo);ie(K(e,ne(({scrollTop:b})=>b),$e(),on((b,v)=>wt(d)?{direction:b.direction,prevScrollTop:v}:{direction:v<b.prevScrollTop?ms:Jo,prevScrollTop:v},{direction:Jo,prevScrollTop:0}),ne(b=>b.direction)),g),ie(K(e,Mn(50),Jt(jF)),g);const y=Q(0);return ie(K(h,le(b=>!b),Jt(0)),y),ie(K(t,Mn(100),de(h),le(([b,v])=>!!v),on(([b,v],[S])=>[v,S],[0,0]),ne(([b,v])=>v-b)),y),{isScrolling:h,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:y,lastJumpDueToItemResize:m}},Be(It)),Xn=Ce(([{log:e}])=>{const t=Q(!1),n=jt(K(t,le(r=>r),$e()));return Oe(t,r=>{r&&wt(e)("props updated",{},Nt.DEBUG)}),{propsReady:t,didMount:n}},Be(qn),{singleton:!0});function rf(e,t){e==0?t():requestAnimationFrame(()=>rf(e-1,t))}function of(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const ks=Ce(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=Q(!0),l=Q(0),c=Q(!0);return ie(K(i,de(l),le(([u,f])=>!!f),Jt(!1)),a),ie(K(i,de(l),le(([u,f])=>!!f),Jt(!1)),c),Oe(K(dt(t,i),de(a,e,n,c),le(([[,u],f,{sizeTree:h},d,p])=>u&&(!Fe(h)||Qu(d))&&!f&&!p),de(l)),([,u])=>{dn(s,()=>{fe(c,!0)}),rf(4,()=>{dn(r,()=>{fe(a,!0)}),fe(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Be(mn,It,Ds,Xn),{singleton:!0});function Gp(e){return e?e==="smooth"?"smooth":"auto":!1}const _F=(e,t)=>typeof e=="function"?Gp(e(t)):t&&Gp(e),VF=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=Q(!1),f=ge();let h=null;function d(m){fe(o,{index:"LAST",align:"end",behavior:m})}Oe(K(dt(K(ce(e),io(1)),a),de(ce(u),n,s,c),ne(([[m,g],y,b,v,S])=>{let T=g&&v,E="auto";return T&&(E=_F(y,b||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),le(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{h&&(h(),h=null),h=dn(t,()=>{wt(l)("following output to ",{totalCount:m},Nt.DEBUG),d(g),h=null})});function p(m){const g=dn(r,y=>{m&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(wt(l)("scrolling to bottom due to increased size",{},Nt.DEBUG),d("auto"))});setTimeout(g,100)}return Oe(K(dt(ce(u),e,i),le(([m,,g])=>m&&g),on(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),le(({refreshed:m})=>m),de(u,e)),([,m])=>{wt(s)&&p(m!==!1)}),Oe(f,()=>{p(wt(u)!==!1)}),Oe(dt(ce(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&d("auto")}),{followOutput:u,autoscrollToBottom:f}},Be(mn,Ms,Ds,ks,Xn,qn,It));function $F(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Zb=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=ge(),i=ge(),a=jt(K(s,ne($F)));return ie(K(a,ne(l=>l.totalCount)),e),ie(K(a,ne(l=>l.groupIndices)),t),ie(K(dt(r,n,o),le(([l,c])=>pa(c)),ne(([l,c,u])=>Kt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),$e(),ne(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Be(mn,It));function gs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Jb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const $i="top",Bi="bottom",Yp="none";function Kp(e,t,n){return typeof e=="number"?n===ms&&t===$i||n===Jo&&t===Bi?e:0:n===ms?t===$i?e.main:e.reverse:t===Bi?e.main:e.reverse}function qp(e,t){return typeof e=="number"?e:e[t]||0}const sf=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=ge(),i=Q(0),a=Q(0),l=Q(0),c=Tt(K(dt(ce(e),ce(t),ce(r),ce(s,gs),ce(l),ce(i),ce(o),ce(n),ce(a)),ne(([u,f,h,[d,p],m,g,y,b,v])=>{const S=u-b,T=g+y,E=Math.max(h-S,0);let R=Yp;const I=qp(v,$i),M=qp(v,Bi);return d-=b,d+=h+y,p+=h+y,p-=b,d>u+T-I&&(R=ms),p<u-E+f+M&&(R=Jo),R!==Yp?[Math.max(S-h-Kp(m,$i,R)-I,0),S-E-y+f+Kp(m,Bi,R)+M]:null}),le(u=>u!=null),$e(gs)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Be(It),{singleton:!0});function BF(e,t,n){if(pa(t)){const r=Xb(e,t);return[{index:Kt(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const xl={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Xp(e,t,n){if(e.length===0)return[];if(!pa(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=ha(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function ci(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-l,h=a+f*i+(f-1)*r,d=c,p=h-u;return{items:Xp(e,o,s),topItems:Xp(t,o,s),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:s}}function e0(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=of(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:s[f+l]}));return ci(c,[],a,o,n,r)}const wr=Ce(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},h,{didMount:d},{recalcInProgress:p}])=>{const m=Q([]),g=Q(0),y=ge();ie(s.topItemsIndexes,m);const b=Tt(K(dt(d,p,ce(i,gs),ce(t),ce(e),ce(u),c,ce(m),ce(r),ce(o),n),le(([E,R,,I,,,,,,,M])=>{const A=M&&M.length!==I;return E&&!R&&!A}),ne(([,,[E,R],I,M,A,N,k,j,P,O])=>{const F=M,{sizeTree:_,offsetTree:W}=F,U=wt(g);if(I===0)return{...xl,totalCount:I};if(E===0&&R===0)return U===0?{...xl,totalCount:I}:e0(U,A,M,j,P,O||[]);if(Fe(_))return U>0?null:ci(BF(of(A,I),F,O),[],I,P,F,j);const D=[];if(k.length>0){const G=k[0],L=k[k.length-1];let B=0;for(const z of ha(_,G,L)){const V=z.value,Y=Math.max(z.start,G),ee=Math.min(z.end,L);for(let H=Y;H<=ee;H++)D.push({index:H,size:V,offset:B,data:O&&O[H]}),B+=V}}if(!N)return ci([],D,I,P,F,j);const $=k.length>0?k[k.length-1]+1:0,q=IF(W,E,R,$);if(q.length===0)return null;const J=I-1,X=da([],G=>{for(const L of q){const B=L.value;let z=B.offset,V=L.start;const Y=B.size;if(B.offset<E){V+=Math.floor((E-B.offset+P)/(Y+P));const H=V-L.start;z+=H*Y+H*P}V<$&&(z+=($-V)*Y,V=$);const ee=Math.min(L.end,J);for(let H=V;H<=ee&&!(z>=R);H++)G.push({index:H,size:Y,offset:z,data:O&&O[H]}),z+=Y+P}});return ci(X,D,I,P,F,j)}),le(E=>E!==null),$e()),xl);ie(K(n,le(Qu),ne(E=>E==null?void 0:E.length)),t),ie(K(b,ne(E=>E.topListHeight)),f),ie(f,l),ie(K(b,ne(E=>[E.top,E.bottom])),a),ie(K(b,ne(E=>E.items)),y);const v=jt(K(b,le(({items:E})=>E.length>0),de(t,n),le(([{items:E},R])=>E[E.length-1].originalIndex===R-1),ne(([,E,R])=>[E-1,R]),$e(gs),ne(([E])=>E))),S=jt(K(b,Mn(200),le(({items:E,topItems:R})=>E.length>0&&E[0].originalIndex===R.length),ne(({items:E})=>E[0].index),$e())),T=jt(K(b,le(({items:E})=>E.length>0),ne(({items:E})=>{let R=0,I=E.length-1;for(;E[R].type==="group"&&R<I;)R++;for(;E[I].type==="group"&&I>R;)I--;return{startIndex:E[R].index,endIndex:E[I].index}}),$e(Jb)));return{listState:b,topItemsIndexes:m,endReached:v,startReached:S,rangeChanged:T,itemsRendered:y,initialItemCount:g,...h}},Be(mn,Zb,sf,ks,Ds,Ms,Xn,tf),{singleton:!0}),WF=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ie(K(a,de(s),le(([,l])=>l!==0),de(o,e,t,r,n),ne(([[,l],c,u,f,h,d=[]])=>e0(l,c,u,f,h,d))),i),{}),Be(mn,ks,wr,Xn),{singleton:!0}),t0=Ce(([{scrollVelocity:e}])=>{const t=Q(!1),n=ge(),r=Q(!1);return ie(K(e,de(r,t,n),le(([o,s])=>!!s),ne(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),$e()),t),Oe(K(dt(t,e,n),de(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Be(Ms),{singleton:!0}),HF=Ce(([{topItemsIndexes:e}])=>{const t=Q(0);return ie(K(t,le(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Be(wr)),n0=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=ge(),i=Tt(K(dt(e,r,t,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ie(ce(i),s),{totalListHeight:i,totalListHeightChanged:s}},Be(It,wr),{singleton:!0});function r0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const zF=r0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),UF=Ce(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:h},{log:d},{recalcInProgress:p}])=>{const m=jt(K(l,de(a),on(([,y,b,v],[{items:S,totalCount:T,bottom:E,offsetBottom:R},I])=>{const M=E+R;let A=0;return b===T&&y.length>0&&S.length>0&&(S[0].originalIndex===0&&y[0].originalIndex===0||(A=M-v,A!==0&&(A+=I))),[A,S,T,M]},[0,[],0,0]),le(([y])=>y!==0),de(t,i,r,s,d,p),le(([,y,b,v,,,S])=>!S&&!v&&y!==0&&b===ms),ne(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},Nt.DEBUG),y))));function g(y){y>0?(fe(e,{top:-y,behavior:"auto"}),fe(n,0)):(fe(n,0),fe(e,{top:-y,behavior:"auto"}))}return Oe(K(m,de(n,o)),([y,b,v])=>{v&&zF()?fe(n,b-y):g(-y)}),Oe(K(dt(Tt(o,!1),n,p),le(([y,b,v])=>!y&&!v&&b!==0),ne(([y,b])=>b),Mn(1)),g),ie(K(u,ne(y=>({top:-y}))),e),Oe(K(c,de(f,h),ne(([y,{lastSize:b,groupIndices:v,sizeTree:S},T])=>{function E(R){return R*(b+T)}if(v.length===0)return E(y);{let R=0;const I=hs(S,0);let M=0,A=0;for(;M<y;){M++,R+=I;let N=v.length===A+1?1/0:v[A+1]-v[A]-1;M+N>y&&(R-=I,N=y-M+1),M+=N,R+=E(N),A++}return R}})),y=>{fe(n,y),requestAnimationFrame(()=>{fe(e,{top:y}),requestAnimationFrame(()=>{fe(n,0),fe(p,!1)})})}),{deviation:n}},Be(It,Ms,wr,mn,qn,tf)),GF=Ce(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Q(0);return Oe(K(e,de(r),le(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{dn(K(n,io(1),le(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{fe(t,o)})})}),{initialScrollTop:r}},Be(Xn,It,wr),{singleton:!0}),YF=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Q(!1),r=Tt(K(dt(n,e,t),le(([o])=>o),ne(([,o,s])=>Math.max(0,o-s)),Mn(0),$e()),0);return{alignToBottom:n,paddingTopAddition:r}},Be(It,n0),{singleton:!0}),af=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ge(),r=ge(),o=ge(),s=Q(!1),i=Q(void 0);return ie(K(dt(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ie(K(e,de(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Be(It)),KF=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,qF=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=ge();return ie(K(u,de(e,o,t,s,i,a,r),de(n),ne(([[f,h,d,p,m,g,y,b],v])=>{const{done:S,behavior:T,align:E,calculateViewLocation:R=KF,...I}=f,M=qb(f,h,p-1),A=ps(M,h.offsetTree,v)+m+g,N=A+Kt(h.sizeTree,M)[1],k=b+g,j=b+d-y,P=R({itemTop:A,itemBottom:N,viewportTop:k,viewportBottom:j,locationParams:{behavior:T,align:E,...I}});return P?S&&dn(K(l,le(O=>O===!1),io(wt(l)?1:2)),S):S&&S(),P}),le(f=>f!==null)),c),{scrollIntoView:u}},Be(mn,It,Ds,wr,qn),{singleton:!0}),XF=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=ge(),u=Q(void 0),f=Q(null),h=Q(null);return ie(a,f),ie(l,h),Oe(K(c,de(e,n,i,f,h,r)),([d,p,m,g,y,b,v])=>{const S=DF(p.sizeTree);g&&y!==null&&b!==null&&(m=y.scrollTop-b.offsetTop),m-=v,d({ranges:S,scrollTop:m})}),ie(K(u,le(Qu),ne(QF)),o),ie(K(s,de(u),le(([,d])=>d!==void 0),$e(),ne(([,d])=>d.ranges)),t),{getState:c,restoreStateFrom:u}},Be(mn,It,ks,Xn,af));function QF(e){return{offset:e.scrollTop,index:0,align:"start"}}const ZF=Ce(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Be(sf,WF,Xn,t0,n0,GF,YF,af,qF,qn)),o0=Ce(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p},m,g,y,{listState:b,topItemsIndexes:v,...S},{scrollToIndex:T},E,{topItemCount:R},{groupCounts:I},M])=>(ie(S.rangeChanged,M.scrollSeekRangeChanged),ie(K(M.windowViewportRect,ne(A=>A.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:v,topItemCount:R,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...y,statefulTotalCount:c,listState:b,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...M,...m,sizes:f,...g}),Be(mn,ks,It,XF,VF,wr,Ds,UF,HF,Zb,ZF)),wl="-webkit-sticky",Qp="sticky",s0=r0(()=>{if(typeof document>"u")return Qp;const e=document.createElement("div");return e.style.position=wl,e.style.position===wl?wl:Qp});function lf(e,t){const n=x.useRef(null),r=x.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(t){const h=t.getBoundingClientRect(),d=l.top-h.top;u=h.height-Math.max(0,d),f=d+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=ef(r),i=x.useCallback(()=>{r(s.current)},[r,s]);return x.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const ma=x.createContext(void 0),i0=x.createContext(void 0);function cf(e){return e}const JF=Ce(()=>{const e=Q(l=>`Item ${l}`),t=Q(null),n=Q(l=>`Group ${l}`),r=Q({}),o=Q(cf),s=Q("div"),i=Q(xr),a=(l,c=null)=>Tt(K(r,ne(u=>u[l]),$e()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),ej=Ce(([e,t])=>({...e,...t}),Be(o0,JF)),tj=({height:e})=>x.createElement("div",{style:{height:e}}),nj={position:s0(),zIndex:1,overflowAnchor:"none"},rj={overflowAnchor:"none"},Zp=x.memo(function({showTopList:t=!1}){const n=pe("listState"),r=Wt("sizeRanges"),o=pe("useWindowScroll"),s=pe("customScrollParent"),i=Wt("windowScrollContainerState"),a=Wt("scrollContainerState"),l=s||o?i:a,c=pe("itemContent"),u=pe("context"),f=pe("groupContent"),h=pe("trackItemSizes"),d=pe("itemSize"),p=pe("log"),m=Wt("gap"),{callbackRef:g}=$b(r,d,h,t?xr:l,p,m,s),[y,b]=x.useState(0);df("deviation",P=>{y!==P&&b(P)});const v=pe("EmptyPlaceholder"),S=pe("ScrollSeekPlaceholder")||tj,T=pe("ListComponent"),E=pe("ItemComponent"),R=pe("GroupComponent"),I=pe("computeItemKey"),M=pe("isSeeking"),A=pe("groupIndices").length>0,N=pe("alignToBottom"),k=pe("initialItemFinalLocationReached"),j=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:y!==0?y:N?"auto":0,...k?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&v?x.createElement(v,Ke(v,u)):x.createElement(T,{...Ke(T,u),ref:g,style:j,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const O=P.originalIndex,F=I(O+n.firstItemIndex,P.data,u);return M?x.createElement(S,{...Ke(S,u),key:F,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?x.createElement(R,{...Ke(R,u),key:F,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,style:nj},f(P.index,u)):x.createElement(E,{...Ke(E,u),...a0(E,P.data),key:F,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:rj},A?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),oj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Mo=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),sj={width:"100%",position:s0(),top:0,zIndex:1};function Ke(e,t){if(typeof e!="string")return{context:t}}function a0(e,t){return{item:typeof e=="string"?void 0:t}}const ij=x.memo(function(){const t=pe("HeaderComponent"),n=Wt("headerHeight"),r=pe("headerFooterTag"),o=hn(x.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=pe("context");return t?x.createElement(r,{ref:o},x.createElement(t,Ke(t,s))):null}),aj=x.memo(function(){const t=pe("FooterComponent"),n=Wt("footerHeight"),r=pe("headerFooterTag"),o=hn(x.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=pe("context");return t?x.createElement(r,{ref:o},x.createElement(t,Ke(t,s))):null});function uf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return x.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:m}=Wb(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),x.createElement(c,{ref:d,style:{...oj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Ke(c,h)},i)})}function ff({usePublisher:e,useEmitter:t,useEmitterValue:n}){return x.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),d=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:y}=Wb(l,u,c,xr,d);return gF(()=>(m.current=d||window,()=>{m.current=null}),[m,d]),t("windowScrollTo",y),t("scrollBy",g),x.createElement(c,{style:{position:"relative",...s,...f!==0?{height:f+h}:{}},"data-virtuoso-scroller":!0,...a,...Ke(c,p)},i)})}const lj=({children:e})=>{const t=x.useContext(ma),n=Wt("viewportHeight"),r=Wt("fixedItemHeight"),o=pe("alignToBottom"),s=hn(x.useMemo(()=>fs(n,i=>Yt(i,"height")),[n]));return x.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.createElement("div",{style:Mo(o),ref:s,"data-viewport-type":"element"},e)},cj=({children:e})=>{const t=x.useContext(ma),n=Wt("windowViewportRect"),r=Wt("fixedItemHeight"),o=pe("customScrollParent"),s=lf(n,o),i=pe("alignToBottom");return x.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.createElement("div",{ref:s,style:Mo(i),"data-viewport-type":"window"},e)},uj=({children:e})=>{const t=pe("TopItemListComponent")||"div",n=pe("headerHeight"),r={...sj,marginTop:`${n}px`},o=pe("context");return x.createElement(t,{style:r,...Ke(t,o)},e)},fj=x.memo(function(t){const n=pe("useWindowScroll"),r=pe("topItemsIndexes").length>0,o=pe("customScrollParent"),s=o||n?pj:hj,i=o||n?cj:lj;return x.createElement(s,{...t},r&&x.createElement(uj,null,x.createElement(Zp,{showTopList:!0})),x.createElement(i,null,x.createElement(ij,null),x.createElement(Zp,null),x.createElement(aj,null)))}),{Component:dj,usePublisher:Wt,useEmitterValue:pe,useEmitter:df}=Ju(ej,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},fj),hj=uf({usePublisher:Wt,useEmitterValue:pe,useEmitter:df}),pj=ff({usePublisher:Wt,useEmitterValue:pe,useEmitter:df}),mj=dj,Jp={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},gj={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:em,ceil:tm,floor:Wi,min:Tl,max:es}=Math;function yj(e){return{...gj,items:e}}function nm(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function vj(e,t){return e&&e.column===t.column&&e.row===t.row}function Zs(e,t){return e&&e.width===t.width&&e.height===t.height}const bj=Ce(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,h,{propsReady:d,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:b,windowScrollTo:v},S])=>{const T=Q(0),E=Q(0),R=Q(Jp),I=Q({height:0,width:0}),M=Q({height:0,width:0}),A=ge(),N=ge(),k=Q(0),j=Q(null),P=Q({row:0,column:0}),O=ge(),F=ge(),_=Q(!1),W=Q(0),U=Q(!0),D=Q(!1);Oe(K(p,de(W),le(([L,B])=>!!B)),()=>{fe(U,!1),fe(E,0)}),Oe(K(dt(p,U,M,I,W,D),le(([L,B,z,V,,Y])=>L&&!B&&z.height!==0&&V.height!==0&&!Y)),([,,,,L])=>{fe(D,!0),rf(1,()=>{fe(A,L)}),dn(K(r),()=>{fe(n,[0,0]),fe(U,!0)})}),ie(K(F,le(L=>L!=null&&L.scrollTop>0),Jt(0)),E),Oe(K(p,de(F),le(([,L])=>L!=null)),([,L])=>{L&&(fe(I,L.viewport),fe(M,L==null?void 0:L.item),fe(P,L.gap),L.scrollTop>0&&(fe(_,!0),dn(K(r,io(1)),B=>{fe(_,!1)}),fe(i,{top:L.scrollTop})))}),ie(K(I,ne(({height:L})=>L)),o),ie(K(dt(ce(I,Zs),ce(M,Zs),ce(P,(L,B)=>L&&L.column===B.column&&L.row===B.row),ce(r)),ne(([L,B,z,V])=>({viewport:L,item:B,gap:z,scrollTop:V}))),O),ie(K(dt(ce(T),t,ce(P,vj),ce(M,Zs),ce(I,Zs),ce(j),ce(E),ce(_),ce(U),ce(W)),le(([,,,,,,,L])=>!L),ne(([L,[B,z],V,Y,ee,H,we,,Ue,je])=>{const{row:Ge,column:se}=V,{height:me,width:oe}=Y,{width:ye}=ee;if(we===0&&(L===0||ye===0))return Jp;if(oe===0){const Ct=of(je,L),Qn=Ct===0?Math.max(we-1,0):Ct;return yj(nm(Ct,Qn,H))}const Qe=l0(ye,oe,se);let ve,ot;Ue?B===0&&z===0&&we>0?(ve=0,ot=we-1):(ve=Qe*Wi((B+Ge)/(me+Ge)),ot=Qe*tm((z+Ge)/(me+Ge))-1,ot=Tl(L-1,es(ot,Qe-1)),ve=Tl(ot,es(0,ve))):(ve=0,ot=-1);const Z=nm(ve,ot,H),{top:re,bottom:xe}=rm(ee,V,Y,Z),Ne=tm(L/Qe),vt=Ne*me+(Ne-1)*Ge-xe;return{items:Z,offsetTop:re,offsetBottom:vt,top:re,bottom:xe,itemHeight:me,itemWidth:oe}})),R),ie(K(j,le(L=>L!==null),ne(L=>L.length)),T),ie(K(dt(I,M,R,P),le(([L,B,{items:z}])=>z.length>0&&B.height!==0&&L.height!==0),ne(([L,B,{items:z},V])=>{const{top:Y,bottom:ee}=rm(L,V,B,z);return[Y,ee]}),$e(gs)),n);const $=Q(!1);ie(K(r,de($),ne(([L,B])=>B||L!==0)),$);const q=jt(K(ce(R),le(({items:L})=>L.length>0),de(T,$),le(([{items:L},B,z])=>z&&L[L.length-1].index===B-1),ne(([,L])=>L-1),$e())),J=jt(K(ce(R),le(({items:L})=>L.length>0&&L[0].index===0),Jt(0),$e())),X=jt(K(ce(R),de(_),le(([{items:L},B])=>L.length>0&&!B),ne(([{items:L}])=>({startIndex:L[0].index,endIndex:L[L.length-1].index})),$e(Jb),Mn(0)));ie(X,h.scrollSeekRangeChanged),ie(K(A,de(I,M,T,P),ne(([L,B,z,V,Y])=>{const ee=Qb(L),{align:H,behavior:we,offset:Ue}=ee;let je=ee.index;je==="LAST"&&(je=V-1),je=es(0,je,Tl(V-1,je));let Ge=Oc(B,Y,z,je);return H==="end"?Ge=em(Ge-B.height+z.height):H==="center"&&(Ge=em(Ge-B.height/2+z.height/2)),Ue&&(Ge+=Ue),{top:Ge,behavior:we}})),i);const G=Tt(K(R,ne(L=>L.offsetBottom+L.bottom)),0);return ie(K(m,ne(L=>({width:L.visibleWidth,height:L.visibleHeight}))),I),{data:j,totalCount:T,viewportDimensions:I,itemDimensions:M,scrollTop:r,scrollHeight:N,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:A,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:v,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:b,deviation:k,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:F,...h,initialTopMostItemIndex:W,gridState:R,totalListHeight:G,...f,startReached:J,endReached:q,rangeChanged:X,stateChanged:O,propsReady:d,stateRestoreInProgress:_,...S}},Be(sf,It,Ms,t0,Xn,af,qn));function rm(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Oc(e,t,n,r[0].index),i=Oc(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Oc(e,t,n,r){const o=l0(e.width,n.width,t.column),s=Wi(r/o),i=s*n.height+es(0,s-1)*t.row;return i>0?i+t.row:i}function l0(e,t,n){return es(1,Wi((e+n)/(Wi(t)+n)))}const xj=Ce(()=>{const e=Q(c=>`Item ${c}`),t=Q({}),n=Q(null),r=Q("virtuoso-grid-item"),o=Q("virtuoso-grid-list"),s=Q(cf),i=Q("div"),a=Q(xr),l=(c,u=null)=>Tt(K(t,ne(f=>f[c]),$e()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),wj=Ce(([e,t])=>({...e,...t}),Be(bj,xj)),Tj=x.memo(function(){const t=He("gridState"),n=He("listClassName"),r=He("itemClassName"),o=He("itemContent"),s=He("computeItemKey"),i=He("isSeeking"),a=Ut("scrollHeight"),l=He("ItemComponent"),c=He("ListComponent"),u=He("ScrollSeekPlaceholder"),f=He("context"),h=Ut("itemDimensions"),d=Ut("gap"),p=He("log"),m=He("stateRestoreInProgress"),g=hn(x.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const v=y.firstChild;if(v){const{width:S,height:T}=v.getBoundingClientRect();h({width:S,height:T})}d({row:om("row-gap",getComputedStyle(y).rowGap,p),column:om("column-gap",getComputedStyle(y).columnGap,p)})},[a,h,d,p]));return m?null:x.createElement(c,{ref:g,className:n,...Ke(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(y=>{const b=s(y.index,y.data,f);return i?x.createElement(u,{key:b,...Ke(u,f),index:y.index,height:t.itemHeight,width:t.itemWidth}):x.createElement(l,{...Ke(l,f),className:r,"data-index":y.index,key:b},o(y.index,y.data,f))}))}),Sj=x.memo(function(){const t=He("HeaderComponent"),n=Ut("headerHeight"),r=He("headerFooterTag"),o=hn(x.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=He("context");return t?x.createElement(r,{ref:o},x.createElement(t,Ke(t,s))):null}),Ej=x.memo(function(){const t=He("FooterComponent"),n=Ut("footerHeight"),r=He("headerFooterTag"),o=hn(x.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=He("context");return t?x.createElement(r,{ref:o},x.createElement(t,Ke(t,s))):null}),Cj=({children:e})=>{const t=x.useContext(i0),n=Ut("itemDimensions"),r=Ut("viewportDimensions"),o=hn(x.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return x.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.createElement("div",{style:Mo(!1),ref:o},e)},Pj=({children:e})=>{const t=x.useContext(i0),n=Ut("windowViewportRect"),r=Ut("itemDimensions"),o=He("customScrollParent"),s=lf(n,o);return x.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.createElement("div",{ref:s,style:Mo(!1)},e)},Rj=x.memo(function({...t}){const n=He("useWindowScroll"),r=He("customScrollParent"),o=r||n?Aj:Ij,s=r||n?Pj:Cj;return x.createElement(o,{...t},x.createElement(s,null,x.createElement(Sj,null),x.createElement(Tj,null),x.createElement(Ej,null)))}),{Component:ML,usePublisher:Ut,useEmitterValue:He,useEmitter:c0}=Ju(wj,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},Rj),Ij=uf({usePublisher:Ut,useEmitterValue:He,useEmitter:c0}),Aj=ff({usePublisher:Ut,useEmitterValue:He,useEmitter:c0});function om(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Nt.WARN),t==="normal"?0:parseInt(t??"0",10)}const Oj=Ce(()=>{const e=Q(l=>x.createElement("td",null,"Item $",l)),t=Q(null),n=Q(null),r=Q(null),o=Q({}),s=Q(cf),i=Q(xr),a=(l,c=null)=>Tt(K(o,ne(u=>u[l]),$e()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}),Dj=Ce(([e,t])=>({...e,...t}),Be(o0,Oj)),Mj=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e}})),kj=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e,padding:0,border:0}})),Fj={overflowAnchor:"none"},jj=x.memo(function(){const t=Ie("listState"),n=Gt("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),s=Gt("windowScrollContainerState"),i=Gt("scrollContainerState"),a=o||r?s:i,l=Ie("itemContent"),c=Ie("trackItemSizes"),u=Ie("itemSize"),f=Ie("log"),{callbackRef:h,ref:d}=$b(n,u,c,a,f,void 0,o),[p,m]=x.useState(0);hf("deviation",F=>{p!==F&&(d.current.style.marginTop=`${F}px`,m(F))});const g=Ie("EmptyPlaceholder"),y=Ie("ScrollSeekPlaceholder")||Mj,b=Ie("FillerRow")||kj,v=Ie("TableBodyComponent"),S=Ie("TableRowComponent"),T=Ie("computeItemKey"),E=Ie("isSeeking"),R=Ie("paddingTopAddition"),I=Ie("firstItemIndex"),M=Ie("statefulTotalCount"),A=Ie("context");if(M===0&&g)return x.createElement(g,Ke(g,A));const N=t.offsetTop+R+p,k=t.offsetBottom,j=N>0?x.createElement(b,{height:N,key:"padding-top",context:A}):null,P=k>0?x.createElement(b,{height:k,key:"padding-bottom",context:A}):null,O=t.items.map(F=>{const _=F.originalIndex,W=T(_+I,F.data,A);return E?x.createElement(y,{...Ke(y,A),key:W,index:F.index,height:F.size,type:F.type||"item"}):x.createElement(S,{...Ke(S,A),...a0(S,F.data),key:W,"data-index":_,"data-known-size":F.size,"data-item-index":F.index,style:Fj},l(F.index,F.data,A))});return x.createElement(v,{ref:h,"data-testid":"virtuoso-item-list",...Ke(v,A)},[j,...O,P])}),Nj=({children:e})=>{const t=x.useContext(ma),n=Gt("viewportHeight"),r=Gt("fixedItemHeight"),o=hn(x.useMemo(()=>fs(n,s=>Yt(s,"height")),[n]));return x.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.createElement("div",{style:Mo(!1),ref:o,"data-viewport-type":"element"},e)},Lj=({children:e})=>{const t=x.useContext(ma),n=Gt("windowViewportRect"),r=Gt("fixedItemHeight"),o=Ie("customScrollParent"),s=lf(n,o);return x.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.createElement("div",{ref:s,style:Mo(!1),"data-viewport-type":"window"},e)},_j=x.memo(function(t){const n=Ie("useWindowScroll"),r=Ie("customScrollParent"),o=Gt("fixedHeaderHeight"),s=Gt("fixedFooterHeight"),i=Ie("fixedHeaderContent"),a=Ie("fixedFooterContent"),l=Ie("context"),c=hn(x.useMemo(()=>fs(o,b=>Yt(b,"height")),[o])),u=hn(x.useMemo(()=>fs(s,b=>Yt(b,"height")),[s])),f=r||n?Bj:$j,h=r||n?Lj:Nj,d=Ie("TableComponent"),p=Ie("TableHeadComponent"),m=Ie("TableFooterComponent"),g=i?x.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Ke(p,l)},i()):null,y=a?x.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Ke(m,l)},a()):null;return x.createElement(f,{...t},x.createElement(h,null,x.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...Ke(d,l)},[g,x.createElement(jj,{key:"TableBody"}),y])))}),{Component:Vj,usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}=Ju(Dj,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},_j),$j=uf({usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}),Bj=ff({usePublisher:Gt,useEmitterValue:Ie,useEmitter:hf}),Wj=Vj,Hj=e=>{const[t,n]=x.useState(0);return x.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},zj={Item:x.forwardRef(function(t,n){return w.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:x.forwardRef(function(t,n){return w.jsx("ul",{...t,ref:n,className:"space-y-3"})})},Uj=e=>{const t=x.useRef(null),n=Hj(t);return w.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[w.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:[w.jsx("header",{className:"border-b border-card-border pb-2"}),w.jsxs("div",{className:"px-8 space-y-2",children:[w.jsx(As,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(mj,{height:n,useWindowScroll:!0,data:e.source,components:zj,itemContent:(r,o)=>w.jsx(x.Fragment,{children:w.jsx(Tb,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(Ur,{children:w.jsx(bu,{})})}),w.jsx("div",{})]})};var Gj=Object.defineProperty,sm=Object.getOwnPropertySymbols,Yj=Object.prototype.hasOwnProperty,Kj=Object.prototype.propertyIsEnumerable,im=(e,t,n)=>t in e?Gj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qj=(e,t)=>{for(var n in t||(t={}))Yj.call(t,n)&&im(e,n,t[n]);if(sm)for(var n of sm(t))Kj.call(t,n)&&im(e,n,t[n]);return e},pf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Xj=(e,t,n,r)=>ga(pf,e,t,n,r),ao=e=>typeof e=="object",jn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ao(e)&&!ao(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=>jn(e[r],t[r]))},Qj=(e,t)=>(ao(e)||Array.isArray(e))&&t?e[t]:e,Zj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Hi=e=>/[0-9.]+/.test(e),am=e=>["string","number"].includes(typeof e),lm=e=>e==null||(e==null?void 0:e.length)===0||e==="",cm={eq:jn,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:lm,notEmpty:e=>!lm(e),in:(e,t)=>pf(t,n=>jn(e,n)),notIn:(e,t)=>u0(t,n=>!jn(e,n))},Jj=e=>{if(e in cm)return cm[e];throw new Error("Linq - Symbol not found")},Br=(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},ga=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=Jj(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},eN=(e,t,n,r)=>ga(Br,e,t,n,r),u0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},tN=(e,t,n,r)=>ga(u0,e,t,n,r),f0=e=>{if(e===null)return null;const t=qj({},e);return Object.keys(t).forEach(n=>t[n]=ao(e[n])?f0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},um=(e,t)=>{if(ao(t)){for(let n=0;n<e.length;n++){const r=e[n];if(jn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(jn(t,r))return!0}return!1},nN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},rN=e=>Br(e,(t,n,r)=>ao(t)?n===r.findIndex(o=>jn(o,t)):n===r.indexOf(t)),oN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},d0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},sN=(e,t)=>d0(e,n=>n[t]),fm=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},iN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},aN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Hi(e)&&Hi(t)?r.map(i=>Number.parseInt(i)):r},Sl=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Hi(e)&&Hi(t)){const o=[],[s,i]=iN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return aN(e,t,r)},lN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Sl(r,o,1):Sl(r,s,Number.parseInt(o,10))}return am(e)&&am(t)?Sl(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},El=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},dm=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 s=t[n];t[n]=t[r],t[r]=s}return t},cN=(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)},uN=(e,t,n,r)=>ga(cN,e,t,n,r),hm=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Zj(t))},h0=(e=>(e.Asc="asc",e.Desc="desc",e))(h0||{}),fN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),dN=(e,t)=>e.sort(fN(t)),hN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Br(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},pN=class Dc{constructor(t=[]){this.array=t}static Range(...t){return lN(...t)}static New(t){return new Dc(t)}Where(t,n,r){return this.array=eN(this.array,t,n,r),this}Some(t,n,r){return Xj(this.array,t,n,r)}All(t,n,r){return tN(this.array,t,n,r)}Reverse(){return this.array=dm(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=uN(this.array,t,n,r),this}Distinct(){return this.array=rN(this.array),this}First(t){return t===void 0?this.array[0]:oN(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?El((n,r)=>n+r,0,this.array):El((n,r)=>n+Qj(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return sN(this.array,t)}GroupWith(t){return d0(this.array,t)}Except(t){return Br(this.array,n=>!um(t,n))}Intersect(t){return Br(this.array,n=>um(t,n))}OrderBy(t,n){let r;return r=t?hm(this.array,t):this.array.toSorted(),this.array=n==="desc"?dm(r):r,this}Includes(t){return pf(this.array,n=>jn(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 El(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(fm(this.array,n=>[t,n]))}Zip(t,n){return fm(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Br(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Dc(f0(this.array))}ToObject(t){return nN(this.array,t)}Sort(t){return Array.isArray(t)?dN(this.array,t):hm(this.array,t)}Unique(t){return hN(this.array,t)}},p0=pN,Mc={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,y)=>{try{Object.keys(g).forEach(y)}catch(b){window.console.log(b)}},n=g=>g==null,r=g=>{const y=typeof g;return y==="string"||y==="number"||y==="boolean"||n(g)},o=(g,y)=>{const b=y.getItem(g);try{return JSON.parse(b)}catch{return b??null}},s=g=>Object.keys(g).reduce((y,b)=>({...y,[b]:o(b,g)}),{}),i=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,y)=>(g[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(y=>y(g))},f=[{name:"expires",parse:g=>`expires=${i(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${i(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const y=g.domain??"";return y===""?"":`domain=${g.multiDomain?".":""}${y}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],h={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(y=>y.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const y=h.json()[g];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,y,b={})=>{const v=r(y)?y:encodeURIComponent(JSON.stringify(y)),S=f.reduce((T,E)=>{const R=E.parse(b);return R===""?T:T.concat(R)},[`${encodeURIComponent(g)}=${v}`]).join(";");document.cookie=S,u()}},d=g=>{const y=new Set,b=v=>{g().removeItem(v);const S=s(g());y.forEach(T=>T(S))};return{delete:b,listener:v=>(y.add(v),()=>y.delete(v)),clearListeners:()=>y.clear(),json:(v=!1)=>v?s(g()):g(),has:v=>{const S=g().getItem(v);return!n(S)},deleteAll:()=>{t(g(),b),y.forEach(v=>v(g()))},get:v=>o(v,g()),set:(v,S)=>{g().setItem(v,JSON.stringify(S)),y.forEach(T=>T(g()))}}},p=d(()=>window.sessionStorage),m=d(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=d})(Mc);const mf=e=>e.headerLabel??e.thead??e.id,gf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Wr=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Wr||{});const yf=e=>e.type==="number"?e.valueAsNumber:e.value,mN=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},gN={},yN=(e,t)=>{if(!Array.isArray(t))return e;const n=new Map(e.map(r=>[r.id,r]));return t.map(r=>{const o=n.get(r.id);return{...r,...o}})},vN=(e,t,n=gN)=>{const r=Ci()?null:Mc.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=Pu({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:yN(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Ci()||Mc.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},kc=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??Wr.Text,i=t[s]??[],a=((c=i.find(f=>f["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:Cs(),operation:l,label:mf(e),name:o,type:s,value:"",...r}},vf=()=>{const e=Rt(),t=x.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:x.useMemo(()=>({[Wr.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Wr.Boolean]:[t.is,t.isNot],[Wr.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},bN=e=>{const t=Rt(),n=vf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,kc(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(f=>f.map(h=>{if(c!==h.id)return h;const d=e.cols.find(p=>u===p.id);return kc(d,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(f=>f.map(h=>h.id===c?{...h,operation:n.operations[u]}:h))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=yf(l.target);e.set(f=>f.map(h=>h.id===c?{...h,value:u}:h))};return w.jsx(x.Fragment,{children:w.jsx(Io,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(xP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(vr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),w.jsx(vr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(As,{"data-id":l.id,onChange:a,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),w.jsx("div",{className:"mt-5 flex items-center justify-center",children:w.jsx("button",{"data-id":l.id,type:"button",onClick:i,children:w.jsx(Qr,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[w.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},xN=({filter:e,onDelete:t,set:n})=>{const r=Rt(),o=vf(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(f=>f.id===c?{...f,operation:o.operations[l]}:f))},i=a=>{const l=a.target.dataset.id||"",c=yf(a.target);n(u=>u.map(f=>f.id===l?{...f,value:c}:f))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(vr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),w.jsx(As,{"data-id":e.id,onChange:i,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),w.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:w.jsx(Qr,{className:"text-danger",size:14})})]})},wN=({item:e,onPointerDown:t})=>{const n=pr(0);return w.jsxs(ea.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[w.jsx("button",{type:"button",className:"cursor-grab",children:w.jsx(bP,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},TN=e=>{var l;const t=Rt(),n=gf(e.cols),r=iP(),[o,s]=x.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var g;const u=c.target,f=u.value,h=u.options.selectedIndex,d=((g=u.options.item(h))==null?void 0:g.label)||"";s(d);const p=new p0(e.rows).GroupBy(f),m=e.cols.find(y=>y.id===f);e.setGroups(ww(p).map((y,b)=>{const v=p[y];return{...m,groupId:Cs(),groupKey:f,index:b,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return w.jsx(x.Fragment,{children:w.jsxs(Io,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(EP,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[w.jsxs("div",{className:"flex flex-nowrap items-center",children:[w.jsx(vr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),w.jsx(Ur,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(Qr,{size:16,className:"text-danger"})})]}),e.groups.length>0?w.jsxs("section",{className:"my-4",children:[w.jsx("header",{children:w.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),w.jsx(RC,{children:w.jsx(ea.Group,{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=>w.jsx(wN,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},SN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),EN=(e,t)=>e.toSorted(SN(t)),m0=(e,t,n)=>({id:Cs(),type:n,value:e.id,label:t}),CN=e=>{const t=Rt(),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,m0(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,value:u}:h))},i=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))};return w.jsx(x.Fragment,{children:w.jsx(Io,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Iy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(vr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(vr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:w.jsx(Qr,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(xu,{size:14})," ",t.tableSortAddButton]})})]})})})},PN=e=>{const t=Rt(),[n,r]=x.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");x.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=m0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=mf(e.col);return w.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?w.jsx(hP,{size:14}):null,n==="desc"?w.jsx(dP,{size:14}):null,n==="undefined"?w.jsx(Iy,{size:14}):null]})},RN=e=>w.jsx("header",{className:"min-w-full mb-1",children:w.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[w.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[w.jsx("span",{children:w.jsx(bN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(CN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(TN,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),w.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=>w.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[w.jsxs("span",{children:[w.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),w.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[w.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),w.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=yf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function IN(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const AN=e=>{const t=x.useId(),n=Rt(),r=e.asLink||"button",o=x.useMemo(()=>IN(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return w.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[w.jsx("p",{children:w.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?w.jsxs(x.Fragment,{children:[w.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),w.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=>w.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),w.jsx("nav",{children:w.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?w.jsx("li",{children:w.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:w.jsx(x.Fragment,{children:typeof i=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},ON={top:0,left:0,right:0,bottom:-1},DN=e=>{var p;const t=Rt(),n=e.filters.filter(m=>m.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=vf(),a=r?wP:TP,l=m=>{const g=m.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==g))},c=x.useCallback(m=>{if(m===null)return;const g=new AbortController;return m.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),f=u!=null&&u.type?u.type===h0.Asc?"ascending":"descending":"none",h=mf(e.header),d=pr(void 0);return w.jsxs(ea.Item,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:d},role:"columnheader","aria-sort":f,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[w.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:w.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?w.jsx(Io,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",h]}),w.jsx(a,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:w.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:h})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(m=>w.jsx("li",{className:"my-1",children:w.jsx(xN,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(kc(e.header,i.options,i.operations))),children:[w.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?w.jsx(PN,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),w.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",dragConstraints:ON,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,g)=>{const y=m.target,b=d.get()||y.getBoundingClientRect().width,v=g.delta.x;return d.set(Math.abs(b+v))}})]})},MN=e=>w.jsx(ea.Group,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:w.jsx(yo,{children:e.headers.map(t=>w.jsx(DN,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),g0=x.createContext({}),kN=()=>x.useContext(g0),FN=x.forwardRef(({context:e,className:t="",...n},r)=>w.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:w.jsx(yo,{children:n.children})})),jN=x.forwardRef(({context:e,className:t="",...n},r)=>w.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),NN=x.forwardRef(({context:e,...t},n)=>{const r=kN(),o={...t==null?void 0:t.style,top:vn.number(r.sticky)?`${r.sticky}px`:void 0};return w.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),LN=x.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),_N=x.forwardRef((e,t)=>e.context.loadingMore?w.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:w.jsx("tr",{role:"row",className:"bg-card-background",children:w.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:w.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),VN={TableHead:NN,Table:jN,TableBody:FN,TableRow:LN,TableFoot:_N},$N=[0,0,0,0,0,0,0,0,0,0],BN=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(x.Fragment,{children:r.map((s,i)=>{var f;const a=`${i},${e}`,l=Ou(t,s.id),c=s.Element,u=((f=s.cellProps)==null?void 0:f.className)||"";return x.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):c?w.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):w.jsx(x.Fragment,{children:vn.nil(l)?"":l}))})})},WN=()=>w.jsx(x.Fragment,{}),pm=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,border:l=!1,setSorters:c,...u})=>{const f=x.useRef(null),[h,d]=x.useState(!1),p=Cc(n),m=Cc(u.loadingMore),g=x.useMemo(()=>{if(u.loading)return $N;if(r)return u.rows;const y=new p0(u.rows);return e.length>0&&e.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:y.Where(b.name,b.operation.symbol,b.value)),i.length===0?y.Select():EN(y.Select(),i)},[u.rows,e,i,u.loading]);return x.useEffect(()=>{if(f.current===null)return()=>{};const y=f.current,b=new IntersectionObserver(v=>{var E;return v[v.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void d(!0)):d(!1)});return b.observe(y),()=>b.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg ${l?"border border-table-border":""}`,children:[w.jsx(Wj,{data:g,useWindowScroll:!0,followOutput:"smooth",components:VN,totalCount:g.length,itemContent:BN,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?WN:null,fixedHeaderContent:()=>w.jsx(MN,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:s,setSorters:c,sorters:i})}),w.jsx("div",{"aria-hidden":"true",ref:f,className:"h-0.5 w-full"})]}),t!==null?w.jsx(AN,{...t}):null]})},HN=(e,t)=>typeof t=="function"?t(e):t,Js=(e,t,n)=>e===t||n==null?void 0:n(t),zN=e=>{const t=x.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=x.useMemo(()=>gf(e.cols),[e.cols]),[o,s]=Pu({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:HN(u[l],c)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),Js((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),Js((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),Js((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),Js((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return w.jsx(g0.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?w.jsx(RN,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?w.jsx(pm,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):w.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>w.jsx("div",{className:"min-w-full",children:w.jsx(pm,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var UN=String.prototype.replace,GN=/%20/g,Cl={RFC1738:"RFC1738",RFC3986:"RFC3986"},bf={default:Cl.RFC3986,formatters:{RFC1738:function(e){return UN.call(e,GN,"+")},RFC3986:function(e){return String(e)}},RFC1738:Cl.RFC1738,RFC3986:Cl.RFC3986},YN=bf,Pl=Object.prototype.hasOwnProperty,ir=Array.isArray,Xt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),KN=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(ir(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},y0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},qN=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(ir(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Pl.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return ir(t)&&!ir(n)&&(o=y0(t,r)),ir(t)&&ir(n)?(n.forEach(function(s,i){if(Pl.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Pl.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},XN=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},QN=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Rl=1024,ZN=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Rl){for(var c=i.length>=Rl?i.slice(l,l+Rl):i,u=[],f=0;f<c.length;++f){var h=c.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===YN.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(f);continue}if(h<128){u[u.length]=Xt[h];continue}if(h<2048){u[u.length]=Xt[192|h>>6]+Xt[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=Xt[224|h>>12]+Xt[128|h>>6&63]+Xt[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=Xt[240|h>>18]+Xt[128|h>>12&63]+Xt[128|h>>6&63]+Xt[128|h&63]}a+=u.join("")}return a},JN=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return KN(n),t},eL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},tL=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},nL=function(t,n){return[].concat(t,n)},rL=function(t,n){if(ir(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},v0={arrayToObject:y0,assign:XN,combine:nL,compact:JN,decode:QN,encode:ZN,isBuffer:tL,isRegExp:eL,maybeMap:rL,merge:qN},b0=gw,ui=v0,ts=bf,oL=Object.prototype.hasOwnProperty,x0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Qt=Array.isArray,sL=Array.prototype.push,w0=function(e,t){sL.apply(e,Qt(t)?t:[t])},iL=Date.prototype.toISOString,mm=ts.default,st={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ui.encode,encodeValuesOnly:!1,format:mm,formatter:ts.formatters[mm],indices:!1,serializeDate:function(t){return iL.call(t)},skipNulls:!1,strictNullHandling:!1},aL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Il={},lL=function e(t,n,r,o,s,i,a,l,c,u,f,h,d,p,m,g,y,b){for(var v=t,S=b,T=0,E=!1;(S=S.get(Il))!==void 0&&!E;){var R=S.get(t);if(T+=1,typeof R<"u"){if(R===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Il)>"u"&&(T=0)}if(typeof u=="function"?v=u(n,v):v instanceof Date?v=d(v):r==="comma"&&Qt(v)&&(v=ui.maybeMap(v,function(D){return D instanceof Date?d(D):D})),v===null){if(i)return c&&!g?c(n,st.encoder,y,"key",p):n;v=""}if(aL(v)||ui.isBuffer(v)){if(c){var I=g?n:c(n,st.encoder,y,"key",p);return[m(I)+"="+m(c(v,st.encoder,y,"value",p))]}return[m(n)+"="+m(String(v))]}var M=[];if(typeof v>"u")return M;var A;if(r==="comma"&&Qt(v))g&&c&&(v=ui.maybeMap(v,c)),A=[{value:v.length>0?v.join(",")||null:void 0}];else if(Qt(u))A=u;else{var N=Object.keys(v);A=f?N.sort(f):N}var k=l?n.replace(/\./g,"%2E"):n,j=o&&Qt(v)&&v.length===1?k+"[]":k;if(s&&Qt(v)&&v.length===0)return j+"[]";for(var P=0;P<A.length;++P){var O=A[P],F=typeof O=="object"&&typeof O.value<"u"?O.value:v[O];if(!(a&&F===null)){var _=h&&l?O.replace(/\./g,"%2E"):O,W=Qt(v)?typeof r=="function"?r(j,_):j:j+(h?"."+_:"["+_+"]");b.set(t,T);var U=b0();U.set(Il,b),w0(M,e(F,W,r,o,s,i,a,l,r==="comma"&&g&&Qt(v)?null:c,u,f,h,d,p,m,g,y,U))}}return M},cL=function(t){if(!t)return st;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||st.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ts.default;if(typeof t.format<"u"){if(!oL.call(ts.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ts.formatters[r],s=st.filter;(typeof t.filter=="function"||Qt(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in x0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=st.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:st.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:st.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:st.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:st.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?st.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:st.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:st.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:st.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:st.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:st.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:st.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:st.strictNullHandling}},uL=function(e,t){var n=e,r=cL(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Qt(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=x0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=b0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||w0(i,lL(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var h=i.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),h.length>0?d+h:""},lo=v0,Fc=Object.prototype.hasOwnProperty,fL=Array.isArray,Ze={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:lo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},dL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},T0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},hL="utf8=%26%2310003%3B",pL="utf8=%E2%9C%93",mL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===pL?c="utf-8":i[l]===hL&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],f=u.indexOf("]="),h=f===-1?u.indexOf("="):f+1,d,p;h===-1?(d=n.decoder(u,Ze.decoder,c,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),Ze.decoder,c,"key"),p=lo.maybeMap(T0(u.slice(h+1),n),function(g){return n.decoder(g,Ze.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=dL(p)),u.indexOf("[]=")>-1&&(p=fL(p)?[p]:p);var m=Fc.call(r,d);m&&n.duplicates==="combine"?r[d]=lo.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},gL=function(e,t,n,r){for(var o=r?t:T0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},yL=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&Fc.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(s))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Fc.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),gL(u,n,r,o)}},vL=function(t){if(!t)return Ze;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Ze.charset:t.charset,r=typeof t.duplicates>"u"?Ze.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Ze.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ze.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ze.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ze.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ze.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ze.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ze.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Ze.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Ze.decoder,delimiter:typeof t.delimiter=="string"||lo.isRegExp(t.delimiter)?t.delimiter:Ze.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ze.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ze.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ze.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ze.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ze.strictNullHandling}},bL=function(e,t){var n=vL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?mL(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=yL(a,r[a],n,typeof e=="string");o=lo.merge(o,l,n)}return n.allowSparse===!0?o:lo.compact(o)},xL=uL,wL=bL,TL=bf,SL={formats:TL,parse:wL,stringify:xL};const EL=(e,t)=>e.localeCompare(t),CL={sort:EL,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},S0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return SL.parse(n.toString(),CL)},E0=e=>e.replace("[",".").replace("]","").split("."),Wo=(e,t)=>E0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),Vo=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),PL=(e,t)=>{const[n,r]=x.useState(null),o=x.useRef({}),[s,i]=x.useState({}),a=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},l=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},c=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},u=(p,m)=>{const g=Wo(p,e);return{...m,name:p,id:p,required:!g.isOptional(),form:t,type:g._def.typeName==="ZodNumber"?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}};x.useEffect(()=>{const p=Object.values(o.current).map(g=>{const y=g.element.dataset.origin?document.querySelector(`[data-target="${g.element.name}"]`):g.element,b=g.schema.safeParse(Vo(y)),v=T=>{var M;const E=y.dataset.target||y.name;if(!E)return;const R=Vo(T.target)||(T.relatedTarget?Vo(T.relatedTarget):""),I=g.schema.safeParse(R);if(I.success)return y.setCustomValidity(""),i(A=>Da(A,E,I.data)),r(A=>{const{[E]:N,...k}=A||{};return k===null||vn.empty(k)?null:k});if(y.required){const A=((M=I.error.issues[0])==null?void 0:M.message)||"";y.setCustomValidity(A),r(N=>({...N,[E]:A}))}},S=y.getAttribute("data-trigger")||"blur";return y.addEventListener(S,v),y.tagName==="SELECT"&&y.addEventListener("change",v),{input:g,hasInitialError:y.required?!b.success:!1,unsubscribe:()=>{y.removeEventListener(S,v),y.tagName==="SELECT"&&y.addEventListener("change",v)}}});return p.some(g=>g.hasInitialError)&&r(g=>g===null?{}:g),()=>p.forEach(g=>g.unsubscribe())});const f=x.useCallback(p=>m=>{const g=m.currentTarget,y=Object.values(o.current).reduce((v,S)=>{var M;const T=S.element,E=S.schema.safeParse(Vo(T));if(T.dataset.ignore==="ignore"||E.success)return v;const R=(M=E.error.issues[0])==null?void 0:M.message;T.setAttribute("data-initialized","true");const I=T.dataset.name||T.name||"";return{...v,[I]:R}},{}),b=vn.empty(y)?null:y;r(b),p==null||p({form:g,errors:b||{}})},[]),h=x.useCallback(p=>m=>{m.preventDefault();const g=m.currentTarget;let y=S0(g);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(g.elements)).forEach(S=>{if(S.tagName==="SELECT"){const T=S;y=Da(y,T.name,T.value)}if(S.tagName==="INPUT"){const T=S;y=Da(y,T.name,Vo(T))}});const v=e.safeParse(s);return v.success?p({form:g,json:y,data:v.data,event:m,reset:()=>Ec(g),success:!0,errors:[]}):p({form:g,json:y,event:m,data:y,success:!1,reset:()=>Ec(g),errors:v.error.issues.map(S=>({message:S.message,path:S.path.map(T=>String(T))}))})},[t]);return{state:s,input:u,datepicker:a,checkbox:c,select:l,onSubmit:h,errors:n,onInvalid:f,disabled:n!==null,name:t,get:p=>Ou(s,p)||""}},RL=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=IP;exports.Autocomplete=$M;exports.Button=Ur;exports.Calendar=fv;exports.Card=dv;exports.Checkbox=Tb;exports.ColType=Wr;exports.Collapse=My;exports.ComponentsProvider=gA;exports.DatePicker=WM;exports.Dropdown=Io;exports.Expand=TM;exports.FileUpload=eF;exports.Form=nF;exports.Input=As;exports.InputFeedback=xb;exports.InputField=ua;exports.Menu=CM;exports.MenuItem=EM;exports.Modal=FM;exports.Notifications=wO;exports.Option=wb;exports.Polymorph=po;exports.Radiobox=oF;exports.RenderOnView=s1;exports.Select=vr;exports.Stats=TO;exports.Switch=sF;exports.Tab=CO;exports.Table=zN;exports.Tabs=SO;exports.Tag=l1;exports.TaskList=iF;exports.Textarea=rF;exports.Toolbar=jM;exports.Tooltip=bb;exports.TransferList=Uj;exports.convertPath=E0;exports.createColumns=mN;exports.createDesignTokens=sv;exports.createOptionCols=gf;exports.createStyles=uA;exports.createTheme=fA;exports.css=De;exports.defaultDarkTheme=pA;exports.defaultLightTheme=mA;exports.dispatchInput=Vm;exports.formReset=Ec;exports.formToJson=S0;exports.getSchemaShape=Wo;exports.initializeInputDataset=zi;exports.isReactComponent=t1;exports.isReactFC=n1;exports.isSsr=Ci;exports.mergeRefs=Hc;exports.parsers=Ru;exports.path=Ou;exports.reduceTokens=jr;exports.safeRegex=oc;exports.splitInto=lv;exports.useForm=PL;exports.useNotification=bO;exports.usePrevious=RL;exports.useReactive=jv;exports.useTablePreferences=vN;exports.useTranslations=Rt;exports.uuid=Cs;
202
202
  //# sourceMappingURL=index.js.map