@g4rcez/components 0.0.69 → 0.0.70
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.css +1 -1
- package/dist/index.js +84 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7119 -6654
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +84 -44
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/core/button.d.ts +1 -1
- package/dist/src/components/core/button.js +13 -13
- package/dist/src/components/core/tag.d.ts +2 -2
- package/dist/src/components/display/alert.d.ts +1 -1
- package/dist/src/components/display/calendar.d.ts.map +1 -1
- package/dist/src/components/display/calendar.js +5 -6
- package/dist/src/components/display/notifications.d.ts +1 -1
- package/dist/src/components/floating/modal.d.ts.map +1 -1
- package/dist/src/components/floating/modal.js +2 -1
- package/dist/src/hooks/use-components-provider.d.ts +1 -1
- package/dist/src/hooks/use-components-provider.d.ts.map +1 -1
- package/dist/src/hooks/use-components-provider.js +4 -2
- package/package.json +2 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(Q,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],w):(Q=typeof globalThis<"u"?globalThis:Q||self,w(Q.components={},Q.React,Q["react/jsx-runtime"],Q.ReactDOM))})(this,function(Q,w,x,Oi){"use strict";var W$=Object.defineProperty;var U$=(Q,w,x)=>w in Q?W$(Q,w,{enumerable:!0,configurable:!0,writable:!0,value:x}):Q[w]=x;var ie=(Q,w,x)=>U$(Q,typeof w!="symbol"?w+"":w,x);function zf(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 k=zf(w),ms=zf(Oi);function Hf(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=Hf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hf(e))&&(r&&(r+=" "),r+=t);return r}var Wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tx(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 Sx=Error,Ex=EvalError,Cx=RangeError,Px=ReferenceError,Uf=SyntaxError,gs=TypeError,kx=URIError,Ix=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},Gf=typeof Symbol<"u"&&Symbol,Ax=Ix,Ox=function(){return typeof Gf!="function"||typeof Symbol!="function"||typeof Gf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ax()},Il={__proto__:null,foo:{}},_x=Object,Dx=function(){return{__proto__:Il}.foo===Il.foo&&!(Il instanceof _x)},Mx="Function.prototype.bind called on incompatible ",Nx=Object.prototype.toString,Fx=Math.max,Lx="[object Function]",Yf=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},Vx=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},$x=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Rx=function(t){var n=this;if(typeof n!="function"||Nx.apply(n)!==Lx)throw new TypeError(Mx+n);for(var r=Vx(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Yf(r,arguments));return Object(u)===u?u:this}return n.apply(t,Yf(r,arguments))},i=Fx(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+$x(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},Bx=Rx,Al=Function.prototype.bind||Bx,jx=Function.prototype.call,zx=Object.prototype.hasOwnProperty,Hx=Al,Wx=Hx.call(jx,zx),Ie,Ux=Sx,Gx=Ex,Yx=Cx,qx=Px,ro=Uf,oo=gs,Kx=kx,qf=Function,Ol=function(e){try{return qf('"use strict"; return ('+e+").constructor;")()}catch{}},wr=Object.getOwnPropertyDescriptor;if(wr)try{wr({},"")}catch{wr=null}var _l=function(){throw new oo},Zx=wr?function(){try{return arguments.callee,_l}catch{try{return wr(arguments,"callee").get}catch{return _l}}}():_l,so=Ox(),Xx=Dx(),Tt=Object.getPrototypeOf||(Xx?function(e){return e.__proto__}:null),io={},Qx=typeof Uint8Array>"u"||!Tt?Ie:Tt(Uint8Array),xr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ie:ArrayBuffer,"%ArrayIteratorPrototype%":so&&Tt?Tt([][Symbol.iterator]()):Ie,"%AsyncFromSyncIteratorPrototype%":Ie,"%AsyncFunction%":io,"%AsyncGenerator%":io,"%AsyncGeneratorFunction%":io,"%AsyncIteratorPrototype%":io,"%Atomics%":typeof Atomics>"u"?Ie:Atomics,"%BigInt%":typeof BigInt>"u"?Ie:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ie:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ux,"%eval%":eval,"%EvalError%":Gx,"%Float32Array%":typeof Float32Array>"u"?Ie:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ie:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ie:FinalizationRegistry,"%Function%":qf,"%GeneratorFunction%":io,"%Int8Array%":typeof Int8Array>"u"?Ie:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ie:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":so&&Tt?Tt(Tt([][Symbol.iterator]())):Ie,"%JSON%":typeof JSON=="object"?JSON:Ie,"%Map%":typeof Map>"u"?Ie:Map,"%MapIteratorPrototype%":typeof Map>"u"||!so||!Tt?Ie:Tt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ie:Promise,"%Proxy%":typeof Proxy>"u"?Ie:Proxy,"%RangeError%":Yx,"%ReferenceError%":qx,"%Reflect%":typeof Reflect>"u"?Ie:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ie:Set,"%SetIteratorPrototype%":typeof Set>"u"||!so||!Tt?Ie:Tt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":so&&Tt?Tt(""[Symbol.iterator]()):Ie,"%Symbol%":so?Symbol:Ie,"%SyntaxError%":ro,"%ThrowTypeError%":Zx,"%TypedArray%":Qx,"%TypeError%":oo,"%Uint8Array%":typeof Uint8Array>"u"?Ie:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ie:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ie:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ie:Uint32Array,"%URIError%":Kx,"%WeakMap%":typeof WeakMap>"u"?Ie:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ie:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ie:WeakSet};if(Tt)try{null.error}catch(e){var Jx=Tt(Tt(e));xr["%Error.prototype%"]=Jx}var e1=function e(t){var n;if(t==="%AsyncFunction%")n=Ol("async function () {}");else if(t==="%GeneratorFunction%")n=Ol("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ol("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Tt&&(n=Tt(o.prototype))}return xr[t]=n,n},Kf={__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"]},ys=Al,_i=Wx,t1=ys.call(Function.call,Array.prototype.concat),n1=ys.call(Function.apply,Array.prototype.splice),Zf=ys.call(Function.call,String.prototype.replace),Di=ys.call(Function.call,String.prototype.slice),r1=ys.call(Function.call,RegExp.prototype.exec),o1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,s1=/\\(\\)?/g,i1=function(t){var n=Di(t,0,1),r=Di(t,-1);if(n==="%"&&r!=="%")throw new ro("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new ro("invalid intrinsic syntax, expected opening `%`");var o=[];return Zf(t,o1,function(s,i,a,l){o[o.length]=a?Zf(l,s1,"$1"):i||s}),o},a1=function(t,n){var r=t,o;if(_i(Kf,r)&&(o=Kf[r],r="%"+o[0]+"%"),_i(xr,r)){var s=xr[r];if(s===io&&(s=e1(r)),typeof s>"u"&&!n)throw new oo("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new ro("intrinsic "+t+" does not exist!")},ao=function(t,n){if(typeof t!="string"||t.length===0)throw new oo("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new oo('"allowMissing" argument must be a boolean');if(r1(/^%?[^%]*%?$/,t)===null)throw new ro("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=i1(t),o=r.length>0?r[0]:"",s=a1("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],n1(r,t1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=Di(f,0,1),p=Di(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new ro("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",_i(xr,i))a=xr[i];else if(a!=null){if(!(f in a)){if(!n)throw new oo("base intrinsic for "+t+" exists, but the property is not available.");return}if(wr&&u+1>=r.length){var m=wr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=_i(a,f),a=a[f];d&&!l&&(xr[i]=a)}}return a},Xf={exports:{}},Dl,Qf;function Ml(){if(Qf)return Dl;Qf=1;var e=ao,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Dl=t,Dl}var l1=ao,Mi=l1("%Object.getOwnPropertyDescriptor%",!0);if(Mi)try{Mi([],"length")}catch{Mi=null}var Jf=Mi,eh=Ml(),c1=Uf,lo=gs,th=Jf,u1=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new lo("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new lo("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new lo("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new lo("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new lo("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new lo("`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=!!th&&th(t,n);if(eh)eh(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 c1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Nl=Ml(),nh=function(){return!!Nl};nh.hasArrayLengthDefineBug=function(){if(!Nl)return null;try{return Nl([],"length",{value:1}).length!==1}catch{return!0}};var d1=nh,f1=ao,rh=u1,h1=d1(),oh=Jf,sh=gs,p1=f1("%Math.floor%"),m1=function(t,n){if(typeof t!="function")throw new sh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||p1(n)!==n)throw new sh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&oh){var i=oh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(h1?rh(t,"length",n,!0,!0):rh(t,"length",n)),t};(function(e){var t=Al,n=ao,r=m1,o=gs,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Ml(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Xf);var g1=Xf.exports,ih=ao,ah=g1,y1=ah(ih("String.prototype.indexOf")),v1=function(t,n){var r=ih(t,!!n);return typeof r=="function"&&y1(t,".prototype.")>-1?ah(r):r};const b1=Tx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Fl=typeof Map=="function"&&Map.prototype,Ll=Object.getOwnPropertyDescriptor&&Fl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ni=Fl&&Ll&&typeof Ll.get=="function"?Ll.get:null,lh=Fl&&Map.prototype.forEach,Vl=typeof Set=="function"&&Set.prototype,$l=Object.getOwnPropertyDescriptor&&Vl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Fi=Vl&&$l&&typeof $l.get=="function"?$l.get:null,ch=Vl&&Set.prototype.forEach,w1=typeof WeakMap=="function"&&WeakMap.prototype,vs=w1?WeakMap.prototype.has:null,x1=typeof WeakSet=="function"&&WeakSet.prototype,bs=x1?WeakSet.prototype.has:null,T1=typeof WeakRef=="function"&&WeakRef.prototype,uh=T1?WeakRef.prototype.deref:null,S1=Boolean.prototype.valueOf,E1=Object.prototype.toString,C1=Function.prototype.toString,P1=String.prototype.match,Rl=String.prototype.slice,qn=String.prototype.replace,k1=String.prototype.toUpperCase,dh=String.prototype.toLowerCase,fh=RegExp.prototype.test,hh=Array.prototype.concat,yn=Array.prototype.join,I1=Array.prototype.slice,ph=Math.floor,Bl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,jl=Object.getOwnPropertySymbols,zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,co=typeof Symbol=="function"&&typeof Symbol.iterator=="object",_t=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===co||!0)?Symbol.toStringTag:null,mh=Object.prototype.propertyIsEnumerable,gh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function yh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||fh.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-ph(-e):ph(e);if(r!==e){var o=String(r),s=Rl.call(t,o.length+1);return qn.call(o,n,"$&_")+"."+qn.call(qn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qn.call(t,n,"$&_")}var Hl=b1,vh=Hl.custom,bh=Th(vh)?vh:null,A1=function e(t,n,r,o){var s=n||{};if(Kn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Kn(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=Kn(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(Kn(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(Kn(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 Eh(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?yh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?yh(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 Wl(t)?"[Array]":"[Object]";var d=Y1(s,r);if(typeof o>"u")o=[];else if(Sh(o,t)>=0)return"[Circular]";function f(F,P,N){if(P&&(o=I1.call(o),o.push(P)),N){var L={depth:s.depth};return Kn(s,"quoteStyle")&&(L.quoteStyle=s.quoteStyle),e(F,L,r+1,o)}return e(F,s,r+1,o)}if(typeof t=="function"&&!xh(t)){var h=$1(t),p=Li(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+yn.call(p,", ")+" }":"")}if(Th(t)){var m=co?qn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):zl.call(t);return typeof t=="object"&&!co?ws(m):m}if(W1(t)){for(var b="<"+dh.call(String(t.nodeName)),v=t.attributes||[],y=0;y<v.length;y++)b+=" "+v[y].name+"="+wh(O1(v[y].value),"double",s);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+dh.call(String(t.nodeName))+">",b}if(Wl(t)){if(t.length===0)return"[]";var g=Li(t,f);return d&&!G1(g)?"["+Gl(g,d)+"]":"[ "+yn.call(g,", ")+" ]"}if(D1(t)){var S=Li(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!mh.call(t,"cause")?"{ ["+String(t)+"] "+yn.call(hh.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+yn.call(S,", ")+" }"}if(typeof t=="object"&&i){if(bh&&typeof t[bh]=="function"&&Hl)return Hl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(R1(t)){var T=[];return lh&&lh.call(t,function(F,P){T.push(f(P,t,!0)+" => "+f(F,t))}),Ch("Map",Ni.call(t),T,d)}if(z1(t)){var E=[];return ch&&ch.call(t,function(F){E.push(f(F,t))}),Ch("Set",Fi.call(t),E,d)}if(B1(t))return Ul("WeakMap");if(H1(t))return Ul("WeakSet");if(j1(t))return Ul("WeakRef");if(N1(t))return ws(f(Number(t)));if(L1(t))return ws(f(Bl.call(t)));if(F1(t))return ws(S1.call(t));if(M1(t))return ws(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Wf<"u"&&t===Wf)return"{ [object globalThis] }";if(!_1(t)&&!xh(t)){var C=Li(t,f),I=gh?gh(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",O=!I&&_t&&Object(t)===t&&_t in t?Rl.call(Zn(t),8,-1):A?"Object":"",M=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",_=M+(O||A?"["+yn.call(hh.call([],O||[],A||[]),": ")+"] ":"");return C.length===0?_+"{}":d?_+"{"+Gl(C,d)+"}":_+"{ "+yn.call(C,", ")+" }"}return String(t)};function wh(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function O1(e){return qn.call(String(e),/"/g,""")}function Wl(e){return Zn(e)==="[object Array]"&&(!_t||!(typeof e=="object"&&_t in e))}function _1(e){return Zn(e)==="[object Date]"&&(!_t||!(typeof e=="object"&&_t in e))}function xh(e){return Zn(e)==="[object RegExp]"&&(!_t||!(typeof e=="object"&&_t in e))}function D1(e){return Zn(e)==="[object Error]"&&(!_t||!(typeof e=="object"&&_t in e))}function M1(e){return Zn(e)==="[object String]"&&(!_t||!(typeof e=="object"&&_t in e))}function N1(e){return Zn(e)==="[object Number]"&&(!_t||!(typeof e=="object"&&_t in e))}function F1(e){return Zn(e)==="[object Boolean]"&&(!_t||!(typeof e=="object"&&_t in e))}function Th(e){if(co)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!zl)return!1;try{return zl.call(e),!0}catch{}return!1}function L1(e){if(!e||typeof e!="object"||!Bl)return!1;try{return Bl.call(e),!0}catch{}return!1}var V1=Object.prototype.hasOwnProperty||function(e){return e in this};function Kn(e,t){return V1.call(e,t)}function Zn(e){return E1.call(e)}function $1(e){if(e.name)return e.name;var t=P1.call(C1.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Sh(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 R1(e){if(!Ni||!e||typeof e!="object")return!1;try{Ni.call(e);try{Fi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function B1(e){if(!vs||!e||typeof e!="object")return!1;try{vs.call(e,vs);try{bs.call(e,bs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function j1(e){if(!uh||!e||typeof e!="object")return!1;try{return uh.call(e),!0}catch{}return!1}function z1(e){if(!Fi||!e||typeof e!="object")return!1;try{Fi.call(e);try{Ni.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function H1(e){if(!bs||!e||typeof e!="object")return!1;try{bs.call(e,bs);try{vs.call(e,vs)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function W1(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Eh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Eh(Rl.call(e,0,t.maxStringLength),t)+r}var o=qn.call(qn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,U1);return wh(o,"single",t)}function U1(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":"")+k1.call(t.toString(16))}function ws(e){return"Object("+e+")"}function Ul(e){return e+" { ? }"}function Ch(e,t,n,r){var o=r?Gl(n,r):yn.call(n,", ");return e+" ("+t+") {"+o+"}"}function G1(e){for(var t=0;t<e.length;t++)if(Sh(e[t],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
1
|
+
(function(Q,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],w):(Q=typeof globalThis<"u"?globalThis:Q||self,w(Q.components={},Q.React,Q["react/jsx-runtime"],Q.ReactDOM))})(this,function(Q,w,x,Ni){"use strict";var XR=Object.defineProperty;var QR=(Q,w,x)=>w in Q?XR(Q,w,{enumerable:!0,configurable:!0,writable:!0,value:x}):Q[w]=x;var ie=(Q,w,x)=>QR(Q,typeof w!="symbol"?w+"":w,x);function rh(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=rh(w),bs=rh(Ni);function oh(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=oh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Gx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=oh(e))&&(r&&(r+=" "),r+=t);return r}var sh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qx(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 Kx=Error,Zx=EvalError,Xx=RangeError,Qx=ReferenceError,ih=SyntaxError,ws=TypeError,Jx=URIError,e1=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},ah=typeof Symbol<"u"&&Symbol,t1=e1,n1=function(){return typeof ah!="function"||typeof Symbol!="function"||typeof ah("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t1()},Vl={__proto__:null,foo:{}},r1=Object,o1=function(){return{__proto__:Vl}.foo===Vl.foo&&!(Vl instanceof r1)},s1="Function.prototype.bind called on incompatible ",i1=Object.prototype.toString,a1=Math.max,l1="[object Function]",lh=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},c1=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},u1=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},d1=function(t){var n=this;if(typeof n!="function"||i1.apply(n)!==l1)throw new TypeError(s1+n);for(var r=c1(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,lh(r,arguments));return Object(u)===u?u:this}return n.apply(t,lh(r,arguments))},i=a1(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+u1(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},f1=d1,$l=Function.prototype.bind||f1,h1=Function.prototype.call,p1=Object.prototype.hasOwnProperty,m1=$l,g1=m1.call(h1,p1),Ie,y1=Kx,v1=Zx,b1=Xx,w1=Qx,oo=ih,so=ws,x1=Jx,ch=Function,Rl=function(e){try{return ch('"use strict"; return ('+e+").constructor;")()}catch{}},xr=Object.getOwnPropertyDescriptor;if(xr)try{xr({},"")}catch{xr=null}var Bl=function(){throw new so},T1=xr?function(){try{return arguments.callee,Bl}catch{try{return xr(arguments,"callee").get}catch{return Bl}}}():Bl,io=n1(),S1=o1(),Tt=Object.getPrototypeOf||(S1?function(e){return e.__proto__}:null),ao={},E1=typeof Uint8Array>"u"||!Tt?Ie:Tt(Uint8Array),Tr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ie:ArrayBuffer,"%ArrayIteratorPrototype%":io&&Tt?Tt([][Symbol.iterator]()):Ie,"%AsyncFromSyncIteratorPrototype%":Ie,"%AsyncFunction%":ao,"%AsyncGenerator%":ao,"%AsyncGeneratorFunction%":ao,"%AsyncIteratorPrototype%":ao,"%Atomics%":typeof Atomics>"u"?Ie:Atomics,"%BigInt%":typeof BigInt>"u"?Ie:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ie:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":y1,"%eval%":eval,"%EvalError%":v1,"%Float32Array%":typeof Float32Array>"u"?Ie:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ie:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ie:FinalizationRegistry,"%Function%":ch,"%GeneratorFunction%":ao,"%Int8Array%":typeof Int8Array>"u"?Ie:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ie:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":io&&Tt?Tt(Tt([][Symbol.iterator]())):Ie,"%JSON%":typeof JSON=="object"?JSON:Ie,"%Map%":typeof Map>"u"?Ie:Map,"%MapIteratorPrototype%":typeof Map>"u"||!io||!Tt?Ie:Tt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ie:Promise,"%Proxy%":typeof Proxy>"u"?Ie:Proxy,"%RangeError%":b1,"%ReferenceError%":w1,"%Reflect%":typeof Reflect>"u"?Ie:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ie:Set,"%SetIteratorPrototype%":typeof Set>"u"||!io||!Tt?Ie:Tt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":io&&Tt?Tt(""[Symbol.iterator]()):Ie,"%Symbol%":io?Symbol:Ie,"%SyntaxError%":oo,"%ThrowTypeError%":T1,"%TypedArray%":E1,"%TypeError%":so,"%Uint8Array%":typeof Uint8Array>"u"?Ie:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ie:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ie:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ie:Uint32Array,"%URIError%":x1,"%WeakMap%":typeof WeakMap>"u"?Ie:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ie:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ie:WeakSet};if(Tt)try{null.error}catch(e){var C1=Tt(Tt(e));Tr["%Error.prototype%"]=C1}var P1=function e(t){var n;if(t==="%AsyncFunction%")n=Rl("async function () {}");else if(t==="%GeneratorFunction%")n=Rl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Rl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Tt&&(n=Tt(o.prototype))}return Tr[t]=n,n},uh={__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"]},xs=$l,Li=g1,k1=xs.call(Function.call,Array.prototype.concat),I1=xs.call(Function.apply,Array.prototype.splice),dh=xs.call(Function.call,String.prototype.replace),Fi=xs.call(Function.call,String.prototype.slice),A1=xs.call(Function.call,RegExp.prototype.exec),O1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_1=/\\(\\)?/g,D1=function(t){var n=Fi(t,0,1),r=Fi(t,-1);if(n==="%"&&r!=="%")throw new oo("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new oo("invalid intrinsic syntax, expected opening `%`");var o=[];return dh(t,O1,function(s,i,a,l){o[o.length]=a?dh(l,_1,"$1"):i||s}),o},M1=function(t,n){var r=t,o;if(Li(uh,r)&&(o=uh[r],r="%"+o[0]+"%"),Li(Tr,r)){var s=Tr[r];if(s===ao&&(s=P1(r)),typeof s>"u"&&!n)throw new so("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new oo("intrinsic "+t+" does not exist!")},lo=function(t,n){if(typeof t!="string"||t.length===0)throw new so("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new so('"allowMissing" argument must be a boolean');if(A1(/^%?[^%]*%?$/,t)===null)throw new oo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=D1(t),o=r.length>0?r[0]:"",s=M1("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],I1(r,k1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=Fi(f,0,1),p=Fi(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new oo("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",Li(Tr,i))a=Tr[i];else if(a!=null){if(!(f in a)){if(!n)throw new so("base intrinsic for "+t+" exists, but the property is not available.");return}if(xr&&u+1>=r.length){var m=xr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=Li(a,f),a=a[f];d&&!l&&(Tr[i]=a)}}return a},fh={exports:{}},jl,hh;function Wl(){if(hh)return jl;hh=1;var e=lo,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return jl=t,jl}var N1=lo,Vi=N1("%Object.getOwnPropertyDescriptor%",!0);if(Vi)try{Vi([],"length")}catch{Vi=null}var ph=Vi,mh=Wl(),L1=ih,co=ws,gh=ph,F1=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new co("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new co("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new co("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new co("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new co("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new co("`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=!!gh&&gh(t,n);if(mh)mh(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 L1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Hl=Wl(),yh=function(){return!!Hl};yh.hasArrayLengthDefineBug=function(){if(!Hl)return null;try{return Hl([],"length",{value:1}).length!==1}catch{return!0}};var V1=yh,$1=lo,vh=F1,R1=V1(),bh=ph,wh=ws,B1=$1("%Math.floor%"),j1=function(t,n){if(typeof t!="function")throw new wh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||B1(n)!==n)throw new wh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&bh){var i=bh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(R1?vh(t,"length",n,!0,!0):vh(t,"length",n)),t};(function(e){var t=$l,n=lo,r=j1,o=ws,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Wl(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(fh);var W1=fh.exports,xh=lo,Th=W1,H1=Th(xh("String.prototype.indexOf")),z1=function(t,n){var r=xh(t,!!n);return typeof r=="function"&&H1(t,".prototype.")>-1?Th(r):r};const U1=qx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var zl=typeof Map=="function"&&Map.prototype,Ul=Object.getOwnPropertyDescriptor&&zl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$i=zl&&Ul&&typeof Ul.get=="function"?Ul.get:null,Sh=zl&&Map.prototype.forEach,Gl=typeof Set=="function"&&Set.prototype,Yl=Object.getOwnPropertyDescriptor&&Gl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ri=Gl&&Yl&&typeof Yl.get=="function"?Yl.get:null,Eh=Gl&&Set.prototype.forEach,G1=typeof WeakMap=="function"&&WeakMap.prototype,Ts=G1?WeakMap.prototype.has:null,Y1=typeof WeakSet=="function"&&WeakSet.prototype,Ss=Y1?WeakSet.prototype.has:null,q1=typeof WeakRef=="function"&&WeakRef.prototype,Ch=q1?WeakRef.prototype.deref:null,K1=Boolean.prototype.valueOf,Z1=Object.prototype.toString,X1=Function.prototype.toString,Q1=String.prototype.match,ql=String.prototype.slice,Kn=String.prototype.replace,J1=String.prototype.toUpperCase,Ph=String.prototype.toLowerCase,kh=RegExp.prototype.test,Ih=Array.prototype.concat,yn=Array.prototype.join,eT=Array.prototype.slice,Ah=Math.floor,Kl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Zl=Object.getOwnPropertySymbols,Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,uo=typeof Symbol=="function"&&typeof Symbol.iterator=="object",_t=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===uo||!0)?Symbol.toStringTag:null,Oh=Object.prototype.propertyIsEnumerable,_h=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Dh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||kh.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Ah(-e):Ah(e);if(r!==e){var o=String(r),s=ql.call(t,o.length+1);return Kn.call(o,n,"$&_")+"."+Kn.call(Kn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Kn.call(t,n,"$&_")}var Ql=U1,Mh=Ql.custom,Nh=Vh(Mh)?Mh:null,tT=function e(t,n,r,o){var s=n||{};if(Zn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Zn(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=Zn(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(Zn(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(Zn(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 Rh(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Dh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Dh(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 Jl(t)?"[Array]":"[Object]";var d=bT(s,r);if(typeof o>"u")o=[];else if($h(o,t)>=0)return"[Circular]";function f(V,k,M){if(k&&(o=eT.call(o),o.push(k)),M){var F={depth:s.depth};return Zn(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(V,F,r+1,o)}return e(V,s,r+1,o)}if(typeof t=="function"&&!Fh(t)){var h=uT(t),p=Bi(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+yn.call(p,", ")+" }":"")}if(Vh(t)){var m=uo?Kn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Xl.call(t);return typeof t=="object"&&!uo?Es(m):m}if(gT(t)){for(var y="<"+Ph.call(String(t.nodeName)),b=t.attributes||[],v=0;v<b.length;v++)y+=" "+b[v].name+"="+Lh(nT(b[v].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+Ph.call(String(t.nodeName))+">",y}if(Jl(t)){if(t.length===0)return"[]";var g=Bi(t,f);return d&&!vT(g)?"["+tc(g,d)+"]":"[ "+yn.call(g,", ")+" ]"}if(oT(t)){var S=Bi(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Oh.call(t,"cause")?"{ ["+String(t)+"] "+yn.call(Ih.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+yn.call(S,", ")+" }"}if(typeof t=="object"&&i){if(Nh&&typeof t[Nh]=="function"&&Ql)return Ql(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(dT(t)){var T=[];return Sh&&Sh.call(t,function(V,k){T.push(f(k,t,!0)+" => "+f(V,t))}),Bh("Map",$i.call(t),T,d)}if(pT(t)){var E=[];return Eh&&Eh.call(t,function(V){E.push(f(V,t))}),Bh("Set",Ri.call(t),E,d)}if(fT(t))return ec("WeakMap");if(mT(t))return ec("WeakSet");if(hT(t))return ec("WeakRef");if(iT(t))return Es(f(Number(t)));if(lT(t))return Es(f(Kl.call(t)));if(aT(t))return Es(K1.call(t));if(sT(t))return Es(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof sh<"u"&&t===sh)return"{ [object globalThis] }";if(!rT(t)&&!Fh(t)){var C=Bi(t,f),I=_h?_h(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",O=!I&&_t&&Object(t)===t&&_t in t?ql.call(Xn(t),8,-1):A?"Object":"",L=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",_=L+(O||A?"["+yn.call(Ih.call([],O||[],A||[]),": ")+"] ":"");return C.length===0?_+"{}":d?_+"{"+tc(C,d)+"}":_+"{ "+yn.call(C,", ")+" }"}return String(t)};function Lh(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function nT(e){return Kn.call(String(e),/"/g,""")}function Jl(e){return Xn(e)==="[object Array]"&&(!_t||!(typeof e=="object"&&_t in e))}function rT(e){return Xn(e)==="[object Date]"&&(!_t||!(typeof e=="object"&&_t in e))}function Fh(e){return Xn(e)==="[object RegExp]"&&(!_t||!(typeof e=="object"&&_t in e))}function oT(e){return Xn(e)==="[object Error]"&&(!_t||!(typeof e=="object"&&_t in e))}function sT(e){return Xn(e)==="[object String]"&&(!_t||!(typeof e=="object"&&_t in e))}function iT(e){return Xn(e)==="[object Number]"&&(!_t||!(typeof e=="object"&&_t in e))}function aT(e){return Xn(e)==="[object Boolean]"&&(!_t||!(typeof e=="object"&&_t in e))}function Vh(e){if(uo)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Xl)return!1;try{return Xl.call(e),!0}catch{}return!1}function lT(e){if(!e||typeof e!="object"||!Kl)return!1;try{return Kl.call(e),!0}catch{}return!1}var cT=Object.prototype.hasOwnProperty||function(e){return e in this};function Zn(e,t){return cT.call(e,t)}function Xn(e){return Z1.call(e)}function uT(e){if(e.name)return e.name;var t=Q1.call(X1.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function $h(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 dT(e){if(!$i||!e||typeof e!="object")return!1;try{$i.call(e);try{Ri.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function fT(e){if(!Ts||!e||typeof e!="object")return!1;try{Ts.call(e,Ts);try{Ss.call(e,Ss)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function hT(e){if(!Ch||!e||typeof e!="object")return!1;try{return Ch.call(e),!0}catch{}return!1}function pT(e){if(!Ri||!e||typeof e!="object")return!1;try{Ri.call(e);try{$i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function mT(e){if(!Ss||!e||typeof e!="object")return!1;try{Ss.call(e,Ss);try{Ts.call(e,Ts)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function gT(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Rh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Rh(ql.call(e,0,t.maxStringLength),t)+r}var o=Kn.call(Kn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,yT);return Lh(o,"single",t)}function yT(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":"")+J1.call(t.toString(16))}function Es(e){return"Object("+e+")"}function ec(e){return e+" { ? }"}function Bh(e,t,n,r){var o=r?tc(n,r):yn.call(n,", ");return e+" ("+t+") {"+o+"}"}function vT(e){for(var t=0;t<e.length;t++)if($h(e[t],`
|
|
2
|
+
`)>=0)return!1;return!0}function bT(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=yn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:yn.call(Array(t+1),n)}}function tc(e,t){if(e.length===0)return"";var n=`
|
|
3
3
|
`+t.prev+t.base;return n+yn.call(e,","+n)+`
|
|
4
|
-
`+t.prev}function Li(e,t){var n=Wl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Kn(e,o)?t(e[o],e):""}var s=typeof jl=="function"?jl(e):[],i;if(co){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Kn(e,l)&&(n&&String(Number(l))===l&&l<e.length||co&&i["$"+l]instanceof Symbol||(fh.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof jl=="function")for(var c=0;c<s.length;c++)mh.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Ph=ao,uo=v1,q1=A1,K1=gs,Vi=Ph("%WeakMap%",!0),$i=Ph("%Map%",!0),Z1=uo("WeakMap.prototype.get",!0),X1=uo("WeakMap.prototype.set",!0),Q1=uo("WeakMap.prototype.has",!0),J1=uo("Map.prototype.get",!0),eT=uo("Map.prototype.set",!0),tT=uo("Map.prototype.has",!0),Yl=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},nT=function(e,t){var n=Yl(e,t);return n&&n.value},rT=function(e,t,n){var r=Yl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},oT=function(e,t){return!!Yl(e,t)},sT=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new K1("Side channel does not contain "+q1(s))},get:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Z1(t,s)}else if($i){if(n)return J1(n,s)}else if(r)return nT(r,s)},has:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Q1(t,s)}else if($i){if(n)return tT(n,s)}else if(r)return oT(r,s);return!1},set:function(s,i){Vi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Vi),X1(t,s,i)):$i?(n||(n=new $i),eT(n,s,i)):(r||(r={key:{},next:null}),rT(r,s,i))}};return o},kh=e=>Array.isArray(e),ql=e=>e===void 0,Kl=e=>e===null,iT=Function.bind.call(Function.call,Object.prototype.toString),aT=e=>!!e&&iT(e)==="[object Error]"||e instanceof Error,Ih=(e,t)=>e instanceof t,lT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},cT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Ih(e,Date),Ct={array:kh,date:cT,empty:e=>Kl(e)||ql(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:Ih,isError:aT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Kl(e)||ql(e),null:Kl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!kh(e)&&typeof e=="object",primitive:lT,string:e=>typeof e=="string",undefined:ql},uT=e=>Object.keys(e),Tr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((s,i)=>s&&s[i],e);return o===void 0?n:o};const Zl="-";function dT(e){const t=hT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Zl);return a[0]===""&&a.length!==1&&a.shift(),Ah(a,t)||fT(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Ah(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ah(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Zl);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Oh=/^\[(.+)\]$/;function fT(e){if(Oh.test(e)){const t=Oh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function hT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return mT(Object.entries(e.classGroups),n).forEach(([s,i])=>{Xl(i,r,s,t)}),r}function Xl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:_h(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(pT(o)){Xl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Xl(i,_h(t,s),n,r)})})}function _h(e,t){let n=e;return t.split(Zl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function pT(e){return e.isThemeGetter}function mT(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 gT(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 Dh="!";function yT(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,d;for(let b=0;b<a.length;b++){let v=a[b];if(c===0){if(v===o&&(r||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(v==="/"){d=b;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Dh),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function vT(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 bT(e){return{cache:gT(e.cacheSize),parseClassName:yT(e),...dT(e)}}const wT=/\s+/;function xT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(wT).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=vT(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Dh:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).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(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function TT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Mh(t))&&(r&&(r+=" "),r+=n);return r}function Mh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Mh(e[r]))&&(n&&(n+=" "),n+=t);return n}function ST(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=bT(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=xT(l,n);return o(l,u),u}return function(){return s(TT.apply(null,arguments))}}function qe(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Nh=/^\[(?:([a-z-]+):)?(.+)\]$/i,ET=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),PT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,IT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,AT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Vn(e){return Sr(e)||CT.has(e)||ET.test(e)}function Xn(e){return fo(e,"length",$T)}function Sr(e){return!!e&&!Number.isNaN(Number(e))}function Ri(e){return fo(e,"number",Sr)}function xs(e){return!!e&&Number.isInteger(Number(e))}function _T(e){return e.endsWith("%")&&Sr(e.slice(0,-1))}function Se(e){return Nh.test(e)}function Qn(e){return PT.test(e)}const DT=new Set(["length","size","percentage"]);function MT(e){return fo(e,DT,Fh)}function NT(e){return fo(e,"position",Fh)}const FT=new Set(["image","url"]);function LT(e){return fo(e,FT,BT)}function VT(e){return fo(e,"",RT)}function Ts(){return!0}function fo(e,t,n){const r=Nh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function $T(e){return kT.test(e)&&!IT.test(e)}function Fh(){return!1}function RT(e){return AT.test(e)}function BT(e){return OT.test(e)}function jT(){const e=qe("colors"),t=qe("spacing"),n=qe("blur"),r=qe("brightness"),o=qe("borderColor"),s=qe("borderRadius"),i=qe("borderSpacing"),a=qe("borderWidth"),l=qe("contrast"),c=qe("grayscale"),u=qe("hueRotate"),d=qe("invert"),f=qe("gap"),h=qe("gradientColorStops"),p=qe("gradientColorStopPositions"),m=qe("inset"),b=qe("margin"),v=qe("opacity"),y=qe("padding"),g=qe("saturate"),S=qe("scale"),T=qe("sepia"),E=qe("skew"),C=qe("space"),I=qe("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",Se,t],_=()=>[Se,t],F=()=>["",Vn,Xn],P=()=>["auto",Sr,Se],N=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",Se],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Sr,Ri],K=()=>[Sr,Se];return{cacheSize:500,separator:":",theme:{colors:[Ts],spacing:[Vn,Xn],blur:["none","",Qn,Se],brightness:j(),borderColor:[e],borderRadius:["none","","full",Qn,Se],borderSpacing:_(),borderWidth:F(),contrast:j(),grayscale:W(),hueRotate:K(),invert:W(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[_T,Xn],inset:M(),margin:M(),opacity:j(),padding:_(),saturate:j(),scale:j(),sepia:W(),skew:K(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[Qn]}],"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:[...N(),Se]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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",xs,Se]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",xs,Se]}],"grid-cols":[{"grid-cols":[Ts]}],"col-start-end":[{col:["auto",{span:["full",xs,Se]},Se]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Ts]}],"row-start-end":[{row:["auto",{span:[xs,Se]},Se]}],"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",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,t]}],"min-w":[{"min-w":[Se,t,"min","max","fit"]}],"max-w":[{"max-w":[Se,t,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[Se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ri]}],"font-family":[{font:[Ts]}],"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",Se]}],"line-clamp":[{"line-clamp":["none",Sr,Ri]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"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:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,Xn]}],"underline-offset":[{"underline-offset":["auto",Vn,Se]}],"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:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],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",Se]}],"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:[...N(),NT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",MT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],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:[...L(),"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:L()}],"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:["",...L()]}],"outline-offset":[{"outline-offset":[Vn,Se]}],"outline-w":[{outline:[Vn,Xn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Vn,Xn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qn,VT]}],"shadow-color":[{shadow:[Ts]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qn,Se]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],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":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"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",Se]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[xs,Se]}],"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",Se]}],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",Se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",Se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vn,Xn,Ri]}],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 zT=ST(jT),Ql=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},HT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),WT=e=>Ct.function(e),$e=(...e)=>zT(wx(e)),Jl=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Ss=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},en=(e,t=2)=>e.toString(16).padStart(t,"0"),Es=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${en(t,4)+en(n,3)}-${en(r[0])+en(r[1])}-${en(r[2])+en(r[3])}-${en(r[4])+en(r[5])}-${en(r[6])+en(r[7])+en(r[8])+en(r[9])}`},Lh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Vh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},ec=(e,t)=>{const n=Lh(t,Vh.basic,e)||Lh(t,Vh.extend,e);return n===void 0||n===e?void 0:n},Bi=()=>typeof window>"u",Cs=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),$h=(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};function Rh(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=Rh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function UT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Rh(e))&&(r&&(r+=" "),r+=t);return r}const Bh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,jh=UT,ho=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return jh(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],d=s==null?void 0:s[c];if(u===null)return null;const f=Bh(u)||Bh(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,f]:c},[]);return jh(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},po=w.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return x.jsx(s,{ref:o,...r,children:n})}),GT=ho("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"}}),mo=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:$e(GT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),zh=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function YT(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 qT=({children:e,...t})=>{const n=zh(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:YT(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(d=>c.isIntersecting?!0:d)});return a.observe(i),()=>a.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},KT=ho("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"}}}),ZT=ho("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"}}),XT=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:$e(ZT({size:i,theme:s}),t),children:[n?x.jsx("span",{className:KT({theme:n})}):null,r,a.children]})}),Ps=w.createContext({});function an(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const ji=w.createContext(null),go=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class QT extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function JT({children:e,isPresent:t,anchorX:n}){const r=w.useId(),o=w.useRef(null),s=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=w.useContext(go);return w.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u,right:d}=s.current;if(t||!o.current||!a||!l)return;const f=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const h=document.createElement("style");return i&&(h.nonce=i),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
4
|
+
`+t.prev}function Bi(e,t){var n=Jl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Zn(e,o)?t(e[o],e):""}var s=typeof Zl=="function"?Zl(e):[],i;if(uo){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Zn(e,l)&&(n&&String(Number(l))===l&&l<e.length||uo&&i["$"+l]instanceof Symbol||(kh.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Zl=="function")for(var c=0;c<s.length;c++)Oh.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var jh=lo,fo=z1,wT=tT,xT=ws,ji=jh("%WeakMap%",!0),Wi=jh("%Map%",!0),TT=fo("WeakMap.prototype.get",!0),ST=fo("WeakMap.prototype.set",!0),ET=fo("WeakMap.prototype.has",!0),CT=fo("Map.prototype.get",!0),PT=fo("Map.prototype.set",!0),kT=fo("Map.prototype.has",!0),nc=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},IT=function(e,t){var n=nc(e,t);return n&&n.value},AT=function(e,t,n){var r=nc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},OT=function(e,t){return!!nc(e,t)},_T=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new xT("Side channel does not contain "+wT(s))},get:function(s){if(ji&&s&&(typeof s=="object"||typeof s=="function")){if(t)return TT(t,s)}else if(Wi){if(n)return CT(n,s)}else if(r)return IT(r,s)},has:function(s){if(ji&&s&&(typeof s=="object"||typeof s=="function")){if(t)return ET(t,s)}else if(Wi){if(n)return kT(n,s)}else if(r)return OT(r,s);return!1},set:function(s,i){ji&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new ji),ST(t,s,i)):Wi?(n||(n=new Wi),PT(n,s,i)):(r||(r={key:{},next:null}),AT(r,s,i))}};return o},Wh=e=>Array.isArray(e),rc=e=>e===void 0,oc=e=>e===null,DT=Function.bind.call(Function.call,Object.prototype.toString),MT=e=>!!e&&DT(e)==="[object Error]"||e instanceof Error,Hh=(e,t)=>e instanceof t,NT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},LT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Hh(e,Date),Ct={array:Wh,date:LT,empty:e=>oc(e)||rc(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Hh,isError:MT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>oc(e)||rc(e),null:oc,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Wh(e)&&typeof e=="object",primitive:NT,string:e=>typeof e=="string",undefined:rc},FT=e=>Object.keys(e),Sr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((s,i)=>s&&s[i],e);return o===void 0?n:o};const sc="-";function VT(e){const t=RT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(sc);return a[0]===""&&a.length!==1&&a.shift(),zh(a,t)||$T(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function zh(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?zh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(sc);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Uh=/^\[(.+)\]$/;function $T(e){if(Uh.test(e)){const t=Uh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function RT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jT(Object.entries(e.classGroups),n).forEach(([s,i])=>{ic(i,r,s,t)}),r}function ic(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Gh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(BT(o)){ic(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{ic(i,Gh(t,s),n,r)})})}function Gh(e,t){let n=e;return t.split(sc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function BT(e){return e.isThemeGetter}function jT(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 WT(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 Yh="!";function HT(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,d;for(let y=0;y<a.length;y++){let b=a[y];if(c===0){if(b===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(b==="/"){d=y;continue}}b==="["?c++:b==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Yh),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function zT(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 UT(e){return{cache:WT(e.cacheSize),parseClassName:HT(e),...VT(e)}}const GT=/\s+/;function YT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(GT).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=zT(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Yh:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).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(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function qT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qh(t))&&(r&&(r+=" "),r+=n);return r}function qh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qh(e[r]))&&(n&&(n+=" "),n+=t);return n}function KT(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=UT(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=YT(l,n);return o(l,u),u}return function(){return s(qT.apply(null,arguments))}}function qe(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Kh=/^\[(?:([a-z-]+):)?(.+)\]$/i,ZT=/^\d+\/\d+$/,XT=new Set(["px","full","screen"]),QT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JT=/\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$/,eS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,tS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $n(e){return Er(e)||XT.has(e)||ZT.test(e)}function Qn(e){return ho(e,"length",uS)}function Er(e){return!!e&&!Number.isNaN(Number(e))}function Hi(e){return ho(e,"number",Er)}function Cs(e){return!!e&&Number.isInteger(Number(e))}function rS(e){return e.endsWith("%")&&Er(e.slice(0,-1))}function Se(e){return Kh.test(e)}function Jn(e){return QT.test(e)}const oS=new Set(["length","size","percentage"]);function sS(e){return ho(e,oS,Zh)}function iS(e){return ho(e,"position",Zh)}const aS=new Set(["image","url"]);function lS(e){return ho(e,aS,fS)}function cS(e){return ho(e,"",dS)}function Ps(){return!0}function ho(e,t,n){const r=Kh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function uS(e){return JT.test(e)&&!eS.test(e)}function Zh(){return!1}function dS(e){return tS.test(e)}function fS(e){return nS.test(e)}function hS(){const e=qe("colors"),t=qe("spacing"),n=qe("blur"),r=qe("brightness"),o=qe("borderColor"),s=qe("borderRadius"),i=qe("borderSpacing"),a=qe("borderWidth"),l=qe("contrast"),c=qe("grayscale"),u=qe("hueRotate"),d=qe("invert"),f=qe("gap"),h=qe("gradientColorStops"),p=qe("gradientColorStopPositions"),m=qe("inset"),y=qe("margin"),b=qe("opacity"),v=qe("padding"),g=qe("saturate"),S=qe("scale"),T=qe("sepia"),E=qe("skew"),C=qe("space"),I=qe("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",Se,t],_=()=>[Se,t],V=()=>["",$n,Qn],k=()=>["auto",Er,Se],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",Se],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Er,Hi],K=()=>[Er,Se];return{cacheSize:500,separator:":",theme:{colors:[Ps],spacing:[$n,Qn],blur:["none","",Jn,Se],brightness:j(),borderColor:[e],borderRadius:["none","","full",Jn,Se],borderSpacing:_(),borderWidth:V(),contrast:j(),grayscale:z(),hueRotate:K(),invert:z(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[rS,Qn],inset:L(),margin:L(),opacity:j(),padding:_(),saturate:j(),scale:j(),sepia:z(),skew:K(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[Jn]}],"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(),Se]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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",Cs,Se]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Cs,Se]}],"grid-cols":[{"grid-cols":[Ps]}],"col-start-end":[{col:["auto",{span:["full",Cs,Se]},Se]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[Ps]}],"row-start-end":[{row:["auto",{span:[Cs,Se]},Se]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,t]}],"min-w":[{"min-w":[Se,t,"min","max","fit"]}],"max-w":[{"max-w":[Se,t,"none","full","min","max","fit","prose",{screen:[Jn]},Jn]}],h:[{h:[Se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Jn,Qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hi]}],"font-family":[{font:[Ps]}],"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",Se]}],"line-clamp":[{"line-clamp":["none",Er,Hi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$n,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$n,Qn]}],"underline-offset":[{"underline-offset":["auto",$n,Se]}],"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:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],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",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),iS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lS]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],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":[b]}],"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":[b]}],"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":[$n,Se]}],"outline-w":[{outline:[$n,Qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[$n,Qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Jn,cS]}],"shadow-color":[{shadow:[Ps]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Jn,Se]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],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":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"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",Se]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Cs,Se]}],"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",Se]}],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",Se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",Se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$n,Qn,Hi]}],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 pS=KT(hS),ac=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},mS=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),gS=e=>Ct.function(e),$e=(...e)=>pS(Gx(e)),lc=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},ks=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},en=(e,t=2)=>e.toString(16).padStart(t,"0"),Is=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${en(t,4)+en(n,3)}-${en(r[0])+en(r[1])}-${en(r[2])+en(r[3])}-${en(r[4])+en(r[5])}-${en(r[6])+en(r[7])+en(r[8])+en(r[9])}`},Xh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Qh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},cc=(e,t)=>{const n=Xh(t,Qh.basic,e)||Xh(t,Qh.extend,e);return n===void 0||n===e?void 0:n},zi=()=>typeof window>"u",As=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Jh=(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};function ep(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=ep(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function yS(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ep(e))&&(r&&(r+=" "),r+=t);return r}const tp=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,np=yS,po=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return np(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],d=s==null?void 0:s[c];if(u===null)return null;const f=tp(u)||tp(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,d,f]:c},[]);return np(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},mo=w.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return x.jsx(s,{ref:o,...r,children:n})}),vS=po("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary text-primary-foreground",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),go=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(mo,{...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:$e(vS({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),rp=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function bS(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 wS=({children:e,...t})=>{const n=rp(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:bS(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(d=>c.isIntersecting?!0:d)});return a.observe(i),()=>a.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},xS=po("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"}}}),TS=po("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"}}),SS=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(mo,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:$e(TS({size:i,theme:s}),t),children:[n?x.jsx("span",{className:xS({theme:n})}):null,r,a.children]})}),Os=w.createContext({});function an(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ui=w.createContext(null),yo=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class ES extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function CS({children:e,isPresent:t,anchorX:n}){const r=w.useId(),o=w.useRef(null),s=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=w.useContext(yo);return w.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u,right:d}=s.current;if(t||!o.current||!a||!l)return;const f=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const h=document.createElement("style");return i&&(h.nonce=i),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
5
5
|
[data-motion-pop-id="${r}"] {
|
|
6
6
|
position: absolute !important;
|
|
7
7
|
width: ${a}px !important;
|
|
@@ -9,137 +9,137 @@
|
|
|
9
9
|
${f}px !important;
|
|
10
10
|
top: ${c}px !important;
|
|
11
11
|
}
|
|
12
|
-
`),()=>{document.head.removeChild(h)}},[t]),x.jsx(QT,{isPresent:t,childRef:o,sizeRef:s,children:k.cloneElement(e,{ref:o})})}const eS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=an(tS),c=w.useId(),u=w.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=w.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return w.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),k.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(JT,{isPresent:n,anchorX:a,children:e})),x.jsx(ji.Provider,{value:d,children:e})};function tS(){return new Map}function Hh(e=!0){const t=w.useContext(ji);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=w.useId();w.useEffect(()=>{if(e)return o(s)},[e]);const i=w.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const zi=e=>e.key||"";function Wh(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const tc=typeof window<"u",Hi=tc?w.useLayoutEffect:w.useEffect,Jn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left"})=>{const[l,c]=Hh(i),u=w.useMemo(()=>Wh(e),[e]),d=i&&!l?[]:u.map(zi),f=w.useRef(!0),h=w.useRef(u),p=an(()=>new Map),[m,b]=w.useState(u),[v,y]=w.useState(u);Hi(()=>{f.current=!1,h.current=u;for(let T=0;T<v.length;T++){const E=zi(v[T]);d.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[v,d.length,d.join("-")]);const g=[];if(u!==m){let T=[...u];for(let E=0;E<v.length;E++){const C=v[E],I=zi(C);d.includes(I)||(T.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(T=g),y(Wh(T)),b(u),null}process.env.NODE_ENV!=="production"&&s==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=w.useContext(Ps);return x.jsx(x.Fragment,{children:v.map(T=>{const E=zi(T),C=i&&!l?!1:u===v||d.includes(E),I=()=>{if(p.has(E))p.set(E,!0);else return;let A=!0;p.forEach(O=>{O||(A=!1)}),A&&(S==null||S(),y(h.current),i&&(c==null||c()),r&&r())};return x.jsx(eS,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:I,anchorX:a,children:T},E)})})},nS=w.createContext(null);function rS(){const e=w.useRef(!1);return Hi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Ht=e=>e;let yo=Ht,tn=Ht;process.env.NODE_ENV!=="production"&&(yo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});const oS={skipAnimations:!1,useManualTiming:!1},Wi=["read","resolveKeyframes","update","preRender","render","postRender"],Uh={value:null,addProjectionMetrics:null};function sS(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Uh.value&&Uh.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const iS=40;function Gh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Wi.reduce((v,y)=>(v[y]=sS(s,t?y:void 0),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,iS),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Wi.reduce((v,y)=>{const g=i[y];return v[y]=(S,T=!1,E=!1)=>(n||p(),g.schedule(S,T,E)),v},{}),cancel:v=>{for(let y=0;y<Wi.length;y++)i[Wi[y]].cancel(v)},state:o,steps:i}}const{schedule:We,cancel:$n,state:Pt,steps:nc}=Gh(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ht,!0);function aS(){const e=rS(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>We.postRender(r),[r]),t]}const lS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Yh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(lS);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 qh=e=>e===!0,cS=e=>qh(e===!0)||e==="id",uS=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(Ps),o=w.useContext(nS),[s,i]=aS(),a=w.useRef(null),l=r.id||o;a.current===null&&(cS(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:qh(n)&&r.group||Yh()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(Ps.Provider,{value:c,children:e})},Kh=w.createContext({strict:!1}),Zh={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"]},vo={};for(const e in Zh)vo[e]={isEnabled:t=>Zh[e].some(n=>!!t[n])};function dS(e){for(const t in e)vo[t]={...vo[t],...e[t]}}const fS=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 Ui(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fS.has(e)}let Xh=e=>!Ui(e);function Qh(e){e&&(Xh=t=>t.startsWith("on")?!Ui(t):e(t))}try{Qh(require("@emotion/is-prop-valid").default)}catch{}function hS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Xh(o)||n===!0&&Ui(o)||!t&&!Ui(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function pS({children:e,isValidProp:t,...n}){t&&Qh(t),n={...w.useContext(go),...n},n.isStatic=an(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(go.Provider,{value:r,children:e})}const Jh=new Set;function Gi(e,t,n){e||Jh.has(t)||(console.warn(t),Jh.add(t))}function mS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Gi(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Yi=w.createContext({});function qi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ks(e){return typeof e=="string"||Array.isArray(e)}const rc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oc=["initial",...rc];function Ki(e){return qi(e.animate)||oc.some(t=>ks(e[t]))}function ep(e){return!!(Ki(e)||e.variants)}function gS(e,t){if(Ki(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ks(n)?n:void 0,animate:ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function yS(e){const{initial:t,animate:n}=gS(e,w.useContext(Yi));return w.useMemo(()=>({initial:t,animate:n}),[tp(t),tp(n)])}function tp(e){return Array.isArray(e)?e.join(" "):e}const vS=Symbol.for("motionComponentSymbol");function bo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bS(e,t,n){return w.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):bo(n)&&(n.current=r))},[t])}const sc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),np="data-"+sc("framerAppearId"),{schedule:ic,cancel:K$}=Gh(queueMicrotask,!1),rp=w.createContext({});function wS(e,t,n,r,o){var s,i;const{visualElement:a}=w.useContext(Yi),l=w.useContext(Kh),c=w.useContext(ji),u=w.useContext(go).reducedMotion,d=w.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=w.useContext(rp);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&xS(d.current,n,o,h);const p=w.useRef(!1);w.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[np],b=w.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return Hi(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),ic.render(f.render),b.current&&f.animationState&&f.animationState.animateChanges())}),w.useEffect(()=>{f&&(!b.current&&f.animationState&&f.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,m)}),b.current=!1))}),f}function xS(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:op(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&bo(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function op(e){if(e)return e.options.allowProjection!==!1?e.projection:op(e.parent)}function TS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&dS(e);function a(c,u){let d;const f={...w.useContext(go),...c,layoutId:SS(c)},{isStatic:h}=f,p=yS(c),m=r(c,h);if(!h&&tc){ES(f,e);const b=CS(f);d=b.MeasureLayout,p.visualElement=wS(o,m,f,t,b.ProjectionNode)}return x.jsxs(Yi.Provider,{value:p,children:[d&&p.visualElement?x.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,bS(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=w.forwardRef(a);return l[vS]=o,l}function SS({layoutId:e}){const t=w.useContext(Ps).id;return t&&e!==void 0?t+"-"+e:e}function ES(e,t){const n=w.useContext(Kh).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?yo(!1,r):tn(!1,r)}}function CS(e){const{drag:t,layout:n}=vo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const sp=e=>t=>typeof t=="string"&&t.startsWith(e),ac=sp("--"),PS=sp("var(--"),lc=e=>PS(e)?kS.test(e.split("/*")[0].trim()):!1,kS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Is={};function IS(e){for(const t in e)Is[t]=e[t],ac(t)&&(Is[t].isCSSVariable=!0)}const wo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Er=new Set(wo);function ip(e,{layout:t,layoutId:n}){return Er.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Is[e]||e==="opacity")}const vt=e=>!!(e&&e.getVelocity),ap=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Rn=(e,t,n)=>n>t?t:n<e?e:n,xo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},As={...xo,transform:e=>Rn(0,1,e)},Zi={...xo,default:1},Os=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),er=Os("deg"),vn=Os("%"),ge=Os("px"),AS=Os("vh"),OS=Os("vw"),lp={...vn,parse:e=>vn.parse(e)/100,transform:e=>vn.transform(e*100)},_S={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,backgroundPositionX:ge,backgroundPositionY:ge},DS={rotate:er,rotateX:er,rotateY:er,rotateZ:er,scale:Zi,scaleX:Zi,scaleY:Zi,scaleZ:Zi,skew:er,skewX:er,skewY:er,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:As,originX:lp,originY:lp,originZ:ge},cp={...xo,transform:Math.round},cc={..._S,...DS,zIndex:cp,size:ge,fillOpacity:As,strokeOpacity:As,numOctaves:cp},MS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},NS=wo.length;function FS(e,t,n){let r="",o=!0;for(let s=0;s<NS;s++){const i=wo[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=ap(a,cc[i]);if(!l){o=!1;const u=MS[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function uc(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Er.has(l)){i=!0;continue}else if(ac(l)){o[l]=c;continue}else{const u=ap(c,cc[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=FS(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const dc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function up(e,t,n){for(const r in t)!vt(t[r])&&!ip(r,n)&&(e[r]=t[r])}function LS({transformTemplate:e},t){return w.useMemo(()=>{const n=dc();return uc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function VS(e,t){const n=e.style||{},r={};return up(r,n,e),Object.assign(r,LS(e,t)),r}function $S(e,t){const n={},r=VS(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 RS=["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 fc(e){return typeof e!="string"||e.includes("-")?!1:!!(RS.indexOf(e)>-1||/[A-Z]/u.test(e))}const BS={offset:"stroke-dashoffset",array:"stroke-dasharray"},jS={offset:"strokeDashoffset",array:"strokeDasharray"};function zS(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?BS:jS;e[s.offset]=ge.transform(-r);const i=ge.transform(t),a=ge.transform(n);e[s.array]=`${i} ${a}`}function dp(e,t,n){return typeof e=="string"?e:ge.transform(t+n*e)}function HS(e,t,n){const r=dp(t,e.x,e.width),o=dp(n,e.y,e.height);return`${r} ${o}`}function hc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(uc(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=HS(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&zS(f,i,a,l,!1)}const fp=()=>({...dc(),attrs:{}}),pc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WS(e,t,n,r){const o=w.useMemo(()=>{const s=fp();return hc(s,t,pc(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};up(s,e.style,e),o.style={...s,...o.style}}return o}function US(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(fc(n)?WS:$S)(r,s,i,n),c=hS(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=w.useMemo(()=>vt(d)?d.get():d,[d]);return w.createElement(n,{...u,children:f})}}function hp(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function mc(e,t,n,r){if(typeof t=="function"){const[o,s]=hp(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]=hp(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const gc=e=>Array.isArray(e),GS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),YS=e=>gc(e)?e[e.length-1]||0:e;function Xi(e){const t=vt(e)?e.get():e;return GS(t)?t.toValue():t}function qS({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:KS(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const pp=e=>(t,n)=>{const r=w.useContext(Yi),o=w.useContext(ji),s=()=>qS(e,t,r,o);return n?s():an(s)};function KS(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=Xi(s[f]);let{initial:i,animate:a}=e;const l=Ki(e),c=ep(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!qi(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=mc(e,f[h]);if(p){const{transitionEnd:m,transition:b,...v}=p;for(const y in v){let g=v[y];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(o[y]=g)}for(const y in m)o[y]=m[y]}}}return o}function yc(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(vt(o[i])||t.style&&vt(t.style[i])||ip(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 s}const ZS={useVisualState:pp({scrapeMotionValuesFromProps:yc,createRenderState:dc})};function mp(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function gp(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 yp=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 vp(e,t,n,r){gp(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(yp.has(o)?o:sc(o),t.attrs[o])}function bp(e,t,n){const r=yc(e,t,n);for(const o in e)if(vt(e[o])||vt(t[o])){const s=wo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const wp=["x","y","width","height","cx","cy","r"],XS={useVisualState:pp({scrapeMotionValuesFromProps:bp,createRenderState:fp,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Er.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<wp.length;a++){const l=wp[a];e[l]!==t[l]&&(i=!0)}i&&We.read(()=>{mp(n,r),We.render(()=>{hc(r,o,pc(n.tagName),e.transformTemplate),vp(n,r)})})}})};function QS(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...fc(r)?XS:ZS,preloadedFeatures:e,useRender:US(o),createVisualElement:t,Component:r};return TS(i)}}function _s(e,t,n){const r=e.getProps();return mc(r,t,n!==void 0?n:r.custom,e)}function vc(e,t){return e?e[t]||e.default||e:void 0}const xp=new Set(["width","height","top","left","right","bottom",...wo]);let Qi;function JS(){Qi=void 0}const bn={now:()=>(Qi===void 0&&bn.set(Pt.isProcessing||oS.useManualTiming?Pt.timestamp:performance.now()),Qi),set:e=>{Qi=e,queueMicrotask(JS)}};function bc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ji(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function eE([...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}class wc{constructor(){this.subscriptions=[]}add(t){return bc(this.subscriptions,t),()=>Ji(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}}function Tp(e,t){return t?e*(1e3/t):0}const Sp=30,tE=e=>!isNaN(parseFloat(e)),Ds={current:void 0};class nE{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=bn.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=bn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Gi(!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 wc);const r=this.events[t].add(n);return t==="change"?()=>{r(),We.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 Ds.current&&Ds.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Sp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Sp);return Tp(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 To(e,t){return new nE(e,t)}function rE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,To(n))}function oE(e,t){const n=_s(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=YS(s[i]);rE(e,i,a)}}function sE(e){return!!(vt(e)&&e.add)}function xc(e,t){const n=e.getValue("willChange");if(sE(n))return n.add(t)}function Ep(e){return e.props[np]}function Tc(e){let t;return()=>(t===void 0&&(t=e()),t)}const iE=Tc(()=>window.ScrollTimeline!==void 0);class aE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(iE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Cp extends aE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const ln=e=>e*1e3,wn=e=>e/1e3;function ea(e){return typeof e=="function"}function Pp(e,t){e.timeline=t,e.onfinish=null}const Sc=e=>Array.isArray(e)&&typeof e[0]=="number",lE={linearEasing:void 0};function cE(e,t){const n=Tc(e);return()=>{var r;return(r=lE[t])!==null&&r!==void 0?r:n()}}const ta=cE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},kp=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Cr(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ip(e){return!!(typeof e=="function"&&ta()||!e||typeof e=="string"&&(e in Ec||ta())||Sc(e)||Array.isArray(e)&&e.every(Ip))}const Ms=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ec={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ms([0,.65,.55,1]),circOut:Ms([.55,0,1,.45]),backIn:Ms([.31,.01,.66,-.59]),backOut:Ms([.33,1.53,.69,.99])};function Ap(e,t){if(e)return typeof e=="function"&&ta()?kp(e,t):Sc(e)?Ms(e):Array.isArray(e)?e.map(n=>Ap(n,t)||Ec.easeOut):Ec[e]}const Op=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uE=1e-7,dE=12;function fE(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Op(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>uE&&++a<dE);return i}function Ns(e,t,n,r){if(e===t&&n===r)return Ht;const o=s=>fE(s,0,1,e,n);return s=>s===0||s===1?s:Op(o(s),t,r)}const _p=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Dp=e=>t=>1-e(1-t),Mp=Ns(.33,1.53,.69,.99),Cc=Dp(Mp),Np=_p(Cc),Fp=e=>(e*=2)<1?.5*Cc(e):.5*(2-Math.pow(2,-10*(e-1))),Pc=e=>1-Math.sin(Math.acos(e)),Lp=Dp(Pc),Vp=_p(Pc),$p=e=>/^0[^.\s]+$/u.test(e);function hE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$p(e):!0}const Fs=e=>Math.round(e*1e5)/1e5,kc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pE(e){return e==null}const mE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ic=(e,t)=>n=>!!(typeof n=="string"&&mE.test(n)&&n.startsWith(e)||t&&!pE(n)&&Object.prototype.hasOwnProperty.call(n,t)),Rp=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(kc);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},gE=e=>Rn(0,255,e),Ac={...xo,transform:e=>Math.round(gE(e))},Pr={test:Ic("rgb","red"),parse:Rp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ac.transform(e)+", "+Ac.transform(t)+", "+Ac.transform(n)+", "+Fs(As.transform(r))+")"};function yE(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 Oc={test:Ic("#"),parse:yE,transform:Pr.transform},So={test:Ic("hsl","hue"),parse:Rp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vn.transform(Fs(t))+", "+vn.transform(Fs(n))+", "+Fs(As.transform(r))+")"},Dt={test:e=>Pr.test(e)||Oc.test(e)||So.test(e),parse:e=>Pr.test(e)?Pr.parse(e):So.test(e)?So.parse(e):Oc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Pr.transform(e):So.transform(e)},vE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function bE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(kc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(vE))===null||n===void 0?void 0:n.length)||0)>0}const Bp="number",jp="color",wE="var",xE="var(",zp="${}",TE=/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 Ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(TE,l=>(Dt.test(l)?(r.color.push(s),o.push(jp),n.push(Dt.parse(l))):l.startsWith(xE)?(r.var.push(s),o.push(wE),n.push(l)):(r.number.push(s),o.push(Bp),n.push(parseFloat(l))),++s,zp)).split(zp);return{values:n,split:a,indexes:r,types:o}}function Hp(e){return Ls(e).values}function Wp(e){const{split:t,types:n}=Ls(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===Bp?s+=Fs(o[i]):a===jp?s+=Dt.transform(o[i]):s+=o[i]}return s}}const SE=e=>typeof e=="number"?0:e;function EE(e){const t=Hp(e);return Wp(e)(t.map(SE))}const tr={test:bE,parse:Hp,createTransformer:Wp,getAnimatableNone:EE},CE=new Set(["brightness","contrast","saturate","opacity"]);function PE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kc)||[];if(!r)return e;const o=n.replace(r,"");let s=CE.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const kE=/\b([a-z-]*)\(.*?\)/gu,_c={...tr,getAnimatableNone:e=>{const t=e.match(kE);return t?t.map(PE).join(" "):e}},IE={...cc,color:Dt,backgroundColor:Dt,outlineColor:Dt,fill:Dt,stroke:Dt,borderColor:Dt,borderTopColor:Dt,borderRightColor:Dt,borderBottomColor:Dt,borderLeftColor:Dt,filter:_c,WebkitFilter:_c},Dc=e=>IE[e];function Up(e,t){let n=Dc(e);return n!==_c&&(n=tr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const AE=new Set(["auto","none","0"]);function OE(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!AE.has(s)&&Ls(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Up(n,o)}const Gp=e=>e===xo||e===ge,Yp=(e,t)=>parseFloat(e.split(", ")[t]),qp=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Yp(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Yp(s[1],e):0}},_E=new Set(["x","y","z"]),DE=wo.filter(e=>!_E.has(e));function ME(e){const t=[];return DE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Eo={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:qp(4,13),y:qp(5,14)};Eo.translateX=Eo.x,Eo.translateY=Eo.y;const kr=new Set;let Mc=!1,Nc=!1;function Kp(){if(Nc){const e=Array.from(kr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=ME(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)})}Nc=!1,Mc=!1,kr.forEach(e=>e.complete()),kr.clear()}function Zp(){kr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Nc=!0)})}function NE(){Zp(),Kp()}class Fc{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?(kr.add(this),Mc||(Mc=!0,We.read(Zp),We.resolveKeyframes(Kp))):(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),kr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,kr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xp=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),FE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LE(e){const t=FE.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const VE=4;function Qp(e,t,n=1){tn(n<=VE,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=LE(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Xp(i)?parseFloat(i):i}return lc(o)?Qp(o,t,n+1):o}const Jp=e=>t=>t.test(e),em=[xo,ge,vn,er,OS,AS,{test:e=>e==="auto",parse:e=>e}],tm=e=>em.find(Jp(e));class nm extends Fc{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),lc(c))){const u=Qp(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!xp.has(r)||t.length!==2)return;const[o,s]=t,i=tm(o),a=tm(s);if(i!==a)if(Gp(i)&&Gp(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++)hE(t[o])&&r.push(o);r.length&&OE(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Eo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Eo[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()}}const rm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tr.test(e)||e==="0")&&!e.startsWith("url("));function $E(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 RE(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=rm(o,t),a=rm(s,t);return yo(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:$E(e)||(n==="spring"||ea(n))&&r}const BE=e=>e!==null;function na(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(BE),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const jE=40;class om{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.createdAt=bn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>jE?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&NE(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=bn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!RE(t,r,o,s))if(i)this.options.duration=0;else{l&&l(na(t,this.options,n)),a&&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)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ra=2e4;function Lc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ra;)t+=n,r=e.next(t);return t>=ra?1/0:t}const Ke=(e,t,n)=>e+(t-e)*n;function Vc(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 zE({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=Vc(l,a,e+1/3),s=Vc(l,a,e),i=Vc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function oa(e,t){return n=>n>0?t:e}const $c=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},HE=[Oc,Pr,So],WE=e=>HE.find(t=>t.test(e));function sm(e){const t=WE(e);if(yo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===So&&(n=zE(n)),n}const im=(e,t)=>{const n=sm(e),r=sm(t);if(!n||!r)return oa(e,t);const o={...n};return s=>(o.red=$c(n.red,r.red,s),o.green=$c(n.green,r.green,s),o.blue=$c(n.blue,r.blue,s),o.alpha=Ke(n.alpha,r.alpha,s),Pr.transform(o))},UE=(e,t)=>n=>t(e(n)),Vs=(...e)=>e.reduce(UE),Rc=new Set(["none","hidden"]);function GE(e,t){return Rc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function YE(e,t){return n=>Ke(e,t,n)}function Bc(e){return typeof e=="number"?YE:typeof e=="string"?lc(e)?oa:Dt.test(e)?im:ZE:Array.isArray(e)?am:typeof e=="object"?Dt.test(e)?im:qE:oa}function am(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Bc(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function qE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Bc(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function KE(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 ZE=(e,t)=>{const n=tr.createTransformer(t),r=Ls(e),o=Ls(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?Rc.has(e)&&!o.values.length||Rc.has(t)&&!r.values.length?GE(e,t):Vs(am(KE(r,o),o.values),n):(yo(!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.`),oa(e,t))};function lm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ke(e,t,n):Bc(e)(e,t)}const XE=5;function cm(e,t,n){const r=Math.max(t-XE,0);return Tp(n-e(r),t-r)}const et={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},jc=.001;function QE({duration:e=et.duration,bounce:t=et.bounce,velocity:n=et.velocity,mass:r=et.mass}){let o,s;yo(e<=ln(et.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Rn(et.minDamping,et.maxDamping,i),e=Rn(et.minDuration,et.maxDuration,wn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=zc(c,i),p=Math.exp(-d);return jc-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=zc(Math.pow(c,2),i);return(-o(c)+jc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-jc+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=eC(o,s,a);if(e=ln(e),isNaN(l))return{stiffness:et.stiffness,damping:et.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const JE=12;function eC(e,t,n){let r=n;for(let o=1;o<JE;o++)r=r-e(r)/t(r);return r}function zc(e,t){return e*Math.sqrt(1-t*t)}const tC=["duration","bounce"],nC=["stiffness","damping","mass"];function um(e,t){return t.some(n=>e[n]!==void 0)}function rC(e){let t={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...e};if(!um(e,nC)&&um(e,tC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Rn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:et.mass,stiffness:o,damping:s}}else{const n=QE(e);t={...t,...n,mass:et.mass},t.isResolvedFromDuration=!0}return t}function Hc(e=et.visualDuration,t=et.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=rC({...n,velocity:-wn(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),b=i-s,v=wn(Math.sqrt(l/u)),y=Math.abs(b)<5;r||(r=y?et.restSpeed.granular:et.restSpeed.default),o||(o=y?et.restDelta.granular:et.restDelta.default);let g;if(m<1){const T=zc(v,m);g=E=>{const C=Math.exp(-m*v*E);return i-C*((p+m*v*b)/T*Math.sin(T*E)+b*Math.cos(T*E))}}else if(m===1)g=T=>i-Math.exp(-v*T)*(b+(p+v*b)*T);else{const T=v*Math.sqrt(m*m-1);g=E=>{const C=Math.exp(-m*v*E),I=Math.min(T*E,300);return i-C*((p+m*v*b)*Math.sinh(I)+T*b*Math.cosh(I))/T}}const S={calculatedDuration:h&&d||null,next:T=>{const E=g(T);if(h)a.done=T>=d;else{let C=0;m<1&&(C=T===0?ln(p):cm(g,T,E));const I=Math.abs(C)<=r,A=Math.abs(i-E)<=o;a.done=I&&A}return a.value=a.done?i:E,a},toString:()=>{const T=Math.min(Lc(S),ra),E=kp(C=>S.next(T*C).value,T,30);return T+"ms "+E}};return S}function dm({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 d=e[0],f={done:!1,value:d},h=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 b=d+m,v=i===void 0?b:i(b);v!==b&&(m=v-d);const y=I=>-m*Math.exp(-I/r),g=I=>v+y(I),S=I=>{const A=y(I),O=g(I);f.done=Math.abs(A)<=c,f.value=f.done?v:O};let T,E;const C=I=>{h(f.value)&&(T=I,E=Hc({keyframes:[f.value,p(f.value)],velocity:cm(g,I,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:I=>{let A=!1;return!E&&T===void 0&&(A=!0,S(I),C(I)),T!==void 0&&I>=T?E.next(I-T):(!A&&S(I),f)}}}const oC=Ns(.42,0,1,1),sC=Ns(0,0,.58,1),fm=Ns(.42,0,.58,1),hm=e=>Array.isArray(e)&&typeof e[0]!="number",pm={linear:Ht,easeIn:oC,easeInOut:fm,easeOut:sC,circIn:Pc,circInOut:Vp,circOut:Lp,backIn:Cc,backInOut:Np,backOut:Mp,anticipate:Fp},Wc=e=>{if(Sc(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Ns(t,n,r,o)}else if(typeof e=="string")return tn(pm[e]!==void 0,`Invalid easing type '${e}'`),pm[e];return e};function iC(e,t,n){const r=[],o=n||lm,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]||Ht:t;a=Vs(l,a)}r.push(a)}return r}function mm(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(tn(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=iC(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Cr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Rn(e[0],e[s-1],u)):c}function gm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Cr(0,t,r);e.push(Ke(n,1,o))}}function ym(e){const t=[0];return gm(t,e.length-1),t}function aC(e,t){return e.map(n=>n*t)}function lC(e,t){return e.map(()=>t||fm).splice(0,e.length-1)}function $s({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=hm(r)?r.map(Wc):Wc(r),s={done:!1,value:t[0]},i=aC(n&&n.length===t.length?n:ym(t),e),a=mm(i,t,{ease:Array.isArray(o)?o:lC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const cC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>We.update(t,!0),stop:()=>$n(t),now:()=>Pt.isProcessing?Pt.timestamp:bn.now()}},uC={decay:dm,inertia:dm,tween:$s,keyframes:$s,spring:Hc},dC=e=>e/100;class Uc extends om{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||Fc,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=ea(n)?n:uC[n]||$s;let l,c;process.env.NODE_ENV!=="production"&&a!==$s&&tn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==$s&&typeof t[0]!="number"&&(l=Vs(dC,lm(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=Lc(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}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:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:b}=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-f*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=s;if(h){const I=Math.min(this.currentTime,u)/d;let A=Math.floor(I),O=I%1;!O&&I>=1&&(O=1),O===1&&A--,A=Math.min(A,h+1),!!(A%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/d)):p==="mirror"&&(S=i)),g=Rn(0,1,O)*d}const T=y?{done:!1,value:l[0]}:S.next(g);a&&(T.value=a(T.value));let{done:E}=T;!y&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(T.value=na(l,this.options,o)),b&&b(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?wn(t.calculatedDuration):0}get time(){return wn(this.currentTime)}set time(t){t=ln(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=wn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=cC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const fC=new Set(["opacity","clipPath","filter","transform"]);function hC(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Ap(a,o);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 pC=Tc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sa=10,mC=2e4;function gC(e){return ea(e.type)||e.type==="spring"||!Ip(e.ease)}function yC(e,t){const n=new Uc({...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<mC;)r=n.sample(s),o.push(r.value),s+=sa;return{times:void 0,keyframes:o,duration:s-sa,ease:"linear"}}const vm={anticipate:Fp,backInOut:Np,circInOut:Vp};function vC(e){return e in vm}class bm extends om{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new nm(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ta()&&vC(s)&&(s=vm[s]),gC(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,b=yC(t,m);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,o=b.times,s=b.ease,i="keyframes"}const u=hC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Pp(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(na(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return wn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return wn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ln(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ht;const{animation:r}=n;Pp(r,t)}return Ht}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new Uc({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=ln(this.time);c.setWithVelocity(p.sample(m-sa).value,p.sample(m).value,sa)}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;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return pC()&&r&&fC.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const bC={type:"spring",stiffness:500,damping:25,restSpeed:10},wC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xC={type:"keyframes",duration:.8},TC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},SC=(e,{keyframes:t})=>t.length>2?xC:Er.has(e)?e.startsWith("scale")?wC(t[1]):bC:TC;function EC({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}const Gc=(e,t,n,r={},o,s)=>i=>{const a=vc(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ln(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};EC(a)||(u={...u,...SC(e,u)}),u.duration&&(u.duration=ln(u.duration)),u.repeatDelay&&(u.repeatDelay=ln(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const f=na(u.keyframes,a);if(f!==void 0)return We.update(()=>{u.onUpdate(f),u.onComplete()}),new Cp([])}return!s&&bm.supports(u)?new bm(u):new Uc(u)};function CC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Yc(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 d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&CC(u,d))continue;const p={delay:n,...vc(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const v=Ep(e);if(v){const y=window.MotionHandoffAnimation(v,d,We);y!==null&&(p.startTime=y,m=!0)}}xc(e,d),f.start(Gc(d,f,h,e.shouldReduceMotion&&xp.has(d)?{type:!1}:p,e,m));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{We.update(()=>{a&&oE(e,a)})}),c}function qc(e,t,n={}){var r;const o=_s(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(Yc(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return PC(e,t,u+c,d,f,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 PC(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(kC).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(qc(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function kC(e,t){return e.sortNodePosition(t)}function IC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>qc(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=qc(e,t,n);else{const o=typeof t=="function"?_s(e,t,n.custom):t;r=Promise.all(Yc(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function wm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const AC=oc.length;function xm(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xm(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<AC;n++){const r=oc[n],o=e.props[r];(ks(o)||o===!1)&&(t[r]=o)}return t}const OC=[...rc].reverse(),_C=rc.length;function DC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>IC(e,n,r)))}function MC(e){let t=DC(e),n=Tm(),r=!0;const o=l=>(c,u)=>{var d;const f=_s(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=xm(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let b=0;b<_C;b++){const v=OC[b],y=n[v],g=c[v]!==void 0?c[v]:u[v],S=ks(g),T=v===l?y.isActive:null;T===!1&&(p=b);let E=g===u[v]&&g!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...h},!y.isActive&&T===null||!g&&!y.prevProp||qi(g)||typeof g=="boolean")continue;const C=NC(y.prevProp,g);let I=C||v===l&&y.isActive&&!E&&S||b>p&&S,A=!1;const O=Array.isArray(g)?g:[g];let M=O.reduce(o(v),{});T===!1&&(M={});const{prevResolvedValues:_={}}=y,F={..._,...M},P=V=>{I=!0,f.has(V)&&(A=!0,f.delete(V)),y.needsAnimating[V]=!0;const B=e.getValue(V);B&&(B.liveStyle=!1)};for(const V in F){const B=M[V],W=_[V];if(h.hasOwnProperty(V))continue;let D=!1;gc(B)&&gc(W)?D=!wm(B,W):D=B!==W,D?B!=null?P(V):f.add(V):B!==void 0&&f.has(V)?P(V):y.protectedKeys[V]=!0}y.prevProp=g,y.prevResolvedValues=M,y.isActive&&(h={...h,...M}),r&&e.blockInitialAnimation&&(I=!1),I&&(!(E&&C)||A)&&d.push(...O.map(V=>({animation:V,options:{type:v}})))}if(f.size){const b={};if(typeof c.initial!="boolean"){const v=_s(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const y=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),b[v]=y??null}),d.push({animation:b})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):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(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Tm(),r=!0}}}function NC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!wm(t,e):!1}function Ir(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tm(){return{animate:Ir(!0),whileInView:Ir(),whileHover:Ir(),whileTap:Ir(),whileDrag:Ir(),whileFocus:Ir(),exit:Ir()}}class nr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class FC extends nr{constructor(t){super(t),t.animationState||(t.animationState=MC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qi(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 LC=0;class VC extends nr{constructor(){super(...arguments),this.id=LC++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const $C={animation:{Feature:FC},exit:{Feature:VC}},cn={x:!1,y:!1};function Sm(){return cn.x||cn.y}function RC(e){return e==="x"||e==="y"?cn[e]?null:(cn[e]=!0,()=>{cn[e]=!1}):cn.x||cn.y?null:(cn.x=cn.y=!0,()=>{cn.x=cn.y=!1})}function Rs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Kc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Bs(e){return{point:{x:e.pageX,y:e.pageY}}}const BC=e=>t=>Kc(t)&&e(t,Bs(t));function Co(e,t,n,r){return Rs(e,t,BC(n),r)}function Em({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function jC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Cm=1e-4,HC=1-Cm,WC=1+Cm,Pm=.01,UC=0-Pm,GC=0+Pm;function $t(e){return e.max-e.min}function YC(e,t,n){return Math.abs(e-t)<=n}function km(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(e.scale>=HC&&e.scale<=WC||isNaN(e.scale))&&(e.scale=1),(e.translate>=UC&&e.translate<=GC||isNaN(e.translate))&&(e.translate=0)}function js(e,t,n,r){km(e.x,t.x,n.x,r?r.originX:void 0),km(e.y,t.y,n.y,r?r.originY:void 0)}function Im(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function qC(e,t,n){Im(e.x,t.x,n.x),Im(e.y,t.y,n.y)}function Am(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function zs(e,t,n){Am(e.x,t.x,n.x),Am(e.y,t.y,n.y)}const Om=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:Om(),y:Om()}),_m=()=>({min:0,max:0}),st=()=>({x:_m(),y:_m()});function nn(e){return[e("x"),e("y")]}function Zc(e){return e===void 0||e===1}function Xc({scale:e,scaleX:t,scaleY:n}){return!Zc(e)||!Zc(t)||!Zc(n)}function Ar(e){return Xc(e)||Dm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dm(e){return Mm(e.x)||Mm(e.y)}function Mm(e){return e&&e!=="0%"}function ia(e,t,n){const r=e-n,o=t*r;return n+o}function Nm(e,t,n,r,o){return o!==void 0&&(e=ia(e,o,r)),ia(e,n,r)+t}function Qc(e,t=0,n=1,r,o){e.min=Nm(e.min,t,n,r,o),e.max=Nm(e.max,t,n,r,o)}function Fm(e,{x:t,y:n}){Qc(e.x,t.translate,t.scale,t.originPoint),Qc(e.y,n.translate,n.scale,n.originPoint)}const Lm=.999999999999,Vm=1.0000000000001;function KC(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&&Io(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Fm(e,i)),r&&Ar(s.latestValues)&&Io(e,s.latestValues))}t.x<Vm&&t.x>Lm&&(t.x=1),t.y<Vm&&t.y>Lm&&(t.y=1)}function ko(e,t){e.min=e.min+t,e.max=e.max+t}function $m(e,t,n,r,o=.5){const s=Ke(e.min,e.max,o);Qc(e,t,n,s,r)}function Io(e,t){$m(e.x,t.x,t.scaleX,t.scale,t.originX),$m(e.y,t.y,t.scaleY,t.scale,t.originY)}function Rm(e,t){return Em(zC(e.getBoundingClientRect(),t))}function ZC(e,t,n){const r=Rm(e,n),{scroll:o}=t;return o&&(ko(r.x,o.offset.x),ko(r.y,o.offset.y)),r}function aa(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Bm=(e,t)=>Math.abs(e-t);function XC(e,t){const n=Bm(e.x,t.x),r=Bm(e.y,t.y);return Math.sqrt(n**2+r**2)}class jm{constructor(t,n,{transformPagePoint:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=eu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=XC(u.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:h}=u,{timestamp:p}=Pt;this.history.push({...h,timestamp:p});const{onStart:m,onMove:b}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=Jc(d,this.transformPagePoint),We.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{aa(u,"release"),this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=eu(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:Jc(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!Kc(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=Bs(t),i=Jc(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=Pt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,eu(i,this.history)),aa(t,"set"),this.removeListeners=Vs(Co(t.currentTarget,"pointermove",this.handlePointerMove),Co(t.currentTarget,"pointerup",this.handlePointerUp),Co(t.currentTarget,"pointercancel",this.handlePointerUp),Co(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),$n(this.updatePoint)}}function Jc(e,t){return t?{point:t(e.point)}:e}function zm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eu({point:e},t){return{point:e,delta:zm(e,Hm(t)),offset:zm(e,QC(t)),velocity:JC(t,.1)}}function QC(e){return e[0]}function Hm(e){return e[e.length-1]}function JC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Hm(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ln(t)));)n--;if(!r)return{x:0,y:0};const s=wn(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}function eP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ke(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function Wm(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 tP(e,{top:t,left:n,bottom:r,right:o}){return{x:Wm(e.x,n,o),y:Wm(e.y,t,r)}}function Um(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 nP(e,t){return{x:Um(e.x,t.x),y:Um(e.y,t.y)}}function rP(e,t){let n=.5;const r=$t(e),o=$t(t);return o>r?n=Cr(t.min,t.max-r,e.min):r>o&&(n=Cr(e.min,e.max-o,t.min)),Rn(0,1,n)}function oP(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 tu=.35;function sP(e=tu){return e===!1?e=0:e===!0&&(e=tu),{x:Gm(e,"left","right"),y:Gm(e,"top","bottom")}}function Gm(e,t,n){return{min:Ym(e,t),max:Ym(e,n)}}function Ym(e,t){return typeof e=="number"?e:e[t]||0}const iP=new WeakMap;class aP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bs(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=RC(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nn(b=>{let v=this.getAxisMotionValue(b).get()||0;if(vn.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[b];g&&(v=$t(g)*(parseFloat(v)/100))}}this.originPoint[b]=v}),p&&We.postRender(()=>p(u,d)),xc(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=d;if(h&&this.currentDirection===null){this.currentDirection=lP(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>nn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new jm(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&We.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!la(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=eP(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&&bo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=tP(o.layoutBox,n):this.constraints=!1,this.elastic=sP(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&nn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=oP(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bo(t))return!1;const r=t.current;tn(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=ZC(r,o.root,this.visualElement.getTransformPagePoint());let i=nP(o.layout.layoutBox,s);if(n){const a=n(jC(i));this.hasMutatedConstraints=!!a,a&&(i=Em(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=nn(u=>{if(!la(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return xc(this.visualElement,t),r.start(Gc(t,r,0,n,this.visualElement,!1))}stopAnimation(){nn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nn(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){nn(n=>{const{drag:r}=this.getProps();if(!la(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]-Ke(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!bo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};nn(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=rP({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(),nn(i=>{if(!la(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ke(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;iP.set(this.visualElement,this);const t=this.visualElement.current,n=Co(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();bo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),We.read(r);const i=Rs(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(nn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.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=tu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function la(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class cP extends nr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new aP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const qm=e=>(t,n)=>{e&&We.postRender(()=>e(t,n))};class uP extends nr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new jm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:qm(t),onStart:qm(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&We.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Co(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ca={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Km(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Hs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const n=Km(e,t.target.x),r=Km(e,t.target.y);return`${n}% ${r}%`}},dP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=tr.parse(e);if(o.length>5)return r;const s=tr.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=Ke(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 fP extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;IS(hP),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()})),ca.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()||We.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ic.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 Zm(e){const[t,n]=Hh(),r=w.useContext(Ps);return x.jsx(fP,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(rp),isPresent:t,safeToRemove:n})}const hP={borderRadius:{...Hs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hs,borderTopRightRadius:Hs,borderBottomLeftRadius:Hs,borderBottomRightRadius:Hs,boxShadow:dP};function Xm(e,t,n){const r=vt(e)?e:To(e);return r.start(Gc("",r,t,n)),r.animation}function Qm(e){return e instanceof SVGElement&&e.tagName!=="svg"}const pP=(e,t)=>e.depth-t.depth;class mP{constructor(){this.children=[],this.isDirty=!1}add(t){bc(this.children,t),this.isDirty=!0}remove(t){Ji(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pP),this.isDirty=!1,this.children.forEach(t)}}function gP(e,t){const n=bn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&($n(r),e(s-t))};return We.read(r,!0),()=>$n(r)}const Jm=["TopLeft","TopRight","BottomLeft","BottomRight"],yP=Jm.length,eg=e=>typeof e=="string"?parseFloat(e):e,tg=e=>typeof e=="number"||ge.test(e);function vP(e,t,n,r,o,s){o?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,bP(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,wP(r))):s&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<yP;i++){const a=`border${Jm[i]}Radius`;let l=ng(t,a),c=ng(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||tg(l)===tg(c)?(e[a]=Math.max(Ke(eg(l),eg(c),r),0),(vn.test(c)||vn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ke(t.rotate||0,n.rotate||0,r))}function ng(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bP=rg(0,.5,Lp),wP=rg(.5,.95,Ht);function rg(e,t,n){return r=>r<e?0:r>t?1:n(Cr(e,t,r))}function og(e,t){e.min=t.min,e.max=t.max}function rn(e,t){og(e.x,t.x),og(e.y,t.y)}function sg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ig(e,t,n,r,o){return e-=t,e=ia(e,1/n,r),o!==void 0&&(e=ia(e,1/o,r)),e}function xP(e,t=0,n=1,r=.5,o,s=e,i=e){if(vn.test(t)&&(t=parseFloat(t),t=Ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ke(s.min,s.max,r);e===s&&(a-=t),e.min=ig(e.min,t,n,a,o),e.max=ig(e.max,t,n,a,o)}function ag(e,t,[n,r,o],s,i){xP(e,t[n],t[r],t[o],t.scale,s,i)}const TP=["x","scaleX","originX"],SP=["y","scaleY","originY"];function lg(e,t,n,r){ag(e.x,t,TP,n?n.x:void 0,r?r.x:void 0),ag(e.y,t,SP,n?n.y:void 0,r?r.y:void 0)}function cg(e){return e.translate===0&&e.scale===1}function ug(e){return cg(e.x)&&cg(e.y)}function dg(e,t){return e.min===t.min&&e.max===t.max}function EP(e,t){return dg(e.x,t.x)&&dg(e.y,t.y)}function fg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hg(e,t){return fg(e.x,t.x)&&fg(e.y,t.y)}function pg(e){return $t(e.x)/$t(e.y)}function mg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CP{constructor(){this.members=[]}add(t){bc(this.members,t),t.scheduleRender()}remove(t){if(Ji(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 PP(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:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),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 nu=["","X","Y","Z"],kP={visibility:"hidden"},gg=1e3;let IP=0;function ru(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function yg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ep(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",We,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&yg(r)}function vg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=IP++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(_P),this.nodes.forEach(LP),this.nodes.forEach(VP),this.nodes.forEach(DP)},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 mP)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new wc),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=Qm(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 d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=gP(f,250),ca.hasAnimatedSinceResize&&(ca.hasAnimatedSinceResize=!1,this.nodes.forEach(wg))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||zP,{onLayoutAnimationStart:b,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!hg(this.targetLayout,p),g=!f&&h;if(this.options.layoutRoot||this.resumeFrom||g||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const S={...vc(m,"layout"),onPlay:b,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||wg(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,$n(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($P),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.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bg);return}this.isUpdating||this.nodes.forEach(NP),this.isUpdating=!1,this.nodes.forEach(FP),this.nodes.forEach(AP),this.nodes.forEach(OP),this.clearAllSnapshots();const a=bn.now();Pt.delta=Rn(0,1e3/60,a-Pt.timestamp),Pt.timestamp=a,Pt.isProcessing=!0,nc.update.process(Pt),nc.preRender.process(Pt),nc.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ic.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(MP),this.sharedNodes.forEach(RP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,We.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){We.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$t(this.snapshot.measuredBox.x)&&!$t(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),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);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ug(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ar(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)),HP(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return st();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(WP))){const{scroll:u}=this.root;u&&(ko(l.x,u.offset.x),ko(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=st();if(rn(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&rn(l,i),ko(l.x,d.offset.x),ko(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=st();rn(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&&Io(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ar(u.latestValues)&&Io(l,u.latestValues)}return Ar(this.latestValues)&&Io(l,this.latestValues),l}removeTransform(i){const a=st();rn(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ar(c.latestValues))continue;Xc(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();rn(u,d),lg(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ar(this.latestValues)&&lg(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:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),zs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Fm(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),zs(this.relativeTargetOrigin,this.target,h.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Xc(this.parent.latestValues)||Dm(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:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;KC(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=st());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sg(this.prevProjectionDelta.x,this.projectionDelta.x),sg(this.prevProjectionDelta.y,this.projectionDelta.y)),js(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!mg(this.projectionDelta.x,this.prevProjectionDelta.x)||!mg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,b=this.getStack(),v=!b||b.members.length<=1,y=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(jP));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const T=S/1e3;xg(d.x,i.x,T),xg(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),BP(this.relativeTarget,this.relativeTargetOrigin,f,T),g&&EP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),rn(g,this.relativeTarget)),m&&(this.animationValues=u,vP(u,c,this.latestValues,T,y,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&&($n(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=We.update(()=>{ca.hasAnimatedSinceResize=!0,this.currentAnimation=Xm(0,gg,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},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(gg),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&&Pg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=$t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=$t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}rn(a,l),Io(a,u),js(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new CP),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&&ru("z",i,c,this.animationValues);for(let u=0;u<nu.length;u++)ru(`rotate${nu[u]}`,i,c,this.animationValues),ru(`skew${nu[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 kP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Xi(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Xi(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ar(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=PP(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Is){if(f[m]===void 0)continue;const{correct:b,applyTo:v,isCSSVariable:y}=Is[m],g=c.transform==="none"?f[m]:b(f[m],d);if(v){const S=v.length;for(let T=0;T<S;T++)c[v[T]]=g}else y?this.options.visualElement.renderState.vars[m]=g:c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?Xi(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(bg),this.root.sharedNodes.clear()}}}function AP(e){e.updateLayout()}function OP(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"?nn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=$t(f);f.min=r[d].min,f.max=f.min+h}):Pg(s,n.layoutBox,r)&&nn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=$t(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Po();js(a,r,n.layoutBox);const l=Po();i?js(l,e.applyTransform(o,!0),n.measuredBox):js(l,r,n.layoutBox);const c=!ug(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=st();zs(p,n.layoutBox,f.layoutBox);const m=st();zs(m,r,h.layoutBox),hg(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function _P(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function DP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function MP(e){e.clearSnapshot()}function bg(e){e.clearMeasurements()}function NP(e){e.isLayoutDirty=!1}function FP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LP(e){e.resolveTargetDelta()}function VP(e){e.calcProjection()}function $P(e){e.resetSkewAndRotation()}function RP(e){e.removeLeadSnapshot()}function xg(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tg(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function BP(e,t,n,r){Tg(e.x,t.x,n.x,r),Tg(e.y,t.y,n.y,r)}function jP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zP={duration:.45,ease:[.4,0,.1,1]},Sg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Eg=Sg("applewebkit/")&&!Sg("chrome/")?Math.round:Ht;function Cg(e){e.min=Eg(e.min),e.max=Eg(e.max)}function HP(e){Cg(e.x),Cg(e.y)}function Pg(e,t,n){return e==="position"||e==="preserve-aspect"&&!YC(pg(t),pg(n),.2)}function WP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const UP=vg({attachResizeListener:(e,t)=>Rs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ou={current:void 0},kg=vg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ou.current){const e=new UP({});e.mount(window),e.setOptions({layoutScroll:!0}),ou.current=e}return ou.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),GP={pan:{Feature:uP},drag:{Feature:cP,ProjectionNode:kg,MeasureLayout:Zm}};function Ig(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const s=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Ag(e,t){const n=Ig(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Og(e){return!(e.pointerType==="touch"||Sm())}function YP(e,t,n={}){const[r,o,s]=Ag(e,n),i=a=>{if(!Og(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Og(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function _g(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&We.postRender(()=>s(t,Bs(t)))}class qP extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=YP(t,(n,r)=>(_g(this.node,r,"Start"),o=>_g(this.node,o,"End"))))}unmount(){}}class KP extends nr{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=Vs(Rs(this.node.current,"focus",()=>this.onFocus()),Rs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Dg=(e,t)=>t?e===t?!0:Dg(e,t.parentElement):!1,ZP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function XP(e){return ZP.has(e.tagName)||e.tabIndex!==-1}const Ws=new WeakSet;function Mg(e){return t=>{t.key==="Enter"&&e(t)}}function su(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const QP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Mg(()=>{if(Ws.has(n))return;su(n,"down");const o=Mg(()=>{su(n,"up")}),s=()=>su(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ng(e){return Kc(e)&&!Sm()}function JP(e,t,n={}){const[r,o,s]=Ag(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ng(a)||Ws.has(l))return;Ws.add(l),aa(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),aa(h,"release"),!(!Ng(h)||!Ws.has(l))&&(Ws.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?ek(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||Dg(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!XP(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>QP(c,o),o)}),s}function ek(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function Fg(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&We.postRender(()=>s(t,Bs(t)))}class tk extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=JP(t,(n,r)=>(Fg(this.node,r,"Start"),(o,{success:s})=>Fg(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const iu=new WeakMap,au=new WeakMap,nk=e=>{const t=iu.get(e.target);t&&t(e)},rk=e=>{e.forEach(nk)};function ok({root:e,...t}){const n=e||document;au.has(n)||au.set(n,{});const r=au.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(rk,{root:e,...t})),r[o]}function sk(e,t,n){const r=ok(t);return iu.set(e,n),r.observe(e),()=>{iu.delete(e),r.unobserve(e)}}const ik={some:0,all:1};class ak extends nr{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:ik[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:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return sk(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(lk(t,n))&&this.startObserver()}unmount(){}}function lk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ck={inView:{Feature:ak},tap:{Feature:tk},focus:{Feature:KP},hover:{Feature:qP}},uk={layout:{ProjectionNode:kg,MeasureLayout:Zm}},lu={current:null},Lg={current:!1};function dk(){if(Lg.current=!0,!!tc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lu.current=e.matches;e.addListener(t),t()}else lu.current=!1}const fk=[...em,Dt,tr],hk=e=>fk.find(Jp(e)),Us=new WeakMap;function pk(e,t,n){for(const r in t){const o=t[r],s=n[r];if(vt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Gi(o.version==="12.4.7",`Attempting to mix Motion versions ${o.version} with 12.4.7 may not work as expected.`);else if(vt(s))e.addValue(r,To(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,To(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $g{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Fc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=bn.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,We.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Ki(n),this.isVariantNode=ep(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&vt(p)&&p.set(l[h],!1)}}mount(t){this.current=t,Us.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)),Lg.current||dk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lu.current,process.env.NODE_ENV!=="production"&&Gi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),$n(this.notifyUpdate),$n(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Er.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&We.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in vo){const n=vo[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):st()}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<Vg.length;r++){const o=Vg[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=pk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=To(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"&&(Xp(o)||$p(o))?o=parseFloat(o):!hk(o)&&tr.test(n)&&(o=Up(t,n)),this.setBaseTarget(t,vt(o)?o.get():o)),vt(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=mc(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&&!vt(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 wc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Rg extends $g{constructor(){super(...arguments),this.KeyframeResolver=nm}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;vt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function mk(e){return window.getComputedStyle(e)}class Bg extends Rg{constructor(){super(...arguments),this.type="html",this.renderInstance=gp}readValueFromInstance(t,n){if(Er.has(n)){const r=Dc(n);return r&&r.default||0}else{const r=mk(t),o=(ac(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Rm(t,n)}build(t,n,r){uc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return yc(t,n,r)}}class jg extends Rg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&mp(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Er.has(n)){const r=Dc(n);return r&&r.default||0}return n=yp.has(n)?n:sc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return bp(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&We.postRender(this.updateDimensions)}build(t,n,r){hc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){vp(t,n,r,o)}mount(t){this.isSVGTag=pc(t.tagName),super.mount(t)}}const gk=(e,t)=>fc(e)?new jg(t):new Bg(t,{allowProjection:e!==w.Fragment}),yk=QS({...$C,...ck,...GP,...uk},gk),dt=mS(yk);function Or(e){const t=an(()=>To(e)),{isStatic:n}=w.useContext(go);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}function zg(e,t){const n=Or(t()),r=()=>n.set(t());return r(),Hi(()=>{const o=()=>We.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),$n(r)}}),n}const vk=e=>e&&typeof e=="object"&&e.mix,bk=e=>vk(e)?e.mix:void 0;function wk(...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=mm(o,s,{mixer:bk(s[0]),...i});return t?a(r):a}function xk(e){Ds.current=[],e();const t=zg(Ds.current,e);return Ds.current=void 0,t}function Tk(e,t,n,r){if(typeof e=="function")return xk(e);const o=typeof t=="function"?t:wk(t,n,r);return Array.isArray(e)?Hg(e,o):Hg([e],([s])=>o(s))}function Hg(e,t){const n=an(()=>[]);return zg(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Sk(e){return w.useEffect(()=>()=>e(),[])}function Ek(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Lc(r),ra);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:wn(o)}}const Ck=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Wg(e,t){return hm(e)?e[Ck(0,e.length,t)]:e}function cu(e){return typeof e=="object"&&!Array.isArray(e)}function Ug(e,t,n,r){return typeof e=="string"&&cu(t)?Ig(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Pk(e,t,n){return e*(t+1)}function Gg(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function kk(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ji(e,o),r--)}}function Ik(e,t,n,r,o,s){kk(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ke(o,s,r[i]),easing:Wg(n,i)})}function Ak(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function Ok(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const _k="easeInOut",Dk=20;function Mk(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const p=e[h];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,Gg(d,p.at,u,c));continue}let[m,b,v={}]=p;v.at!==void 0&&(d=Gg(d,v.at,u,c));let y=0;const g=(S,T,E,C=0,I=0)=>{const A=Nk(S),{delay:O=0,times:M=ym(A),type:_="keyframes",repeat:F,repeatType:P,repeatDelay:N=0,...L}=T;let{ease:V=t.ease||"easeOut",duration:B}=T;const W=typeof O=="function"?O(C,I):O,D=A.length,j=ea(_)?_:o==null?void 0:o[_];if(D<=2&&j){let G=100;if(D===2&&Vk(A)){const H=A[1]-A[0];G=Math.abs(H)}const $={...L};B!==void 0&&($.duration=ln(B));const z=Ek($,G,j);V=z.ease,B=z.duration}B??(B=s);const K=d+W;M.length===1&&M[0]===0&&(M[1]=1);const J=M.length-A.length;if(J>0&&gm(M,J),A.length===1&&A.unshift(null),F){tn(F<Dk,"Repeat count too high, must be less than 20"),B=Pk(B,F);const G=[...A],$=[...M];V=Array.isArray(V)?[...V]:[V];const z=[...V];for(let H=0;H<F;H++){A.push(...G);for(let U=0;U<G.length;U++)M.push($[U]+(H+1)),V.push(U===0?"linear":Wg(z,U-1))}Ak(M,F)}const X=K+B;Ik(E,A,V,M,K,X),y=Math.max(W+B,y),f=Math.max(X,f)};if(vt(m)){const S=Yg(m,a);g(b,v,qg("default",S))}else{const S=Ug(m,b,r,l),T=S.length;for(let E=0;E<T;E++){b=b,v=v;const C=S[E],I=Yg(C,a);for(const A in b)g(b[A],Fk(v,A),qg(A,I),E,T)}}u=d,d+=y}return a.forEach((h,p)=>{for(const m in h){const b=h[m];b.sort(Ok);const v=[],y=[],g=[];for(let T=0;T<b.length;T++){const{at:E,value:C,easing:I}=b[T];v.push(C),y.push(Cr(0,f,E)),g.push(I||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),g.unshift(_k)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(p)||i.set(p,{keyframes:{},transition:{}});const S=i.get(p);S.keyframes[m]=v,S.transition[m]={...t,duration:f,ease:g,times:y,...n}}}),i}function Yg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function qg(e,t){return t[e]||(t[e]=[]),t[e]}function Nk(e){return Array.isArray(e)?e:[e]}function Fk(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Lk=e=>typeof e=="number",Vk=e=>e.every(Lk);function $k(e,t){return e in t}class Rk extends $g{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if($k(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return st()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function Bk(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Qm(e)?new jg(t):new Bg(t);n.mount(e),Us.set(e,n)}function jk(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Rk(t);n.mount(e),Us.set(e,n)}function zk(e,t){return vt(e)||typeof e=="number"||typeof e=="string"&&!cu(t)}function Kg(e,t,n,r){const o=[];if(zk(e,t))o.push(Xm(e,cu(t)&&t.default||t,n&&(n.default||n)));else{const s=Ug(e,t,r),i=s.length;tn(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?Bk:jk;Us.has(l)||c(l);const u=Us.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...Yc(u,{...t,transition:d},{}))}}return o}function Hk(e,t,n){const r=[];return Mk(e,t,n,{spring:Hc}).forEach(({keyframes:s,transition:i},a)=>{r.push(...Kg(a,s,i))}),r}function Wk(e){return Array.isArray(e)&&e.some(Array.isArray)}function Uk(e){function t(n,r,o){let s=[];Wk(n)?s=Hk(n,r,e):s=Kg(n,r,o,e);const i=new Cp(s);return e&&e.animations.push(i),i}return t}function Gk(){const e=an(()=>({current:null,animations:[]})),t=an(()=>Uk(e));return Sk(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class Yk{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 qk=()=>new Yk;function Kk(){return an(qk)}function Zk(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function Xk(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:Zk(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=Wc(r)(l/c)*c}return t+l}}const Zg=w.createContext(null);function Qk(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=Ke(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?eE(e,o,o+s):e}function Jk({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=an(()=>dt[t]),l=[],c=w.useRef(!1);tn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(tI)},updateOrder:(d,f,h)=>{if(c.current)return;const p=Qk(l,d,f,h);l!==p&&(c.current=!0,r(p.map(eI).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(Zg.Provider,{value:u,children:e})})}const Xg=w.forwardRef(Jk);function eI(e){return e.value}function tI(e,t){return e.layout.min-t.layout.min}function Qg(e,t=0){return vt(e)?e:Or(t)}function nI({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=an(()=>dt[r]),c=w.useContext(Zg),u={x:Qg(t.x),y:Qg(t.y)},d=Tk([u.x,u.y],([m,b])=>m||b?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,b)=>{const{velocity:v}=b;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,b)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const Jg=w.forwardRef(nI);/**
|
|
12
|
+
`),()=>{document.head.removeChild(h)}},[t]),x.jsx(ES,{isPresent:t,childRef:o,sizeRef:s,children:P.cloneElement(e,{ref:o})})}const PS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=an(kS),c=w.useId(),u=w.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=w.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return w.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),P.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(CS,{isPresent:n,anchorX:a,children:e})),x.jsx(Ui.Provider,{value:d,children:e})};function kS(){return new Map}function op(e=!0){const t=w.useContext(Ui);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=w.useId();w.useEffect(()=>{if(e)return o(s)},[e]);const i=w.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Gi=e=>e.key||"";function sp(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const uc=typeof window<"u",Yi=uc?w.useLayoutEffect:w.useEffect,er=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left"})=>{const[l,c]=op(i),u=w.useMemo(()=>sp(e),[e]),d=i&&!l?[]:u.map(Gi),f=w.useRef(!0),h=w.useRef(u),p=an(()=>new Map),[m,y]=w.useState(u),[b,v]=w.useState(u);Yi(()=>{f.current=!1,h.current=u;for(let T=0;T<b.length;T++){const E=Gi(b[T]);d.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[b,d.length,d.join("-")]);const g=[];if(u!==m){let T=[...u];for(let E=0;E<b.length;E++){const C=b[E],I=Gi(C);d.includes(I)||(T.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(T=g),v(sp(T)),y(u),null}process.env.NODE_ENV!=="production"&&s==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=w.useContext(Os);return x.jsx(x.Fragment,{children:b.map(T=>{const E=Gi(T),C=i&&!l?!1:u===b||d.includes(E),I=()=>{if(p.has(E))p.set(E,!0);else return;let A=!0;p.forEach(O=>{O||(A=!1)}),A&&(S==null||S(),v(h.current),i&&(c==null||c()),r&&r())};return x.jsx(PS,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:I,anchorX:a,children:T},E)})})},IS=w.createContext(null);function AS(){const e=w.useRef(!1);return Yi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Ht=e=>e;let vo=Ht,tn=Ht;process.env.NODE_ENV!=="production"&&(vo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});const OS={skipAnimations:!1,useManualTiming:!1},qi=["read","resolveKeyframes","update","preRender","render","postRender"],ip={value:null,addProjectionMetrics:null};function _S(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&ip.value&&ip.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const DS=40;function ap(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=qi.reduce((b,v)=>(b[v]=_S(s,t?v:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,DS),1),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:qi.reduce((b,v)=>{const g=i[v];return b[v]=(S,T=!1,E=!1)=>(n||p(),g.schedule(S,T,E)),b},{}),cancel:b=>{for(let v=0;v<qi.length;v++)i[qi[v]].cancel(b)},state:o,steps:i}}const{schedule:ze,cancel:Rn,state:Pt,steps:dc}=ap(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ht,!0);function MS(){const e=AS(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>ze.postRender(r),[r]),t]}const NS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function lp(){const e=new Set,t=new WeakMap,n=()=>e.forEach(NS);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 cp=e=>e===!0,LS=e=>cp(e===!0)||e==="id",FS=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(Os),o=w.useContext(IS),[s,i]=MS(),a=w.useRef(null),l=r.id||o;a.current===null&&(LS(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:cp(n)&&r.group||lp()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(Os.Provider,{value:c,children:e})},up=w.createContext({strict:!1}),dp={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"]},bo={};for(const e in dp)bo[e]={isEnabled:t=>dp[e].some(n=>!!t[n])};function VS(e){for(const t in e)bo[t]={...bo[t],...e[t]}}const $S=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 Ki(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$S.has(e)}let fp=e=>!Ki(e);function hp(e){e&&(fp=t=>t.startsWith("on")?!Ki(t):e(t))}try{hp(require("@emotion/is-prop-valid").default)}catch{}function RS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(fp(o)||n===!0&&Ki(o)||!t&&!Ki(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function BS({children:e,isValidProp:t,...n}){t&&hp(t),n={...w.useContext(yo),...n},n.isStatic=an(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(yo.Provider,{value:r,children:e})}const pp=new Set;function Zi(e,t,n){e||pp.has(t)||(console.warn(t),pp.add(t))}function jS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Zi(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Xi=w.createContext({});function Qi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _s(e){return typeof e=="string"||Array.isArray(e)}const fc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hc=["initial",...fc];function Ji(e){return Qi(e.animate)||hc.some(t=>_s(e[t]))}function mp(e){return!!(Ji(e)||e.variants)}function WS(e,t){if(Ji(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_s(n)?n:void 0,animate:_s(r)?r:void 0}}return e.inherit!==!1?t:{}}function HS(e){const{initial:t,animate:n}=WS(e,w.useContext(Xi));return w.useMemo(()=>({initial:t,animate:n}),[gp(t),gp(n)])}function gp(e){return Array.isArray(e)?e.join(" "):e}const zS=Symbol.for("motionComponentSymbol");function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function US(e,t,n){return w.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):wo(n)&&(n.current=r))},[t])}const pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yp="data-"+pc("framerAppearId"),{schedule:mc,cancel:nB}=ap(queueMicrotask,!1),vp=w.createContext({});function GS(e,t,n,r,o){var s,i;const{visualElement:a}=w.useContext(Xi),l=w.useContext(up),c=w.useContext(Ui),u=w.useContext(yo).reducedMotion,d=w.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=w.useContext(vp);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&YS(d.current,n,o,h);const p=w.useRef(!1);w.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[yp],y=w.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return Yi(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),mc.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),w.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function YS(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:bp(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&wo(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function bp(e){if(e)return e.options.allowProjection!==!1?e.projection:bp(e.parent)}function qS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&VS(e);function a(c,u){let d;const f={...w.useContext(yo),...c,layoutId:KS(c)},{isStatic:h}=f,p=HS(c),m=r(c,h);if(!h&&uc){ZS(f,e);const y=XS(f);d=y.MeasureLayout,p.visualElement=GS(o,m,f,t,y.ProjectionNode)}return x.jsxs(Xi.Provider,{value:p,children:[d&&p.visualElement?x.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,US(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=w.forwardRef(a);return l[zS]=o,l}function KS({layoutId:e}){const t=w.useContext(Os).id;return t&&e!==void 0?t+"-"+e:e}function ZS(e,t){const n=w.useContext(up).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?vo(!1,r):tn(!1,r)}}function XS(e){const{drag:t,layout:n}=bo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const wp=e=>t=>typeof t=="string"&&t.startsWith(e),gc=wp("--"),QS=wp("var(--"),yc=e=>QS(e)?JS.test(e.split("/*")[0].trim()):!1,JS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ds={};function eE(e){for(const t in e)Ds[t]=e[t],gc(t)&&(Ds[t].isCSSVariable=!0)}const xo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cr=new Set(xo);function xp(e,{layout:t,layoutId:n}){return Cr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ds[e]||e==="opacity")}const vt=e=>!!(e&&e.getVelocity),Tp=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Bn=(e,t,n)=>n>t?t:n<e?e:n,To={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ms={...To,transform:e=>Bn(0,1,e)},ea={...To,default:1},Ns=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tr=Ns("deg"),vn=Ns("%"),ge=Ns("px"),tE=Ns("vh"),nE=Ns("vw"),Sp={...vn,parse:e=>vn.parse(e)/100,transform:e=>vn.transform(e*100)},rE={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,backgroundPositionX:ge,backgroundPositionY:ge},oE={rotate:tr,rotateX:tr,rotateY:tr,rotateZ:tr,scale:ea,scaleX:ea,scaleY:ea,scaleZ:ea,skew:tr,skewX:tr,skewY:tr,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:Ms,originX:Sp,originY:Sp,originZ:ge},Ep={...To,transform:Math.round},vc={...rE,...oE,zIndex:Ep,size:ge,fillOpacity:Ms,strokeOpacity:Ms,numOctaves:Ep},sE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iE=xo.length;function aE(e,t,n){let r="",o=!0;for(let s=0;s<iE;s++){const i=xo[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Tp(a,vc[i]);if(!l){o=!1;const u=sE[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function bc(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Cr.has(l)){i=!0;continue}else if(gc(l)){o[l]=c;continue}else{const u=Tp(c,vc[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=aE(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const wc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cp(e,t,n){for(const r in t)!vt(t[r])&&!xp(r,n)&&(e[r]=t[r])}function lE({transformTemplate:e},t){return w.useMemo(()=>{const n=wc();return bc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function cE(e,t){const n=e.style||{},r={};return Cp(r,n,e),Object.assign(r,lE(e,t)),r}function uE(e,t){const n={},r=cE(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 dE=["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 xc(e){return typeof e!="string"||e.includes("-")?!1:!!(dE.indexOf(e)>-1||/[A-Z]/u.test(e))}const fE={offset:"stroke-dashoffset",array:"stroke-dasharray"},hE={offset:"strokeDashoffset",array:"strokeDasharray"};function pE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?fE:hE;e[s.offset]=ge.transform(-r);const i=ge.transform(t),a=ge.transform(n);e[s.array]=`${i} ${a}`}function Pp(e,t,n){return typeof e=="string"?e:ge.transform(t+n*e)}function mE(e,t,n){const r=Pp(t,e.x,e.width),o=Pp(n,e.y,e.height);return`${r} ${o}`}function Tc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(bc(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=mE(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&pE(f,i,a,l,!1)}const kp=()=>({...wc(),attrs:{}}),Sc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gE(e,t,n,r){const o=w.useMemo(()=>{const s=kp();return Tc(s,t,Sc(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Cp(s,e.style,e),o.style={...s,...o.style}}return o}function yE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(xc(n)?gE:uE)(r,s,i,n),c=RS(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=w.useMemo(()=>vt(d)?d.get():d,[d]);return w.createElement(n,{...u,children:f})}}function Ip(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ec(e,t,n,r){if(typeof t=="function"){const[o,s]=Ip(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]=Ip(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const Cc=e=>Array.isArray(e),vE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),bE=e=>Cc(e)?e[e.length-1]||0:e;function ta(e){const t=vt(e)?e.get():e;return vE(t)?t.toValue():t}function wE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:xE(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const Ap=e=>(t,n)=>{const r=w.useContext(Xi),o=w.useContext(Ui),s=()=>wE(e,t,r,o);return n?s():an(s)};function xE(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=ta(s[f]);let{initial:i,animate:a}=e;const l=Ji(e),c=mp(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!Qi(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Ec(e,f[h]);if(p){const{transitionEnd:m,transition:y,...b}=p;for(const v in b){let g=b[v];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(o[v]=g)}for(const v in m)o[v]=m[v]}}}return o}function Pc(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(vt(o[i])||t.style&&vt(t.style[i])||xp(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 s}const TE={useVisualState:Ap({scrapeMotionValuesFromProps:Pc,createRenderState:wc})};function Op(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function _p(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 Dp=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 Mp(e,t,n,r){_p(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Dp.has(o)?o:pc(o),t.attrs[o])}function Np(e,t,n){const r=Pc(e,t,n);for(const o in e)if(vt(e[o])||vt(t[o])){const s=xo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const Lp=["x","y","width","height","cx","cy","r"],SE={useVisualState:Ap({scrapeMotionValuesFromProps:Np,createRenderState:kp,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Cr.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<Lp.length;a++){const l=Lp[a];e[l]!==t[l]&&(i=!0)}i&&ze.read(()=>{Op(n,r),ze.render(()=>{Tc(r,o,Sc(n.tagName),e.transformTemplate),Mp(n,r)})})}})};function EE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...xc(r)?SE:TE,preloadedFeatures:e,useRender:yE(o),createVisualElement:t,Component:r};return qS(i)}}function Ls(e,t,n){const r=e.getProps();return Ec(r,t,n!==void 0?n:r.custom,e)}function kc(e,t){return e?e[t]||e.default||e:void 0}const Fp=new Set(["width","height","top","left","right","bottom",...xo]);let na;function CE(){na=void 0}const bn={now:()=>(na===void 0&&bn.set(Pt.isProcessing||OS.useManualTiming?Pt.timestamp:performance.now()),na),set:e=>{na=e,queueMicrotask(CE)}};function Ic(e,t){e.indexOf(t)===-1&&e.push(t)}function ra(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function PE([...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}class Ac{constructor(){this.subscriptions=[]}add(t){return Ic(this.subscriptions,t),()=>ra(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}}function Vp(e,t){return t?e*(1e3/t):0}const $p=30,kE=e=>!isNaN(parseFloat(e)),Fs={current:void 0};class IE{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=bn.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=bn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=kE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Zi(!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 Ac);const r=this.events[t].add(n);return t==="change"?()=>{r(),ze.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 Fs.current&&Fs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$p)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$p);return Vp(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 So(e,t){return new IE(e,t)}function AE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,So(n))}function OE(e,t){const n=Ls(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=bE(s[i]);AE(e,i,a)}}function _E(e){return!!(vt(e)&&e.add)}function Oc(e,t){const n=e.getValue("willChange");if(_E(n))return n.add(t)}function Rp(e){return e.props[yp]}function _c(e){let t;return()=>(t===void 0&&(t=e()),t)}const DE=_c(()=>window.ScrollTimeline!==void 0);class ME{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(DE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Bp extends ME{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const ln=e=>e*1e3,wn=e=>e/1e3;function oa(e){return typeof e=="function"}function jp(e,t){e.timeline=t,e.onfinish=null}const Dc=e=>Array.isArray(e)&&typeof e[0]=="number",NE={linearEasing:void 0};function LE(e,t){const n=_c(e);return()=>{var r;return(r=NE[t])!==null&&r!==void 0?r:n()}}const sa=LE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Wp=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Pr(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Hp(e){return!!(typeof e=="function"&&sa()||!e||typeof e=="string"&&(e in Mc||sa())||Dc(e)||Array.isArray(e)&&e.every(Hp))}const Vs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Mc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vs([0,.65,.55,1]),circOut:Vs([.55,0,1,.45]),backIn:Vs([.31,.01,.66,-.59]),backOut:Vs([.33,1.53,.69,.99])};function zp(e,t){if(e)return typeof e=="function"&&sa()?Wp(e,t):Dc(e)?Vs(e):Array.isArray(e)?e.map(n=>zp(n,t)||Mc.easeOut):Mc[e]}const Up=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,FE=1e-7,VE=12;function $E(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Up(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>FE&&++a<VE);return i}function $s(e,t,n,r){if(e===t&&n===r)return Ht;const o=s=>$E(s,0,1,e,n);return s=>s===0||s===1?s:Up(o(s),t,r)}const Gp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yp=e=>t=>1-e(1-t),qp=$s(.33,1.53,.69,.99),Nc=Yp(qp),Kp=Gp(Nc),Zp=e=>(e*=2)<1?.5*Nc(e):.5*(2-Math.pow(2,-10*(e-1))),Lc=e=>1-Math.sin(Math.acos(e)),Xp=Yp(Lc),Qp=Gp(Lc),Jp=e=>/^0[^.\s]+$/u.test(e);function RE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Jp(e):!0}const Rs=e=>Math.round(e*1e5)/1e5,Fc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function BE(e){return e==null}const jE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vc=(e,t)=>n=>!!(typeof n=="string"&&jE.test(n)&&n.startsWith(e)||t&&!BE(n)&&Object.prototype.hasOwnProperty.call(n,t)),em=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(Fc);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},WE=e=>Bn(0,255,e),$c={...To,transform:e=>Math.round(WE(e))},kr={test:Vc("rgb","red"),parse:em("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$c.transform(e)+", "+$c.transform(t)+", "+$c.transform(n)+", "+Rs(Ms.transform(r))+")"};function HE(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 Rc={test:Vc("#"),parse:HE,transform:kr.transform},Eo={test:Vc("hsl","hue"),parse:em("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vn.transform(Rs(t))+", "+vn.transform(Rs(n))+", "+Rs(Ms.transform(r))+")"},Dt={test:e=>kr.test(e)||Rc.test(e)||Eo.test(e),parse:e=>kr.test(e)?kr.parse(e):Eo.test(e)?Eo.parse(e):Rc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?kr.transform(e):Eo.transform(e)},zE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function UE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Fc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(zE))===null||n===void 0?void 0:n.length)||0)>0}const tm="number",nm="color",GE="var",YE="var(",rm="${}",qE=/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 Bs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(qE,l=>(Dt.test(l)?(r.color.push(s),o.push(nm),n.push(Dt.parse(l))):l.startsWith(YE)?(r.var.push(s),o.push(GE),n.push(l)):(r.number.push(s),o.push(tm),n.push(parseFloat(l))),++s,rm)).split(rm);return{values:n,split:a,indexes:r,types:o}}function om(e){return Bs(e).values}function sm(e){const{split:t,types:n}=Bs(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===tm?s+=Rs(o[i]):a===nm?s+=Dt.transform(o[i]):s+=o[i]}return s}}const KE=e=>typeof e=="number"?0:e;function ZE(e){const t=om(e);return sm(e)(t.map(KE))}const nr={test:UE,parse:om,createTransformer:sm,getAnimatableNone:ZE},XE=new Set(["brightness","contrast","saturate","opacity"]);function QE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Fc)||[];if(!r)return e;const o=n.replace(r,"");let s=XE.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const JE=/\b([a-z-]*)\(.*?\)/gu,Bc={...nr,getAnimatableNone:e=>{const t=e.match(JE);return t?t.map(QE).join(" "):e}},eC={...vc,color:Dt,backgroundColor:Dt,outlineColor:Dt,fill:Dt,stroke:Dt,borderColor:Dt,borderTopColor:Dt,borderRightColor:Dt,borderBottomColor:Dt,borderLeftColor:Dt,filter:Bc,WebkitFilter:Bc},jc=e=>eC[e];function im(e,t){let n=jc(e);return n!==Bc&&(n=nr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const tC=new Set(["auto","none","0"]);function nC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!tC.has(s)&&Bs(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=im(n,o)}const am=e=>e===To||e===ge,lm=(e,t)=>parseFloat(e.split(", ")[t]),cm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return lm(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?lm(s[1],e):0}},rC=new Set(["x","y","z"]),oC=xo.filter(e=>!rC.has(e));function sC(e){const t=[];return oC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Co={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:cm(4,13),y:cm(5,14)};Co.translateX=Co.x,Co.translateY=Co.y;const Ir=new Set;let Wc=!1,Hc=!1;function um(){if(Hc){const e=Array.from(Ir).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=sC(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)})}Hc=!1,Wc=!1,Ir.forEach(e=>e.complete()),Ir.clear()}function dm(){Ir.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hc=!0)})}function iC(){dm(),um()}class zc{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?(Ir.add(this),Wc||(Wc=!0,ze.read(dm),ze.resolveKeyframes(um))):(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),Ir.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ir.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const fm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),aC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lC(e){const t=aC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const cC=4;function hm(e,t,n=1){tn(n<=cC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=lC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return fm(i)?parseFloat(i):i}return yc(o)?hm(o,t,n+1):o}const pm=e=>t=>t.test(e),mm=[To,ge,vn,tr,nE,tE,{test:e=>e==="auto",parse:e=>e}],gm=e=>mm.find(pm(e));class ym extends zc{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),yc(c))){const u=hm(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Fp.has(r)||t.length!==2)return;const[o,s]=t,i=gm(o),a=gm(s);if(i!==a)if(am(i)&&am(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++)RE(t[o])&&r.push(o);r.length&&nC(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Co[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Co[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()}}const vm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(nr.test(e)||e==="0")&&!e.startsWith("url("));function uC(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 dC(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=vm(o,t),a=vm(s,t);return vo(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:uC(e)||(n==="spring"||oa(n))&&r}const fC=e=>e!==null;function ia(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(fC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const hC=40;class bm{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.createdAt=bn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>hC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&iC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=bn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!dC(t,r,o,s))if(i)this.options.duration=0;else{l&&l(ia(t,this.options,n)),a&&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)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const aa=2e4;function Uc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<aa;)t+=n,r=e.next(t);return t>=aa?1/0:t}const Ke=(e,t,n)=>e+(t-e)*n;function Gc(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 pC({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=Gc(l,a,e+1/3),s=Gc(l,a,e),i=Gc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function la(e,t){return n=>n>0?t:e}const Yc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},mC=[Rc,kr,Eo],gC=e=>mC.find(t=>t.test(e));function wm(e){const t=gC(e);if(vo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Eo&&(n=pC(n)),n}const xm=(e,t)=>{const n=wm(e),r=wm(t);if(!n||!r)return la(e,t);const o={...n};return s=>(o.red=Yc(n.red,r.red,s),o.green=Yc(n.green,r.green,s),o.blue=Yc(n.blue,r.blue,s),o.alpha=Ke(n.alpha,r.alpha,s),kr.transform(o))},yC=(e,t)=>n=>t(e(n)),js=(...e)=>e.reduce(yC),qc=new Set(["none","hidden"]);function vC(e,t){return qc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function bC(e,t){return n=>Ke(e,t,n)}function Kc(e){return typeof e=="number"?bC:typeof e=="string"?yc(e)?la:Dt.test(e)?xm:TC:Array.isArray(e)?Tm:typeof e=="object"?Dt.test(e)?xm:wC:la}function Tm(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Kc(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function wC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Kc(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function xC(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 TC=(e,t)=>{const n=nr.createTransformer(t),r=Bs(e),o=Bs(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?qc.has(e)&&!o.values.length||qc.has(t)&&!r.values.length?vC(e,t):js(Tm(xC(r,o),o.values),n):(vo(!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.`),la(e,t))};function Sm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ke(e,t,n):Kc(e)(e,t)}const SC=5;function Em(e,t,n){const r=Math.max(t-SC,0);return Vp(n-e(r),t-r)}const et={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Zc=.001;function EC({duration:e=et.duration,bounce:t=et.bounce,velocity:n=et.velocity,mass:r=et.mass}){let o,s;vo(e<=ln(et.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Bn(et.minDamping,et.maxDamping,i),e=Bn(et.minDuration,et.maxDuration,wn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Xc(c,i),p=Math.exp(-d);return Zc-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Xc(Math.pow(c,2),i);return(-o(c)+Zc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Zc+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=PC(o,s,a);if(e=ln(e),isNaN(l))return{stiffness:et.stiffness,damping:et.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const CC=12;function PC(e,t,n){let r=n;for(let o=1;o<CC;o++)r=r-e(r)/t(r);return r}function Xc(e,t){return e*Math.sqrt(1-t*t)}const kC=["duration","bounce"],IC=["stiffness","damping","mass"];function Cm(e,t){return t.some(n=>e[n]!==void 0)}function AC(e){let t={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...e};if(!Cm(e,IC)&&Cm(e,kC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Bn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:et.mass,stiffness:o,damping:s}}else{const n=EC(e);t={...t,...n,mass:et.mass},t.isResolvedFromDuration=!0}return t}function Qc(e=et.visualDuration,t=et.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=AC({...n,velocity:-wn(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),y=i-s,b=wn(Math.sqrt(l/u)),v=Math.abs(y)<5;r||(r=v?et.restSpeed.granular:et.restSpeed.default),o||(o=v?et.restDelta.granular:et.restDelta.default);let g;if(m<1){const T=Xc(b,m);g=E=>{const C=Math.exp(-m*b*E);return i-C*((p+m*b*y)/T*Math.sin(T*E)+y*Math.cos(T*E))}}else if(m===1)g=T=>i-Math.exp(-b*T)*(y+(p+b*y)*T);else{const T=b*Math.sqrt(m*m-1);g=E=>{const C=Math.exp(-m*b*E),I=Math.min(T*E,300);return i-C*((p+m*b*y)*Math.sinh(I)+T*y*Math.cosh(I))/T}}const S={calculatedDuration:h&&d||null,next:T=>{const E=g(T);if(h)a.done=T>=d;else{let C=0;m<1&&(C=T===0?ln(p):Em(g,T,E));const I=Math.abs(C)<=r,A=Math.abs(i-E)<=o;a.done=I&&A}return a.value=a.done?i:E,a},toString:()=>{const T=Math.min(Uc(S),aa),E=Wp(C=>S.next(T*C).value,T,30);return T+"ms "+E}};return S}function Pm({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 d=e[0],f={done:!1,value:d},h=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 y=d+m,b=i===void 0?y:i(y);b!==y&&(m=b-d);const v=I=>-m*Math.exp(-I/r),g=I=>b+v(I),S=I=>{const A=v(I),O=g(I);f.done=Math.abs(A)<=c,f.value=f.done?b:O};let T,E;const C=I=>{h(f.value)&&(T=I,E=Qc({keyframes:[f.value,p(f.value)],velocity:Em(g,I,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:I=>{let A=!1;return!E&&T===void 0&&(A=!0,S(I),C(I)),T!==void 0&&I>=T?E.next(I-T):(!A&&S(I),f)}}}const OC=$s(.42,0,1,1),_C=$s(0,0,.58,1),km=$s(.42,0,.58,1),Im=e=>Array.isArray(e)&&typeof e[0]!="number",Am={linear:Ht,easeIn:OC,easeInOut:km,easeOut:_C,circIn:Lc,circInOut:Qp,circOut:Xp,backIn:Nc,backInOut:Kp,backOut:qp,anticipate:Zp},Jc=e=>{if(Dc(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return $s(t,n,r,o)}else if(typeof e=="string")return tn(Am[e]!==void 0,`Invalid easing type '${e}'`),Am[e];return e};function DC(e,t,n){const r=[],o=n||Sm,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]||Ht:t;a=js(l,a)}r.push(a)}return r}function Om(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(tn(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=DC(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Pr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Bn(e[0],e[s-1],u)):c}function _m(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Pr(0,t,r);e.push(Ke(n,1,o))}}function Dm(e){const t=[0];return _m(t,e.length-1),t}function MC(e,t){return e.map(n=>n*t)}function NC(e,t){return e.map(()=>t||km).splice(0,e.length-1)}function Ws({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Im(r)?r.map(Jc):Jc(r),s={done:!1,value:t[0]},i=MC(n&&n.length===t.length?n:Dm(t),e),a=Om(i,t,{ease:Array.isArray(o)?o:NC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const LC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ze.update(t,!0),stop:()=>Rn(t),now:()=>Pt.isProcessing?Pt.timestamp:bn.now()}},FC={decay:Pm,inertia:Pm,tween:Ws,keyframes:Ws,spring:Qc},VC=e=>e/100;class eu extends bm{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||zc,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=oa(n)?n:FC[n]||Ws;let l,c;process.env.NODE_ENV!=="production"&&a!==Ws&&tn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Ws&&typeof t[0]!="number"&&(l=js(VC,Sm(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=Uc(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}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:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=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 b=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=s;if(h){const I=Math.min(this.currentTime,u)/d;let A=Math.floor(I),O=I%1;!O&&I>=1&&(O=1),O===1&&A--,A=Math.min(A,h+1),!!(A%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/d)):p==="mirror"&&(S=i)),g=Bn(0,1,O)*d}const T=v?{done:!1,value:l[0]}:S.next(g);a&&(T.value=a(T.value));let{done:E}=T;!v&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(T.value=ia(l,this.options,o)),y&&y(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?wn(t.calculatedDuration):0}get time(){return wn(this.currentTime)}set time(t){t=ln(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=wn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=LC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const $C=new Set(["opacity","clipPath","filter","transform"]);function RC(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=zp(a,o);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 BC=_c(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ca=10,jC=2e4;function WC(e){return oa(e.type)||e.type==="spring"||!Hp(e.ease)}function HC(e,t){const n=new eu({...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<jC;)r=n.sample(s),o.push(r.value),s+=ca;return{times:void 0,keyframes:o,duration:s-ca,ease:"linear"}}const Mm={anticipate:Zp,backInOut:Kp,circInOut:Qp};function zC(e){return e in Mm}class Nm extends bm{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new ym(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&sa()&&zC(s)&&(s=Mm[s]),WC(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,y=HC(t,m);t=y.keyframes,t.length===1&&(t[1]=t[0]),r=y.duration,o=y.times,s=y.ease,i="keyframes"}const u=RC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(jp(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(ia(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return wn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return wn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ln(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ht;const{animation:r}=n;jp(r,t)}return Ht}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new eu({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=ln(this.time);c.setWithVelocity(p.sample(m-ca).value,p.sample(m).value,ca)}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;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return BC()&&r&&$C.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const UC={type:"spring",stiffness:500,damping:25,restSpeed:10},GC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YC={type:"keyframes",duration:.8},qC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KC=(e,{keyframes:t})=>t.length>2?YC:Cr.has(e)?e.startsWith("scale")?GC(t[1]):UC:qC;function ZC({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}const tu=(e,t,n,r={},o,s)=>i=>{const a=kc(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ln(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};ZC(a)||(u={...u,...KC(e,u)}),u.duration&&(u.duration=ln(u.duration)),u.repeatDelay&&(u.repeatDelay=ln(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const f=ia(u.keyframes,a);if(f!==void 0)return ze.update(()=>{u.onUpdate(f),u.onComplete()}),new Bp([])}return!s&&Nm.supports(u)?new Nm(u):new eu(u)};function XC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function nu(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 d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&XC(u,d))continue;const p={delay:n,...kc(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=Rp(e);if(b){const v=window.MotionHandoffAnimation(b,d,ze);v!==null&&(p.startTime=v,m=!0)}}Oc(e,d),f.start(tu(d,f,h,e.shouldReduceMotion&&Fp.has(d)?{type:!1}:p,e,m));const y=f.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{ze.update(()=>{a&&OE(e,a)})}),c}function ru(e,t,n={}){var r;const o=Ls(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(nu(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return QC(e,t,u+c,d,f,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 QC(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(JC).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(ru(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function JC(e,t){return e.sortNodePosition(t)}function eP(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>ru(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=ru(e,t,n);else{const o=typeof t=="function"?Ls(e,t,n.custom):t;r=Promise.all(nu(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Lm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const tP=hc.length;function Fm(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Fm(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<tP;n++){const r=hc[n],o=e.props[r];(_s(o)||o===!1)&&(t[r]=o)}return t}const nP=[...fc].reverse(),rP=fc.length;function oP(e){return t=>Promise.all(t.map(({animation:n,options:r})=>eP(e,n,r)))}function sP(e){let t=oP(e),n=Vm(),r=!0;const o=l=>(c,u)=>{var d;const f=Ls(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=Fm(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<rP;y++){const b=nP[y],v=n[b],g=c[b]!==void 0?c[b]:u[b],S=_s(g),T=b===l?v.isActive:null;T===!1&&(p=y);let E=g===u[b]&&g!==c[b]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...h},!v.isActive&&T===null||!g&&!v.prevProp||Qi(g)||typeof g=="boolean")continue;const C=iP(v.prevProp,g);let I=C||b===l&&v.isActive&&!E&&S||y>p&&S,A=!1;const O=Array.isArray(g)?g:[g];let L=O.reduce(o(b),{});T===!1&&(L={});const{prevResolvedValues:_={}}=v,V={..._,...L},k=N=>{I=!0,f.has(N)&&(A=!0,f.delete(N)),v.needsAnimating[N]=!0;const B=e.getValue(N);B&&(B.liveStyle=!1)};for(const N in V){const B=L[N],z=_[N];if(h.hasOwnProperty(N))continue;let D=!1;Cc(B)&&Cc(z)?D=!Lm(B,z):D=B!==z,D?B!=null?k(N):f.add(N):B!==void 0&&f.has(N)?k(N):v.protectedKeys[N]=!0}v.prevProp=g,v.prevResolvedValues=L,v.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(I=!1),I&&(!(E&&C)||A)&&d.push(...O.map(N=>({animation:N,options:{type:b}})))}if(f.size){const y={};if(typeof c.initial!="boolean"){const b=Ls(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(y.transition=b.transition)}f.forEach(b=>{const v=e.getBaseTarget(b),g=e.getValue(b);g&&(g.liveStyle=!0),y[b]=v??null}),d.push({animation:y})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):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(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Vm(),r=!0}}}function iP(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Lm(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vm(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class rr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class aP extends rr{constructor(t){super(t),t.animationState||(t.animationState=sP(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Qi(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 lP=0;class cP extends rr{constructor(){super(...arguments),this.id=lP++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const uP={animation:{Feature:aP},exit:{Feature:cP}},cn={x:!1,y:!1};function $m(){return cn.x||cn.y}function dP(e){return e==="x"||e==="y"?cn[e]?null:(cn[e]=!0,()=>{cn[e]=!1}):cn.x||cn.y?null:(cn.x=cn.y=!0,()=>{cn.x=cn.y=!1})}function Hs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ou=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function zs(e){return{point:{x:e.pageX,y:e.pageY}}}const fP=e=>t=>ou(t)&&e(t,zs(t));function Po(e,t,n,r){return Hs(e,t,fP(n),r)}function Rm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pP(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Bm=1e-4,mP=1-Bm,gP=1+Bm,jm=.01,yP=0-jm,vP=0+jm;function $t(e){return e.max-e.min}function bP(e,t,n){return Math.abs(e-t)<=n}function Wm(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(e.scale>=mP&&e.scale<=gP||isNaN(e.scale))&&(e.scale=1),(e.translate>=yP&&e.translate<=vP||isNaN(e.translate))&&(e.translate=0)}function Us(e,t,n,r){Wm(e.x,t.x,n.x,r?r.originX:void 0),Wm(e.y,t.y,n.y,r?r.originY:void 0)}function Hm(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function wP(e,t,n){Hm(e.x,t.x,n.x),Hm(e.y,t.y,n.y)}function zm(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function Gs(e,t,n){zm(e.x,t.x,n.x),zm(e.y,t.y,n.y)}const Um=()=>({translate:0,scale:1,origin:0,originPoint:0}),ko=()=>({x:Um(),y:Um()}),Gm=()=>({min:0,max:0}),st=()=>({x:Gm(),y:Gm()});function nn(e){return[e("x"),e("y")]}function su(e){return e===void 0||e===1}function iu({scale:e,scaleX:t,scaleY:n}){return!su(e)||!su(t)||!su(n)}function Or(e){return iu(e)||Ym(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ym(e){return qm(e.x)||qm(e.y)}function qm(e){return e&&e!=="0%"}function ua(e,t,n){const r=e-n,o=t*r;return n+o}function Km(e,t,n,r,o){return o!==void 0&&(e=ua(e,o,r)),ua(e,n,r)+t}function au(e,t=0,n=1,r,o){e.min=Km(e.min,t,n,r,o),e.max=Km(e.max,t,n,r,o)}function Zm(e,{x:t,y:n}){au(e.x,t.translate,t.scale,t.originPoint),au(e.y,n.translate,n.scale,n.originPoint)}const Xm=.999999999999,Qm=1.0000000000001;function xP(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&&Ao(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Zm(e,i)),r&&Or(s.latestValues)&&Ao(e,s.latestValues))}t.x<Qm&&t.x>Xm&&(t.x=1),t.y<Qm&&t.y>Xm&&(t.y=1)}function Io(e,t){e.min=e.min+t,e.max=e.max+t}function Jm(e,t,n,r,o=.5){const s=Ke(e.min,e.max,o);au(e,t,n,s,r)}function Ao(e,t){Jm(e.x,t.x,t.scaleX,t.scale,t.originX),Jm(e.y,t.y,t.scaleY,t.scale,t.originY)}function eg(e,t){return Rm(pP(e.getBoundingClientRect(),t))}function TP(e,t,n){const r=eg(e,n),{scroll:o}=t;return o&&(Io(r.x,o.offset.x),Io(r.y,o.offset.y)),r}function da(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const tg=(e,t)=>Math.abs(e-t);function SP(e,t){const n=tg(e.x,t.x),r=tg(e.y,t.y);return Math.sqrt(n**2+r**2)}class ng{constructor(t,n,{transformPagePoint:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=cu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=SP(u.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:h}=u,{timestamp:p}=Pt;this.history.push({...h,timestamp:p});const{onStart:m,onMove:y}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=lu(d,this.transformPagePoint),ze.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{da(u,"release"),this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=cu(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:lu(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!ou(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=zs(t),i=lu(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=Pt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,cu(i,this.history)),da(t,"set"),this.removeListeners=js(Po(t.currentTarget,"pointermove",this.handlePointerMove),Po(t.currentTarget,"pointerup",this.handlePointerUp),Po(t.currentTarget,"pointercancel",this.handlePointerUp),Po(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rn(this.updatePoint)}}function lu(e,t){return t?{point:t(e.point)}:e}function rg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cu({point:e},t){return{point:e,delta:rg(e,og(t)),offset:rg(e,EP(t)),velocity:CP(t,.1)}}function EP(e){return e[0]}function og(e){return e[e.length-1]}function CP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=og(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ln(t)));)n--;if(!r)return{x:0,y:0};const s=wn(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}function PP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ke(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function sg(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 kP(e,{top:t,left:n,bottom:r,right:o}){return{x:sg(e.x,n,o),y:sg(e.y,t,r)}}function ig(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 IP(e,t){return{x:ig(e.x,t.x),y:ig(e.y,t.y)}}function AP(e,t){let n=.5;const r=$t(e),o=$t(t);return o>r?n=Pr(t.min,t.max-r,e.min):r>o&&(n=Pr(e.min,e.max-o,t.min)),Bn(0,1,n)}function OP(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 uu=.35;function _P(e=uu){return e===!1?e=0:e===!0&&(e=uu),{x:ag(e,"left","right"),y:ag(e,"top","bottom")}}function ag(e,t,n){return{min:lg(e,t),max:lg(e,n)}}function lg(e,t){return typeof e=="number"?e:e[t]||0}const DP=new WeakMap;class MP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zs(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=dP(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(vn.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[y];g&&(b=$t(g)*(parseFloat(b)/100))}}this.originPoint[y]=b}),p&&ze.postRender(()=>p(u,d)),Oc(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=d;if(h&&this.currentDirection===null){this.currentDirection=NP(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>nn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ng(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&ze.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!fa(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=PP(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&&wo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=kP(o.layoutBox,n):this.constraints=!1,this.elastic=_P(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&nn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=OP(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const r=t.current;tn(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=TP(r,o.root,this.visualElement.getTransformPagePoint());let i=IP(o.layout.layoutBox,s);if(n){const a=n(hP(i));this.hasMutatedConstraints=!!a,a&&(i=Rm(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=nn(u=>{if(!fa(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Oc(this.visualElement,t),r.start(tu(t,r,0,n,this.visualElement,!1))}stopAnimation(){nn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nn(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){nn(n=>{const{drag:r}=this.getProps();if(!fa(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]-Ke(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};nn(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=AP({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(),nn(i=>{if(!fa(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ke(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;DP.set(this.visualElement,this);const t=this.visualElement.current,n=Po(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();wo(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()),ze.read(r);const i=Hs(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(nn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.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=uu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function fa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function NP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class LP extends rr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new MP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const cg=e=>(t,n)=>{e&&ze.postRender(()=>e(t,n))};class FP extends rr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new ng(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:cg(t),onStart:cg(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&ze.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Po(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ha={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ug(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ys={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const n=ug(e,t.target.x),r=ug(e,t.target.y);return`${n}% ${r}%`}},VP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=nr.parse(e);if(o.length>5)return r;const s=nr.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=Ke(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 $P extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;eE(RP),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()})),ha.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()||ze.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),mc.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 dg(e){const[t,n]=op(),r=w.useContext(Os);return x.jsx($P,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(vp),isPresent:t,safeToRemove:n})}const RP={borderRadius:{...Ys,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ys,borderTopRightRadius:Ys,borderBottomLeftRadius:Ys,borderBottomRightRadius:Ys,boxShadow:VP};function fg(e,t,n){const r=vt(e)?e:So(e);return r.start(tu("",r,t,n)),r.animation}function hg(e){return e instanceof SVGElement&&e.tagName!=="svg"}const BP=(e,t)=>e.depth-t.depth;class jP{constructor(){this.children=[],this.isDirty=!1}add(t){Ic(this.children,t),this.isDirty=!0}remove(t){ra(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(BP),this.isDirty=!1,this.children.forEach(t)}}function WP(e,t){const n=bn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Rn(r),e(s-t))};return ze.read(r,!0),()=>Rn(r)}const pg=["TopLeft","TopRight","BottomLeft","BottomRight"],HP=pg.length,mg=e=>typeof e=="string"?parseFloat(e):e,gg=e=>typeof e=="number"||ge.test(e);function zP(e,t,n,r,o,s){o?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,UP(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,GP(r))):s&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<HP;i++){const a=`border${pg[i]}Radius`;let l=yg(t,a),c=yg(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gg(l)===gg(c)?(e[a]=Math.max(Ke(mg(l),mg(c),r),0),(vn.test(c)||vn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ke(t.rotate||0,n.rotate||0,r))}function yg(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const UP=vg(0,.5,Xp),GP=vg(.5,.95,Ht);function vg(e,t,n){return r=>r<e?0:r>t?1:n(Pr(e,t,r))}function bg(e,t){e.min=t.min,e.max=t.max}function rn(e,t){bg(e.x,t.x),bg(e.y,t.y)}function wg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function xg(e,t,n,r,o){return e-=t,e=ua(e,1/n,r),o!==void 0&&(e=ua(e,1/o,r)),e}function YP(e,t=0,n=1,r=.5,o,s=e,i=e){if(vn.test(t)&&(t=parseFloat(t),t=Ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ke(s.min,s.max,r);e===s&&(a-=t),e.min=xg(e.min,t,n,a,o),e.max=xg(e.max,t,n,a,o)}function Tg(e,t,[n,r,o],s,i){YP(e,t[n],t[r],t[o],t.scale,s,i)}const qP=["x","scaleX","originX"],KP=["y","scaleY","originY"];function Sg(e,t,n,r){Tg(e.x,t,qP,n?n.x:void 0,r?r.x:void 0),Tg(e.y,t,KP,n?n.y:void 0,r?r.y:void 0)}function Eg(e){return e.translate===0&&e.scale===1}function Cg(e){return Eg(e.x)&&Eg(e.y)}function Pg(e,t){return e.min===t.min&&e.max===t.max}function ZP(e,t){return Pg(e.x,t.x)&&Pg(e.y,t.y)}function kg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ig(e,t){return kg(e.x,t.x)&&kg(e.y,t.y)}function Ag(e){return $t(e.x)/$t(e.y)}function Og(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class XP{constructor(){this.members=[]}add(t){Ic(this.members,t),t.scheduleRender()}remove(t){if(ra(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 QP(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:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),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 du=["","X","Y","Z"],JP={visibility:"hidden"},_g=1e3;let ek=0;function fu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Dg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Rp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ze,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Dg(r)}function Mg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=ek++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(rk),this.nodes.forEach(lk),this.nodes.forEach(ck),this.nodes.forEach(ok)},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 jP)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Ac),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=hg(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 d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=WP(f,250),ha.hasAnimatedSinceResize&&(ha.hasAnimatedSinceResize=!1,this.nodes.forEach(Lg))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||pk,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=u.getProps(),v=!this.targetLayout||!Ig(this.targetLayout,p),g=!f&&h;if(this.options.layoutRoot||this.resumeFrom||g||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const S={...kc(m,"layout"),onPlay:y,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||Lg(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,Rn(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(uk),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.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ng);return}this.isUpdating||this.nodes.forEach(ik),this.isUpdating=!1,this.nodes.forEach(ak),this.nodes.forEach(tk),this.nodes.forEach(nk),this.clearAllSnapshots();const a=bn.now();Pt.delta=Bn(0,1e3/60,a-Pt.timestamp),Pt.timestamp=a,Pt.isProcessing=!0,dc.update.process(Pt),dc.preRender.process(Pt),dc.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,mc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sk),this.sharedNodes.forEach(dk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ze.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ze.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$t(this.snapshot.measuredBox.x)&&!$t(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),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);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Cg(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Or(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)),mk(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return st();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(gk))){const{scroll:u}=this.root;u&&(Io(l.x,u.offset.x),Io(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=st();if(rn(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&rn(l,i),Io(l.x,d.offset.x),Io(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=st();rn(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&&Ao(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Or(u.latestValues)&&Ao(l,u.latestValues)}return Or(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(i){const a=st();rn(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Or(c.latestValues))continue;iu(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();rn(u,d),Sg(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Or(this.latestValues)&&Sg(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:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),Gs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Zm(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),Gs(this.relativeTargetOrigin,this.target,h.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||iu(this.parent.latestValues)||Ym(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:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;xP(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=st());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wg(this.prevProjectionDelta.x,this.projectionDelta.x),wg(this.prevProjectionDelta.y,this.projectionDelta.y)),Us(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Og(this.projectionDelta.x,this.prevProjectionDelta.x)||!Og(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ko(),this.projectionDelta=ko(),this.projectionDeltaWithTransform=ko()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ko();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),b=!y||y.members.length<=1,v=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(hk));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const T=S/1e3;Fg(d.x,i.x,T),Fg(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fk(this.relativeTarget,this.relativeTargetOrigin,f,T),g&&ZP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),rn(g,this.relativeTarget)),m&&(this.animationValues=u,zP(u,c,this.latestValues,T,v,b)),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&&(Rn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ze.update(()=>{ha.hasAnimatedSinceResize=!0,this.currentAnimation=fg(0,_g,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},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(_g),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&&jg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=$t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=$t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}rn(a,l),Ao(a,u),Us(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new XP),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&&fu("z",i,c,this.animationValues);for(let u=0;u<du.length;u++)fu(`rotate${du[u]}`,i,c,this.animationValues),fu(`skew${du[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 JP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ta(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ta(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Or(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=QP(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Ds){if(f[m]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:v}=Ds[m],g=c.transform==="none"?f[m]:y(f[m],d);if(b){const S=b.length;for(let T=0;T<S;T++)c[b[T]]=g}else v?this.options.visualElement.renderState.vars[m]=g:c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?ta(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(Ng),this.root.sharedNodes.clear()}}}function tk(e){e.updateLayout()}function nk(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"?nn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=$t(f);f.min=r[d].min,f.max=f.min+h}):jg(s,n.layoutBox,r)&&nn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=$t(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=ko();Us(a,r,n.layoutBox);const l=ko();i?Us(l,e.applyTransform(o,!0),n.measuredBox):Us(l,r,n.layoutBox);const c=!Cg(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=st();Gs(p,n.layoutBox,f.layoutBox);const m=st();Gs(m,r,h.layoutBox),Ig(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function rk(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ok(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function sk(e){e.clearSnapshot()}function Ng(e){e.clearMeasurements()}function ik(e){e.isLayoutDirty=!1}function ak(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Lg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lk(e){e.resolveTargetDelta()}function ck(e){e.calcProjection()}function uk(e){e.resetSkewAndRotation()}function dk(e){e.removeLeadSnapshot()}function Fg(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Vg(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function fk(e,t,n,r){Vg(e.x,t.x,n.x,r),Vg(e.y,t.y,n.y,r)}function hk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const pk={duration:.45,ease:[.4,0,.1,1]},$g=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rg=$g("applewebkit/")&&!$g("chrome/")?Math.round:Ht;function Bg(e){e.min=Rg(e.min),e.max=Rg(e.max)}function mk(e){Bg(e.x),Bg(e.y)}function jg(e,t,n){return e==="position"||e==="preserve-aspect"&&!bP(Ag(t),Ag(n),.2)}function gk(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const yk=Mg({attachResizeListener:(e,t)=>Hs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hu={current:void 0},Wg=Mg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hu.current){const e=new yk({});e.mount(window),e.setOptions({layoutScroll:!0}),hu.current=e}return hu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),vk={pan:{Feature:FP},drag:{Feature:LP,ProjectionNode:Wg,MeasureLayout:dg}};function Hg(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const s=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function zg(e,t){const n=Hg(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Ug(e){return!(e.pointerType==="touch"||$m())}function bk(e,t,n={}){const[r,o,s]=zg(e,n),i=a=>{if(!Ug(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Ug(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Gg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&ze.postRender(()=>s(t,zs(t)))}class wk extends rr{mount(){const{current:t}=this.node;t&&(this.unmount=bk(t,(n,r)=>(Gg(this.node,r,"Start"),o=>Gg(this.node,o,"End"))))}unmount(){}}class xk extends rr{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=js(Hs(this.node.current,"focus",()=>this.onFocus()),Hs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Yg=(e,t)=>t?e===t?!0:Yg(e,t.parentElement):!1,Tk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Sk(e){return Tk.has(e.tagName)||e.tabIndex!==-1}const qs=new WeakSet;function qg(e){return t=>{t.key==="Enter"&&e(t)}}function pu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ek=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=qg(()=>{if(qs.has(n))return;pu(n,"down");const o=qg(()=>{pu(n,"up")}),s=()=>pu(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Kg(e){return ou(e)&&!$m()}function Ck(e,t,n={}){const[r,o,s]=zg(e,n),i=a=>{const l=a.currentTarget;if(!l||!Kg(a)||qs.has(l))return;qs.add(l),da(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),da(h,"release"),!(!Kg(h)||!qs.has(l))&&(qs.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?Pk(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||Yg(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!Sk(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>Ek(c,o),o)}),s}function Pk(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function Zg(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&ze.postRender(()=>s(t,zs(t)))}class kk extends rr{mount(){const{current:t}=this.node;t&&(this.unmount=Ck(t,(n,r)=>(Zg(this.node,r,"Start"),(o,{success:s})=>Zg(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const mu=new WeakMap,gu=new WeakMap,Ik=e=>{const t=mu.get(e.target);t&&t(e)},Ak=e=>{e.forEach(Ik)};function Ok({root:e,...t}){const n=e||document;gu.has(n)||gu.set(n,{});const r=gu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Ak,{root:e,...t})),r[o]}function _k(e,t,n){const r=Ok(t);return mu.set(e,n),r.observe(e),()=>{mu.delete(e),r.unobserve(e)}}const Dk={some:0,all:1};class Mk extends rr{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:Dk[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:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return _k(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(Nk(t,n))&&this.startObserver()}unmount(){}}function Nk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Lk={inView:{Feature:Mk},tap:{Feature:kk},focus:{Feature:xk},hover:{Feature:wk}},Fk={layout:{ProjectionNode:Wg,MeasureLayout:dg}},yu={current:null},Xg={current:!1};function Vk(){if(Xg.current=!0,!!uc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yu.current=e.matches;e.addListener(t),t()}else yu.current=!1}const $k=[...mm,Dt,nr],Rk=e=>$k.find(pm(e)),Ks=new WeakMap;function Bk(e,t,n){for(const r in t){const o=t[r],s=n[r];if(vt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Zi(o.version==="12.4.7",`Attempting to mix Motion versions ${o.version} with 12.4.7 may not work as expected.`);else if(vt(s))e.addValue(r,So(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,So(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Qg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Jg{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=bn.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ze.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Ji(n),this.isVariantNode=mp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&vt(p)&&p.set(l[h],!1)}}mount(t){this.current=t,Ks.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)),Xg.current||Vk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:yu.current,process.env.NODE_ENV!=="production"&&Zi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Rn(this.notifyUpdate),Rn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Cr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ze.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in bo){const n=bo[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):st()}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<Qg.length;r++){const o=Qg[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=Bk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=So(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"&&(fm(o)||Jp(o))?o=parseFloat(o):!Rk(o)&&nr.test(n)&&(o=im(t,n)),this.setBaseTarget(t,vt(o)?o.get():o)),vt(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=Ec(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&&!vt(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 Ac),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ey extends Jg{constructor(){super(...arguments),this.KeyframeResolver=ym}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;vt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jk(e){return window.getComputedStyle(e)}class ty extends ey{constructor(){super(...arguments),this.type="html",this.renderInstance=_p}readValueFromInstance(t,n){if(Cr.has(n)){const r=jc(n);return r&&r.default||0}else{const r=jk(t),o=(gc(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return eg(t,n)}build(t,n,r){bc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Pc(t,n,r)}}class ny extends ey{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Op(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Cr.has(n)){const r=jc(n);return r&&r.default||0}return n=Dp.has(n)?n:pc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Np(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&ze.postRender(this.updateDimensions)}build(t,n,r){Tc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Mp(t,n,r,o)}mount(t){this.isSVGTag=Sc(t.tagName),super.mount(t)}}const Wk=(e,t)=>xc(e)?new ny(t):new ty(t,{allowProjection:e!==w.Fragment}),Hk=EE({...uP,...Lk,...vk,...Fk},Wk),dt=jS(Hk);function _r(e){const t=an(()=>So(e)),{isStatic:n}=w.useContext(yo);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}function ry(e,t){const n=_r(t()),r=()=>n.set(t());return r(),Yi(()=>{const o=()=>ze.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Rn(r)}}),n}const zk=e=>e&&typeof e=="object"&&e.mix,Uk=e=>zk(e)?e.mix:void 0;function Gk(...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=Om(o,s,{mixer:Uk(s[0]),...i});return t?a(r):a}function Yk(e){Fs.current=[],e();const t=ry(Fs.current,e);return Fs.current=void 0,t}function qk(e,t,n,r){if(typeof e=="function")return Yk(e);const o=typeof t=="function"?t:Gk(t,n,r);return Array.isArray(e)?oy(e,o):oy([e],([s])=>o(s))}function oy(e,t){const n=an(()=>[]);return ry(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Kk(e){return w.useEffect(()=>()=>e(),[])}function Zk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Uc(r),aa);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:wn(o)}}const Xk=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function sy(e,t){return Im(e)?e[Xk(0,e.length,t)]:e}function vu(e){return typeof e=="object"&&!Array.isArray(e)}function iy(e,t,n,r){return typeof e=="string"&&vu(t)?Hg(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Qk(e,t,n){return e*(t+1)}function ay(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function Jk(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ra(e,o),r--)}}function eI(e,t,n,r,o,s){Jk(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ke(o,s,r[i]),easing:sy(n,i)})}function tI(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function nI(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const rI="easeInOut",oI=20;function sI(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const p=e[h];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,ay(d,p.at,u,c));continue}let[m,y,b={}]=p;b.at!==void 0&&(d=ay(d,b.at,u,c));let v=0;const g=(S,T,E,C=0,I=0)=>{const A=iI(S),{delay:O=0,times:L=Dm(A),type:_="keyframes",repeat:V,repeatType:k,repeatDelay:M=0,...F}=T;let{ease:N=t.ease||"easeOut",duration:B}=T;const z=typeof O=="function"?O(C,I):O,D=A.length,j=oa(_)?_:o==null?void 0:o[_];if(D<=2&&j){let G=100;if(D===2&&cI(A)){const H=A[1]-A[0];G=Math.abs(H)}const $={...F};B!==void 0&&($.duration=ln(B));const W=Zk($,G,j);N=W.ease,B=W.duration}B??(B=s);const K=d+z;L.length===1&&L[0]===0&&(L[1]=1);const J=L.length-A.length;if(J>0&&_m(L,J),A.length===1&&A.unshift(null),V){tn(V<oI,"Repeat count too high, must be less than 20"),B=Qk(B,V);const G=[...A],$=[...L];N=Array.isArray(N)?[...N]:[N];const W=[...N];for(let H=0;H<V;H++){A.push(...G);for(let U=0;U<G.length;U++)L.push($[U]+(H+1)),N.push(U===0?"linear":sy(W,U-1))}tI(L,V)}const X=K+B;eI(E,A,N,L,K,X),v=Math.max(z+B,v),f=Math.max(X,f)};if(vt(m)){const S=ly(m,a);g(y,b,cy("default",S))}else{const S=iy(m,y,r,l),T=S.length;for(let E=0;E<T;E++){y=y,b=b;const C=S[E],I=ly(C,a);for(const A in y)g(y[A],aI(b,A),cy(A,I),E,T)}}u=d,d+=v}return a.forEach((h,p)=>{for(const m in h){const y=h[m];y.sort(nI);const b=[],v=[],g=[];for(let T=0;T<y.length;T++){const{at:E,value:C,easing:I}=y[T];b.push(C),v.push(Pr(0,f,E)),g.push(I||"easeOut")}v[0]!==0&&(v.unshift(0),b.unshift(b[0]),g.unshift(rI)),v[v.length-1]!==1&&(v.push(1),b.push(null)),i.has(p)||i.set(p,{keyframes:{},transition:{}});const S=i.get(p);S.keyframes[m]=b,S.transition[m]={...t,duration:f,ease:g,times:v,...n}}}),i}function ly(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function cy(e,t){return t[e]||(t[e]=[]),t[e]}function iI(e){return Array.isArray(e)?e:[e]}function aI(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const lI=e=>typeof e=="number",cI=e=>e.every(lI);function uI(e,t){return e in t}class dI extends Jg{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(uI(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return st()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function fI(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=hg(e)?new ny(t):new ty(t);n.mount(e),Ks.set(e,n)}function hI(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new dI(t);n.mount(e),Ks.set(e,n)}function pI(e,t){return vt(e)||typeof e=="number"||typeof e=="string"&&!vu(t)}function uy(e,t,n,r){const o=[];if(pI(e,t))o.push(fg(e,vu(t)&&t.default||t,n&&(n.default||n)));else{const s=iy(e,t,r),i=s.length;tn(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?fI:hI;Ks.has(l)||c(l);const u=Ks.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...nu(u,{...t,transition:d},{}))}}return o}function mI(e,t,n){const r=[];return sI(e,t,n,{spring:Qc}).forEach(({keyframes:s,transition:i},a)=>{r.push(...uy(a,s,i))}),r}function gI(e){return Array.isArray(e)&&e.some(Array.isArray)}function yI(e){function t(n,r,o){let s=[];gI(n)?s=mI(n,r,e):s=uy(n,r,o,e);const i=new Bp(s);return e&&e.animations.push(i),i}return t}function vI(){const e=an(()=>({current:null,animations:[]})),t=an(()=>yI(e));return Kk(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class bI{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 wI=()=>new bI;function xI(){return an(wI)}function TI(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function SI(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:TI(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=Jc(r)(l/c)*c}return t+l}}const dy=w.createContext(null);function EI(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=Ke(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?PE(e,o,o+s):e}function CI({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=an(()=>dt[t]),l=[],c=w.useRef(!1);tn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(kI)},updateOrder:(d,f,h)=>{if(c.current)return;const p=EI(l,d,f,h);l!==p&&(c.current=!0,r(p.map(PI).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(dy.Provider,{value:u,children:e})})}const fy=w.forwardRef(CI);function PI(e){return e.value}function kI(e,t){return e.layout.min-t.layout.min}function hy(e,t=0){return vt(e)?e:_r(t)}function II({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=an(()=>dt[r]),c=w.useContext(dy),u={x:hy(t.x),y:hy(t.y)},d=qk([u.x,u.y],([m,y])=>m||y?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,y)=>{const{velocity:b}=y;b[f]&&p(n,u[f].get(),b[f]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const py=w.forwardRef(II);/**
|
|
13
13
|
* @license lucide-react v0.414.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const
|
|
17
|
+
*/const AI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),my=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
18
18
|
* @license lucide-react v0.414.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/var
|
|
22
|
+
*/var OI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
23
23
|
* @license lucide-react v0.414.0 - ISC
|
|
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
|
|
27
|
+
*/const _I=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,...OI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:my("lucide",o),...a},[...i.map(([c,u])=>w.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 it=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(
|
|
32
|
+
*/const it=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(_I,{ref:s,iconNode:t,className:my(`lucide-${AI(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.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const DI=it("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
38
38
|
* @license lucide-react v0.414.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const MI=it("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
43
43
|
* @license lucide-react v0.414.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const gy=it("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
48
48
|
* @license lucide-react v0.414.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const NI=it("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
53
53
|
* @license lucide-react v0.414.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const LI=it("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
58
58
|
* @license lucide-react v0.414.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const bu=it("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
63
63
|
* @license lucide-react v0.414.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const FI=it("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
68
68
|
* @license lucide-react v0.414.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
72
|
+
*/const wu=it("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
73
73
|
* @license lucide-react v0.414.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const yy=it("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
78
78
|
* @license lucide-react v0.414.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
82
|
+
*/const VI=it("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
83
83
|
* @license lucide-react v0.414.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
87
|
+
*/const vy=it("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
88
88
|
* @license lucide-react v0.414.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const $I=it("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
93
93
|
* @license lucide-react v0.414.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const by=it("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
98
98
|
* @license lucide-react v0.414.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const RI=it("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
103
103
|
* @license lucide-react v0.414.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const xu=it("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
108
108
|
* @license lucide-react v0.414.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const BI=it("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
113
113
|
* @license lucide-react v0.414.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
117
|
+
*/const jI=it("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
118
118
|
* @license lucide-react v0.414.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const Oo=it("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
123
123
|
* @license lucide-react v0.414.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const WI=it("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
128
128
|
* @license lucide-react v0.414.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const HI=it("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
|
|
133
133
|
* @license lucide-react v0.414.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const zI=it("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
138
138
|
* @license lucide-react v0.414.0 - ISC
|
|
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 hu=it("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},bI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},iy=e=>x.jsx(dt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:sy,exit:sy.false,transition:bI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:$e("aria-hidden:pointer-events-none",e.className),children:e.children}),wI=ho("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"}}),xI=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:$e("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(iy,{"data-open":!!s,open:!!s,children:x.jsxs(po,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:$e(wI({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(ny,{size:20}):null,!r&&n==="info"?x.jsx(oy,{size:20}):null,!r&&n==="danger"?x.jsx(gI,{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(hu,{size:20})}):null]})})})});function Fe(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 Ze(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Oo(e,t){const n=Fe(e);return isNaN(t)?Ze(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ua(e,t){const n=Fe(e);if(isNaN(t))return Ze(e,NaN);if(!t)return n;const r=n.getDate(),o=Ze(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 ay=6048e5,TI=864e5,SI=6e4,EI=36e5,CI=1e3;let PI={};function _r(){return PI}function xn(e,t){var a,l,c,u;const n=_r(),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=Fe(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 _o(e){return xn(e,{weekStartsOn:1})}function ly(e){const t=Fe(e),n=t.getFullYear(),r=Ze(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=_o(r),s=Ze(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=_o(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Do(e){const t=Fe(e);return t.setHours(0,0,0,0),t}function da(e){const t=Fe(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 kI(e,t){const n=Do(e),r=Do(t),o=+n-da(n),s=+r-da(r);return Math.round((o-s)/TI)}function II(e){const t=ly(e),n=Ze(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),_o(n)}function cy(e,t){const n=t*7;return Oo(e,n)}function uy(e,t){return ua(e,t*12)}function AI(e){return Ze(e,Date.now())}function OI(e,t){const n=Do(e),r=Do(t);return+n==+r}function _I(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dy(e){if(!_I(e)&&typeof e!="number")return!1;const t=Fe(e);return!isNaN(Number(t))}function fy(e,t){const n=Fe(e.start),r=Fe(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(Fe(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function hy(e){const t=Fe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function DI(e){const t=Fe(e),n=Ze(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function MI(e,t){var a,l;const n=_r(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Fe(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 NI={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"}},FI=(e,t,n)=>{let r;const o=NI[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 pu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const LI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$I={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},RI={date:pu({formats:LI,defaultWidth:"full"}),time:pu({formats:VI,defaultWidth:"full"}),dateTime:pu({formats:$I,defaultWidth:"full"})},BI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jI=(e,t,n,r)=>BI[e];function Gs(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 zI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WI={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"]},UI={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"]},GI={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"}},YI={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"}},qI={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Gs({values:zI,defaultWidth:"wide"}),quarter:Gs({values:HI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gs({values:WI,defaultWidth:"wide"}),day:Gs({values:UI,defaultWidth:"wide"}),dayPeriod:Gs({values:GI,defaultWidth:"wide",formattingValues:YI,defaultFormattingWidth:"wide"})};function Ys(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)?ZI(a,d=>d.test(i)):KI(a,d=>d.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 KI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ZI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function XI(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 QI=/^(\d+)(th|st|nd|rd)?/i,JI=/\d+/i,eA={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},tA={any:[/^b/i,/^(a|c)/i]},nA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rA={any:[/1/i,/2/i,/3/i,/4/i]},oA={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},sA={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]},iA={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},aA={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]},lA={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},cA={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}},uA={ordinalNumber:XI({matchPattern:QI,parsePattern:JI,valueCallback:e=>parseInt(e,10)}),era:Ys({matchPatterns:eA,defaultMatchWidth:"wide",parsePatterns:tA,defaultParseWidth:"any"}),quarter:Ys({matchPatterns:nA,defaultMatchWidth:"wide",parsePatterns:rA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ys({matchPatterns:oA,defaultMatchWidth:"wide",parsePatterns:sA,defaultParseWidth:"any"}),day:Ys({matchPatterns:iA,defaultMatchWidth:"wide",parsePatterns:aA,defaultParseWidth:"any"}),dayPeriod:Ys({matchPatterns:lA,defaultMatchWidth:"any",parsePatterns:cA,defaultParseWidth:"any"})},py={code:"en-US",formatDistance:FI,formatLong:RI,formatRelative:jI,localize:qI,match:uA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dA(e){const t=Fe(e);return kI(t,DI(t))+1}function my(e){const t=Fe(e),n=+_o(t)-+II(t);return Math.round(n/ay)+1}function mu(e,t){var u,d,f,h;const n=Fe(e),r=n.getFullYear(),o=_r(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ze(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=xn(i,t),l=Ze(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=xn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function fA(e,t){var a,l,c,u;const n=_r(),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=mu(e,t),s=Ze(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),xn(s,t)}function gy(e,t){const n=Fe(e),r=+xn(n,t)-+fA(n,t);return Math.round(r/ay)+1}function je(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return je(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):je(n+1,2)},d(e,t){return je(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 je(e.getHours()%12||12,t.length)},H(e,t){return je(e.getHours(),t.length)},m(e,t){return je(e.getMinutes(),t.length)},s(e,t){return je(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return je(o,t.length)}},Mo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yy={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 rr.y(e,t)},Y:function(e,t,n,r){const o=mu(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return je(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):je(s,t.length)},R:function(e,t){const n=ly(e);return je(n,t.length)},u:function(e,t){const n=e.getFullYear();return je(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 je(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 je(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 rr.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 je(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=gy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):je(o,t.length)},I:function(e,t,n){const r=my(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):je(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=dA(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):je(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 je(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 je(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 je(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Mo.noon:r===0?o=Mo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Mo.evening:r>=12?o=Mo.afternoon:r>=4?o=Mo.morning:o=Mo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):je(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):je(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return by(r);case"XXXX":case"XX":return Dr(r);case"XXXXX":case"XXX":default:return Dr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return by(r);case"xxxx":case"xx":return Dr(r);case"xxxxx":case"xxx":default:return Dr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+vy(r,":");case"OOOO":default:return"GMT"+Dr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+vy(r,":");case"zzzz":default:return"GMT"+Dr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return je(r,t.length)},T:function(e,t,n){const r=e.getTime();return je(r,t.length)}};function vy(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+je(s,2)}function by(e,t){return e%60===0?(e>0?"-":"+")+je(Math.abs(e)/60,2):Dr(e,t)}function Dr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=je(Math.trunc(r/60),2),s=je(r%60,2);return n+o+t+s}const wy=(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"})}},xy=(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"})}},gu={p:xy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return wy(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}}",wy(r,t)).replace("{{time}}",xy(o,t))}},hA=/^D+$/,pA=/^Y+$/,mA=["D","DD","YY","YYYY"];function Ty(e){return hA.test(e)}function Sy(e){return pA.test(e)}function yu(e,t,n){const r=gA(e,t,n);if(console.warn(r),mA.includes(e))throw new RangeError(r)}function gA(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 yA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bA=/^'([^]*?)'?$/,wA=/''/g,xA=/[a-zA-Z]/;function TA(e,t,n){var u,d,f,h;const r=_r(),o=r.locale??py,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Fe(e);if(!dy(a))throw new RangeError("Invalid time value");let l=t.match(vA).map(p=>{const m=p[0];if(m==="p"||m==="P"){const b=gu[m];return b(p,o.formatLong)}return p}).join("").match(yA).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:SA(p)};if(yy[m])return{isToken:!0,value:p};if(m.match(xA))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;(Sy(m)||Ty(m))&&yu(m,t,String(e));const b=yy[m[0]];return b(a,m,o.localize,c)}).join("")}function SA(e){const t=e.match(bA);return t?t[1].replace(wA,"'"):e}function EA(){return Object.assign({},_r())}function CA(e){let n=Fe(e).getDay();return n===0&&(n=7),n}function PA(e,t){const n=Fe(e),r=Fe(t);return n.getTime()>r.getTime()}function kA(e,t){const n=Fe(e),r=Fe(t);return+n<+r}function IA(e,t){const n=t instanceof Date?Ze(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 AA=10;class Ey{constructor(){ie(this,"subPriority",0)}validate(t,n){return!0}}class OA extends Ey{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 _A extends Ey{constructor(){super(...arguments);ie(this,"priority",AA);ie(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ze(n,IA(n,Date))}}class Le{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new OA(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class DA extends Le{constructor(){super(...arguments);ie(this,"priority",140);ie(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 ft={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}/},Tn={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 ht(e,t){return e&&{value:t(e.value),rest:e.rest}}function tt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Sn(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*EI+s*SI+i*CI),rest:t.slice(n[0].length)}}function Cy(e){return tt(ft.anyDigitsSigned,e)}function at(e,t){switch(e){case 1:return tt(ft.singleDigit,t);case 2:return tt(ft.twoDigits,t);case 3:return tt(ft.threeDigits,t);case 4:return tt(ft.fourDigits,t);default:return tt(new RegExp("^\\d{1,"+e+"}"),t)}}function fa(e,t){switch(e){case 1:return tt(ft.singleDigitSigned,t);case 2:return tt(ft.twoDigitsSigned,t);case 3:return tt(ft.threeDigitsSigned,t);case 4:return tt(ft.fourDigitsSigned,t);default:return tt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function vu(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 Py(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 ky(e){return e%400===0||e%4===0&&e%100!==0}class MA extends Le{constructor(){super(...arguments);ie(this,"priority",130);ie(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 ht(at(4,n),s);case"yo":return ht(o.ordinalNumber(n,{unit:"year"}),s);default:return ht(at(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=Py(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 NA extends Le{constructor(){super(...arguments);ie(this,"priority",130);ie(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 ht(at(4,n),s);case"Yo":return ht(o.ordinalNumber(n,{unit:"year"}),s);default:return ht(at(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=mu(n,s);if(o.isTwoDigitYear){const l=Py(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),xn(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),xn(n,s)}}class FA extends Le{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return fa(r==="R"?4:r.length,n)}set(n,r,o){const s=Ze(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),_o(s)}}class LA extends Le{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return fa(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class VA extends Le{constructor(){super(...arguments);ie(this,"priority",120);ie(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 at(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 $A extends Le{constructor(){super(...arguments);ie(this,"priority",120);ie(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 at(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 RA extends Le{constructor(){super(...arguments);ie(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ie(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return ht(tt(ft.month,n),s);case"MM":return ht(at(2,n),s);case"Mo":return ht(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 BA extends Le{constructor(){super(...arguments);ie(this,"priority",110);ie(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 ht(tt(ft.month,n),s);case"LL":return ht(at(2,n),s);case"Lo":return ht(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 jA(e,t,n){const r=Fe(e),o=gy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class zA extends Le{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return tt(ft.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return at(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return xn(jA(n,o,s),s)}}function HA(e,t){const n=Fe(e),r=my(n)-t;return n.setDate(n.getDate()-r*7),n}class WA extends Le{constructor(){super(...arguments);ie(this,"priority",100);ie(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 tt(ft.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return at(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return _o(HA(n,o))}}const UA=[31,28,31,30,31,30,31,31,30,31,30,31],GA=[31,29,31,30,31,30,31,31,30,31,30,31];class YA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subPriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return tt(ft.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return at(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=ky(o),i=n.getMonth();return s?r>=1&&r<=GA[i]:r>=1&&r<=UA[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class qA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subpriority",1);ie(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 tt(ft.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return at(r.length,n)}}validate(n,r){const o=n.getFullYear();return ky(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 bu(e,t,n){var d,f,h,p;const r=_r(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=Fe(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 Oo(s,u)}class KA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(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=bu(n,o,s),n.setHours(0,0,0,0),n}}class ZA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(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 ht(at(r.length,n),i);case"eo":return ht(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=bu(n,o,s),n.setHours(0,0,0,0),n}}class XA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(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 ht(at(r.length,n),i);case"co":return ht(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=bu(n,o,s),n.setHours(0,0,0,0),n}}function QA(e,t){const n=Fe(e),r=CA(n),o=t-r;return Oo(n,o)}class JA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(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 at(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ht(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 ht(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ht(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ht(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=QA(n,o),n.setHours(0,0,0,0),n}}class eO extends Le{constructor(){super(...arguments);ie(this,"priority",80);ie(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(vu(o),0,0,0),n}}class tO extends Le{constructor(){super(...arguments);ie(this,"priority",80);ie(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(vu(o),0,0,0),n}}class nO extends Le{constructor(){super(...arguments);ie(this,"priority",80);ie(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(vu(o),0,0,0),n}}class rO extends Le{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return tt(ft.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return at(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 oO extends Le{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return tt(ft.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class sO extends Le{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return tt(ft.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return at(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 iO extends Le{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return tt(ft.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return at(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 aO extends Le{constructor(){super(...arguments);ie(this,"priority",60);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return tt(ft.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class lO extends Le{constructor(){super(...arguments);ie(this,"priority",50);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return tt(ft.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class cO extends Le{constructor(){super(...arguments);ie(this,"priority",30);ie(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return ht(at(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class uO extends Le{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Sn(Tn.basicOptionalMinutes,n);case"XX":return Sn(Tn.basic,n);case"XXXX":return Sn(Tn.basicOptionalSeconds,n);case"XXXXX":return Sn(Tn.extendedOptionalSeconds,n);case"XXX":default:return Sn(Tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ze(n,n.getTime()-da(n)-o)}}class dO extends Le{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Sn(Tn.basicOptionalMinutes,n);case"xx":return Sn(Tn.basic,n);case"xxxx":return Sn(Tn.basicOptionalSeconds,n);case"xxxxx":return Sn(Tn.extendedOptionalSeconds,n);case"xxx":default:return Sn(Tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ze(n,n.getTime()-da(n)-o)}}class fO extends Le{constructor(){super(...arguments);ie(this,"priority",40);ie(this,"incompatibleTokens","*")}parse(n){return Cy(n)}set(n,r,o){return[Ze(n,o*1e3),{timestampIsSet:!0}]}}class hO extends Le{constructor(){super(...arguments);ie(this,"priority",20);ie(this,"incompatibleTokens","*")}parse(n){return Cy(n)}set(n,r,o){return[Ze(n,o),{timestampIsSet:!0}]}}const pO={G:new DA,y:new MA,Y:new NA,R:new FA,u:new LA,Q:new VA,q:new $A,M:new RA,L:new BA,w:new zA,I:new WA,d:new YA,D:new qA,E:new KA,e:new ZA,c:new XA,i:new JA,a:new eO,b:new tO,B:new nO,h:new rO,H:new oO,K:new sO,k:new iO,m:new aO,s:new lO,S:new cO,X:new uO,x:new dO,t:new fO,T:new hO},mO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yO=/^'([^]*?)'?$/,vO=/''/g,bO=/\S/,wO=/[a-zA-Z]/;function xO(e,t,n,r){var m,b,v,y;const o=EA(),s=o.locale??py,i=o.firstWeekContainsDate??((b=(m=o.locale)==null?void 0:m.options)==null?void 0:b.firstWeekContainsDate)??1,a=o.weekStartsOn??((y=(v=o.locale)==null?void 0:v.options)==null?void 0:y.weekStartsOn)??0;if(t==="")return e===""?Fe(n):Ze(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new _A],u=t.match(gO).map(g=>{const S=g[0];if(S in gu){const T=gu[S];return T(g,s.formatLong)}return g}).join("").match(mO),d=[];for(let g of u){Sy(g)&&yu(g,t,e),Ty(g)&&yu(g,t,e);const S=g[0],T=pO[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const I=d.find(A=>E.includes(A.token)||A.token===S);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${g}\` at the same time`)}else if(T.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);d.push({token:S,fullToken:g});const C=T.run(e,g,s.match,l);if(!C)return Ze(n,NaN);c.push(C.setter),e=C.rest}else{if(S.match(wO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(g==="''"?g="'":S==="'"&&(g=TO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Ze(n,NaN)}}if(e.length>0&&bO.test(e))return Ze(n,NaN);const f=c.map(g=>g.priority).sort((g,S)=>S-g).filter((g,S,T)=>T.indexOf(g)===S).map(g=>c.filter(S=>S.priority===g).sort((S,T)=>T.subPriority-S.subPriority)).map(g=>g[0]);let h=Fe(n);if(isNaN(h.getTime()))return Ze(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Ze(n,NaN);const S=g.set(h,p,l);Array.isArray(S)?(h=S[0],Object.assign(p,S[1])):h=S}return Ze(n,h)}function TO(e){return e.match(yO)[1].replace(vO,"'")}function SO(e,t){const n=Fe(e),r=Fe(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function EO(e){return OI(e,AI(e))}function CO(e,t){return Oo(e,-t)}function Iy(e,t){return ua(e,-t)}function PO(e,t){return cy(e,-t)}function kO(e,t){return uy(e,-t)}var pt=function(){return pt=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},pt.apply(this,arguments)};function wu(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 xu(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}typeof SuppressedError=="function"&&SuppressedError;var qs=function(e){return e.replace(new RegExp(" ","g")," ")},Ay=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)},IO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Oy=function(e,t,n){var r=e.length-2,o=IO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},_y=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ha=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},AO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Tu=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},OO=function(e){return e==="money"||e==="currency"},_O=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return pt(pt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},pa=function(e,t){var n=Ay(_y(e),t.fraction.length),r="".concat(t.currency).concat(Oy(n,t.group,t.decimal));return qs(r)},DO=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=wu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var d=w.useMemo(function(){var p=_O(r,s,a);return p.currency=qs("".concat(p.currency.trim()," ")),p.literal=qs(p.literal.trim()),p},[r,s]),f=function(p){var m=pa(p.target.value,d),b=ha(m);p.target.value=m,p.target.setAttribute("data-number",b.toString()),l==null||l(p),b!==0&&(u.current.selectionEnd=m.length)};w.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=pa(p,d),b=ha(m);u.current.value=m,u.current.setAttribute("data-number",b.toString());var v=new InputEvent("change",{});l==null||l(pt(pt({},v),{target:u.current,currentTarget:u.current})),b!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?pa(c.defaultValue,d):void 0;return w.createElement("input",pt({},c,{value:typeof c.value=="string"?pa(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),MO=1,NO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},FO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return pt(pt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},ma=function(e,t){var n=Ay(_y(e),t.fraction.length),r="".concat(Oy(n,t.group,t.decimal)," ").concat(t.percentSign);return qs(r)},LO=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=wu(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=xu(w.useState(function(){var v,y;return(y=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var v,y=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(ma(y,d))},[i.value]);var d=w.useMemo(function(){var v=FO(r);return v.percentSign=qs("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-MO,h=function(v){var y,g=a.current;g&&(g.setSelectionRange(f,f),v&&((y=i.onFocus)===null||y===void 0||y.call(i,v)))},p=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var g=y.selectionStart,S=y.selectionEnd,T=g!==S,E=f<g;!T&&E&&h()}s==null||s(v)},m=function(v){var y=ma(v.target.value,d),g=ha(y);u(y),v.target.value=y,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};w.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var y=ma(v,d),g=ha(y);u(y),a.current.value=y,a.current.setAttribute("data-number",g.toString());var S=new InputEvent("change",{});o==null||o(pt(pt({},S),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return h()},[c]);var b=i.defaultValue?ma(i.defaultValue,d):void 0;return w.createElement("input",pt({},i,{defaultValue:b,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Ks={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},VO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=ga[s];i===void 0?r.push(s.replace(Ks.dots,"\\.").replace(Ks.openParenthesis,"\\(").replace(Ks.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ks.leadingBars,"\\")},Zs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Su(o,n);var s=VO(o);return n?"^".concat(s,"$"):s},$O=function(e){return e.replace(Ks.escape,"\\$&")},Su=function(e,t){var n=e.map(function(r){return typeof r=="string"?$O(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ga={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]/}},RO=/\d/,Dy="(dd) 9dddd-dddd",My="(dd) dddd-dddd",Ny="ddd.ddd.ddd-dd",Fy="dd.ddd.ddd/dddd-dd",ya=function(e){return e.replace(/\D/g,"")},BO=["2",/[0-3]/,":",/[0-5]/,/\d/],jO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Wt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ny,isoDate:"dddd-dd-dd",cnpj:Fy,telephone:My,cellphone:Dy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ya(e).length<=11?Ny:Fy},int:function(e){return e===void 0&&(e=""),RO.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=ya(e);return t.length<11?My:Dy},time:function(e){var t=ya(e),n=t[0];return n==="2"?BO:jO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),pt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Zs(e,"",!0),infinity:n.infinity},n)},Mt={cellTelephone:Ut(Wt.cellTelephone,"tel"),cellphone:Ut(Wt.cellphone,"tel"),cep:Ut(Wt.cep,"decimal"),cnpj:Ut(Wt.cnpj,"decimal"),color:Ut(Wt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(Wt.cpf,"decimal"),cpfCnpj:Ut(Wt.cpfCnpj,"decimal",{transform:ya}),creditCard:Ut(Wt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(Wt.date,"decimal"),int:Ut(Wt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(Wt.isoDate,"decimal"),telephone:Ut(Wt.telephone,"tel"),time:Ut(Wt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(Wt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Ly(e,t,n,r){var o,s;r===void 0&&(r=ga);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var Vy=function(e){return e},zO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Zs(e,n,t));return r.test(n)};function HO(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var WO=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,d=e.onChangeText,f=e.as,h=wu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=Tu(a),b=Tu(d),v=Tu(u),y=w.useRef(zO(u,s,h.value||h.defaultValue)),g=f??"input",S=xu(w.useState(""),2),T=S[0],E=S[1],C=HO(T),I=w.useCallback(function(N,L){var V,B,W=(V=N??L)!==null&&V!==void 0?V:"";if(u===void 0)return W;var D=(B=W==null?void 0:W.toString())!==null&&B!==void 0?B:"";return Ly(D,typeof u=="function"?u(D):u,i??Vy,c??ga)},[i,u,c]),A=xu(w.useState(function(){return I(h.value,h.defaultValue)}),2),O=A[0],M=A[1],_=I(h.defaultValue,h.defaultValue),F=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(O);return Array.isArray(N)?Su(N,s):Zs(u,O,s)}return typeof u=="string"?Zs(u,O,s):Su(u,s)},[l,O,s,u]);w.useEffect(function(){if(h.value!==void 0){var N=I(h.value,h.defaultValue);M(N),p.current!==null&&(p.current.value=N)}},[h.value,u,i,h.defaultValue]);var P=function(N){var L,V,B,W,D,j=N.currentTarget,K=N.target.value;if(v.current===void 0)return M(K),(L=b.current)===null||L===void 0||L.call(b,K),(V=m.current)===null||V===void 0||V.call(m,N),d==null?void 0:d(K);var J=new RegExp(Zs(v.current,K,s)),X=(B=j.selectionEnd)!==null&&B!==void 0?B:0,G=function(Y,ce,R){if(Y.type!=="number")return Y.setSelectionRange(ce,R)};if(r&&y.current&&K.length>=O.length)return j.value=O,G(j,X-1,X-1);var $=!1;K.length<C.length&&(y.current=!1,$=!0),J.test(K)&&(y.current=!0);var z=X,H=K[z-1],U=Ly(K,typeof v.current=="function"?v.current(K):v.current,i??Vy,c??ga);for(j.value=U,M(U);z<U.length&&U.charAt(z-1)!==H;)z+=1;$?G(j,X,X):G(j,z,z),N.target.value=U,E(U),(W=b.current)===null||W===void 0||W.call(b,U),(D=m.current)===null||D===void 0||D.call(m,N)};return w.createElement(g,pt({},h,{ref:p,pattern:F,onChange:P,defaultValue:$y(h.defaultValue)?_:void 0,value:$y(h.value)?I(h.value,h.value):h.value}))}),$y=function(e){return typeof e=="string"},Ry=w.forwardRef(function(e,t){return OO(e.mask)?w.createElement(DO,pt({},e,{mask:void 0,ref:t})):NO(e.mask)?w.createElement(LO,pt({},e,{mask:void 0,ref:t})):w.createElement(WO,pt({},e,{ref:t}))}),Gt=function(e){return function(t){return w.createElement(Ry,pt({},e,t))}};Gt(Mt.cellTelephone),Gt(Mt.cellphone),Gt(Mt.cep),Gt(Mt.cnpj),Gt(Mt.color),Gt(Mt.cpf),Gt(Mt.cpfCnpj),Gt(Mt.creditCard),Gt(Mt.date),Gt(Mt.int),Gt(Mt.isoDate),Gt(Mt.telephone),Gt(Mt.time),Gt(Mt.uuid);var By=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&AO(Mt,t.mask)?Mt[t.mask]:{mask:t.mask}},[t.mask]),o=pt(pt({},t),r);return w.createElement(Ry,pt({},o,{ref:n}))}),Eu={},Cu={exports:{}},Pu={};/**
|
|
142
|
+
*/const Tu=it("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},UI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},xy=e=>x.jsx(dt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:wy,exit:wy.false,transition:UI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:$e("aria-hidden:pointer-events-none",e.className),children:e.children}),GI=po("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"}}),YI=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:$e("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(xy,{"data-open":!!s,open:!!s,children:x.jsxs(mo,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:$e(GI({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(yy,{size:20}):null,!r&&n==="info"?x.jsx(by,{size:20}):null,!r&&n==="danger"?x.jsx(WI,{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(Tu,{size:20})}):null]})})})});function Le(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 Ze(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function _o(e,t){const n=Le(e);return isNaN(t)?Ze(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function pa(e,t){const n=Le(e);if(isNaN(t))return Ze(e,NaN);if(!t)return n;const r=n.getDate(),o=Ze(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 Ty=6048e5,qI=864e5,KI=6e4,ZI=36e5,XI=1e3;let QI={};function Dr(){return QI}function xn(e,t){var a,l,c,u;const n=Dr(),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=Le(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 Do(e){return xn(e,{weekStartsOn:1})}function Sy(e){const t=Le(e),n=t.getFullYear(),r=Ze(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Do(r),s=Ze(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Do(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Mo(e){const t=Le(e);return t.setHours(0,0,0,0),t}function ma(e){const t=Le(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 JI(e,t){const n=Mo(e),r=Mo(t),o=+n-ma(n),s=+r-ma(r);return Math.round((o-s)/qI)}function eA(e){const t=Sy(e),n=Ze(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Do(n)}function Ey(e,t){const n=t*7;return _o(e,n)}function Cy(e,t){return pa(e,t*12)}function tA(e){return Ze(e,Date.now())}function nA(e,t){const n=Mo(e),r=Mo(t);return+n==+r}function rA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Py(e){if(!rA(e)&&typeof e!="number")return!1;const t=Le(e);return!isNaN(Number(t))}function ky(e,t){const n=Le(e.start),r=Le(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(Le(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Iy(e){const t=Le(e);return t.setDate(1),t.setHours(0,0,0,0),t}function oA(e){const t=Le(e),n=Ze(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function sA(e,t){var a,l;const n=Dr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Le(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 iA={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"}},aA=(e,t,n)=>{let r;const o=iA[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 Su(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dA={date:Su({formats:lA,defaultWidth:"full"}),time:Su({formats:cA,defaultWidth:"full"}),dateTime:Su({formats:uA,defaultWidth:"full"})},fA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hA=(e,t,n,r)=>fA[e];function Zs(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 pA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gA={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"]},yA={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"]},vA={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"}},bA={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"}},wA={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Zs({values:pA,defaultWidth:"wide"}),quarter:Zs({values:mA,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Zs({values:gA,defaultWidth:"wide"}),day:Zs({values:yA,defaultWidth:"wide"}),dayPeriod:Zs({values:vA,defaultWidth:"wide",formattingValues:bA,defaultFormattingWidth:"wide"})};function Xs(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)?TA(a,d=>d.test(i)):xA(a,d=>d.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 xA(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function TA(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function SA(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 EA=/^(\d+)(th|st|nd|rd)?/i,CA=/\d+/i,PA={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},kA={any:[/^b/i,/^(a|c)/i]},IA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},AA={any:[/1/i,/2/i,/3/i,/4/i]},OA={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},_A={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]},DA={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},MA={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]},NA={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},LA={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}},FA={ordinalNumber:SA({matchPattern:EA,parsePattern:CA,valueCallback:e=>parseInt(e,10)}),era:Xs({matchPatterns:PA,defaultMatchWidth:"wide",parsePatterns:kA,defaultParseWidth:"any"}),quarter:Xs({matchPatterns:IA,defaultMatchWidth:"wide",parsePatterns:AA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xs({matchPatterns:OA,defaultMatchWidth:"wide",parsePatterns:_A,defaultParseWidth:"any"}),day:Xs({matchPatterns:DA,defaultMatchWidth:"wide",parsePatterns:MA,defaultParseWidth:"any"}),dayPeriod:Xs({matchPatterns:NA,defaultMatchWidth:"any",parsePatterns:LA,defaultParseWidth:"any"})},Ay={code:"en-US",formatDistance:aA,formatLong:dA,formatRelative:hA,localize:wA,match:FA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function VA(e){const t=Le(e);return JI(t,oA(t))+1}function Oy(e){const t=Le(e),n=+Do(t)-+eA(t);return Math.round(n/Ty)+1}function Eu(e,t){var u,d,f,h;const n=Le(e),r=n.getFullYear(),o=Dr(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ze(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=xn(i,t),l=Ze(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=xn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function $A(e,t){var a,l,c,u;const n=Dr(),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=Eu(e,t),s=Ze(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),xn(s,t)}function _y(e,t){const n=Le(e),r=+xn(n,t)-+$A(n,t);return Math.round(r/Ty)+1}function je(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const or={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return je(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):je(n+1,2)},d(e,t){return je(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 je(e.getHours()%12||12,t.length)},H(e,t){return je(e.getHours(),t.length)},m(e,t){return je(e.getMinutes(),t.length)},s(e,t){return je(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return je(o,t.length)}},No={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dy={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 or.y(e,t)},Y:function(e,t,n,r){const o=Eu(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return je(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):je(s,t.length)},R:function(e,t){const n=Sy(e);return je(n,t.length)},u:function(e,t){const n=e.getFullYear();return je(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 je(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 je(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 or.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 je(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=_y(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):je(o,t.length)},I:function(e,t,n){const r=Oy(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):je(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):or.d(e,t)},D:function(e,t,n){const r=VA(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):je(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 je(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 je(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 je(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=No.noon:r===0?o=No.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=No.evening:r>=12?o=No.afternoon:r>=4?o=No.morning:o=No.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 or.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):or.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):je(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):je(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):or.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):or.s(e,t)},S:function(e,t){return or.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ny(r);case"XXXX":case"XX":return Mr(r);case"XXXXX":case"XXX":default:return Mr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ny(r);case"xxxx":case"xx":return Mr(r);case"xxxxx":case"xxx":default:return Mr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+My(r,":");case"OOOO":default:return"GMT"+Mr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+My(r,":");case"zzzz":default:return"GMT"+Mr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return je(r,t.length)},T:function(e,t,n){const r=e.getTime();return je(r,t.length)}};function My(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+je(s,2)}function Ny(e,t){return e%60===0?(e>0?"-":"+")+je(Math.abs(e)/60,2):Mr(e,t)}function Mr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=je(Math.trunc(r/60),2),s=je(r%60,2);return n+o+t+s}const Ly=(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"})}},Fy=(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"})}},Cu={p:Fy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ly(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}}",Ly(r,t)).replace("{{time}}",Fy(o,t))}},RA=/^D+$/,BA=/^Y+$/,jA=["D","DD","YY","YYYY"];function Vy(e){return RA.test(e)}function $y(e){return BA.test(e)}function Pu(e,t,n){const r=WA(e,t,n);if(console.warn(r),jA.includes(e))throw new RangeError(r)}function WA(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 HA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,UA=/^'([^]*?)'?$/,GA=/''/g,YA=/[a-zA-Z]/;function qA(e,t,n){var u,d,f,h;const r=Dr(),o=r.locale??Ay,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Le(e);if(!Py(a))throw new RangeError("Invalid time value");let l=t.match(zA).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=Cu[m];return y(p,o.formatLong)}return p}).join("").match(HA).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:KA(p)};if(Dy[m])return{isToken:!0,value:p};if(m.match(YA))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;($y(m)||Vy(m))&&Pu(m,t,String(e));const y=Dy[m[0]];return y(a,m,o.localize,c)}).join("")}function KA(e){const t=e.match(UA);return t?t[1].replace(GA,"'"):e}function ZA(){return Object.assign({},Dr())}function XA(e){let n=Le(e).getDay();return n===0&&(n=7),n}function QA(e,t){const n=Le(e),r=Le(t);return n.getTime()>r.getTime()}function JA(e,t){const n=Le(e),r=Le(t);return+n<+r}function eO(e,t){const n=t instanceof Date?Ze(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 tO=10;class Ry{constructor(){ie(this,"subPriority",0)}validate(t,n){return!0}}class nO extends Ry{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 rO extends Ry{constructor(){super(...arguments);ie(this,"priority",tO);ie(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ze(n,eO(n,Date))}}class Fe{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new nO(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class oO extends Fe{constructor(){super(...arguments);ie(this,"priority",140);ie(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 ft={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}/},Tn={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 ht(e,t){return e&&{value:t(e.value),rest:e.rest}}function tt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Sn(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*ZI+s*KI+i*XI),rest:t.slice(n[0].length)}}function By(e){return tt(ft.anyDigitsSigned,e)}function at(e,t){switch(e){case 1:return tt(ft.singleDigit,t);case 2:return tt(ft.twoDigits,t);case 3:return tt(ft.threeDigits,t);case 4:return tt(ft.fourDigits,t);default:return tt(new RegExp("^\\d{1,"+e+"}"),t)}}function ga(e,t){switch(e){case 1:return tt(ft.singleDigitSigned,t);case 2:return tt(ft.twoDigitsSigned,t);case 3:return tt(ft.threeDigitsSigned,t);case 4:return tt(ft.fourDigitsSigned,t);default:return tt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ku(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 jy(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 Wy(e){return e%400===0||e%4===0&&e%100!==0}class sO extends Fe{constructor(){super(...arguments);ie(this,"priority",130);ie(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 ht(at(4,n),s);case"yo":return ht(o.ordinalNumber(n,{unit:"year"}),s);default:return ht(at(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=jy(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 iO extends Fe{constructor(){super(...arguments);ie(this,"priority",130);ie(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 ht(at(4,n),s);case"Yo":return ht(o.ordinalNumber(n,{unit:"year"}),s);default:return ht(at(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Eu(n,s);if(o.isTwoDigitYear){const l=jy(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),xn(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),xn(n,s)}}class aO extends Fe{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ga(r==="R"?4:r.length,n)}set(n,r,o){const s=Ze(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Do(s)}}class lO extends Fe{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ga(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class cO extends Fe{constructor(){super(...arguments);ie(this,"priority",120);ie(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 at(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 uO extends Fe{constructor(){super(...arguments);ie(this,"priority",120);ie(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 at(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 dO extends Fe{constructor(){super(...arguments);ie(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ie(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return ht(tt(ft.month,n),s);case"MM":return ht(at(2,n),s);case"Mo":return ht(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 fO extends Fe{constructor(){super(...arguments);ie(this,"priority",110);ie(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 ht(tt(ft.month,n),s);case"LL":return ht(at(2,n),s);case"Lo":return ht(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 hO(e,t,n){const r=Le(e),o=_y(r,n)-t;return r.setDate(r.getDate()-o*7),r}class pO extends Fe{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return tt(ft.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return at(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return xn(hO(n,o,s),s)}}function mO(e,t){const n=Le(e),r=Oy(n)-t;return n.setDate(n.getDate()-r*7),n}class gO extends Fe{constructor(){super(...arguments);ie(this,"priority",100);ie(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 tt(ft.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return at(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Do(mO(n,o))}}const yO=[31,28,31,30,31,30,31,31,30,31,30,31],vO=[31,29,31,30,31,30,31,31,30,31,30,31];class bO extends Fe{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subPriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return tt(ft.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return at(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=Wy(o),i=n.getMonth();return s?r>=1&&r<=vO[i]:r>=1&&r<=yO[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class wO extends Fe{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subpriority",1);ie(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 tt(ft.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return at(r.length,n)}}validate(n,r){const o=n.getFullYear();return Wy(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 Iu(e,t,n){var d,f,h,p;const r=Dr(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=Le(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 _o(s,u)}class xO extends Fe{constructor(){super(...arguments);ie(this,"priority",90);ie(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=Iu(n,o,s),n.setHours(0,0,0,0),n}}class TO extends Fe{constructor(){super(...arguments);ie(this,"priority",90);ie(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 ht(at(r.length,n),i);case"eo":return ht(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=Iu(n,o,s),n.setHours(0,0,0,0),n}}class SO extends Fe{constructor(){super(...arguments);ie(this,"priority",90);ie(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 ht(at(r.length,n),i);case"co":return ht(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=Iu(n,o,s),n.setHours(0,0,0,0),n}}function EO(e,t){const n=Le(e),r=XA(n),o=t-r;return _o(n,o)}class CO extends Fe{constructor(){super(...arguments);ie(this,"priority",90);ie(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 at(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ht(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 ht(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ht(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ht(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=EO(n,o),n.setHours(0,0,0,0),n}}class PO extends Fe{constructor(){super(...arguments);ie(this,"priority",80);ie(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(ku(o),0,0,0),n}}class kO extends Fe{constructor(){super(...arguments);ie(this,"priority",80);ie(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(ku(o),0,0,0),n}}class IO extends Fe{constructor(){super(...arguments);ie(this,"priority",80);ie(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(ku(o),0,0,0),n}}class AO extends Fe{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return tt(ft.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return at(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 OO extends Fe{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return tt(ft.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class _O extends Fe{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return tt(ft.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return at(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 DO extends Fe{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return tt(ft.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return at(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 MO extends Fe{constructor(){super(...arguments);ie(this,"priority",60);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return tt(ft.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class NO extends Fe{constructor(){super(...arguments);ie(this,"priority",50);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return tt(ft.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class LO extends Fe{constructor(){super(...arguments);ie(this,"priority",30);ie(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return ht(at(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class FO extends Fe{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Sn(Tn.basicOptionalMinutes,n);case"XX":return Sn(Tn.basic,n);case"XXXX":return Sn(Tn.basicOptionalSeconds,n);case"XXXXX":return Sn(Tn.extendedOptionalSeconds,n);case"XXX":default:return Sn(Tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ze(n,n.getTime()-ma(n)-o)}}class VO extends Fe{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Sn(Tn.basicOptionalMinutes,n);case"xx":return Sn(Tn.basic,n);case"xxxx":return Sn(Tn.basicOptionalSeconds,n);case"xxxxx":return Sn(Tn.extendedOptionalSeconds,n);case"xxx":default:return Sn(Tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ze(n,n.getTime()-ma(n)-o)}}class $O extends Fe{constructor(){super(...arguments);ie(this,"priority",40);ie(this,"incompatibleTokens","*")}parse(n){return By(n)}set(n,r,o){return[Ze(n,o*1e3),{timestampIsSet:!0}]}}class RO extends Fe{constructor(){super(...arguments);ie(this,"priority",20);ie(this,"incompatibleTokens","*")}parse(n){return By(n)}set(n,r,o){return[Ze(n,o),{timestampIsSet:!0}]}}const BO={G:new oO,y:new sO,Y:new iO,R:new aO,u:new lO,Q:new cO,q:new uO,M:new dO,L:new fO,w:new pO,I:new gO,d:new bO,D:new wO,E:new xO,e:new TO,c:new SO,i:new CO,a:new PO,b:new kO,B:new IO,h:new AO,H:new OO,K:new _O,k:new DO,m:new MO,s:new NO,S:new LO,X:new FO,x:new VO,t:new $O,T:new RO},jO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HO=/^'([^]*?)'?$/,zO=/''/g,UO=/\S/,GO=/[a-zA-Z]/;function YO(e,t,n,r){var m,y,b,v;const o=ZA(),s=o.locale??Ay,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((v=(b=o.locale)==null?void 0:b.options)==null?void 0:v.weekStartsOn)??0;if(t==="")return e===""?Le(n):Ze(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new rO],u=t.match(WO).map(g=>{const S=g[0];if(S in Cu){const T=Cu[S];return T(g,s.formatLong)}return g}).join("").match(jO),d=[];for(let g of u){$y(g)&&Pu(g,t,e),Vy(g)&&Pu(g,t,e);const S=g[0],T=BO[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const I=d.find(A=>E.includes(A.token)||A.token===S);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${g}\` at the same time`)}else if(T.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);d.push({token:S,fullToken:g});const C=T.run(e,g,s.match,l);if(!C)return Ze(n,NaN);c.push(C.setter),e=C.rest}else{if(S.match(GO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(g==="''"?g="'":S==="'"&&(g=qO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Ze(n,NaN)}}if(e.length>0&&UO.test(e))return Ze(n,NaN);const f=c.map(g=>g.priority).sort((g,S)=>S-g).filter((g,S,T)=>T.indexOf(g)===S).map(g=>c.filter(S=>S.priority===g).sort((S,T)=>T.subPriority-S.subPriority)).map(g=>g[0]);let h=Le(n);if(isNaN(h.getTime()))return Ze(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Ze(n,NaN);const S=g.set(h,p,l);Array.isArray(S)?(h=S[0],Object.assign(p,S[1])):h=S}return Ze(n,h)}function qO(e){return e.match(HO)[1].replace(zO,"'")}function KO(e,t){const n=Le(e),r=Le(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function ZO(e){return nA(e,tA(e))}function XO(e,t){return _o(e,-t)}function Hy(e,t){return pa(e,-t)}function QO(e,t){return Ey(e,-t)}function JO(e,t){return Cy(e,-t)}var pt=function(){return pt=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},pt.apply(this,arguments)};function Au(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ou(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,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}typeof SuppressedError=="function"&&SuppressedError;var Qs=function(e){return e.replace(new RegExp(" ","g")," ")},zy=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)},e_=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Uy=function(e,t,n){var r=e.length-2,o=e_(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},Gy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ya=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},t_=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},_u=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},n_=function(e){return e==="money"||e==="currency"},r_=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return pt(pt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},va=function(e,t){var n=zy(Gy(e),t.fraction.length),r="".concat(t.currency).concat(Uy(n,t.group,t.decimal));return Qs(r)},o_=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=Au(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var d=w.useMemo(function(){var p=r_(r,s,a);return p.currency=Qs("".concat(p.currency.trim()," ")),p.literal=Qs(p.literal.trim()),p},[r,s]),f=function(p){var m=va(p.target.value,d),y=ya(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)};w.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=va(p,d),y=ya(m);u.current.value=m,u.current.setAttribute("data-number",y.toString());var b=new InputEvent("change",{});l==null||l(pt(pt({},b),{target:u.current,currentTarget:u.current})),y!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?va(c.defaultValue,d):void 0;return w.createElement("input",pt({},c,{value:typeof c.value=="string"?va(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),s_=1,i_=function(e){return e==="percentage"||e==="percent"||e==="percentual"},a_=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return pt(pt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},ba=function(e,t){var n=zy(Gy(e),t.fraction.length),r="".concat(Uy(n,t.group,t.decimal)," ").concat(t.percentSign);return Qs(r)},l_=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=Au(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=Ou(w.useState(function(){var b,v;return(v=(b=i.value)===null||b===void 0?void 0:b.toString())!==null&&v!==void 0?v:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var b,v=Number.parseFloat("".concat((b=i.value)!==null&&b!==void 0?b:"0")).toFixed(d.fraction.length);u(ba(v,d))},[i.value]);var d=w.useMemo(function(){var b=a_(r);return b.percentSign=Qs("".concat(b.percentSign)),b},[r]),f=c.length-d.percentSign.length-s_,h=function(b){var v,g=a.current;g&&(g.setSelectionRange(f,f),b&&((v=i.onFocus)===null||v===void 0||v.call(i,b)))},p=function(b){var v=b.currentTarget;if(v.selectionStart!==null){var g=v.selectionStart,S=v.selectionEnd,T=g!==S,E=f<g;!T&&E&&h()}s==null||s(b)},m=function(b){var v=ba(b.target.value,d),g=ya(v);u(v),b.target.value=v,b.target.setAttribute("data-number",g.toString()),o==null||o(b)};w.useEffect(function(){if(a.current!==null){var b=a.current.value;if(b!==""){var v=ba(b,d),g=ya(v);u(v),a.current.value=v,a.current.setAttribute("data-number",g.toString());var S=new InputEvent("change",{});o==null||o(pt(pt({},S),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return h()},[c]);var y=i.defaultValue?ba(i.defaultValue,d):void 0;return w.createElement("input",pt({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Js={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},c_=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=wa[s];i===void 0?r.push(s.replace(Js.dots,"\\.").replace(Js.openParenthesis,"\\(").replace(Js.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Js.leadingBars,"\\")},ei=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Du(o,n);var s=c_(o);return n?"^".concat(s,"$"):s},u_=function(e){return e.replace(Js.escape,"\\$&")},Du=function(e,t){var n=e.map(function(r){return typeof r=="string"?u_(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},wa={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},d_=/\d/,Yy="(dd) 9dddd-dddd",qy="(dd) dddd-dddd",Ky="ddd.ddd.ddd-dd",Zy="dd.ddd.ddd/dddd-dd",xa=function(e){return e.replace(/\D/g,"")},f_=["2",/[0-3]/,":",/[0-5]/,/\d/],h_=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],zt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ky,isoDate:"dddd-dd-dd",cnpj:Zy,telephone:qy,cellphone:Yy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return xa(e).length<=11?Ky:Zy},int:function(e){return e===void 0&&(e=""),d_.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=xa(e);return t.length<11?qy:Yy},time:function(e){var t=xa(e),n=t[0];return n==="2"?f_:h_}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),pt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:ei(e,"",!0),infinity:n.infinity},n)},Mt={cellTelephone:Ut(zt.cellTelephone,"tel"),cellphone:Ut(zt.cellphone,"tel"),cep:Ut(zt.cep,"decimal"),cnpj:Ut(zt.cnpj,"decimal"),color:Ut(zt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(zt.cpf,"decimal"),cpfCnpj:Ut(zt.cpfCnpj,"decimal",{transform:xa}),creditCard:Ut(zt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(zt.date,"decimal"),int:Ut(zt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(zt.isoDate,"decimal"),telephone:Ut(zt.telephone,"tel"),time:Ut(zt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(zt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Xy(e,t,n,r){var o,s;r===void 0&&(r=wa);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var Qy=function(e){return e},p_=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(ei(e,n,t));return r.test(n)};function m_(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var g_=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,d=e.onChangeText,f=e.as,h=Au(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=_u(a),y=_u(d),b=_u(u),v=w.useRef(p_(u,s,h.value||h.defaultValue)),g=f??"input",S=Ou(w.useState(""),2),T=S[0],E=S[1],C=m_(T),I=w.useCallback(function(M,F){var N,B,z=(N=M??F)!==null&&N!==void 0?N:"";if(u===void 0)return z;var D=(B=z==null?void 0:z.toString())!==null&&B!==void 0?B:"";return Xy(D,typeof u=="function"?u(D):u,i??Qy,c??wa)},[i,u,c]),A=Ou(w.useState(function(){return I(h.value,h.defaultValue)}),2),O=A[0],L=A[1],_=I(h.defaultValue,h.defaultValue),V=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var M=u(O);return Array.isArray(M)?Du(M,s):ei(u,O,s)}return typeof u=="string"?ei(u,O,s):Du(u,s)},[l,O,s,u]);w.useEffect(function(){if(h.value!==void 0){var M=I(h.value,h.defaultValue);L(M),p.current!==null&&(p.current.value=M)}},[h.value,u,i,h.defaultValue]);var k=function(M){var F,N,B,z,D,j=M.currentTarget,K=M.target.value;if(b.current===void 0)return L(K),(F=y.current)===null||F===void 0||F.call(y,K),(N=m.current)===null||N===void 0||N.call(m,M),d==null?void 0:d(K);var J=new RegExp(ei(b.current,K,s)),X=(B=j.selectionEnd)!==null&&B!==void 0?B:0,G=function(Y,ce,R){if(Y.type!=="number")return Y.setSelectionRange(ce,R)};if(r&&v.current&&K.length>=O.length)return j.value=O,G(j,X-1,X-1);var $=!1;K.length<C.length&&(v.current=!1,$=!0),J.test(K)&&(v.current=!0);var W=X,H=K[W-1],U=Xy(K,typeof b.current=="function"?b.current(K):b.current,i??Qy,c??wa);for(j.value=U,L(U);W<U.length&&U.charAt(W-1)!==H;)W+=1;$?G(j,X,X):G(j,W,W),M.target.value=U,E(U),(z=y.current)===null||z===void 0||z.call(y,U),(D=m.current)===null||D===void 0||D.call(m,M)};return w.createElement(g,pt({},h,{ref:p,pattern:V,onChange:k,defaultValue:Jy(h.defaultValue)?_:void 0,value:Jy(h.value)?I(h.value,h.value):h.value}))}),Jy=function(e){return typeof e=="string"},ev=w.forwardRef(function(e,t){return n_(e.mask)?w.createElement(o_,pt({},e,{mask:void 0,ref:t})):i_(e.mask)?w.createElement(l_,pt({},e,{mask:void 0,ref:t})):w.createElement(g_,pt({},e,{ref:t}))}),Gt=function(e){return function(t){return w.createElement(ev,pt({},e,t))}};Gt(Mt.cellTelephone),Gt(Mt.cellphone),Gt(Mt.cep),Gt(Mt.cnpj),Gt(Mt.color),Gt(Mt.cpf),Gt(Mt.cpfCnpj),Gt(Mt.creditCard),Gt(Mt.date),Gt(Mt.int),Gt(Mt.isoDate),Gt(Mt.telephone),Gt(Mt.time),Gt(Mt.uuid);var tv=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&t_(Mt,t.mask)?Mt[t.mask]:{mask:t.mask}},[t.mask]),o=pt(pt({},t),r);return w.createElement(ev,pt({},o,{ref:n}))}),Mu={},Nu={exports:{}},Lu={};/**
|
|
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
|
|
150
|
+
*/var nv;function y_(){if(nv)return Lu;nv=1;var e=w;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,y=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&y({inst:m})},[d,h,f]),o(function(){return l(m)&&y({inst:m}),d(function(){l(m)&&y({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Lu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Lu}var rv={};/**
|
|
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
|
|
158
|
+
*/var ov;function v_(){return ov||(ov=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(g){{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",g,T)}}function r(g,S,T){{var E=t.ReactDebugCurrentFrame,C=E.getStackAddendum();C!==""&&(S+="%s",T=T.concat([C]));var I=T.map(function(A){return String(A)});I.unshift("Warning: "+S),Function.prototype.apply.call(console[g],console,I)}}function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&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,d=!1;function f(g,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(!d){var C=S();s(E,C)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var I=i({inst:{value:E,getSnapshot:S}}),A=I[0].inst,O=I[1];return l(function(){A.value=E,A.getSnapshot=S,h(A)&&O({inst:A})},[g,E,S]),a(function(){h(A)&&O({inst:A});var L=function(){h(A)&&O({inst:A})};return g(L)},[g]),c(E),E}function h(g){var S=g.getSnapshot,T=g.value;try{var E=S();return!s(T,E)}catch{return!0}}function p(g,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,b=y?p:f,v=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b;rv.useSyncExternalStore=v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),rv}var sv;function iv(){return sv||(sv=1,process.env.NODE_ENV==="production"?Nu.exports=y_():Nu.exports=v_()),Nu.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
|
|
166
|
+
*/var av;function b_(){if(av)return Mu;av=1;var e=w,t=iv();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 Mu.useSyncExternalStoreWithSelector=function(c,u,d,f,h){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 b(E){if(!v){if(v=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var C=m.value;if(h(C,E))return S=C}return S=E}if(C=S,r(g,E))return C;var I=f(E);return h!==void 0&&h(C,I)?C:(g=E,S=I)}var v=!1,g,S,T=d===void 0?null:d;return[function(){return b(u())},T===null?void 0:function(){return b(T())}]},[u,d,f,h]);var y=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},Mu}var lv={};/**
|
|
167
167
|
* @license React
|
|
168
168
|
* use-sync-external-store-shim/with-selector.development.js
|
|
169
169
|
*
|
|
@@ -171,32 +171,72 @@
|
|
|
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 qy;function qO(){return qy||(qy=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=Uy();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}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,d,f,h,p){var m=s(null),b;m.current===null?(b={hasValue:!1,value:null},m.current=b):b=m.current;var v=a(function(){var T=!1,E,C,I=function(_){if(!T){T=!0,E=_;var F=h(_);if(p!==void 0&&b.hasValue){var P=b.value;if(p(P,F))return C=P,P}return C=F,F}var N=E,L=C;if(r(N,_))return L;var V=h(_);return p!==void 0&&p(L,V)?L:(E=_,C=V,V)},A=f===void 0?null:f,O=function(){return I(d())},M=A===null?void 0:function(){return I(A())};return[O,M]},[d,f,h,p]),y=v[0],g=v[1],S=o(u,y,g);return i(function(){b.hasValue=!0,b.value=S},[S]),l(S),S}Yy.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yy}process.env.NODE_ENV==="production"?YO():qO();const No=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},KO=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},ZO=e=>Object.entries(e),Ky=e=>e instanceof Promise,Zy=(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),XO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>Zy(u,f,s,d));return Ky(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))},QO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>Zy(c,u,s,o.current));return Ky(a)?a.then(c=>l(c)):l(a)},ku=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=No(r),i=No((n==null?void 0:n.props)??{}),a=No(t),l=No((n==null?void 0:n.postMiddleware)??[]),c=No((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),d=KO(r),f=No(d),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(b=>{b(r,d,m)})},[r,l,d]);const[p]=w.useState(()=>{const m=()=>i.current,b=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return ZO(b).reduce((v,[y,g])=>({...v,[y]:n!=null&&n.debug?XO(y,g,o,m,h,c.current):QO(y,g,o,m,h,c.current)}),{})});return[r,p,i.current]},JO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function e_(e,t){return w.useRef(JO(e,t)).current}const va={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>)`},Fo=(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(Fo(i,t,n,a))},[]),Xy=(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]:Xy(i,t,n,a)}},{}),Qy={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ba=(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)},t_={default:e=>ba(e,{result:Qy.default}),dark:e=>ba(e,{result:Qy.dark})},Iu=(e,t)=>{const n=a=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return a?a(d):d},r=Fo(e.colors,n(t==null?void 0:t.colors)),o=Fo(e.spacing,n(t==null?void 0:t.spacing)),s=Fo(e.rounded,n(t==null?void 0:t.rounded)),i=e.custom?Fo(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,s,i)},n_=(e,t)=>ba(Iu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),r_=(e,t)=>Iu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),o_=(e,t)=>ba(Iu(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Jy={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},ev={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"},s_={name:"dark",rounded:Jy,spacing:ev,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:{foreground:"hsla(210, 40%, 98%)",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%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},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%)"}}}},i_={rounded:Jy,spacing:ev,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},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:{foreground:"hsla(217, 15%, 20%)",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%)",overlay:"hsla(0, 0%, 0%)"},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%)"}}}},a_=s_,l_=i_,Au={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",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",calendarToday:"Today"},wa=w.createContext({colorTokenParser:va.hsla,translations:Au,locale:void 0}),c_=e=>{const t=w.useMemo(()=>({locale:e.locale,translations:{...Au,...e.map},colorTokenParser:e.parser||va.hsla}),[e]);return x.jsx(wa.Provider,{value:t,children:e.children})},tv=()=>{const e=w.useContext(wa);if(e)return e.locale},kt=()=>{const e=w.useContext(wa);return e?e.translations:Au},u_=()=>{const e=w.useContext(wa);return e?e.colorTokenParser:va.hsla},d_={type:"spring",bounce:.3,duration:.6},nv=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),rv={middle:{x:"0%",opacity:1},enter:nv(1),exit:nv(-1)},ov={exit:{visibility:"hidden"}},f_=e=>{const t=xn(hy(e));return fy({start:t,end:Oo(t,41)})},sv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),h_=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=hy(new Date(1970,o,1).setMonth(o)),i=sv(s,n);return x.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),Ou={ArrowLeft:(e,t)=>t==="days"?CO(e,1):Iy(e,1),ArrowRight:(e,t)=>t==="days"?Oo(e,1):ua(e,1),ArrowUp:(e,t)=>t==="days"?PO(e,1):kO(e,1),ArrowDown:(e,t)=>t==="days"?cy(e,1):uy(e,1)},iv=(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)},Mr=e=>e.getFullYear().toString().padStart(4,"0"),p_=(e,t,n)=>e===void 0||n===void 0?!1:PA(t,e)&&kA(t,n),m_=e=>{var n;const t=kt();return x.jsx(dt.tbody,{layout:!0,variants:rv,custom:e.direction,onKeyDown:e.onKeyDown,className:$e((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 h,p,m,b,v,y,g,S,T,E,C,I,A,O;const a=i.toISOString(),l=e.rangeMode?a===((p=(h=e.range)==null?void 0:h.to)==null?void 0:p.toISOString())||a===((b=(m=e.range)==null?void 0:m.from)==null?void 0:b.toISOString()):a===((v=e.date)==null?void 0:v.toISOString()),c=EO(i)&&e.markToday,u=((y=e.disabledDate)==null?void 0:y.call(e,i))||!1,d=!SO(i,e.stateDate)||u,f=e.rangeMode?p_((g=e.range)==null?void 0:g.from,i,(S=e.range)==null?void 0:S.to):!1;return x.jsxs("td",{align:"center",className:$e("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:$e(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${d?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,f&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((C=e.stateRange.from)==null?void 0:C.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.from)??t.calendarFromDate})}):null,l&&((A=e.stateRange.to)==null?void 0:A.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:((O=e.labelRange)==null?void 0:O.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},av=({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:d=!0,...f})=>{const h=w.useRef(Es()),p=kt(),m=w.useRef(null),{date:b,range:v}=f,y=b||new Date,g=w.useRef(null),[S,T]=ku({date:y,isAnimating:!1,year:Mr(y),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:h_(h.current,y,o),selectMode:l?"from":void 0,week:fy({start:xn(y),end:MI(y)})},M=>({onChangeYear:_=>({year:_}),setToday:()=>({date:Do(new Date)}),onExitComplete:()=>(iv(g.current||null,m,M.state().date,200),g.current=null,{isAnimating:!1}),date:_=>{const F=_(M.state().date);return{date:F,year:Mr(F)}},nextMonth:_=>{g.current=_.currentTarget;const F=M.state();if(F.isAnimating)return F;const P=ua(F.date,1);return{date:P,isAnimating:!0,direction:1,year:Mr(P)}},previousMonth:_=>{g.current=_.currentTarget;const F=M.state();if(F.isAnimating)return F;const P=Iy(F.date,1);return{date:P,isAnimating:!0,direction:-1,year:Mr(P)}},onSelectDate:_=>{const F=M.state(),P=_.currentTarget.dataset.range==="true",N=_.currentTarget.dataset.date||"",L=new Date(N);return{date:L,year:Mr(L),selectMode:F.selectMode===void 0?void 0:F.selectMode==="from"?"to":"from",range:P?{from:F.selectMode==="from"?L:F.range.from,to:F.selectMode==="to"?L:F.range.to}:F.range}},onChangeMonth:_=>{const F=_.target.value,N=Array.from(_.target.options).find(V=>V.value===F),L=M.state();if(N){const V=N.dataset.index||"",B=new Date(M.state().date);return B.setMonth(+V),{...L,date:B,year:Mr(B)}}return L},onKeyDown:_=>{const F=_.key,P=M.state();if(F in Ou){(F==="ArrowUp"||F==="ArrowDown")&&_.preventDefault();const N=M.state().date,L=Ct.keyof(Ou,F)?Ou[F](N,_.shiftKey?"month":"days"):null;if(L!==null)return iv(_.target,m,L),{...P,date:L,year:Mr(L)}}return M.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(M,_,F)=>{var N,L;return(F.method==="onChangeMonth"||F.method==="previousMonth"||F.method==="nextMonth")&&((L=(N=F.props).onChangeMonth)==null||L.call(N,M.date)),M},(M,_,F)=>{var N,L;return F.method==="onChangeYear"&&((L=(N=F.props).onChangeYear)==null||L.call(N,M.date)),M},(M,_,F)=>{const P=F.method==="onSelectDate"||F.method==="setToday"||F.method==="onKeyDown";return l&&P&&t?(c==null||c(M.range),M):(P&&t&&(c==null||c(M.date)),M)}]}),E=$h(f_(S.date),7),C=S.date.toISOString(),I=sv(S.date,o);w.useEffect(()=>{t||c==null||c(S.date)},[C]);const A=e_(M=>{T.date(_=>{const F=new Date(_);return F.setFullYear(+M),F})},1200),O=M=>{const _=M.currentTarget.value;T.onChangeYear(_),a==null||a(new Date(_)),A(_)};return x.jsx(pS,{transition:d_,children:x.jsxs("div",{"data-component":"calendar",ref:m,className:$e("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(Jn,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:T.onExitComplete,children:x.jsxs(dt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(dt.button,{layout:!0,"data-focustrap":"prev",variants:ov,onClick:T.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(uI,{className:"h-4 w-4"})}),x.jsx(dt.span,{layout:!0,variants:rv,custom:S.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:`${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}),x.jsx(By,{mask:"int",value:S.year,maxLength:4,placeholder:"YYYY",onChange:O,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(dt.button,{layout:!0,"data-focustrap":"next",variants:ov,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:T.nextMonth,children:x.jsx(du,{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(dt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:S.week.map(M=>x.jsx("th",{className:$e("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:M.toLocaleDateString(o,{weekday:"short"})},M.toString()))})}),x.jsx(m_,{stateRange:S.range,stateDate:S.date,disabledDate:r,markRange:d,zip:E,range:v,styles:u,dispatch:T,date:b||null,markToday:s,rangeMode:l,labelRange:n,RenderOnDay:e,direction:S.direction,onKeyDown:T.onKeyDown})]})]},I)})}),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:T.setToday,children:p.calendarToday})})]})})},lv=({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:$e("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:$e("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:$e("min-w-full px-8",i),children:e})]}),cv=e=>{const t=e.Icon??ry,n=kt();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function g_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function uv(...e){return t=>e.forEach(n=>g_(n,t))}function Nr(...e){return k.useCallback(uv(...e),e)}function dv(e,t=[]){let n=[];function r(s,i){const a=k.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...p}=d,m=(f==null?void 0:f[e][l])||a,b=k.useMemo(()=>p,Object.values(p));return x.jsx(m.Provider,{value:b,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,p=k.useContext(h);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>k.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return k.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,y_(o,...t)]}function y_(...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 d=l(s)[`__scope${c}`];return{...a,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Lo=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),s=o.find(b_);if(s){const i=s.props.children,a=o.map(l=>l===s?k.Children.count(i)>1?k.Children.only(null):k.isValidElement(i)?i.props.children:null:l);return x.jsx(_u,{...r,ref:t,children:k.isValidElement(i)?k.cloneElement(i,void 0,a):null})}return x.jsx(_u,{...r,ref:t,children:n})});Lo.displayName="Slot";var _u=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=x_(n);return k.cloneElement(n,{...w_(r,n.props),ref:t?uv(t,o):o})}return k.Children.count(n)>1?k.Children.only(null):null});_u.displayName="SlotClone";var v_=({children:e})=>x.jsx(x.Fragment,{children:e});function b_(e){return k.isValidElement(e)&&e.type===v_}function w_(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 x_(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 T_(e){const t=e+"CollectionProvider",[n,r]=dv(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,b=w.useRef(null),v=w.useRef(new Map).current;return x.jsx(o,{scope:p,itemMap:v,collectionRef:b,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((h,p)=>{const{scope:m,children:b}=h,v=s(a,m),y=Nr(p,v.collectionRef);return x.jsx(Lo,{ref:y,children:b})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=w.forwardRef((h,p)=>{const{scope:m,children:b,...v}=h,y=w.useRef(null),g=Nr(p,y),S=s(c,m);return w.useEffect(()=>(S.itemMap.set(y,{ref:y,...v}),()=>void S.itemMap.delete(y))),x.jsx(Lo,{[u]:"",ref:g,children:b})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return w.useCallback(()=>{const b=p.collectionRef.current;if(!b)return[];const v=Array.from(b.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:d},f,r]}var S_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],En=S_.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?Lo: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 fv(e,t){e&&ms.flushSync(()=>e.dispatchEvent(t))}function Bn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function E_(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e);k.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 C_="DismissableLayer",Du="dismissableLayer.update",P_="dismissableLayer.pointerDownOutside",k_="dismissableLayer.focusOutside",hv,pv=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mv=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=k.useContext(pv),[u,d]=k.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=k.useState({}),p=Nr(t,C=>d(C)),m=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(b),y=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,T=A_(C=>{const I=C.target,A=[...c.branches].some(O=>O.contains(I));!S||A||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),E=O_(C=>{const I=C.target;[...c.branches].some(O=>O.contains(I))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return E_(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(hv=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),yv(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=hv)}},[u,f,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),yv())},[u,c]),k.useEffect(()=>{const C=()=>h({});return document.addEventListener(Du,C),()=>document.removeEventListener(Du,C)},[]),x.jsx(En.div,{...l,ref:p,style:{pointerEvents:g?S?"auto":"none":void 0,...e.style},onFocusCapture:qt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:qt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:qt(e.onPointerDownCapture,T.onPointerDownCapture)})});mv.displayName=C_;var I_="DismissableLayerBranch",gv=k.forwardRef((e,t)=>{const n=k.useContext(pv),r=k.useRef(null),o=Nr(t,r);return k.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(En.div,{...e,ref:o})});gv.displayName=I_;function A_(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){vv(P_,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 O_(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=s=>{s.target&&!r.current&&vv(k_,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 yv(){const e=new CustomEvent(Du);document.dispatchEvent(e)}function vv(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?fv(o,s):o.dispatchEvent(s)}var __=mv,D_=gv,xa=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},M_="Portal",bv=k.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=k.useState(!1);xa(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Oi.createPortal(x.jsx(En.div,{...r,ref:t}),i):null});bv.displayName=M_;function N_(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var wv=e=>{const{present:t,children:n}=e,r=F_(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),s=Nr(r.ref,L_(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:s}):null};wv.displayName="Presence";function F_(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),s=k.useRef("none"),i=e?"mounted":"unmounted",[a,l]=N_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=Ta(r.current);s.current=a==="mounted"?c:"none"},[a]),xa(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=Ta(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),xa(()=>{if(t){const c=d=>{const h=Ta(r.current).includes(d.animationName);d.target===t&&h&&ms.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=Ta(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:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ta(e){return(e==null?void 0:e.animationName)||"none"}function L_(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 V_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=$_({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=Bn(n),l=k.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[s,e,o,a]);return[i,l]}function $_({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),s=Bn(t);return k.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var R_="VisuallyHidden",Mu=k.forwardRef((e,t)=>x.jsx(En.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}}));Mu.displayName=R_;var Nu="ToastProvider",[Fu,B_,j_]=T_("Toast"),[xv,J$]=dv("Toast",[j_]),[z_,Sa]=xv(Nu),Tv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),f=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nu}\`. Expected non-empty \`string\`.`),x.jsx(Fu.Provider,{scope:t,children:x.jsx(z_,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:k.useCallback(()=>u(h=>h+1),[]),onToastRemove:k.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Tv.displayName=Nu;var Sv="ToastViewport",H_=["F8"],Lu="toast.viewportPause",Vu="toast.viewportResume",Ev=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=H_,label:o="Notifications ({hotkey})",...s}=e,i=Sa(Sv,n),a=B_(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),f=Nr(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;k.useEffect(()=>{const b=v=>{var g;r.every(S=>v[S]||v.code===S)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),k.useEffect(()=>{const b=l.current,v=d.current;if(p&&b&&v){const y=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Lu);v.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Vu);v.dispatchEvent(E),i.isClosePausedRef.current=!1}},S=E=>{!b.contains(E.relatedTarget)&&g()},T=()=>{b.contains(document.activeElement)||g()};return b.addEventListener("focusin",y),b.addEventListener("focusout",S),b.addEventListener("pointermove",y),b.addEventListener("pointerleave",T),window.addEventListener("blur",y),window.addEventListener("focus",g),()=>{b.removeEventListener("focusin",y),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",y),b.removeEventListener("pointerleave",T),window.removeEventListener("blur",y),window.removeEventListener("focus",g)}}},[p,i.isClosePausedRef]);const m=k.useCallback(({tabbingDirection:b})=>{const y=a().map(g=>{const S=g.ref.current,T=[S,...rD(S)];return b==="forwards"?T:T.reverse()});return(b==="forwards"?y.reverse():y).flat()},[a]);return k.useEffect(()=>{const b=d.current;if(b){const v=y=>{var T,E,C;const g=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!g){const I=document.activeElement,A=y.shiftKey;if(y.target===b&&A){(T=c.current)==null||T.focus();return}const _=m({tabbingDirection:A?"backwards":"forwards"}),F=_.findIndex(P=>P===I);Bu(_.slice(F+1))?y.preventDefault():A?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return b.addEventListener("keydown",v),()=>b.removeEventListener("keydown",v)}},[a,m]),x.jsxs(D_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&x.jsx($u,{ref:c,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"forwards"});Bu(b)}}),x.jsx(Fu.Slot,{scope:n,children:x.jsx(En.ol,{tabIndex:-1,...s,ref:f})}),p&&x.jsx($u,{ref:u,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"backwards"});Bu(b)}})]})});Ev.displayName=Sv;var Cv="ToastFocusProxy",$u=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Sa(Cv,n);return x.jsx(Mu,{"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()}})});$u.displayName=Cv;var Ea="Toast",W_="toast.swipeStart",U_="toast.swipeMove",G_="toast.swipeCancel",Y_="toast.swipeEnd",Pv=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=V_({prop:r,defaultProp:o,onChange:s});return x.jsx(wv,{present:n||a,children:x.jsx(Z_,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Bn(e.onPause),onResume:Bn(e.onResume),onSwipeStart:qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Pv.displayName=Ea;var[q_,K_]=xv(Ea,{onClose(){}}),Z_=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=Sa(Ea,n),[b,v]=k.useState(null),y=Nr(t,P=>v(P)),g=k.useRef(null),S=k.useRef(null),T=o||m.duration,E=k.useRef(0),C=k.useRef(T),I=k.useRef(0),{onToastAdd:A,onToastRemove:O}=m,M=Bn(()=>{var N;(b==null?void 0:b.contains(document.activeElement))&&((N=m.viewport)==null||N.focus()),i()}),_=k.useCallback(P=>{!P||P===1/0||(window.clearTimeout(I.current),E.current=new Date().getTime(),I.current=window.setTimeout(M,P))},[M]);k.useEffect(()=>{const P=m.viewport;if(P){const N=()=>{_(C.current),c==null||c()},L=()=>{const V=new Date().getTime()-E.current;C.current=C.current-V,window.clearTimeout(I.current),l==null||l()};return P.addEventListener(Lu,L),P.addEventListener(Vu,N),()=>{P.removeEventListener(Lu,L),P.removeEventListener(Vu,N)}}},[m.viewport,T,l,c,_]),k.useEffect(()=>{s&&!m.isClosePausedRef.current&&_(T)},[s,T,m.isClosePausedRef,_]),k.useEffect(()=>(A(),()=>O()),[A,O]);const F=k.useMemo(()=>b?Dv(b):null,[b]);return m.viewport?x.jsxs(x.Fragment,{children:[F&&x.jsx(X_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),x.jsx(q_,{scope:n,onClose:M,children:ms.createPortal(x.jsx(Fu.ItemSlot,{scope:n,children:x.jsx(__,{asChild:!0,onEscapeKeyDown:qt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(En.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:qt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:qt(e.onPointerDown,P=>{P.button===0&&(g.current={x:P.clientX,y:P.clientY})}),onPointerMove:qt(e.onPointerMove,P=>{if(!g.current)return;const N=P.clientX-g.current.x,L=P.clientY-g.current.y,V=!!S.current,B=["left","right"].includes(m.swipeDirection),W=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=B?W(0,N):0,j=B?0:W(0,L),K=P.pointerType==="touch"?10:2,J={x:D,y:j},X={originalEvent:P,delta:J};V?(S.current=J,Ca(U_,d,X,{discrete:!1})):Mv(J,m.swipeDirection,K)?(S.current=J,Ca(W_,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(N)>K||Math.abs(L)>K)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,P=>{const N=S.current,L=P.target;if(L.hasPointerCapture(P.pointerId)&&L.releasePointerCapture(P.pointerId),S.current=null,g.current=null,N){const V=P.currentTarget,B={originalEvent:P,delta:N};Mv(N,m.swipeDirection,m.swipeThreshold)?Ca(Y_,h,B,{discrete:!0}):Ca(G_,f,B,{discrete:!0}),V.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),X_=e=>{const{__scopeToast:t,children:n,...r}=e,o=Sa(Ea,t),[s,i]=k.useState(!1),[a,l]=k.useState(!1);return tD(()=>i(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(bv,{asChild:!0,children:x.jsx(Mu,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},Q_="ToastTitle",kv=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(En.div,{...r,ref:t})});kv.displayName=Q_;var J_="ToastDescription",Iv=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(En.div,{...r,ref:t})});Iv.displayName=J_;var Av="ToastAction",eD=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(_v,{altText:n,asChild:!0,children:x.jsx(Ru,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Av}\`. Expected non-empty \`string\`.`),null)});eD.displayName=Av;var Ov="ToastClose",Ru=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=K_(Ov,n);return x.jsx(_v,{asChild:!0,children:x.jsx(En.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});Ru.displayName=Ov;var _v=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(En.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Dv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),nD(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(...Dv(r))}}),t}function Ca(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?fv(o,s):o.dispatchEvent(s)}var Mv=(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 tD(e=()=>{}){const t=Bn(e);xa(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function nD(e){return e.nodeType===e.ELEMENT_NODE}function rD(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 Bu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var oD=Tv,sD=Ev,iD=Pv,aD=kv,lD=Iv,cD=Ru;const uD=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},dD=ho("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"}}),Nv=w.createContext(()=>{throw new Error("Not implemented")}),fD=()=>w.useContext(Nv),Fv={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]}},hD=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=dD({theme:t.theme||"default"});return x.jsx(iD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(dt.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:Fv[t.reversedIndex]||Fv.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(aD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(lD,{className:"select-text truncate",children:t.text})]}),r?x.jsx(cD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(hu,{className:"h-5 w-5"})}):null]})})})});function pD({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=uD(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const p=[...h,{...u,id:d,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(h=>h.filter(p=>p.id!==d))}},[t]);return x.jsxs(oD,{duration:n,swipeThreshold:150,children:[x.jsx(Nv.Provider,{value:l,children:e}),x.jsx(Jn,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(p=>p.id!==c.id));return w.createElement(hD,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(sD,{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 mD=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:$e("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]}),Lv=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},Vv=w.createContext(""),gD=e=>{const[t,n]=Lv(e.active),r=Or(0),o=Or(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const b=m.getBoundingClientRect();o.set(b.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=zh(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.Children.toArray(e.children),c=u=>{const d=u.currentTarget,f=d.getBoundingClientRect();o.set(f.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return x.jsx(Vv.Provider,{value:t,children:x.jsx(lv,{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 d=u.props;return x.jsx("li",{"data-id":d.id,"data-active":t===d.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":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},yD=()=>w.useContext(Vv),vD=e=>{const t=yD();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function or(e){return $v(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jn(e){var t;return(t=($v(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $v(e){return e instanceof Node||e instanceof Rt(e).Node}function Ue(e){return e instanceof Element||e instanceof Rt(e).Element}function mt(e){return e instanceof HTMLElement||e instanceof Rt(e).HTMLElement}function ju(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function Xs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function bD(e){return["table","td","th"].includes(or(e))}function Pa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function zu(e){const t=Hu(),n=Ue(e)?Kt(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 wD(e){let t=zn(e);for(;mt(t)&&!sr(t);){if(zu(t))return t;if(Pa(t))return null;t=zn(t)}return null}function Hu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sr(e){return["html","body","#document"].includes(or(e))}function Kt(e){return Rt(e).getComputedStyle(e)}function ka(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ju(e)&&e.host||jn(e);return ju(t)?t.host:t}function Rv(e){const t=zn(e);return sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:mt(t)&&Xs(t)?t:Rv(t)}function ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rv(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Rt(o);if(s){const a=Wu(i);return t.concat(i,i.visualViewport||[],Xs(o)?o:[],a&&n?ir(a):[])}return t.concat(o,ir(o,[],n))}function Wu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function un(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 lt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ju(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Uu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Bv(){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 jv(e){return e.mozInputSource===0&&e.isTrusted?!0:qu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Gu(e){return xD()?!1:!qu()&&e.width===0&&e.height===0||qu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Yu(){return/apple/i.test(navigator.vendor)}function qu(){const e=/android/i;return e.test(Uu())||e.test(Bv())}function zv(){return Uu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function xD(){return Bv().includes("jsdom/")}function Vo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function TD(e){return"nativeEvent"in e}function SD(e){return e.matches("html,body")}function St(e){return(e==null?void 0:e.ownerDocument)||document}function Ku(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 Cn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const ED="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Zu(e){return mt(e)&&e.matches(ED)}function It(e){e.preventDefault(),e.stopPropagation()}function Hv(e){return e?e.getAttribute("role")==="combobox"&&Zu(e):!1}const Pn=Math.min,Zt=Math.max,Ia=Math.round,$o=Math.floor,ar=e=>({x:e,y:e}),CD={left:"right",right:"left",bottom:"top",top:"bottom"},PD={start:"end",end:"start"};function Xu(e,t,n){return Zt(e,Pn(t,n))}function Ro(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function Wv(e){return e==="x"?"y":"x"}function Qu(e){return e==="y"?"height":"width"}function Fr(e){return["top","bottom"].includes(lr(e))?"y":"x"}function Ju(e){return Wv(Fr(e))}function kD(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=Ju(e),s=Qu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Aa(i)),[i,Aa(i)]}function ID(e){const t=Aa(e);return[ed(e),t,ed(t)]}function ed(e){return e.replace(/start|end/g,t=>PD[t])}function AD(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 OD(e,t,n,r){const o=Bo(e);let s=AD(lr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ed)))),s}function Aa(e){return e.replace(/left|right|bottom|top/g,t=>CD[t])}function _D(e){return{top:0,right:0,bottom:0,left:0,...e}}function Uv(e){return typeof e!="number"?_D(e):{top:e,right:e,bottom:e,left:e}}function Oa(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 cv;function w_(){return cv||(cv=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=iv();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}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,d,f,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var b=a(function(){var T=!1,E,C,I=function(_){if(!T){T=!0,E=_;var V=h(_);if(p!==void 0&&y.hasValue){var k=y.value;if(p(k,V))return C=k,k}return C=V,V}var M=E,F=C;if(r(M,_))return F;var N=h(_);return p!==void 0&&p(F,N)?F:(E=_,C=N,N)},A=f===void 0?null:f,O=function(){return I(d())},L=A===null?void 0:function(){return I(A())};return[O,L]},[d,f,h,p]),v=b[0],g=b[1],S=o(u,v,g);return i(function(){y.hasValue=!0,y.value=S},[S]),l(S),S}lv.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),lv}process.env.NODE_ENV==="production"?b_():w_();const Lo=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},x_=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},T_=e=>Object.entries(e),uv=e=>e instanceof Promise,dv=(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),S_=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>dv(u,f,s,d));return uv(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))},E_=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>dv(c,u,s,o.current));return uv(a)?a.then(c=>l(c)):l(a)},Fu=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=Lo(r),i=Lo((n==null?void 0:n.props)??{}),a=Lo(t),l=Lo((n==null?void 0:n.postMiddleware)??[]),c=Lo((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),d=x_(r),f=Lo(d),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,d,m)})},[r,l,d]);const[p]=w.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return T_(y).reduce((b,[v,g])=>({...b,[v]:n!=null&&n.debug?S_(v,g,o,m,h,c.current):E_(v,g,o,m,h,c.current)}),{})});return[r,p,i.current]},C_=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function P_(e,t){return w.useRef(C_(e,t)).current}const Ta={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>)`},Fo=(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(Fo(i,t,n,a))},[]),fv=(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]:fv(i,t,n,a)}},{}),hv={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Sa=(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)},k_={default:e=>Sa(e,{result:hv.default}),dark:e=>Sa(e,{result:hv.dark})},Vu=(e,t)=>{const n=a=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return a?a(d):d},r=Fo(e.colors,n(t==null?void 0:t.colors)),o=Fo(e.spacing,n(t==null?void 0:t.spacing)),s=Fo(e.rounded,n(t==null?void 0:t.rounded)),i=e.custom?Fo(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,s,i)},I_=(e,t)=>Sa(Vu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),A_=(e,t)=>Vu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),O_=(e,t)=>Sa(Vu(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),pv={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},mv={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"},__={name:"dark",rounded:pv,spacing:mv,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:{foreground:"hsla(210, 40%, 98%)",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%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},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%)"}}}},D_={rounded:pv,spacing:mv,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},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:{foreground:"hsla(217, 15%, 20%)",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%)",overlay:"hsla(0, 0%, 0%)"},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%)"}}}},M_=__,N_=D_,$u={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",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",calendarToday:"Today"},Ea=w.createContext({colorTokenParser:Ta.hsla,translations:$u,locale:void 0}),L_=e=>{const t=w.useMemo(()=>({locale:e.locale,translations:{...$u,...e.map},colorTokenParser:e.parser||Ta.hsla}),[e]);return x.jsx(Ea.Provider,{value:t,children:e.children})},Ru=e=>{if(e)return e;const t=w.useContext(Ea);if(t)return t.locale||e},kt=()=>{const e=w.useContext(Ea);return e?e.translations:$u},F_=()=>{const e=w.useContext(Ea);return e?e.colorTokenParser:Ta.hsla},V_={type:"spring",bounce:.3,duration:.6},gv=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),yv={middle:{x:"0%",opacity:1},enter:gv(1),exit:gv(-1)},vv={exit:{visibility:"hidden"}},$_=e=>{const t=xn(Iy(e));return ky({start:t,end:_o(t,41)})},bv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),R_=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=Iy(new Date(1970,o,1).setMonth(o)),i=bv(s,n);return x.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),Bu={ArrowLeft:(e,t)=>t==="days"?XO(e,1):Hy(e,1),ArrowRight:(e,t)=>t==="days"?_o(e,1):pa(e,1),ArrowUp:(e,t)=>t==="days"?QO(e,1):JO(e,1),ArrowDown:(e,t)=>t==="days"?Ey(e,1):Cy(e,1)},wv=(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)},Nr=e=>e.getFullYear().toString().padStart(4,"0"),B_=(e,t,n)=>e===void 0||n===void 0?!1:QA(t,e)&&JA(t,n),j_=e=>{var n;const t=kt();return x.jsx(dt.tbody,{layout:!0,variants:yv,custom:e.direction,onKeyDown:e.onKeyDown,className:$e((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 h,p,m,y,b,v,g,S,T,E,C,I,A,O;const a=i.toISOString(),l=e.rangeMode?a===((p=(h=e.range)==null?void 0:h.to)==null?void 0:p.toISOString())||a===((y=(m=e.range)==null?void 0:m.from)==null?void 0:y.toISOString()):a===((b=e.date)==null?void 0:b.toISOString()),c=ZO(i)&&e.markToday,u=((v=e.disabledDate)==null?void 0:v.call(e,i))||!1,d=!KO(i,e.stateDate)||u,f=e.rangeMode?B_((g=e.range)==null?void 0:g.from,i,(S=e.range)==null?void 0:S.to):!1;return x.jsxs("td",{align:"center",className:$e("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:$e(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${d?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,f&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((C=e.stateRange.from)==null?void 0:C.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.from)??t.calendarFromDate})}):null,l&&((A=e.stateRange.to)==null?void 0:A.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:((O=e.labelRange)==null?void 0:O.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},xv=({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:d=!0,...f})=>{const h=w.useRef(Is()),p=kt(),m=Ru(o),y=w.useRef(null),{date:b,range:v}=f,g=b||new Date,S=w.useRef(null),[T,E]=Fu({date:g,isAnimating:!1,year:Nr(g),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:R_(h.current,g,m),selectMode:l?"from":void 0,week:ky({start:xn(g),end:sA(g)})},_=>({onChangeYear:V=>({year:V}),setToday:()=>({date:Mo(new Date)}),onExitComplete:()=>(wv(S.current||null,y,_.state().date,200),S.current=null,{isAnimating:!1}),date:V=>{const k=V(_.state().date);return{date:k,year:Nr(k)}},nextMonth:V=>{S.current=V.currentTarget;const k=_.state();if(k.isAnimating)return k;const M=pa(k.date,1);return{date:M,isAnimating:!0,direction:1,year:Nr(M)}},previousMonth:V=>{S.current=V.currentTarget;const k=_.state();if(k.isAnimating)return k;const M=Hy(k.date,1);return{date:M,isAnimating:!0,direction:-1,year:Nr(M)}},onSelectDate:V=>{const k=_.state(),M=V.currentTarget.dataset.range==="true",F=V.currentTarget.dataset.date||"",N=new Date(F);return{date:N,year:Nr(N),selectMode:k.selectMode===void 0?void 0:k.selectMode==="from"?"to":"from",range:M?{from:k.selectMode==="from"?N:k.range.from,to:k.selectMode==="to"?N:k.range.to}:k.range}},onChangeMonth:V=>{const k=V.target.value,F=Array.from(V.target.options).find(B=>B.value===k),N=_.state();if(F){const B=F.dataset.index||"",z=new Date(_.state().date);return z.setMonth(+B),{...N,date:z,year:Nr(z)}}return N},onKeyDown:V=>{const k=V.key,M=_.state();if(k in Bu){(k==="ArrowUp"||k==="ArrowDown")&&V.preventDefault();const F=_.state().date,N=Ct.keyof(Bu,k)?Bu[k](F,V.shiftKey?"month":"days"):null;if(N!==null)return wv(V.target,y,N),{...M,date:N,year:Nr(N)}}return _.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(_,V,k)=>{var F,N;return(k.method==="onChangeMonth"||k.method==="previousMonth"||k.method==="nextMonth")&&((N=(F=k.props).onChangeMonth)==null||N.call(F,_.date)),_},(_,V,k)=>{var F,N;return k.method==="onChangeYear"&&((N=(F=k.props).onChangeYear)==null||N.call(F,_.date)),_},(_,V,k)=>{const M=k.method==="onSelectDate"||k.method==="setToday"||k.method==="onKeyDown";return l&&M&&t?(c==null||c(_.range),_):(M&&t&&(c==null||c(_.date)),_)}]}),C=Jh($_(T.date),7),I=T.date.toISOString(),A=bv(T.date,m);w.useEffect(()=>{t||c==null||c(T.date)},[I]);const O=P_(_=>{E.date(V=>{const k=new Date(V);return k.setFullYear(+_),k})},1200),L=_=>{const V=_.currentTarget.value;E.onChangeYear(V),a==null||a(new Date(V)),O(V)};return x.jsx(BS,{transition:V_,children:x.jsxs("div",{"data-component":"calendar",ref:y,className:$e("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(er,{initial:!1,mode:"popLayout",custom:T.direction,onExitComplete:E.onExitComplete,children:x.jsxs(dt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(dt.button,{type:"button",layout:!0,"data-focustrap":"prev",variants:vv,onClick:E.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(FI,{className:"h-4 w-4"})}),x.jsx(dt.span,{layout:!0,variants:yv,custom:T.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{value:A,onChange:E.onChangeMonth,style:{width:`${A.length}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:T.months}),x.jsx(tv,{mask:"int",maxLength:4,placeholder:"YYYY",value:T.year,onChange:L,style:{width:`${T.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(dt.button,{layout:!0,type:"button","data-focustrap":"next",variants:vv,onClick:E.nextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(wu,{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(dt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:T.week.map(_=>x.jsx("th",{className:$e("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:_.toLocaleDateString(m,{weekday:"short"})},_.toString()))})}),x.jsx(j_,{zip:C,range:v,styles:u,date:b||null,dispatch:E,markRange:d,markToday:s,rangeMode:l,stateDate:T.date,labelRange:n,stateRange:T.range,RenderOnDay:e,direction:T.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},A)})}),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:E.setToday,children:p.calendarToday})})]})})},Tv=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>x.jsxs(mo,{...a,as:r,"data-componen":"card",className:$e("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:$e("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:$e("min-w-full px-8",i),children:e})]}),Sv=e=>{const t=e.Icon??vy,n=kt();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function W_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ev(...e){return t=>e.forEach(n=>W_(n,t))}function Lr(...e){return P.useCallback(Ev(...e),e)}function Cv(e,t=[]){let n=[];function r(s,i){const a=P.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...p}=d,m=(f==null?void 0:f[e][l])||a,y=P.useMemo(()=>p,Object.values(p));return x.jsx(m.Provider,{value:y,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,p=P.useContext(h);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${d}\` 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,H_(o,...t)]}function H_(...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 d=l(s)[`__scope${c}`];return{...a,...d}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Vo=P.forwardRef((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),s=o.find(U_);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(ju,{...r,ref:t,children:P.isValidElement(i)?P.cloneElement(i,void 0,a):null})}return x.jsx(ju,{...r,ref:t,children:n})});Vo.displayName="Slot";var ju=P.forwardRef((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const o=Y_(n);return P.cloneElement(n,{...G_(r,n.props),ref:t?Ev(t,o):o})}return P.Children.count(n)>1?P.Children.only(null):null});ju.displayName="SlotClone";var z_=({children:e})=>x.jsx(x.Fragment,{children:e});function U_(e){return P.isValidElement(e)&&e.type===z_}function G_(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 Y_(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 q_(e){const t=e+"CollectionProvider",[n,r]=Cv(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,y=w.useRef(null),b=w.useRef(new Map).current;return x.jsx(o,{scope:p,itemMap:b,collectionRef:y,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((h,p)=>{const{scope:m,children:y}=h,b=s(a,m),v=Lr(p,b.collectionRef);return x.jsx(Vo,{ref:v,children:y})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=w.forwardRef((h,p)=>{const{scope:m,children:y,...b}=h,v=w.useRef(null),g=Lr(p,v),S=s(c,m);return w.useEffect(()=>(S.itemMap.set(v,{ref:v,...b}),()=>void S.itemMap.delete(v))),x.jsx(Vo,{[u]:"",ref:g,children:y})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return w.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,T)=>b.indexOf(S.ref.current)-b.indexOf(T.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var K_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],En=K_.reduce((e,t)=>{const n=P.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?Vo: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 Pv(e,t){e&&bs.flushSync(()=>e.dispatchEvent(t))}function jn(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 Z_(e,t=globalThis==null?void 0:globalThis.document){const n=jn(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 X_="DismissableLayer",Wu="dismissableLayer.update",Q_="dismissableLayer.pointerDownOutside",J_="dismissableLayer.focusOutside",kv,Iv=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Av=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=P.useContext(Iv),[u,d]=P.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=P.useState({}),p=Lr(t,C=>d(C)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(y),v=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,S=v>=b,T=tD(C=>{const I=C.target,A=[...c.branches].some(O=>O.contains(I));!S||A||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),E=nD(C=>{const I=C.target;[...c.branches].some(O=>O.contains(I))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return Z_(C=>{v===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),P.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(kv=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_v(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=kv)}},[u,f,n,c]),P.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_v())},[u,c]),P.useEffect(()=>{const C=()=>h({});return document.addEventListener(Wu,C),()=>document.removeEventListener(Wu,C)},[]),x.jsx(En.div,{...l,ref:p,style:{pointerEvents:g?S?"auto":"none":void 0,...e.style},onFocusCapture:qt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:qt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:qt(e.onPointerDownCapture,T.onPointerDownCapture)})});Av.displayName=X_;var eD="DismissableLayerBranch",Ov=P.forwardRef((e,t)=>{const n=P.useContext(Iv),r=P.useRef(null),o=Lr(t,r);return P.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(En.div,{...e,ref:o})});Ov.displayName=eD;function tD(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Dv(Q_,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 nD(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=P.useRef(!1);return P.useEffect(()=>{const o=s=>{s.target&&!r.current&&Dv(J_,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 _v(){const e=new CustomEvent(Wu);document.dispatchEvent(e)}function Dv(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?Pv(o,s):o.dispatchEvent(s)}var rD=Av,oD=Ov,Ca=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},sD="Portal",Mv=P.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=P.useState(!1);Ca(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ni.createPortal(x.jsx(En.div,{...r,ref:t}),i):null});Mv.displayName=sD;function iD(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var Nv=e=>{const{present:t,children:n}=e,r=aD(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),s=Lr(r.ref,lD(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:s}):null};Nv.displayName="Presence";function aD(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),s=P.useRef("none"),i=e?"mounted":"unmounted",[a,l]=iD(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=Pa(r.current);s.current=a==="mounted"?c:"none"},[a]),Ca(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=Pa(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ca(()=>{if(t){const c=d=>{const h=Pa(r.current).includes(d.animationName);d.target===t&&h&&bs.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=Pa(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 Pa(e){return(e==null?void 0:e.animationName)||"none"}function lD(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 cD({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=uD({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=jn(n),l=P.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[s,e,o,a]);return[i,l]}function uD({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),s=jn(t);return P.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var dD="VisuallyHidden",Hu=P.forwardRef((e,t)=>x.jsx(En.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}}));Hu.displayName=dD;var zu="ToastProvider",[Uu,fD,hD]=q_("Toast"),[Lv,iB]=Cv("Toast",[hD]),[pD,ka]=Lv(zu),Fv=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),d=P.useRef(!1),f=P.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${zu}\`. Expected non-empty \`string\`.`),x.jsx(Uu.Provider,{scope:t,children:x.jsx(pD,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:P.useCallback(()=>u(h=>h+1),[]),onToastRemove:P.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Fv.displayName=zu;var Vv="ToastViewport",mD=["F8"],Gu="toast.viewportPause",Yu="toast.viewportResume",$v=P.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=mD,label:o="Notifications ({hotkey})",...s}=e,i=ka(Vv,n),a=fD(n),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=Lr(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;P.useEffect(()=>{const y=b=>{var g;r.every(S=>b[S]||b.code===S)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),P.useEffect(()=>{const y=l.current,b=d.current;if(p&&y&&b){const v=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Gu);b.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Yu);b.dispatchEvent(E),i.isClosePausedRef.current=!1}},S=E=>{!y.contains(E.relatedTarget)&&g()},T=()=>{y.contains(document.activeElement)||g()};return y.addEventListener("focusin",v),y.addEventListener("focusout",S),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",T),window.addEventListener("blur",v),window.addEventListener("focus",g),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",S),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",T),window.removeEventListener("blur",v),window.removeEventListener("focus",g)}}},[p,i.isClosePausedRef]);const m=P.useCallback(({tabbingDirection:y})=>{const v=a().map(g=>{const S=g.ref.current,T=[S,...AD(S)];return y==="forwards"?T:T.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return P.useEffect(()=>{const y=d.current;if(y){const b=v=>{var T,E,C;const g=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!g){const I=document.activeElement,A=v.shiftKey;if(v.target===y&&A){(T=c.current)==null||T.focus();return}const _=m({tabbingDirection:A?"backwards":"forwards"}),V=_.findIndex(k=>k===I);Zu(_.slice(V+1))?v.preventDefault():A?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[a,m]),x.jsxs(oD,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&x.jsx(qu,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});Zu(y)}}),x.jsx(Uu.Slot,{scope:n,children:x.jsx(En.ol,{tabIndex:-1,...s,ref:f})}),p&&x.jsx(qu,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});Zu(y)}})]})});$v.displayName=Vv;var Rv="ToastFocusProxy",qu=P.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=ka(Rv,n);return x.jsx(Hu,{"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()}})});qu.displayName=Rv;var Ia="Toast",gD="toast.swipeStart",yD="toast.swipeMove",vD="toast.swipeCancel",bD="toast.swipeEnd",Bv=P.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=cD({prop:r,defaultProp:o,onChange:s});return x.jsx(Nv,{present:n||a,children:x.jsx(TD,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:jn(e.onPause),onResume:jn(e.onResume),onSwipeStart:qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Bv.displayName=Ia;var[wD,xD]=Lv(Ia,{onClose(){}}),TD=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:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=ka(Ia,n),[y,b]=P.useState(null),v=Lr(t,k=>b(k)),g=P.useRef(null),S=P.useRef(null),T=o||m.duration,E=P.useRef(0),C=P.useRef(T),I=P.useRef(0),{onToastAdd:A,onToastRemove:O}=m,L=jn(()=>{var M;(y==null?void 0:y.contains(document.activeElement))&&((M=m.viewport)==null||M.focus()),i()}),_=P.useCallback(k=>{!k||k===1/0||(window.clearTimeout(I.current),E.current=new Date().getTime(),I.current=window.setTimeout(L,k))},[L]);P.useEffect(()=>{const k=m.viewport;if(k){const M=()=>{_(C.current),c==null||c()},F=()=>{const N=new Date().getTime()-E.current;C.current=C.current-N,window.clearTimeout(I.current),l==null||l()};return k.addEventListener(Gu,F),k.addEventListener(Yu,M),()=>{k.removeEventListener(Gu,F),k.removeEventListener(Yu,M)}}},[m.viewport,T,l,c,_]),P.useEffect(()=>{s&&!m.isClosePausedRef.current&&_(T)},[s,T,m.isClosePausedRef,_]),P.useEffect(()=>(A(),()=>O()),[A,O]);const V=P.useMemo(()=>y?Gv(y):null,[y]);return m.viewport?x.jsxs(x.Fragment,{children:[V&&x.jsx(SD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),x.jsx(wD,{scope:n,onClose:L,children:bs.createPortal(x.jsx(Uu.ItemSlot,{scope:n,children:x.jsx(rD,{asChild:!0,onEscapeKeyDown:qt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(En.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:qt(e.onKeyDown,k=>{k.key==="Escape"&&(a==null||a(k.nativeEvent),k.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:qt(e.onPointerDown,k=>{k.button===0&&(g.current={x:k.clientX,y:k.clientY})}),onPointerMove:qt(e.onPointerMove,k=>{if(!g.current)return;const M=k.clientX-g.current.x,F=k.clientY-g.current.y,N=!!S.current,B=["left","right"].includes(m.swipeDirection),z=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=B?z(0,M):0,j=B?0:z(0,F),K=k.pointerType==="touch"?10:2,J={x:D,y:j},X={originalEvent:k,delta:J};N?(S.current=J,Aa(yD,d,X,{discrete:!1})):Yv(J,m.swipeDirection,K)?(S.current=J,Aa(gD,u,X,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs(M)>K||Math.abs(F)>K)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,k=>{const M=S.current,F=k.target;if(F.hasPointerCapture(k.pointerId)&&F.releasePointerCapture(k.pointerId),S.current=null,g.current=null,M){const N=k.currentTarget,B={originalEvent:k,delta:M};Yv(M,m.swipeDirection,m.swipeThreshold)?Aa(bD,h,B,{discrete:!0}):Aa(vD,f,B,{discrete:!0}),N.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),SD=e=>{const{__scopeToast:t,children:n,...r}=e,o=ka(Ia,t),[s,i]=P.useState(!1),[a,l]=P.useState(!1);return kD(()=>i(!0)),P.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(Mv,{asChild:!0,children:x.jsx(Hu,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},ED="ToastTitle",jv=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(En.div,{...r,ref:t})});jv.displayName=ED;var CD="ToastDescription",Wv=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(En.div,{...r,ref:t})});Wv.displayName=CD;var Hv="ToastAction",PD=P.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(Uv,{altText:n,asChild:!0,children:x.jsx(Ku,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Hv}\`. Expected non-empty \`string\`.`),null)});PD.displayName=Hv;var zv="ToastClose",Ku=P.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=xD(zv,n);return x.jsx(Uv,{asChild:!0,children:x.jsx(En.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});Ku.displayName=zv;var Uv=P.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(En.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Gv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),ID(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(...Gv(r))}}),t}function Aa(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?Pv(o,s):o.dispatchEvent(s)}var Yv=(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 kD(e=()=>{}){const t=jn(e);Ca(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function ID(e){return e.nodeType===e.ELEMENT_NODE}function AD(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 Zu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var OD=Fv,_D=$v,DD=Bv,MD=jv,ND=Wv,LD=Ku;const FD=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},VD=po("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"}}),qv=w.createContext(()=>{throw new Error("Not implemented")}),$D=()=>w.useContext(qv),Kv={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]}},RD=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=VD({theme:t.theme||"default"});return x.jsx(DD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(dt.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:Kv[t.reversedIndex]||Kv.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(MD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(ND,{className:"select-text truncate",children:t.text})]}),r?x.jsx(LD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(Tu,{className:"h-5 w-5"})}):null]})})})});function BD({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=FD(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const p=[...h,{...u,id:d,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(h=>h.filter(p=>p.id!==d))}},[t]);return x.jsxs(OD,{duration:n,swipeThreshold:150,children:[x.jsx(qv.Provider,{value:l,children:e}),x.jsx(er,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(p=>p.id!==c.id));return w.createElement(RD,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(_D,{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 jD=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:$e("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]}),Zv=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},Xv=w.createContext(""),WD=e=>{const[t,n]=Zv(e.active),r=_r(0),o=_r(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const y=m.getBoundingClientRect();o.set(y.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=rp(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.Children.toArray(e.children),c=u=>{const d=u.currentTarget,f=d.getBoundingClientRect();o.set(f.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return x.jsx(Xv.Provider,{value:t,children:x.jsx(Tv,{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 d=u.props;return x.jsx("li",{"data-id":d.id,"data-active":t===d.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":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},HD=()=>w.useContext(Xv),zD=e=>{const t=HD();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function sr(e){return Qv(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wn(e){var t;return(t=(Qv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qv(e){return e instanceof Node||e instanceof Rt(e).Node}function Ue(e){return e instanceof Element||e instanceof Rt(e).Element}function mt(e){return e instanceof HTMLElement||e instanceof Rt(e).HTMLElement}function Xu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function ti(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function UD(e){return["table","td","th"].includes(sr(e))}function Oa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Qu(e){const t=Ju(),n=Ue(e)?Kt(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 GD(e){let t=Hn(e);for(;mt(t)&&!ir(t);){if(Qu(t))return t;if(Oa(t))return null;t=Hn(t)}return null}function Ju(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(sr(e))}function Kt(e){return Rt(e).getComputedStyle(e)}function _a(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(sr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xu(e)&&e.host||Wn(e);return Xu(t)?t.host:t}function Jv(e){const t=Hn(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:mt(t)&&ti(t)?t:Jv(t)}function ar(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jv(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Rt(o);if(s){const a=ed(i);return t.concat(i,i.visualViewport||[],ti(o)?o:[],a&&n?ar(a):[])}return t.concat(o,ar(o,[],n))}function ed(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function un(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 lt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Xu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function td(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function eb(){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 tb(e){return e.mozInputSource===0&&e.isTrusted?!0:od()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function nd(e){return YD()?!1:!od()&&e.width===0&&e.height===0||od()&&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 rd(){return/apple/i.test(navigator.vendor)}function od(){const e=/android/i;return e.test(td())||e.test(eb())}function nb(){return td().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function YD(){return eb().includes("jsdom/")}function $o(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function qD(e){return"nativeEvent"in e}function KD(e){return e.matches("html,body")}function St(e){return(e==null?void 0:e.ownerDocument)||document}function sd(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 Cn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const ZD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function id(e){return mt(e)&&e.matches(ZD)}function It(e){e.preventDefault(),e.stopPropagation()}function rb(e){return e?e.getAttribute("role")==="combobox"&&id(e):!1}const Pn=Math.min,Zt=Math.max,Da=Math.round,Ro=Math.floor,lr=e=>({x:e,y:e}),XD={left:"right",right:"left",bottom:"top",top:"bottom"},QD={start:"end",end:"start"};function ad(e,t,n){return Zt(e,Pn(t,n))}function Bo(e,t){return typeof e=="function"?e(t):e}function cr(e){return e.split("-")[0]}function jo(e){return e.split("-")[1]}function ob(e){return e==="x"?"y":"x"}function ld(e){return e==="y"?"height":"width"}function Fr(e){return["top","bottom"].includes(cr(e))?"y":"x"}function cd(e){return ob(Fr(e))}function JD(e,t,n){n===void 0&&(n=!1);const r=jo(e),o=cd(e),s=ld(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ma(i)),[i,Ma(i)]}function eM(e){const t=Ma(e);return[ud(e),t,ud(t)]}function ud(e){return e.replace(/start|end/g,t=>QD[t])}function tM(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 nM(e,t,n,r){const o=jo(e);let s=tM(cr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ud)))),s}function Ma(e){return e.replace(/left|right|bottom|top/g,t=>XD[t])}function rM(e){return{top:0,right:0,bottom:0,left:0,...e}}function sb(e){return typeof e!="number"?rM(e):{top:e,right:e,bottom:e,left:e}}function Na(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 DD=["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])"],_a=DD.join(","),Gv=typeof Element>"u",jo=Gv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Da=!Gv&&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},Ma=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},MD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ND=function(t,n,r){if(Ma(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(_a));return n&&jo.call(t,_a)&&o.unshift(t),o=o.filter(r),o},FD=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ma(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=jo.call(i,_a);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Ma(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},Yv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},qv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||MD(t))&&!Yv(t)?0:t.tabIndex},LD=function(t,n){var r=qv(t);return r<0&&n&&!Yv(t)?0:r},VD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Kv=function(t){return t.tagName==="INPUT"},$D=function(t){return Kv(t)&&t.type==="hidden"},RD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},BD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},jD=function(t){if(!t.name)return!0;var n=t.form||Da(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=BD(o,t.form);return!s||s===t},zD=function(t){return Kv(t)&&t.type==="radio"},HD=function(t){return zD(t)&&!jD(t)},WD=function(t){var n,r=t&&Da(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,d;r=Da(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},Zv=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},UD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=jo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(jo.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=Da(t);if(l&&!l.shadowRoot&&o(l)===!0)return Zv(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(WD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Zv(t);return!1},GD=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 jo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},YD=function(t,n){return!(n.disabled||Ma(n)||$D(n)||UD(n,t)||RD(n)||GD(n))},td=function(t,n){return!(HD(n)||qv(n)<0||!YD(t,n))},qD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},KD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=LD(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(VD).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Qs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=FD([t],n.includeContainer,{filter:td.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:qD}):r=ND(t,n.includeContainer,td.bind(null,n)),KD(r)},ZD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return jo.call(t,_a)===!1?!1:td(n,t)};function Xv(e,t,n){let{reference:r,floating:o}=e;const s=Fr(t),i=Ju(t),a=Qu(i),l=lr(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Bo(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const XD=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:d}=Xv(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:b,fn:v}=a[m],{x:y,y:g,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=g??d,h={...h,[b]:{...h[b],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=Xv(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function nd(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:d="floating",altBoundary:f=!1,padding:h=0}=Ro(t,e),p=Uv(h),b=a[f?d==="floating"?"reference":"floating":d],v=Oa(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},T=Oa(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);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 QD=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}=Ro(e,t)||{};if(c==null)return{};const d=Uv(u),f={x:n,y:r},h=Ju(o),p=Qu(h),m=await i.getDimensions(c),b=h==="y",v=b?"top":"left",y=b?"bottom":"right",g=b?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-f[h]-s.floating[p],T=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const I=S/2-T/2,A=C/2-m[p]/2-1,O=Pn(d[v],A),M=Pn(d[y],A),_=O,F=C-m[p]-M,P=C/2-m[p]/2+I,N=Xu(_,P,F),L=!l.arrow&&Bo(o)!=null&&P!==N&&s.reference[p]/2-(P<_?O:M)-m[p]/2<0,V=L?P<_?P-_:P-F:0;return{[h]:f[h]+V,data:{[h]:N,centerOffset:P-N-V,...L&&{alignmentOffset:V}},reset:L}}}),JD=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:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=Ro(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=lr(o),y=Fr(a),g=lr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(g||!m?[Aa(a)]:ID(a)),E=p!=="none";!f&&E&&T.push(...OD(a,m,p,S));const C=[a,...T],I=await nd(t,b),A=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&A.push(I[v]),d){const P=kD(o,i,S);A.push(I[P[0]],I[P[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(P=>P<=0)){var M,_;const P=(((M=s.flip)==null?void 0:M.index)||0)+1,N=C[P];if(N)return{data:{index:P,overflows:O},reset:{placement:N}};let L=(_=O.filter(V=>V.overflows[0]<=0).sort((V,B)=>V.overflows[1]-B.overflows[1])[0])==null?void 0:_.placement;if(!L)switch(h){case"bestFit":{var F;const V=(F=O.filter(B=>{if(E){const W=Fr(B.placement);return W===y||W==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(W=>W>0).reduce((W,D)=>W+D,0)]).sort((B,W)=>B[1]-W[1])[0])==null?void 0:F[0];V&&(L=V);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};async function eM(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=lr(n),a=Bo(n),l=Fr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=Ro(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const tM=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 eM(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}}}}},nM=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:b=>{let{x:v,y}=b;return{x:v,y}}},...l}=Ro(e,t),c={x:n,y:r},u=await nd(t,l),d=Fr(lr(o)),f=Wv(d);let h=c[f],p=c[d];if(s){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+u[b],g=h-u[v];h=Xu(y,h,g)}if(i){const b=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=p+u[b],g=p-u[v];p=Xu(y,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},rM=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}=Ro(e,t),l=await nd(t,a),c=lr(n),u=Bo(n),d=Fr(n)==="y",{width:f,height:h}=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 b=h-l.top-l.bottom,v=f-l.left-l.right,y=Pn(h-l[p],b),g=Pn(f-l[m],v),S=!t.middlewareData.shift;let T=y,E=g;if(d?E=u||S?Pn(g,v):v:T=u||S?Pn(y,b):b,S&&!u){const I=Zt(l.left,0),A=Zt(l.right,0),O=Zt(l.top,0),M=Zt(l.bottom,0);d?E=f-2*(I!==0||A!==0?I+A:Zt(l.left,l.right)):T=h-2*(O!==0||M!==0?O+M:Zt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const C=await o.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function Qv(e){const t=Kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ia(n)!==s||Ia(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function rd(e){return Ue(e)?e:e.contextElement}function zo(e){const t=rd(e);if(!mt(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Qv(t);let i=(s?Ia(n.width):n.width)/r,a=(s?Ia(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const oM=ar(0);function Jv(e){const t=Rt(e);return!Hu()||!t.visualViewport?oM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function Lr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=rd(e);let i=ar(1);t&&(r?Ue(r)&&(i=zo(r)):i=zo(e));const a=sM(s,n,r)?Jv(s):ar(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Rt(s),h=r&&Ue(r)?Rt(r):r;let p=f,m=Wu(p);for(;m&&r&&h!==p;){const b=zo(m),v=m.getBoundingClientRect(),y=Kt(m),g=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,S=v.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=g,c+=S,p=Rt(m),m=Wu(p)}}return Oa({width:u,height:d,x:l,y:c})}function iM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=jn(r),a=t?Pa(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1);const u=ar(0),d=mt(r);if((d||!d&&!s)&&((or(r)!=="body"||Xs(i))&&(l=ka(r)),mt(r))){const f=Lr(r);c=zo(r),u.x=f.x+r.clientLeft,u.y=f.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 aM(e){return Array.from(e.getClientRects())}function eb(e){return Lr(jn(e)).left+ka(e).scrollLeft}function lM(e){const t=jn(e),n=ka(e),r=e.ownerDocument.body,o=Zt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Zt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+eb(e);const a=-n.scrollTop;return Kt(r).direction==="rtl"&&(i+=Zt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function cM(e,t){const n=Rt(e),r=jn(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=Hu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function uM(e,t){const n=Lr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=mt(e)?zo(e):ar(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 tb(e,t,n){let r;if(t==="viewport")r=cM(e,n);else if(t==="document")r=lM(jn(e));else if(Ue(t))r=uM(t,n);else{const o=Jv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Oa(r)}function nb(e,t){const n=zn(e);return n===t||!Ue(n)||sr(n)?!1:Kt(n).position==="fixed"||nb(n,t)}function dM(e,t){const n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(a=>Ue(a)&&or(a)!=="body"),o=null;const s=Kt(e).position==="fixed";let i=s?zn(e):e;for(;Ue(i)&&!sr(i);){const a=Kt(i),l=zu(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Xs(i)&&!l&&nb(e,i))?r=r.filter(u=>u!==i):o=a,i=zn(i)}return t.set(e,r),r}function fM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Pa(t)?[]:dM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=tb(t,u,o);return c.top=Zt(d.top,c.top),c.right=Pn(d.right,c.right),c.bottom=Pn(d.bottom,c.bottom),c.left=Zt(d.left,c.left),c},tb(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hM(e){const{width:t,height:n}=Qv(e);return{width:t,height:n}}function pM(e,t,n){const r=mt(t),o=jn(t),s=n==="fixed",i=Lr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ar(0);if(r||!r&&!s)if((or(t)!=="body"||Xs(o))&&(a=ka(t)),r){const d=Lr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=eb(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 od(e){return Kt(e).position==="static"}function rb(e,t){return!mt(e)||Kt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ob(e,t){const n=Rt(e);if(Pa(e))return n;if(!mt(e)){let o=zn(e);for(;o&&!sr(o);){if(Ue(o)&&!od(o))return o;o=zn(o)}return n}let r=rb(e,t);for(;r&&bD(r)&&od(r);)r=rb(r,t);return r&&sr(r)&&od(r)&&!zu(r)?n:r||wD(e)||n}const mM=async function(e){const t=this.getOffsetParent||ob,n=this.getDimensions,r=await n(e.floating);return{reference:pM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gM(e){return Kt(e).direction==="rtl"}const yM={convertOffsetParentRelativeRectToViewportRelativeRect:iM,getDocumentElement:jn,getClippingRect:fM,getOffsetParent:ob,getElementRects:mM,getClientRects:aM,getDimensions:hM,getScale:zo,isElement:Ue,isRTL:gM};function vM(e,t){let n=null,r;const o=jn(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:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=$o(u),p=$o(o.clientWidth-(c+d)),m=$o(o.clientHeight-(u+f)),b=$o(c),y={rootMargin:-h+"px "+-p+"px "+-m+"px "+-b+"px",threshold:Zt(0,Pn(1,l))||1};let g=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return i(!0),s}function Js(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=rd(e),u=o||s?[...c?ir(c):[],...ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?vM(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Lr(e):null;l&&b();function b(){const v=Lr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(b)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const bM=tM,wM=nM,xM=JD,TM=rM,sb=QD,SM=(e,t,n)=>{const r=new Map,o={platform:yM,...n},s={...o.platform,_c:r};return XD(e,t,{...o,platform:s})};var Na=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Fa(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(!Fa(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)&&!Fa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ib(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ab(e,t){const n=ib(e);return Math.round(t*n)/n}function lb(e){const t=k.useRef(e);return Na(()=>{t.current=e}),t}function EM(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,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=k.useState(r);Fa(f,r)||h(r);const[p,m]=k.useState(null),[b,v]=k.useState(null),y=k.useCallback(V=>{V!==E.current&&(E.current=V,m(V))},[]),g=k.useCallback(V=>{V!==C.current&&(C.current=V,v(V))},[]),S=s||p,T=i||b,E=k.useRef(null),C=k.useRef(null),I=k.useRef(u),A=l!=null,O=lb(l),M=lb(o),_=k.useCallback(()=>{if(!E.current||!C.current)return;const V={placement:t,strategy:n,middleware:f};M.current&&(V.platform=M.current),SM(E.current,C.current,V).then(B=>{const W={...B,isPositioned:!0};F.current&&!Fa(I.current,W)&&(I.current=W,ms.flushSync(()=>{d(W)}))})},[f,t,n,M]);Na(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[c]);const F=k.useRef(!1);Na(()=>(F.current=!0,()=>{F.current=!1}),[]),Na(()=>{if(S&&(E.current=S),T&&(C.current=T),S&&T){if(O.current)return O.current(S,T,_);_()}},[S,T,_,O,A]);const P=k.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:g}),[y,g]),N=k.useMemo(()=>({reference:S,floating:T}),[S,T]),L=k.useMemo(()=>{const V={position:n,left:0,top:0};if(!N.floating)return V;const B=ab(N.floating,u.x),W=ab(N.floating,u.y);return a?{...V,transform:"translate("+B+"px, "+W+"px)",...ib(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:W}},[n,a,N.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:_,refs:P,elements:N,floatingStyles:L}),[u,_,P,N,L])}const CM=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?sb({element:r.current,padding:o}).fn(n):{}:r?sb({element:r,padding:o}).fn(n):{}}}},ei=(e,t)=>({...bM(e),options:[e,t]}),sd=(e,t)=>({...wM(e),options:[e,t]}),id=(e,t)=>({...xM(e),options:[e,t]}),cb=(e,t)=>({...TM(e),options:[e,t]}),ub=(e,t)=>({...CM(e),options:[e,t]});function ad(e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const db={...k},PM=db.useInsertionEffect||(e=>e());function bt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return PM(()=>{t.current=e}),k.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 ld="ArrowUp",ti="ArrowDown",Ho="ArrowLeft",Wo="ArrowRight";function La(e,t,n){return Math.floor(e/t)!==n}function ni(e,t){return t<0||t>=e.current.length}function cd(e,t){return Nt(e,{disabledIndices:t})}function fb(e,t){return Nt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Nt(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&&Va(i,a,o));return a}function kM(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===ld){if(u&&It(n),c===-1)d=l;else if(d=Nt(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}ni(e,d)&&(d=c)}if(n.key===ti&&(u&&It(n),c===-1?d=a:(d=Nt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Nt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),ni(e,d)&&(d=c)),r==="both"){const f=$o(c/s);n.key===Wo&&(u&&It(n),c%s!==s-1?(d=Nt(e,{startingIndex:c,disabledIndices:i}),o&&La(d,s,f)&&(d=Nt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Nt(e,{startingIndex:c-c%s-1,disabledIndices:i})),La(d,s,f)&&(d=c)),n.key===Ho&&(u&&It(n),c%s!==0?(d=Nt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&La(d,s,f)&&(d=Nt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Nt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),La(d,s,f)&&(d=c));const h=$o(l/s)===f;ni(e,d)&&(o&&h?d=n.key===Ho?l:Nt(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function IM(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 d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function AM(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 OM(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Va(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 hb=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(hb);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():hb=requestAnimationFrame(s)}var _e=typeof document<"u"?w.useLayoutEffect:w.useEffect;function _M(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 DM(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 pb=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function MM(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=k.useState(()=>new Map),i=k.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=k.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return _e(()=>{const l=new Map(o);Array.from(l.keys()).sort(_M).forEach((u,d)=>{l.set(u,d)}),DM(o,l)||s(l)},[o]),k.createElement(pb.Provider,{value:k.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function mb(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=k.useContext(pb),[a,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return _e(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),_e(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(this,arguments)}let gb=!1,NM=0;const yb=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+NM++;function FM(){const[e,t]=k.useState(()=>gb?yb():void 0);return _e(()=>{e==null&&t(yb())},[]),k.useEffect(()=>{gb=!0},[]),e}const Go=db.useId||FM;let ri;process.env.NODE_ENV!=="production"&&(ri=new Set);function $a(){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=ri)!=null&&e.has(o))){var s;(s=ri)==null||s.add(o),console.warn(o)}}function LM(){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=ri)!=null&&e.has(o))){var s;(s=ri)==null||s.add(o),console.error(o)}}const vb=k.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:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||$a("The `ref` prop is required for `FloatingArrow`."));const b=Go(),[v,y]=k.useState(!1);if(_e(()=>{if(!o)return;Kt(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const g=c*2,S=g/2,T=i/2*(l/-8+1),E=a/2*l/4,[C,I]=r.split("-"),A=!!f,O=C==="top"||C==="bottom",M=u&&I==="end"?"bottom":"top";let _=u&&I==="end"?"right":"left";u&&v&&(_=I==="end"?"left":"right");const F=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",N=f||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",L={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Uo({},m,{"aria-hidden":!0,ref:n,width:A?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[_]:F,[M]:P,[C]:O||A?"100%":"calc(100% - "+g/2+"px)",transform:""+L+(h??""),...p}}),g>0&&k.createElement("path",{clipPath:"url(#"+b+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:N}),k.createElement("path",{stroke:g&&!f?m.fill:"none",d:N}),k.createElement("clipPath",{id:b},k.createElement("rect",{x:-S,y:S*(A?-1:1),width:i+g,height:i})))});function bb(){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 wb=k.createContext(null),xb=k.createContext(null),ur=()=>{var e;return((e=k.useContext(wb))==null?void 0:e.id)||null},dr=()=>k.useContext(xb);function VM(e){const t=Go(),n=dr(),o=ur();return _e(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function $M(e){const{children:t,id:n}=e,r=ur();return k.createElement(wb.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function RM(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(i=>{n.current=[...n.current,i]},[]),o=k.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=k.useState(()=>bb())[0];return k.createElement(xb.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function fr(e){return"data-floating-ui-"+e}function At(e){const t=w.useRef(e);return _e(()=>{t.current=e}),t}const Tb=fr("safe-polygon");function ud(e,t,n){return n&&!Vo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Sb(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:d=0,move:f=!0}=t,h=dr(),p=ur(),m=At(c),b=At(l),v=At(n),y=k.useRef(),g=k.useRef(-1),S=k.useRef(),T=k.useRef(-1),E=k.useRef(!0),C=k.useRef(!1),I=k.useRef(()=>{}),A=k.useCallback(()=>{var N;const L=(N=o.current.openEvent)==null?void 0:N.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"},[o]);k.useEffect(()=>{if(!a)return;function N(L){let{open:V}=L;V||(clearTimeout(g.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",N),()=>{s.off("openchange",N)}},[a,s]),k.useEffect(()=>{if(!a||!m.current||!n)return;function N(V){A()&&r(!1,V,"hover")}const L=St(i.floating).documentElement;return L.addEventListener("mouseleave",N),()=>{L.removeEventListener("mouseleave",N)}},[i.floating,n,r,a,m,A]);const O=k.useCallback(function(N,L,V){L===void 0&&(L=!0),V===void 0&&(V="hover");const B=ud(b.current,"close",y.current);B&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,N,V),B)):L&&(clearTimeout(g.current),r(!1,N,V))},[b,r]),M=bt(()=>{I.current(),S.current=void 0}),_=bt(()=>{if(C.current){const N=St(i.floating).body;N.style.pointerEvents="",N.removeAttribute(Tb),C.current=!1}});k.useEffect(()=>{if(!a)return;function N(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function L(D){if(clearTimeout(g.current),E.current=!1,u&&!Vo(y.current)||d>0&&!ud(b.current,"open"))return;const j=ud(b.current,"open",y.current);j?g.current=window.setTimeout(()=>{v.current||r(!0,D,"hover")},j):r(!0,D,"hover")}function V(D){if(N())return;I.current();const j=St(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){_(),M(),O(D,!0,"safe-polygon")}});const J=S.current;j.addEventListener("mousemove",J),I.current=()=>{j.removeEventListener("mousemove",J)};return}(y.current==="touch"?!lt(i.floating,D.relatedTarget):!0)&&O(D)}function B(D){N()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){_(),M(),O(D)}})(D))}if(Ue(i.domReference)){var W;const D=i.domReference;return n&&D.addEventListener("mouseleave",B),(W=i.floating)==null||W.addEventListener("mouseleave",B),f&&D.addEventListener("mousemove",L,{once:!0}),D.addEventListener("mouseenter",L),D.addEventListener("mouseleave",V),()=>{var j;n&&D.removeEventListener("mouseleave",B),(j=i.floating)==null||j.removeEventListener("mouseleave",B),f&&D.removeEventListener("mousemove",L),D.removeEventListener("mouseenter",L),D.removeEventListener("mouseleave",V)}}},[i,a,e,u,d,f,O,M,_,r,n,v,h,b,m,o]),_e(()=>{var N;if(a&&n&&(N=m.current)!=null&&N.__options.blockPointerEvents&&A()){const V=St(i.floating).body;V.setAttribute(Tb,""),V.style.pointerEvents="none",C.current=!0;const B=i.floating;if(Ue(i.domReference)&&B){var L;const W=i.domReference,D=h==null||(L=h.nodesRef.current.find(j=>j.id===p))==null||(L=L.context)==null?void 0:L.elements.floating;return D&&(D.style.pointerEvents=""),W.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{W.style.pointerEvents="",B.style.pointerEvents=""}}}},[a,n,p,i,h,m,A]),_e(()=>{n||(y.current=void 0,M(),_())},[n,M,_]),k.useEffect(()=>()=>{M(),clearTimeout(g.current),clearTimeout(T.current),_()},[a,i.domReference,M,_]);const F=k.useMemo(()=>{function N(L){y.current=L.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(L){const{nativeEvent:V}=L;function B(){!E.current&&!v.current&&r(!0,V,"hover")}u&&!Vo(y.current)||n||d===0||(clearTimeout(T.current),y.current==="touch"?B():T.current=window.setTimeout(B,d))}}},[u,r,n,v,d]),P=k.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(N){O(N.nativeEvent,!1)}}),[O]);return k.useMemo(()=>a?{reference:F,floating:P}:{},[a,F,P])}function BM(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 Vr(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 jM(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Vr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Yo=new WeakMap,Ra=new WeakSet,Ba={},dd=0;const zM=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Eb=e=>e&&(e.host||Eb(e.parentNode)),HM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Eb(n);return e.contains(r)?r:null}).filter(n=>n!=null);function WM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=HM(t,e),a=new Set,l=new Set(i),c=[];Ba[o]||(Ba[o]=new WeakMap);const u=Ba[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(or(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,b=m!==null&&m!=="false",v=(Yo.get(p)||0)+1,y=(u.get(p)||0)+1;Yo.set(p,v),u.set(p,y),c.push(p),v===1&&b&&Ra.add(p),y===1&&p.setAttribute(o,""),!b&&s&&p.setAttribute(s,"true")}})}return dd++,()=>{c.forEach(h=>{const p=(Yo.get(h)||0)-1,m=(u.get(h)||0)-1;Yo.set(h,p),u.set(h,m),p||(!Ra.has(h)&&s&&h.removeAttribute(s),Ra.delete(h)),m||h.removeAttribute(o)}),dd--,dd||(Yo=new WeakMap,Yo=new WeakMap,Ra=new WeakSet,Ba={})}}function Cb(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=St(e[0]).body;return WM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const qo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Pb(e,t){const n=Qs(e,qo());t==="prev"&&n.reverse();const r=n.indexOf(un(St(e)));return n.slice(r+1)[0]}function kb(){return Pb(document.body,"next")}function Ib(){return Pb(document.body,"prev")}function oi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!lt(n,r)}function UM(e){Qs(e,qo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function GM(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 YM(e,t,n){const r=e.indexOf(t);function o(i){const a=fr("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||lt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const fd={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 qM;function Ab(e){e.key==="Tab"&&(e.target,clearTimeout(qM))}const ja=k.forwardRef(function(t,n){const[r,o]=k.useState();_e(()=>(Yu()&&o("button"),document.addEventListener("keydown",Ab),()=>{document.removeEventListener("keydown",Ab)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[fr("focus-guard")]:"",style:fd};return k.createElement("span",Uo({},t,s))}),Ob=k.createContext(null),_b=fr("portal");function KM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Go(),o=Db(),[s,i]=k.useState(null),a=k.useRef(null);return _e(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),_e(()=>{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(_b,""),l.appendChild(c),a.current=c,i(c)},[t,r]),_e(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ue(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(_b,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function $r(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=KM({id:n,root:r}),[i,a]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return k.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&oi(p)&&(p.type==="focusin"?GM:UM)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),k.createElement(Ob.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&k.createElement(ja,{"data-type":"outside",ref:l,onFocus:h=>{if(oi(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=Ib()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&k.createElement("span",{"aria-owns":s.id,style:fd}),s&&ms.createPortal(t,s),f&&s&&k.createElement(ja,{"data-type":"outside",ref:c,onFocus:h=>{if(oi(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=kb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Db=()=>k.useContext(Ob),Mb=20;let Rr=[];function hd(e){Rr=Rr.filter(n=>n.isConnected);let t=e;if(!(!t||or(t)==="body")){if(!ZD(t,qo())){const n=Qs(t,qo())[0];n&&(t=n)}Rr.push(t),Rr.length>Mb&&(Rr=Rr.slice(-Mb))}}function Nb(){return Rr.slice().reverse().find(e=>e.isConnected)}const ZM=k.forwardRef(function(t,n){return k.createElement("button",Uo({},t,{type:"button",ref:n,tabIndex:-1,style:fd}))});function Ko(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:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:b,dataRef:v,floatingId:y,elements:{domReference:g,floating:S}}=t,T=typeof i=="number"&&i<0,E=Hv(g)&&T,C=zM()?s:!0,I=At(o),A=At(i),O=At(a),M=dr(),_=Db(),F=k.useRef(null),P=k.useRef(null),N=k.useRef(!1),L=k.useRef(!1),V=k.useRef(-1),B=_!=null,W=S==null?void 0:S.firstElementChild,D=(W==null?void 0:W.id)===y?W:S,j=bt(function(G){return G===void 0&&(G=D),G?Qs(G,qo()):[]}),K=bt(G=>{const $=j(G);return I.current.map(z=>g&&z==="reference"?g:D&&z==="floating"?D:$).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function G(z){if(z.key==="Tab"){lt(D,un(St(D)))&&j().length===0&&!E&&It(z);const H=K(),U=Cn(z);I.current[0]==="reference"&&U===g&&(It(z),z.shiftKey?cr(H[H.length-1]):cr(H[1])),I.current[1]==="floating"&&U===D&&z.shiftKey&&(It(z),cr(H[0]))}}const $=St(D);return $.addEventListener("keydown",G),()=>{$.removeEventListener("keydown",G)}},[r,g,D,c,I,E,j,K]),k.useEffect(()=>{if(r||!S)return;function G($){const z=Cn($),U=j().indexOf(z);U!==-1&&(V.current=U)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,j]),k.useEffect(()=>{if(r||!d)return;function G(){L.current=!0,setTimeout(()=>{L.current=!1})}function $(z){const H=z.relatedTarget;queueMicrotask(()=>{const U=!(lt(g,H)||lt(S,H)||lt(H,S)||lt(_==null?void 0:_.portalNode,H)||H!=null&&H.hasAttribute(fr("focus-guard"))||M&&(Vr(M.nodesRef.current,p).find(Y=>{var ce,R;return lt((ce=Y.context)==null?void 0:ce.elements.floating,H)||lt((R=Y.context)==null?void 0:R.elements.domReference,H)})||BM(M.nodesRef.current,p).find(Y=>{var ce,R;return((ce=Y.context)==null?void 0:ce.elements.floating)===H||((R=Y.context)==null?void 0:R.elements.domReference)===H})));if(l&&U&&un(St(D))===St(D).body){mt(D)&&(D==null||D.focus());const Y=V.current,ce=j(),R=ce[Y]||ce[ce.length-1]||D;mt(R)&&R.focus()}(E||!c)&&H&&U&&!L.current&&H!==Nb()&&(N.current=!0,m(!1,z))})}if(S&&mt(g))return g.addEventListener("focusout",$),g.addEventListener("pointerdown",G),S.addEventListener("focusout",$),()=>{g.removeEventListener("focusout",$),g.removeEventListener("pointerdown",G),S.removeEventListener("focusout",$)}},[r,g,S,D,c,p,M,_,m,d,l,j,E]),k.useEffect(()=>{var G;if(r)return;const $=Array.from((_==null||(G=_.portalNode)==null?void 0:G.querySelectorAll("["+fr("portal")+"]"))||[]);if(S){const z=[S,...$,F.current,P.current,I.current.includes("reference")||E?g:null].filter(U=>U!=null),H=c||E?Cb(z,C,!C):Cb(z);return()=>{H()}}},[r,g,S,c,I,_,E,C]),_e(()=>{if(r||!mt(D))return;const G=St(D),$=un(G);queueMicrotask(()=>{const z=K(D),H=A.current,U=(typeof H=="number"?z[H]:H.current)||D,Y=lt(D,$);!T&&!Y&&f&&cr(U,{preventScroll:U===D})})},[r,f,D,T,K,A]),_e(()=>{if(r||!D)return;let G=!1;const $=St(D),z=un($);let U=v.current.openEvent;const Y=h.domReference.current;hd(z);function ce(R){let{open:pe,reason:xe,event:te,nested:me}=R;pe&&(U=te),xe==="escape-key"&&h.domReference.current&&hd(h.domReference.current),xe==="hover"&&te.type==="mouseleave"&&(N.current=!0),xe==="outside-press"&&(me?(N.current=!1,G=!0):N.current=!(jv(te)||Gu(te)))}return b.on("openchange",ce),()=>{b.off("openchange",ce);const R=un($),pe=lt(S,R)||M&&Vr(M.nodesRef.current,p).some(re=>{var fe;return lt((fe=re.context)==null?void 0:fe.elements.floating,R)});(pe||U&&["click","mousedown"].includes(U.type))&&h.domReference.current&&hd(h.domReference.current);const te=Y||z,me=Qs(St(te).body,qo());queueMicrotask(()=>{let re=Nb();!re&&mt(te)&&S&&(re=YM(me,te,S)),O.current&&!N.current&&mt(re)&&(!(re!==R&&R!==$.body)||pe)&&re.focus({preventScroll:G})})}},[r,S,D,O,v,h,b,M,p]),_e(()=>{if(!r&&_)return _.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{_.setFocusManagerState(null)}},[r,_,c,f,m,h,d]),_e(()=>{if(r||!D||typeof MutationObserver!="function"||T)return;const G=()=>{const z=D.getAttribute("tabindex"),H=j(),U=un(St(S)),Y=H.indexOf(U);Y!==-1&&(V.current=Y),I.current.includes("floating")||U!==h.domReference.current&&H.length===0?z!=="0"&&D.setAttribute("tabindex","0"):z!=="-1"&&D.setAttribute("tabindex","-1")};G();const $=new MutationObserver(G);return $.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{$.disconnect()}},[r,S,D,h,I,j,T]);function J(G){return r||!u||!c?null:k.createElement(ZM,{ref:G==="start"?F:P,onClick:$=>m(!1,$.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&C&&(c?!E:!0)&&(B||c);return k.createElement(k.Fragment,null,X&&k.createElement(ja,{"data-type":"inside",ref:_==null?void 0:_.beforeInsideRef,onFocus:G=>{if(c){const z=K();cr(o[0]==="reference"?z[0]:z[z.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(N.current=!1,oi(G,_.portalNode)){const z=kb()||g;z==null||z.focus()}else{var $;($=_.beforeOutsideRef.current)==null||$.focus()}}}),!E&&J("start"),n,J("end"),X&&k.createElement(ja,{"data-type":"inside",ref:_==null?void 0:_.afterInsideRef,onFocus:G=>{if(c)cr(K()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(d&&(N.current=!0),oi(G,_.portalNode)){const z=Ib()||g;z==null||z.focus()}else{var $;($=_.afterOutsideRef.current)==null||$.focus()}}}))}const pd=new Set,XM=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Go();return _e(()=>{if(!r)return;pd.add(s);const i=/iP(hone|ad|od)|iOS/.test(Uu()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,b=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(b))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{pd.delete(s),pd.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),k.createElement("div",Uo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Fb(e){return mt(e.target)&&e.target.tagName==="BUTTON"}function Lb(e){return Zu(e)}function si(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,d=k.useRef(),f=k.useRef(!1),h=k.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Vo(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=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Vo(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){d.current=void 0,!(p.defaultPrevented||!u||Fb(p))&&(p.key===" "&&!Lb(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Fb(p)||Lb(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return k.useMemo(()=>i?{reference:h}:{},[i,h])}function QM(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,d=i.height,f=i.x,h=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function Vb(e){return e!=null&&e.clientX!=null}function JM(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,d=k.useRef(!1),f=k.useRef(null),[h,p]=k.useState(),[m,b]=k.useState([]),v=bt((E,C)=>{d.current||r.current.openEvent&&!Vb(r.current.openEvent)||i.setPositionReference(QM(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),y=bt(E=>{c!=null||u!=null||(n?f.current||b([]):v(E.clientX,E.clientY))}),g=Vo(h)?o:n,S=k.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Rt(o);function C(I){const A=Cn(I);lt(o,A)?(E.removeEventListener("mousemove",C),f.current=null):v(I.clientX,I.clientY)}if(!r.current.openEvent||Vb(r.current.openEvent)){E.addEventListener("mousemove",C);const I=()=>{E.removeEventListener("mousemove",C),f.current=null};return f.current=I,I}i.setPositionReference(s)},[g,a,c,u,o,r,i,s,v]);k.useEffect(()=>S(),[S,m]),k.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),k.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),_e(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const T=k.useMemo(()=>{function E(C){let{pointerType:I}=C;p(I)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return k.useMemo(()=>a?{reference:T}:{},[a,T])}const eN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},tN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$b=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 Br(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:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=dr(),b=bt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?b:l,y=k.useRef(!1),g=k.useRef(!1),{escapeKey:S,outsidePress:T}=$b(h),{escapeKey:E,outsidePress:C}=$b(p),I=bt(P=>{var N;if(!n||!i||!a||P.key!=="Escape")return;const L=(N=s.current.floatingContext)==null?void 0:N.nodeId,V=m?Vr(m.nodesRef.current,L):[];if(!S&&(P.stopPropagation(),V.length>0)){let B=!0;if(V.forEach(W=>{var D;if((D=W.context)!=null&&D.open&&!W.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,TD(P)?P.nativeEvent:P,"escape-key")}),A=bt(P=>{var N;const L=()=>{var V;I(P),(V=Cn(P))==null||V.removeEventListener("keydown",L)};(N=Cn(P))==null||N.addEventListener("keydown",L)}),O=bt(P=>{var N;const L=y.current;y.current=!1;const V=g.current;if(g.current=!1,c==="click"&&V||L||typeof v=="function"&&!v(P))return;const B=Cn(P),W="["+fr("inert")+"]",D=St(o.floating).querySelectorAll(W);let j=Ue(B)?B:null;for(;j&&!sr(j);){const G=zn(j);if(sr(G)||!Ue(G))break;j=G}if(D.length&&Ue(B)&&!SD(B)&&!lt(B,o.floating)&&Array.from(D).every(G=>!lt(j,G)))return;if(mt(B)&&F){const G=B.clientWidth>0&&B.scrollWidth>B.clientWidth,$=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let z=$&&P.offsetX>B.clientWidth;if($&&Kt(B).direction==="rtl"&&(z=P.offsetX<=B.offsetWidth-B.clientWidth),z||G&&P.offsetY>B.clientHeight)return}const K=(N=s.current.floatingContext)==null?void 0:N.nodeId,J=m&&Vr(m.nodesRef.current,K).some(G=>{var $;return Ku(P,($=G.context)==null?void 0:$.elements.floating)});if(Ku(P,o.floating)||Ku(P,o.domReference)||J)return;const X=m?Vr(m.nodesRef.current,K):[];if(X.length>0){let G=!0;if(X.forEach($=>{var z;if((z=$.context)!=null&&z.open&&!$.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),M=bt(P=>{var N;const L=()=>{var V;O(P),(V=Cn(P))==null||V.removeEventListener(c,L)};(N=Cn(P))==null||N.addEventListener(c,L)});k.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function P(V){r(!1,V,"ancestor-scroll")}const N=St(o.floating);a&&N.addEventListener("keydown",E?A:I,E),v&&N.addEventListener(c,C?M:O,C);let L=[];return f&&(Ue(o.domReference)&&(L=ir(o.domReference)),Ue(o.floating)&&(L=L.concat(ir(o.floating))),!Ue(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(ir(o.reference.contextElement)))),L=L.filter(V=>{var B;return V!==((B=N.defaultView)==null?void 0:B.visualViewport)}),L.forEach(V=>{V.addEventListener("scroll",P,{passive:!0})}),()=>{a&&N.removeEventListener("keydown",E?A:I,E),v&&N.removeEventListener(c,C?M:O,C),L.forEach(V=>{V.removeEventListener("scroll",P)})}},[s,o,a,v,c,n,r,f,i,S,T,I,E,A,O,C,M]),k.useEffect(()=>{y.current=!1},[v,c]);const _=k.useMemo(()=>({onKeyDown:I,[eN[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[I,r,u,d]),F=k.useMemo(()=>({onKeyDown:I,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[tN[c]]:()=>{y.current=!0}}),[I,c]);return k.useMemo(()=>i?{reference:_,floating:F}:{},[i,_,F])}function nN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Go(),s=k.useRef({}),[i]=k.useState(()=>bb()),a=ur()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Ue(h)&&LM("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]=k.useState(r.reference),u=bt((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=k.useMemo(()=>({setPositionReference:c}),[]),f=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function jr(e){e===void 0&&(e={});const{nodeId:t}=e,n=nN({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=k.useState(null),[a,l]=k.useState(null),u=(o==null?void 0:o.reference)||s,d=k.useRef(null),f=dr();_e(()=>{u&&(d.current=u)},[u]);const h=EM({...e,elements:{...o,...a&&{reference:a}}}),p=k.useCallback(g=>{const S=Ue(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),h.refs.setReference(S)},[h.refs]),m=k.useCallback(g=>{(Ue(g)||g===null)&&(d.current=g,i(g)),(Ue(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Ue(g))&&h.refs.setReference(g)},[h.refs]),b=k.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=k.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),y=k.useMemo(()=>({...h,...r,refs:b,elements:v,nodeId:t}),[h,b,v,t,r]);return _e(()=>{r.dataRef.current.floatingContext=y;const g=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);g&&(g.context=y)}),k.useMemo(()=>({...h,context:y,refs:b,elements:v}),[h,b,v,y])}function rN(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=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!a)return;const h=Rt(i.domReference);function p(){!n&&mt(i.domReference)&&i.domReference===un(St(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),k.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=k.useMemo(()=>({onPointerDown(h){Gu(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Cn(h.nativeEvent);if(l&&Ue(p))try{if(Yu()&&zv())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Zu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,b=Ue(p)&&p.hasAttribute(fr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=un(i.domReference?i.domReference.ownerDocument:document);!p&&y===i.domReference||lt((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,y)||lt(i.domReference,y)||b||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}const Rb="active",Bb="selected";function md(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Rb]:i,[Bb]: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&&[Rb,Bb].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(b=>b(...p)).find(b=>b!==void 0)}}}else i[c]=u}),i),{})}}function zr(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=k.useCallback(a=>md(a,e,"reference"),t),s=k.useCallback(a=>md(a,e,"floating"),n),i=k.useCallback(a=>md(a,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let jb=!1;function za(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function zb(e,t){return za(t,e===ld||e===ti,e===Ho||e===Wo)}function gd(e,t,n){return za(t,e===ti,n?e===Ho:e===Wo)||e==="Enter"||e===" "||e===""}function oN(e,t,n){return za(t,n?e===Ho:e===Wo,e===ti)}function Hb(e,t,n){return za(t,n?e===Wo:e===Ho,e===ld)}function yd(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:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:C,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||$a("`useListNavigation` looping must be enabled to allow escaping."),p||$a("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&$a("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const A=ur(),O=dr(),M=bt(a),_=k.useRef(m),F=k.useRef(c??-1),P=k.useRef(null),N=k.useRef(!0),L=k.useRef(M),V=k.useRef(!!o.floating),B=k.useRef(n),W=k.useRef(!1),D=k.useRef(!1),j=At(y),K=At(n),J=At(T),X=At(o.floating),G=At(c),[$,z]=k.useState(),[H,U]=k.useState(),Y=bt(function(re,fe,ue){ue===void 0&&(ue=!1);function Pe(Me){p?(z(Me.id),O==null||O.events.emit("virtualfocus",Me),E&&(E.current=Me)):cr(Me,{preventScroll:!0,sync:zv()&&Yu()?jb||W.current:!1})}const ot=re.current[fe.current];ot&&Pe(ot),requestAnimationFrame(()=>{const Me=re.current[fe.current]||ot;if(!Me)return;ot||Pe(Me);const yt=J.current;yt&&R&&(ue||!N.current)&&(Me.scrollIntoView==null||Me.scrollIntoView(typeof yt=="boolean"?{block:"nearest",inline:"nearest"}:yt))})});_e(()=>{document.createElement("div").focus({get preventScroll(){return jb=!0,!1}})},[]),_e(()=>{l&&(n&&o.floating?_.current&&c!=null&&(D.current=!0,F.current=c,M(c)):V.current&&(F.current=-1,L.current(null)))},[l,n,o.floating,c,M]),_e(()=>{if(l&&n&&o.floating)if(i==null){if(W.current=!1,G.current!=null)return;if(V.current&&(F.current=-1,Y(s,F)),(!B.current||!V.current)&&_.current&&(P.current!=null||_.current===!0&&P.current==null)){let re=0;const fe=()=>{s.current[0]==null?(re<2&&(re?requestAnimationFrame:queueMicrotask)(fe),re++):(F.current=P.current==null||gd(P.current,g,h)||f?cd(s,j.current):fb(s,j.current),P.current=null,M(F.current))};fe()}}else ni(s,i)||(F.current=i,Y(s,F,D.current),D.current=!1)},[l,n,o.floating,i,G,f,s,g,h,M,Y,j]),_e(()=>{var re;if(!l||o.floating||!O||p||!V.current)return;const fe=O.nodesRef.current,ue=(re=fe.find(Me=>Me.id===A))==null||(re=re.context)==null?void 0:re.elements.floating,Pe=un(St(o.floating)),ot=fe.some(Me=>Me.context&<(Me.context.elements.floating,Pe));ue&&!ot&&N.current&&ue.focus({preventScroll:!0})},[l,o.floating,O,A,p]),_e(()=>{if(!l||!O||!p||A)return;function re(fe){U(fe.id),E&&(E.current=fe)}return O.events.on("virtualfocus",re),()=>{O.events.off("virtualfocus",re)}},[l,O,p,A,E]),_e(()=>{L.current=M,V.current=!!o.floating}),_e(()=>{n||(P.current=null)},[n]),_e(()=>{B.current=n},[n]);const ce=i!=null,R=k.useMemo(()=>{function re(ue){if(!n)return;const Pe=s.current.indexOf(ue);Pe!==-1&&M(Pe)}return{onFocus(ue){let{currentTarget:Pe}=ue;re(Pe)},onClick:ue=>{let{currentTarget:Pe}=ue;return Pe.focus({preventScroll:!0})},...b&&{onMouseMove(ue){let{currentTarget:Pe}=ue;re(Pe)},onPointerLeave(ue){let{pointerType:Pe}=ue;!N.current||Pe==="touch"||(F.current=-1,Y(s,F),M(null),p||cr(X.current,{preventScroll:!0}))}}}},[n,X,Y,b,s,M,p]),pe=bt(re=>{if(N.current=!1,W.current=!0,!K.current&&re.currentTarget===X.current)return;if(f&&Hb(re.key,g,h)){It(re),r(!1,re.nativeEvent,"list-navigation"),mt(o.domReference)&&!p&&o.domReference.focus();return}const fe=F.current,ue=cd(s,y),Pe=fb(s,y);if(re.key==="Home"&&(It(re),F.current=ue,M(F.current)),re.key==="End"&&(It(re),F.current=Pe,M(F.current)),S>1){const ot=C||Array.from({length:s.current.length},()=>({width:1,height:1})),Me=IM(ot,S,I),yt=Me.findIndex(le=>le!=null&&!Va(s.current,le,y)),ne=Me.reduce((le,Ne,Je)=>Ne!=null&&!Va(s.current,Ne,y)?Je:le,-1);if(F.current=Me[kM({current:Me.map(le=>le!=null?s.current[le]:null)},{event:re,orientation:g,loop:d,cols:S,disabledIndices:OM([...y||s.current.map((le,Ne)=>Va(s.current,Ne)?Ne:void 0),void 0],Me),minIndex:yt,maxIndex:ne,prevIndex:AM(F.current>Pe?ue:F.current,ot,Me,S,re.key===ti?"bl":re.key===Wo?"tr":"tl"),stopEvent:!0})],M(F.current),g==="both")return}if(zb(re.key,g)){if(It(re),n&&!p&&un(re.currentTarget.ownerDocument)===re.currentTarget){F.current=gd(re.key,g,h)?ue:Pe,M(F.current);return}gd(re.key,g,h)?d?F.current=fe>=Pe?u&&fe!==s.current.length?-1:ue:Nt(s,{startingIndex:fe,disabledIndices:y}):F.current=Math.min(Pe,Nt(s,{startingIndex:fe,disabledIndices:y})):d?F.current=fe<=ue?u&&fe!==-1?s.current.length:Pe:Nt(s,{startingIndex:fe,decrement:!0,disabledIndices:y}):F.current=Math.max(ue,Nt(s,{startingIndex:fe,decrement:!0,disabledIndices:y})),ni(s,F.current)?M(null):M(F.current)}}),xe=k.useMemo(()=>p&&n&&ce&&{"aria-activedescendant":H||$},[p,n,ce,H,$]),te=k.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Hv(o.domReference)&&xe,onKeyDown:pe,onPointerMove(){N.current=!0}}),[xe,pe,o.domReference,g]),me=k.useMemo(()=>{function re(ue){m==="auto"&&jv(ue.nativeEvent)&&(_.current=!0)}function fe(ue){_.current=m,m==="auto"&&Gu(ue.nativeEvent)&&(_.current=!0)}return{...xe,onKeyDown(ue){N.current=!1;const Pe=ue.key.indexOf("Arrow")===0,ot=oN(ue.key,g,h),Me=Hb(ue.key,g,h),yt=zb(ue.key,g),ne=(f?ot:yt)||ue.key==="Enter"||ue.key.trim()==="";if(p&&n){const Ot=O==null?void 0:O.nodesRef.current.find(zt=>zt.parentId==null),Vt=O&&Ot?jM(O.nodesRef.current,Ot.id):null;if(Pe&&Vt&&E){const zt=new KeyboardEvent("keydown",{key:ue.key,bubbles:!0});if(ot||Me){var le,Ne;const no=((le=Vt.context)==null?void 0:le.elements.domReference)===ue.currentTarget,hs=Me&&!no?(Ne=Vt.context)==null?void 0:Ne.elements.domReference:ot?s.current.find(ps=>(ps==null?void 0:ps.id)===$):null;hs&&(It(ue),hs.dispatchEvent(zt),U(void 0))}if(yt&&Vt.context&&Vt.context.open&&Vt.parentId&&ue.currentTarget!==Vt.context.elements.domReference){var Je;It(ue),(Je=Vt.context.elements.domReference)==null||Je.dispatchEvent(zt);return}}return pe(ue)}if(!(!n&&!v&&Pe)){if(ne&&(P.current=f&&yt?null:ue.key),f){ot&&(It(ue),n?(F.current=cd(s,j.current),M(F.current)):r(!0,ue.nativeEvent,"list-navigation"));return}yt&&(c!=null&&(F.current=c),It(ue),!n&&v?r(!0,ue.nativeEvent,"list-navigation"):pe(ue),n&&M(F.current))}},onFocus(){n&&!p&&M(null)},onPointerDown:fe,onMouseDown:re,onClick:re}},[$,xe,pe,j,m,s,f,M,r,n,v,g,h,c,O,p,E]);return k.useMemo(()=>l?{reference:me,floating:te,item:R}:{},[l,me,te,R])}const sN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Hr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=sN.get(i))!=null?n:i,l=Go(),u=ur()!=null,d=k.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]),f=k.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=k.useCallback(p=>{let{active:m,selected:b}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&b};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return k.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const Wb=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Zo(e,t){return typeof e=="function"?e(t):e}function iN(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function aN(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]=k.useState("unmounted"),c=iN(n,i);return!c&&a==="close"&&l("unmounted"),_e(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Ub(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=k.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=k.useState(()=>({...Zo(s,c),...Zo(n,c)})),{isMounted:m,status:b}=aN(e,{duration:i}),v=At(n),y=At(r),g=At(o),S=At(s);return _e(()=>{const T=Zo(v.current,c),E=Zo(g.current,c),C=Zo(S.current,c),I=Zo(y.current,c)||Object.keys(T).reduce((A,O)=>(A[O]="",A),{});if(b==="initial"&&p(A=>({transitionProperty:A.transitionProperty,...C,...T})),b==="open"&&p({transitionProperty:Object.keys(I).map(Wb).join(","),transitionDuration:d+"ms",...C,...I}),b==="close"){const A=E||T;p({transitionProperty:Object.keys(A).map(Wb).join(","),transitionDuration:f+"ms",...C,...A})}},[f,g,v,y,S,d,b,c]),{isMounted:m,styles:h}}function lN(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:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=k.useRef(),m=k.useRef(""),b=k.useRef((n=h??i)!=null?n:-1),v=k.useRef(null),y=bt(a),g=bt(l),S=At(u),T=At(f);_e(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),_e(()=>{if(r&&m.current===""){var O;b.current=(O=h??i)!=null?O:-1}},[r,h,i]);const E=bt(O=>{O?o.current.typing||(o.current.typing=O,g(O)):o.current.typing&&(o.current.typing=O,g(O))}),C=bt(O=>{function M(L,V,B){const W=S.current?S.current(V,B):V.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(B.toLocaleLowerCase()))===0);return W?L.indexOf(W):-1}const _=s.current;if(m.current.length>0&&m.current[0]!==" "&&(M(_,_,m.current)===-1?E(!1):O.key===" "&&It(O)),_==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(It(O),E(!0)),_.every(L=>{var V,B;return L?((V=L[0])==null?void 0:V.toLocaleLowerCase())!==((B=L[1])==null?void 0:B.toLocaleLowerCase()):!0})&&m.current===O.key&&(m.current="",b.current=v.current),m.current+=O.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",b.current=v.current,E(!1)},d);const P=b.current,N=M(_,[..._.slice((P||0)+1),..._.slice(0,(P||0)+1)],m.current);N!==-1?(y(N),v.current=N):O.key!==" "&&(m.current="",E(!1))}),I=k.useMemo(()=>({onKeyDown:C}),[C]),A=k.useMemo(()=>({onKeyDown:C,onKeyUp(O){O.key===" "&&E(!1)}}),[C,E]);return k.useMemo(()=>c?{reference:I,floating:A}:{},[c,I,A])}function Gb(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,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function cN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Yb(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(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,b=f-a,y=Math.sqrt(m*m+b*b)/p;return i=d,a=f,l=h,y}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:b,nodeId:v,tree:y}=d;return function(S){function T(){clearTimeout(o),b()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:C}=S,I=[E,C],A=Cn(S),O=S.type==="mouseleave",M=lt(m.floating,A),_=lt(m.domReference,A),F=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),N=p.split("-")[0],L=f>P.right-P.width/2,V=h>P.bottom-P.height/2,B=cN(I,F),W=P.width>F.width,D=P.height>F.height,j=(W?F:P).left,K=(W?F:P).right,J=(D?F:P).top,X=(D?F:P).bottom;if(M&&(s=!0,!O))return;if(_&&(s=!1),_&&!O){s=!0;return}if(O&&Ue(S.relatedTarget)&<(m.floating,S.relatedTarget)||y&&Vr(y.nodesRef.current,v).some(z=>{let{context:H}=z;return H==null?void 0:H.open}))return;if(N==="top"&&h>=F.bottom-1||N==="bottom"&&h<=F.top+1||N==="left"&&f>=F.right-1||N==="right"&&f<=F.left+1)return T();let G=[];switch(N){case"top":G=[[j,F.top+1],[j,P.bottom-1],[K,P.bottom-1],[K,F.top+1]];break;case"bottom":G=[[j,P.top+1],[j,F.bottom-1],[K,F.bottom-1],[K,P.top+1]];break;case"left":G=[[P.right-1,X],[P.right-1,J],[F.left+1,J],[F.left+1,X]];break;case"right":G=[[F.right-1,X],[F.right-1,J],[P.left+1,J],[P.left+1,X]];break}function $(z){let[H,U]=z;switch(N){case"top":{const Y=[W?H+t/2:L?H+t*4:H-t*4,U+t+1],ce=[W?H-t/2:L?H+t*4:H-t*4,U+t+1],R=[[P.left,L||W?P.bottom-t:P.top],[P.right,L?W?P.bottom-t:P.top:P.bottom-t]];return[Y,ce,...R]}case"bottom":{const Y=[W?H+t/2:L?H+t*4:H-t*4,U-t],ce=[W?H-t/2:L?H+t*4:H-t*4,U-t],R=[[P.left,L||W?P.top+t:P.bottom],[P.right,L?W?P.top+t:P.bottom:P.top+t]];return[Y,ce,...R]}case"left":{const Y=[H+t+1,D?U+t/2:V?U+t*4:U-t*4],ce=[H+t+1,D?U-t/2:V?U+t*4:U-t*4];return[...[[V||D?P.right-t:P.left,P.top],[V?D?P.right-t:P.left:P.right-t,P.bottom]],Y,ce]}case"right":{const Y=[H-t,D?U+t/2:V?U+t*4:U-t*4],ce=[H-t,D?U-t/2:V?U+t*4:U-t*4],R=[[V||D?P.left+t:P.right,P.top],[V?D?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ce,...R]}}}if(!Gb([E,C],G)){if(s&&!B)return T();if(!O&&r){const z=c(S.clientX,S.clientY);if(z!==null&&z<.1)return T()}Gb([E,C],$([f,h]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Xo=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[ei(10),id({fallbackAxisSideDirection:"end"}),sd(),ub({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=jr({open:n,middleware:s,transform:!0,whileElementsMounted:Js,onOpenChange:(p,m)=>{var v;const b=m==null?void 0:m.relatedTarget;b&&b.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=si(l),u=Br(l),d=Hr(l),{getReferenceProps:f,getFloatingProps:h}=zr([c,u,d]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx($r,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(Ko,{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,...h(),children:[x.jsx(vb,{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]})})})]})},uN=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=jr({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=si(a),u=Hr(a),d=Br(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=zr([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(mo,{...h(e),as:dt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(dt.span,{layoutId:o,children:e.trigger})}),x.jsx(Jn,{children:s?x.jsx($r,{root:t,children:x.jsx(Ko,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(dt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},qb=300,dN=500,Kb=(e="")=>$e("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),vd=w.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Zb=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=ur(),c=l!==null,[u,d]=w.useState(!1),[f,h]=w.useState(!1),[p,m]=w.useState(null),b=w.useRef([]),v=w.useRef([]),y=w.useContext(vd),g=dr(),S=VM(),T=mb(),{floatingStyles:E,refs:C,context:I}=jr({nodeId:S,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Js,placement:c?"right":"bottom-start",middleware:[ei({mainAxis:c?0:4,alignmentAxis:c?-4:0}),id(),sd()]}),A=Hr(I,{role:"menu",enabled:!0}),O=Br(I,{bubbles:!0}),M=Sb(I,{enabled:n,delay:{open:qb},handleClose:Yb({blockPointerEvents:!0,buffer:1})}),_=si(I,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),F=yd(I,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:b,scrollItemIntoView:!0,onNavigate:m}),P=lN(I,{activeIndex:p,listRef:v,resetMs:dN,onMatch:u?m:void 0}),{getReferenceProps:N,getFloatingProps:L,getItemProps:V}=zr([M,_,A,O,F,P]);w.useEffect(()=>{if(!g)return;const W=()=>d(!1),D=j=>{j.nodeId!==S&&j.parentId===l&&d(!1)};return g.events.on("click",W),g.events.on("menuopen",D),()=>{g.events.off("click",W),g.events.off("menuopen",D)}},[g,S,l]),w.useEffect(()=>{u&&g&&g.events.emit("menuopen",{parentId:l,nodeId:S})},[g,u,S,l]);const B=r?i.className:$e(Kb(i.className));return x.jsxs($M,{id:S,children:[x.jsx(w.Fragment,{children:i.asChild?x.jsx(Lo,{children:s,ref:ad([C.setReference,T.ref,a]),tabIndex:c?y.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":f?"":void 0,className:B,...N(y.getItemProps({...i,onFocus(W){var D;(D=i.onFocus)==null||D.call(i,W),h(!1),y.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:ad([C.setReference,T.ref,a]),tabIndex:c?y.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":f?"":void 0,className:B,...N(y.getItemProps({...i,onFocus(W){var D;(D=i.onFocus)==null||D.call(i,W),h(!1),y.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(du,{size:14})]})]})}),x.jsx(vd.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:V,setHasFocusInside:h,isOpen:u},children:x.jsx(MM,{elementsRef:b,labelsRef:v,children:u&&x.jsx($r,{preserveTabOrder:!0,children:x.jsx(Ko,{context:I,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...L(),ref:C.setFloating,style:{...i.style,...E},className:$e("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})})})})})]})}),fN=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext(vd),a=mb({label:r?null:typeof e=="string"?e:t}),l=dr(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:ad([a.ref,s]),"data-active":c,"data-open":i.isOpen,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Kb(o.className),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),hN=w.forwardRef((e,t)=>ur()!==null?x.jsx(Zb,{...e,isParent:!1,ref:t}):x.jsx(RM,{children:x.jsx(Zb,{...e,isParent:!0,ref:t})})),pN=(e,t)=>Bi()?t:window.matchMedia(e).matches,mN=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(pN(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},dn="600ms",gN={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:dn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:dn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:dn}},yN={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:dn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:dn}},bd={drawer:e=>e==="left"?gN:yN,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:dn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:dn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:dn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:dn},enter:{opacity:1,scale:[1.05,1],animationDuration:dn},exit:{opacity:0,scale:.97,animationDuration:dn}}},vN=ho("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"}}),bN={top:0,left:0,right:0,bottom:-1},wN=e=>e*.62,xN=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=wN(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(dt.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:bN,whileDrag:{cursor:"grabbing"},className:$e("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})},wd={drawer:"right",sheet:"none",dialog:"none"},TN=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=w.useId(),a=w.useId(),l=mN("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:wd[e]:r?wd[e]:wd.sheet,d=l||r?bd[e]:bd.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=jr({open:s.open,onOpenChange:s.onChange}),b=si(m),v=Hr(m),y=Br(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:g,getFloatingProps:S}=zr([b,v,y]),T=s.trigger,E=Or(void 0),C=()=>s.onChange(!1);return x.jsxs(w.Fragment,{children:[s.trigger?x.jsx(w.Fragment,{children:s.asChild?x.jsx(Lo,{ref:p.setReference,...g({layoutId:s.layoutId}),children:T}):x.jsx(dt.button,{ref:p.setReference,...g(),layoutId:s.layoutId,type:"button",children:T})}):null,x.jsx($r,{children:x.jsx(Jn,{presenceAffectsLayout:!0,children:s.open?x.jsx(XM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"flex items-start justify-center p-10"}`,children:x.jsx(Ko,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(dt.div,{exit:"exit",animate:"enter",initial:"initial",variants:f,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:vN({position:u,type:h}),style:h==="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:C,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(hu,{})})}):null,c&&t?x.jsx(xN,{onChange:s.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})}):null})})]})},SN=e=>x.jsx(dt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Xb=({as:e,title:t,children:n,placement:r,focus:o=!0,hover:s=!0,enabled:i=!0,popover:a=!0,followCursor:l=!1,...c})=>{const[u,d]=w.useState(!1),f=w.useRef(null),h=e||"span",{refs:p,floatingStyles:m,context:b}=jr({open:u,placement:r,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Js,middleware:[sd(),ei(5),id({fallbackAxisSideDirection:"start"}),ub({padding:5,element:f})]}),v=Sb(b,{move:!0,delay:{open:qb},enabled:i?s:!1,handleClose:a?Yb():null}),y=rN(b,{enabled:i?o:!1}),g=si(b,{enabled:i?a:!1}),S=Br(b,{enabled:i}),T=Hr(b,{role:"tooltip",enabled:i}),E=JM(b,{enabled:!!i&&!!l}),{getReferenceProps:C,getFloatingProps:I}=zr([T,S,E,o?y:void 0,s?v:void 0,a?g:void 0]);return x.jsxs(w.Fragment,{children:[x.jsx(h,{ref:p.setReference,...C(c),children:t}),x.jsx($r,{preserveTabOrder:!0,children:u&&x.jsxs(po,{...I(),ref:p.setFloating,style:m,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(vb,{ref:f,context:b,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Ha{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++)Ha.getDescendantProperty(a[l],s,r);else s&&Ha.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Wr{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=Wr.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=Ha.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Wr.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=Wr.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 Wr.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 Qb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:$e("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-disabled:text-disabled group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(Xb,{as:"button",type:"button",title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(oy,{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(ny,{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(dI,{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]}),ii=w.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,componentName:m,placeholder:b,hideLeft:v=!1,required:y,disabled:g},S)=>{const T=d??h,E=kt(),C=e??E.inputOptionalLabel;return x.jsxs("fieldset",{ref:S,form:u,disabled:g,"data-error":!!c,"aria-disabled":g,"data-component":m,"data-interactive":!!s,className:$e("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:T,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(Qb,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:b,children:C||n?x.jsxs(w.Fragment,{children:[y?null:x.jsx("span",{"aria-disabled":g,className:"text-opacity-70 aria-disabled:text-disabled",children:C}),n?x.jsx(w.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,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})]})}),EN=e=>x.jsx(w.Fragment,{children:e.children}),Jb=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??EN,a=r.label??r.value;return r.hidden?null:x.jsx(dt.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(cI,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),CN={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},PN={caseSensitive:!1,sort:!1},kN=[],IN=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const b=w.useRef(null),v=p.value??p.defaultValue??"",y=kt(),[g,S]=w.useState(!1),[T,E]=w.useState(""),[C,I]=w.useState(v),[A,O]=w.useState(()=>{var R;return((R=e.find(pe=>pe.value===v))==null?void 0:R.label)??v}),[M,_]=w.useState(null),F=w.useRef(kN),P=t&&T!==""?[{value:T,label:T,"data-dynamic":"true"},...e]:e,N=new Wr(P,["value","label"],PN).search(T),L=t?void 0:`^(${e.map(R=>`${Cs(R.value)}${R.label?"|"+Cs(R.label):""}`).join("|")})$`;w.useEffect(()=>{if(p.value){const R=e.find(pe=>pe.value===p.value);I((R==null?void 0:R.label)??p.value)}},[p.value]);const{x:V,y:B,strategy:W,refs:D,context:j}=jr({open:g,transform:!0,strategy:"absolute",onOpenChange:S,whileElementsMounted:Js,middleware:[ei(4),cb({elementContext:"reference",padding:10,apply(R){var xe;const pe=(xe=b.current)==null?void 0:xe.getBoundingClientRect().width;Object.assign(R.elements.floating.style,{width:`${pe}px`,maxWidth:`${pe}px`,maxHeight:`${Math.min(250,R.availableHeight)}px`})}})]}),K=Ub(j,CN),{getReferenceProps:J,getFloatingProps:X,getItemProps:G}=zr([Hr(j,{role:"listbox"}),Br(j),yd(j,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:M,selectedIndex:M,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:R=>_(pe=>R??pe)})]);w.useEffect(()=>{const R=D.reference.current;if(R)return Ss(R)},[]);const $=(R,pe)=>{I(R.value);const xe=D.reference.current;if(!xe)return;xe==null||xe.setAttribute("data-value",R.value),xe.value=R.value;const te=new Event("change",{bubbles:!1,cancelable:!0});xe.dispatchEvent(te),p.onChange&&p.onChange(te),O(R.label??""),S(!1),E(""),_(pe)},z=R=>{var xe;const pe=R.target.value;return E(pe),!g&&pe===""?S(!0):(R.target.name=p.name||"",pe?S(!0):(xe=p.onChange)==null?void 0:xe.call(p,R))},H=()=>{S(!0),E("")},U=()=>{var R;E(""),I(""),(R=D.reference.current)==null||R.setAttribute("data-value",""),O(""),Jl(D.reference.current),S(!1)},Y=p.id||p.name,ce=()=>{var R;S(!0),E(""),(R=D.reference.current)==null||R.focus()};return x.jsxs(ii,{...p,left:d,error:f,ref:b,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ce,children:[x.jsx(uu,{size:20}),x.jsx("span",{className:"sr-only",children:y.inputCaretDown})]}),C?x.jsx("button",{type:"button",onClick:U,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",{"data-shadow":"true",...J({...p,onChange:z,onFocus:H,pattern:L,ref:D.setReference,name:`${Y}-shadow`,id:`${Y}-shadow`,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),S(!1);if(R.key==="Enter"){if(M!==null&&N[M])return R.preventDefault(),$(N[M],M);if(N.length===1)return R.preventDefault(),$(N[0],0)}}}),"data-value":C,"data-error":!!f,"data-name":Y,"data-target":Y,required:h,value:g?T:A||C,"aria-autocomplete":"list",autoComplete:"off",className:$e("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",p.className)}),x.jsx("input",{id:Y,name:Y,type:"hidden","data-origin":Y,ref:m,required:h,defaultValue:p.value||C||void 0}),x.jsx($r,{preserveTabOrder:!0,children:g?x.jsx(Ko,{guards:!0,returnFocus:!1,context:j,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...X({ref:D.setFloating,style:{position:W,left:(V??0)+(C?26:16),top:B??0,...K.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:x.jsxs(Jn,{children:[N.map((R,pe)=>{const xe=C===R.value||C===R.label;return x.jsx(Jb,{...G({onClick:()=>$(R,pe),ref:te=>void(F.current[pe]=te),selected:M===pe}),option:R,active:xe,selected:M===pe},`${R.value}-option`)}),N.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:o||y.autocompleteEmpty})}):null]})})}):null})]})}),Wa=0,hr=1,Qo=2,e0=4;function ai(e,t){return n=>e(t(n))}function AN(e,t){return t(e)}function t0(e,t){return n=>e(t,n)}function n0(e,t){return()=>e(t)}function Ua(e,t){return t(e),e}function Xe(...e){return e}function ON(e){e()}function r0(e){return()=>e}function _N(...e){return()=>{e.map(ON)}}function xd(e){return e!==void 0}function Ur(){}function ze(e,t){return e(hr,t)}function Ee(e,t){e(Wa,t)}function Td(e){e(Qo)}function Ft(e){return e(e0)}function he(e,t){return ze(e,t0(t,Wa))}function kn(e,t){const n=e(hr,r=>{n(),t(r)});return n}function Oe(){const e=[];return(t,n)=>{switch(t){case Qo:e.splice(0,e.length);return;case hr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Wa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ee(e){let t=e;const n=Oe();return(r,o)=>{switch(r){case hr:o(t);break;case Wa:t=o;break;case e0:return t}return n(r,o)}}function DN(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case hr:return s?n===s?void 0:(r(),n=s,t=ze(e,s),t):(r(),Ur);case Qo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Xt(e){return Ua(Oe(),t=>he(e,t))}function Lt(e,t){return Ua(ee(t),n=>he(e,n))}function MN(...e){return t=>e.reduceRight(AN,t)}function q(e,...t){const n=MN(...t);return(r,o)=>{switch(r){case hr:return ze(e,n(o));case Qo:Td(e);return}}}function o0(e,t){return e===t}function Qe(e=o0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ve(e){return t=>n=>{e(n)&&t(n)}}function ae(e){return t=>ai(t,e)}function In(e){return t=>()=>t(e)}function An(e,t){return n=>r=>n(t=e(t,r))}function Jo(e){return t=>n=>{e>0?e--:t(n)}}function pr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function s0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ce(...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);ze(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 i0(...e){return function(t,n){switch(t){case hr:return _N(...e.map(r=>ze(r,n)));case Qo:return;default:throw new Error(`unrecognized action ${t}`)}}}function we(e,t=o0){return q(e,Qe(t))}function Et(...e){const t=Oe(),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);ze(s,l=>{n[i]=l,r=r|a,r===o&&Ee(t,n)})}),function(s,i){switch(s){case hr:return r===o&&i(n),ze(t,i);case Qo:return Td(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ve(e,t=[],{singleton:n}={singleton:!0}){return{id:NN(),constructor:e,dependencies:t,singleton:n}}const NN=()=>Symbol();function FN(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 LN(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 Ga=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Sd(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,y){v.propsReady&&Ee(v.propsReady,!1);for(const g of r){const S=v[t.required[g]];Ee(S,y[g])}for(const g of o)if(g in y){const S=v[t.optional[g]];Ee(S,y[g])}v.propsReady&&Ee(v.propsReady,!0)}function c(v){return s.reduce((y,g)=>(y[g]=S=>{const T=v[t.methods[g]];Ee(T,S)},y),{})}function u(v){return i.reduce((y,g)=>(y[g]=DN(v[t.events[g]]),y),{})}const d=w.forwardRef((v,y)=>{const{children:g,...S}=v,[T]=w.useState(()=>Ua(FN(e),C=>l(C,S))),[E]=w.useState(n0(u,T));return Ga(()=>{for(const C of i)C in S&&ze(E[C],S[C]);return()=>{Object.values(E).map(Td)}},[S,E,T]),Ga(()=>{l(T,S)}),w.useImperativeHandle(y,r0(c(T))),w.createElement(a.Provider,{value:T},n?w.createElement(n,LN([...r,...o,...i],S),g):g)}),f=v=>w.useCallback(t0(Ee,w.useContext(a)[v]),[v]),h=v=>{const g=w.useContext(a)[v],S=w.useCallback(T=>ze(g,T),[g]);return w.useSyncExternalStore(S,()=>Ft(g),()=>Ft(g))},p=v=>{const g=w.useContext(a)[v],[S,T]=w.useState(n0(Ft,g));return Ga(()=>ze(g,E=>{E!==S&&T(r0(E))}),[g,S]),S},m=w.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,y)=>{const S=w.useContext(a)[v];Ga(()=>ze(S,y),[y,S])}}}const VN=typeof document<"u"?w.useLayoutEffect:w.useEffect;var Qt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Qt||{});const $N={0:"debug",1:"log",2:"warn",3:"error"},RN=()=>typeof globalThis>"u"?window:globalThis,mr=Ve(()=>{const e=ee(3);return{log:ee((n,r,o=1)=>{var s;const i=(s=RN().VIRTUOSO_LOG_LEVEL)!=null?s:Ft(e);o>=i&&console[$N[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Ed(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 On(e,t=!0){return Ed(e,t).callbackRef}function a0(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=BN(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(jN("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Ed(a,n)}function BN(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},Qt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function jN(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Qt.WARN),t==="normal"?0:parseInt(t??"0",10)}function fn(e,t){return Math.round(e.getBoundingClientRect()[t])}function l0(e,t){return Math.abs(e-t)<1.01}function c0(e,t,n,r=Ur,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,b=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:b})};d.suppressFlushSync?v():Oi.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-b)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,b;f===window?(m=Math.max(fn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,b=document.documentElement.scrollTop):(m=f.scrollHeight,p=fn(f,"height"),b=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),l0(p,m)||d.top===b){e({scrollTop:b,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Bt=Ve(()=>{const e=Oe(),t=Oe(),n=ee(0),r=Oe(),o=ee(0),s=Oe(),i=Oe(),a=ee(0),l=ee(0),c=ee(0),u=ee(0),d=Oe(),f=Oe(),h=ee(!1);return he(q(e,ae(({scrollTop:p})=>p)),t),he(q(e,ae(({scrollHeight:p})=>p)),i),he(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),li={lvl:0};function u0(e,t,n,r=li,o=li){return{k:e,v:t,lvl:n,l:r,r:o}}function Ge(e){return e===li}function es(){return li}function Cd(e,t){if(Ge(e))return li;const{k:n,l:r,r:o}=e;if(t===n){if(Ge(r))return o;if(Ge(o))return r;{const[s,i]=d0(r);return Ya(wt(e,{k:s,v:i,l:f0(r)}))}}else return t<n?Ya(wt(e,{l:Cd(r,t)})):Ya(wt(e,{r:Cd(o,t)}))}function ci(e,t){if(!Ge(e))return t===e.k?e.v:t<e.k?ci(e.l,t):ci(e.r,t)}function hn(e,t,n="k"){if(Ge(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=hn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return hn(e.l,t,n)}function Jt(e,t,n){return Ge(e)?u0(t,n,1):t===e.k?wt(e,{k:t,v:n}):t<e.k?h0(wt(e,{l:Jt(e.l,t,n)})):h0(wt(e,{r:Jt(e.r,t,n)}))}function Pd(e,t,n){if(Ge(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Pd(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Pd(i,t,n))),a}function Gr(e){return Ge(e)?[]:[...Gr(e.l),{k:e.k,v:e.v},...Gr(e.r)]}function d0(e){return Ge(e.r)?[e.k,e.v]:d0(e.r)}function f0(e){return Ge(e.r)?e.l:Ya(wt(e,{r:f0(e.r)}))}function wt(e,t){return u0(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 kd(e){return Ge(e)||e.lvl>e.r.lvl}function h0(e){return Id(m0(e))}function Ya(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(kd(t))return m0(wt(e,{lvl:r-1}));if(!Ge(t)&&!Ge(t.r))return wt(t.r,{l:wt(t,{r:t.r.l}),r:wt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(kd(e))return Id(wt(e,{lvl:r-1}));if(!Ge(n)&&!Ge(n.l)){const o=n.l,s=kd(o)?n.lvl-1:n.lvl;return wt(o,{l:wt(e,{r:o.l,lvl:r-1}),r:Id(wt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function qa(e,t,n){if(Ge(e))return[];const r=hn(e,t)[0];return zN(Pd(e,r,n))}function p0(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 zN(e){return p0(e,({k:t,v:n})=>({index:t,value:n}))}function Id(e){const{r:t,lvl:n}=e;return!Ge(t)&&!Ge(t.r)&&t.lvl===n&&t.r.lvl===n?wt(t,{l:wt(e,{r:t.l}),lvl:n+1}):e}function m0(e){const{l:t}=e;return!Ge(t)&&t.lvl===e.lvl?wt(t,{r:wt(e,{l:t.r})}):e}function Ka(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 g0(e,t,n){return e[Ka(e,t,n)]}function HN(e,t,n,r){const o=Ka(e,t,r),s=Ka(e,n,r,o);return e.slice(o,s+1)}const Ad=Ve(()=>({recalcInProgress:ee(!1)}),[],{singleton:!0});function WN(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 y0(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 UN(e,t){let n=Ge(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Ge(e)){e=Jt(e,0,o);continue}const a=qa(e,s-1,i+1);if(a.some(WN(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Cd(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Jt(e,i+1,f));c&&(e=Jt(e,s,o))}return[e,n]}function GN(){return{offsetTree:[],sizeTree:es(),groupOffsetTree:es(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Od({index:e},t){return t===e?0:t<e?-1:1}function YN({offset:e},t){return t===e?0:t<e?-1:1}function qN(e){return{index:e.index,value:e}}function KN(e,t,n,r=0){return r>0&&(t=Math.max(t,g0(e,r,Od).offset)),p0(HN(e,t,n,YN),qN)}function _d(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ka(o,t-1,Od),a=o[l].offset;const u=hn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===hn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of qa(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function ZN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Qt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Ge(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Jt(Jt(p,m,f),m+1,h),i)}else[i,a]=UN(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=_d(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Jt(f,h,ui(h,l,o)),es()),groupIndices:n}}function ui(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=g0(t,e,Od),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function XN(e){return typeof e.groupIndex<"u"}function v0(e,t,n){if(XN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=b0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function b0(e,t){if(!Za(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Za(e){return!Ge(e.groupOffsetTree)}function QN(e){return Gr(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 JN={offsetHeight:"height",offsetWidth:"width"},_n=Ve(([{log:e},{recalcInProgress:t}])=>{const n=Oe(),r=Oe(),o=Lt(r,0),s=Oe(),i=Oe(),a=ee(0),l=ee([]),c=ee(void 0),u=ee(void 0),d=ee((T,E)=>fn(T,JN[E])),f=ee(void 0),h=ee(0),p=GN(),m=Lt(q(n,Ce(l,e,h),An(ZN,p),Qe()),p),b=Lt(q(l,Qe(),An((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ae(({prev:T})=>T)),[]);he(q(l,ve(T=>T.length>0),Ce(m,h),ae(([T,E,C])=>{const I=T.reduce((A,O,M)=>Jt(A,O,ui(O,E.offsetTree,C)||M),es());return{...E,groupIndices:T,groupOffsetTree:I}})),m),he(q(r,Ce(m),ve(([T,{lastIndex:E}])=>T<E),ae(([T,{lastIndex:E,lastSize:C}])=>[{startIndex:T,endIndex:E,size:C}])),n),he(c,u);const v=Lt(q(c,ae(T=>T===void 0)),!0);he(q(u,ve(T=>T!==void 0&&Ge(Ft(m).sizeTree)),ae(T=>[{startIndex:0,endIndex:0,size:T}])),n);const y=Xt(q(n,Ce(m),An(({sizes:T},[E,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:p}),ae(T=>T.changed)));ze(q(a,An((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),ae(T=>T.diff)),T=>{const{groupIndices:E}=Ft(m);if(T>0)Ee(t,!0),Ee(s,T+y0(T,E));else if(T<0){const C=Ft(b);C.length>0&&(T-=y0(-T,C)),Ee(i,T)}}),ze(q(a,Ce(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},Qt.ERROR)});const g=Xt(s);he(q(s,Ce(m),ae(([T,E])=>{const C=E.groupIndices.length>0,I=[],A=E.lastSize;if(C){const O=ci(E.sizeTree,0);let M=0,_=0;for(;M<T;){const N=E.groupIndices[_],L=E.groupIndices.length===_+1?1/0:E.groupIndices[_+1]-N-1;I.push({startIndex:N,endIndex:N,size:O}),I.push({startIndex:N+1,endIndex:N+1+L-1,size:A}),_++,M+=L+1}const F=Gr(E.sizeTree);return M!==T&&F.shift(),F.reduce((N,{k:L,v:V})=>{let B=N.ranges;return N.prevSize!==0&&(B=[...N.ranges,{startIndex:N.prevIndex,endIndex:L+T-1,size:N.prevSize}]),{ranges:B,prevIndex:L+T,prevSize:V}},{ranges:I,prevIndex:T,prevSize:0}).ranges}return Gr(E.sizeTree).reduce((O,{k:M,v:_})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:M+T-1,size:O.prevSize}],prevIndex:M+T,prevSize:_}),{ranges:[],prevIndex:0,prevSize:A}).ranges})),n);const S=Xt(q(i,Ce(m,h),ae(([T,{offsetTree:E},C])=>{const I=-T;return ui(I,E,C)})));return he(q(i,Ce(m,h),ae(([T,E,C])=>{if(E.groupIndices.length>0){if(Ge(E.sizeTree))return E;let A=es();const O=Ft(b);let M=0,_=0,F=0;for(;M<-T;){F=O[_];const N=O[_+1]-F-1;_++,M+=N+1}if(A=Gr(E.sizeTree).reduce((N,{k:L,v:V})=>Jt(N,Math.max(0,L+T),V),A),M!==-T){const N=ci(E.sizeTree,F);A=Jt(A,0,N);const L=hn(E.sizeTree,-T+1)[1];A=Jt(A,1,L)}return{...E,sizeTree:A,..._d(E.offsetTree,0,A,C)}}else{const A=Gr(E.sizeTree).reduce((O,{k:M,v:_})=>Jt(O,Math.max(0,M+T),_),es());return{...E,sizeTree:A,..._d(E.offsetTree,0,A,C)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:y,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Xe(mr,Ad),{singleton:!0}),eF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function w0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!eF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const di=Ve(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Oe(),p=Oe(),m=ee(0);let b=null,v=null,y=null;function g(){b&&(b(),b=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Ee(o,!1)}return he(q(h,Ce(e,s,t,m,l,c,f),Ce(r,u,d),ae(([[S,T,E,C,I,A,O,M],_,F,P])=>{const N=w0(S),{align:L,behavior:V,offset:B}=N,W=C-1,D=v0(N,T,W);let j=ui(D,T.offsetTree,_)+A;L==="end"?(j+=F+hn(T.sizeTree,D)[1]-E+P,D===W&&(j+=O)):L==="center"?j+=(F+hn(T.sizeTree,D)[1]-E+P)/2:j-=I,B&&(j+=B);const K=J=>{g(),J?(M("retrying to scroll to",{location:S},Qt.DEBUG),Ee(h,S)):(Ee(p,!0),M("list did not change, scroll successful",{},Qt.DEBUG))};if(g(),V==="smooth"){let J=!1;y=ze(n,X=>{J=J||X}),b=kn(a,()=>{K(J)})}else b=kn(q(n,tF(150)),K);return v=setTimeout(()=>{g()},1200),Ee(o,!0),M("scrolling from index to",{index:D,top:j,behavior:V},Qt.DEBUG),{top:j,behavior:V}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Xe(_n,Bt,mr),{singleton:!0});function tF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const fi="up",hi="down",nF="none",rF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},oF=0,pi=Ve(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ee(!1),a=ee(!0),l=Oe(),c=Oe(),u=ee(4),d=ee(oF),f=Lt(q(i0(q(we(t),Jo(1),In(!0)),q(we(t),Jo(1),In(!1),s0(100))),Qe()),!1),h=Lt(q(i0(q(s,In(!0)),q(s,In(!1),s0(200))),Qe()),!1);he(q(Et(we(t),we(d)),ae(([y,g])=>y<=g),Qe()),a),he(q(a,pr(50)),c);const p=Xt(q(Et(e,we(n),we(r),we(o),we(u)),An((y,[{scrollTop:g,scrollHeight:S},T,E,C,I])=>{const A=g+T-S>-I,O={viewportHeight:T,scrollTop:g,scrollHeight:S};if(A){let _,F;return g>y.state.scrollTop?(_="SCROLLED_DOWN",F=y.state.scrollTop-g):(_="SIZE_DECREASED",F=y.state.scrollTop-g||y.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:_,scrollTopDelta:F}}let M;return O.scrollHeight>y.state.scrollHeight?M="SIZE_INCREASED":T<y.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":g<y.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:O}},rF),Qe((y,g)=>y&&y.atBottom===g.atBottom))),m=Lt(q(e,An((y,{scrollTop:g,scrollHeight:S,viewportHeight:T})=>{if(l0(y.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const E=S-(g+T)<1;return y.scrollTop!==g&&E?{scrollHeight:S,scrollTop:g,jump:y.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ve(y=>y.changed),ae(y=>y.jump)),0);he(q(p,ae(y=>y.atBottom)),i),he(q(i,pr(50)),l);const b=ee(hi);he(q(e,ae(({scrollTop:y})=>y),Qe(),An((y,g)=>Ft(h)?{direction:y.direction,prevScrollTop:g}:{direction:g<y.prevScrollTop?fi:hi,prevScrollTop:g},{direction:hi,prevScrollTop:0}),ae(y=>y.direction)),b),he(q(e,pr(50),In(nF)),b);const v=ee(0);return he(q(f,ve(y=>!y),In(0)),v),he(q(t,pr(100),Ce(f),ve(([y,g])=>!!g),An(([y,g],[S])=>[g,S],[0,0]),ae(([y,g])=>g-y)),v),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:b,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Xe(Bt)),gr=Ve(([{log:e}])=>{const t=ee(!1),n=Xt(q(t,ve(r=>r),Qe()));return ze(t,r=>{r&&Ft(e)("props updated",{},Qt.DEBUG)}),{propsReady:t,didMount:n}},Xe(mr),{singleton:!0});function Dd(e,t){e==0?t():requestAnimationFrame(()=>Dd(e-1,t))}function Md(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const mi=Ve(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=ee(!0),l=ee(0),c=ee(!0);return he(q(i,Ce(l),ve(([u,d])=>!!d),In(!1)),a),he(q(i,Ce(l),ve(([u,d])=>!!d),In(!1)),c),ze(q(Et(t,i),Ce(a,e,n,c),ve(([[,u],d,{sizeTree:f},h,p])=>u&&(!Ge(f)||xd(h))&&!d&&!p),Ce(l)),([,u])=>{kn(s,()=>{Ee(c,!0)}),Dd(4,()=>{kn(r,()=>{Ee(a,!0)}),Ee(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Xe(_n,Bt,di,gr),{singleton:!0});function x0(e){return e?e==="smooth"?"smooth":"auto":!1}const sF=(e,t)=>typeof e=="function"?x0(e(t)):t&&x0(e),iF=Ve(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ee(!1),d=Oe();let f=null;function h(m){Ee(o,{index:"LAST",align:"end",behavior:m})}ze(q(Et(q(we(e),Jo(1)),a),Ce(we(u),n,s,c),ae(([[m,b],v,y,g,S])=>{let T=b&&g,E="auto";return T&&(E=sF(v,y||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),ve(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:b})=>{f&&(f(),f=null),f=kn(t,()=>{Ft(l)("following output to ",{totalCount:m},Qt.DEBUG),h(b),f=null})});function p(m){const b=kn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Ft(l)("scrolling to bottom due to increased size",{},Qt.DEBUG),h("auto"))});setTimeout(b,100)}return ze(q(Et(we(u),e,i),ve(([m,,b])=>m&&b),An(({value:m},[,b])=>({refreshed:m===b,value:b}),{refreshed:!1,value:0}),ve(({refreshed:m})=>m),Ce(u,e)),([,m])=>{Ft(s)&&p(m!==!1)}),ze(d,()=>{p(Ft(u)!==!1)}),ze(Et(we(u),r),([m,b])=>{m&&!b.atBottom&&b.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Xe(_n,pi,di,mi,gr,mr,Bt));function aF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const T0=Ve(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Oe(),i=Oe(),a=Xt(q(s,ae(aF)));return he(q(a,ae(l=>l.totalCount)),e),he(q(a,ae(l=>l.groupIndices)),t),he(q(Et(r,n,o),ve(([l,c])=>Za(c)),ae(([l,c,u])=>hn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Qe(),ae(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Xe(_n,Bt));function gi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function S0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Xa="top",Qa="bottom",E0="none";function C0(e,t,n){return typeof e=="number"?n===fi&&t===Xa||n===hi&&t===Qa?e:0:n===fi?t===Xa?e.main:e.reverse:t===Qa?e.main:e.reverse}function P0(e,t){return typeof e=="number"?e:e[t]||0}const Nd=Ve(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Oe(),i=ee(0),a=ee(0),l=ee(0),c=Lt(q(Et(we(e),we(t),we(r),we(s,gi),we(l),we(i),we(o),we(n),we(a)),ae(([u,d,f,[h,p],m,b,v,y,g])=>{const S=u-y,T=b+v,E=Math.max(f-S,0);let C=E0;const I=P0(g,Xa),A=P0(g,Qa);return h-=y,h+=f+v,p+=f+v,p-=y,h>u+T-I&&(C=fi),p<u-E+d+A&&(C=hi),C!==E0?[Math.max(S-f-C0(m,Xa,C)-I,0),S-E-v+d+C0(m,Qa,C)+A]:null}),ve(u=>u!=null),Qe(gi)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Xe(Bt),{singleton:!0});function lF(e,t,n){if(Za(t)){const r=b0(e,t);return[{index:hn(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 Fd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function k0(e,t,n){if(e.length===0)return[];if(!Za(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=qa(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 Ja(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 d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:k0(e,o,s),topItems:k0(t,o,s),topListHeight:t.reduce((m,b)=>b.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function I0(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=Md(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return Ja(c,[],a,o,n,r)}const Yr=Ve(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=ee([]),b=ee(0),v=Oe();he(s.topItemsIndexes,m);const y=Lt(q(Et(h,p,we(i,gi),we(t),we(e),we(u),c,we(m),we(r),we(o),n),ve(([E,C,,I,,,,,,,A])=>{const O=A&&A.length!==I;return E&&!C&&!O}),ae(([,,[E,C],I,A,O,M,_,F,P,N])=>{const L=A,{sizeTree:V,offsetTree:B}=L,W=Ft(b);if(I===0)return{...Fd,totalCount:I};if(E===0&&C===0)return W===0?{...Fd,totalCount:I}:I0(W,O,A,F,P,N||[]);if(Ge(V))return W>0?null:Ja(lF(Md(O,I),L,N),[],I,P,L,F);const D=[];if(_.length>0){const G=_[0],$=_[_.length-1];let z=0;for(const H of qa(V,G,$)){const U=H.value,Y=Math.max(H.start,G),ce=Math.min(H.end,$);for(let R=Y;R<=ce;R++)D.push({index:R,size:U,offset:z,data:N&&N[R]}),z+=U}}if(!M)return Ja([],D,I,P,L,F);const j=_.length>0?_[_.length-1]+1:0,K=KN(B,E,C,j);if(K.length===0)return null;const J=I-1,X=Ua([],G=>{for(const $ of K){const z=$.value;let H=z.offset,U=$.start;const Y=z.size;if(z.offset<E){U+=Math.floor((E-z.offset+P)/(Y+P));const R=U-$.start;H+=R*Y+R*P}U<j&&(H+=(j-U)*Y,U=j);const ce=Math.min($.end,J);for(let R=U;R<=ce&&!(H>=C);R++)G.push({index:R,size:Y,offset:H,data:N&&N[R]}),H+=Y+P}});return Ja(X,D,I,P,L,F)}),ve(E=>E!==null),Qe()),Fd);he(q(n,ve(xd),ae(E=>E==null?void 0:E.length)),t),he(q(y,ae(E=>E.topListHeight)),d),he(d,l),he(q(y,ae(E=>[E.top,E.bottom])),a),he(q(y,ae(E=>E.items)),v);const g=Xt(q(y,ve(({items:E})=>E.length>0),Ce(t,n),ve(([{items:E},C])=>E[E.length-1].originalIndex===C-1),ae(([,E,C])=>[E-1,C]),Qe(gi),ae(([E])=>E))),S=Xt(q(y,pr(200),ve(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),ae(({items:E})=>E[0].index),Qe())),T=Xt(q(y,ve(({items:E})=>E.length>0),ae(({items:E})=>{let C=0,I=E.length-1;for(;E[C].type==="group"&&C<I;)C++;for(;E[I].type==="group"&&I>C;)I--;return{startIndex:E[C].index,endIndex:E[I].index}}),Qe(S0)));return{listState:y,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:T,itemsRendered:v,initialItemCount:b,...f}},Xe(_n,T0,Nd,mi,di,pi,gr,Ad),{singleton:!0}),cF=Ve(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(he(q(a,Ce(s),ve(([,l])=>l!==0),Ce(o,e,t,r,n),ae(([[,l],c,u,d,f,h=[]])=>I0(l,c,u,d,f,h))),i),{}),Xe(_n,mi,Yr,gr),{singleton:!0}),A0=Ve(([{scrollVelocity:e}])=>{const t=ee(!1),n=Oe(),r=ee(!1);return he(q(e,Ce(r,t,n),ve(([o,s])=>!!s),ae(([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}),Qe()),t),ze(q(Et(t,e,n),Ce(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Xe(pi),{singleton:!0}),uF=Ve(([{topItemsIndexes:e}])=>{const t=ee(0);return he(q(t,ve(n=>n>0),ae(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Xe(Yr)),O0=Ve(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Oe(),i=Lt(q(Et(e,r,t,n,o),ae(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return he(we(i),s),{totalListHeight:i,totalListHeightChanged:s}},Xe(Bt,Yr),{singleton:!0});function _0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const dF=_0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),fF=Ve(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Xt(q(l,Ce(a),An(([,v,y,g],[{items:S,totalCount:T,bottom:E,offsetBottom:C},I])=>{const A=E+C;let O=0;return y===T&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(O=A-g,O!==0&&(O+=I))),[O,S,T,A]},[0,[],0,0]),ve(([v])=>v!==0),Ce(t,i,r,s,h,p),ve(([,v,y,g,,,S])=>!S&&!g&&v!==0&&y===fi),ae(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},Qt.DEBUG),v))));function b(v){v>0?(Ee(e,{top:-v,behavior:"auto"}),Ee(n,0)):(Ee(n,0),Ee(e,{top:-v,behavior:"auto"}))}return ze(q(m,Ce(n,o)),([v,y,g])=>{g&&dF()?Ee(n,y-v):b(-v)}),ze(q(Et(Lt(o,!1),n,p),ve(([v,y,g])=>!v&&!g&&y!==0),ae(([v,y])=>y),pr(1)),b),he(q(u,ae(v=>({top:-v}))),e),ze(q(c,Ce(d,f),ae(([v,{lastSize:y,groupIndices:g,sizeTree:S},T])=>{function E(C){return C*(y+T)}if(g.length===0)return E(v);{let C=0;const I=ci(S,0);let A=0,O=0;for(;A<v;){A++,C+=I;let M=g.length===O+1?1/0:g[O+1]-g[O]-1;A+M>v&&(C-=I,M=v-A+1),A+=M,C+=E(M),O++}return C}})),v=>{Ee(n,v),requestAnimationFrame(()=>{Ee(e,{top:v}),requestAnimationFrame(()=>{Ee(n,0),Ee(p,!1)})})}),{deviation:n}},Xe(Bt,pi,Yr,_n,mr,Ad)),hF=Ve(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ee(0);return ze(q(e,Ce(r),ve(([,o])=>o!==0),ae(([,o])=>({top:o}))),o=>{kn(q(n,Jo(1),ve(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Ee(t,o)})})}),{initialScrollTop:r}},Xe(gr,Bt,Yr),{singleton:!0}),pF=Ve(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ee(!1),r=Lt(q(Et(n,e,t),ve(([o])=>o),ae(([,o,s])=>Math.max(0,o-s)),pr(0),Qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Xe(Bt,O0),{singleton:!0}),Ld=Ve(([{scrollTo:e,scrollContainerState:t}])=>{const n=Oe(),r=Oe(),o=Oe(),s=ee(!1),i=ee(void 0);return he(q(Et(n,r),ae(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),he(q(e,Ce(r),ae(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Xe(Bt)),mF=({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,gF=Ve(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Oe();return he(q(u,Ce(e,o,t,s,i,a,r),Ce(n),ae(([[d,f,h,p,m,b,v,y],g])=>{const{done:S,behavior:T,align:E,calculateViewLocation:C=mF,...I}=d,A=v0(d,f,p-1),O=ui(A,f.offsetTree,g)+m+b,M=O+hn(f.sizeTree,A)[1],_=y+b,F=y+h-v,P=C({itemTop:O,itemBottom:M,viewportTop:_,viewportBottom:F,locationParams:{behavior:T,align:E,...I}});return P?S&&kn(q(l,ve(N=>N===!1),Jo(Ft(l)?1:2)),S):S&&S(),P}),ve(d=>d!==null)),c),{scrollIntoView:u}},Xe(_n,Bt,di,Yr,mr),{singleton:!0}),yF=Ve(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Oe(),u=ee(void 0),d=ee(null),f=ee(null);return he(a,d),he(l,f),ze(q(c,Ce(e,n,i,d,f,r)),([h,p,m,b,v,y,g])=>{const S=QN(p.sizeTree);b&&v!==null&&y!==null&&(m=v.scrollTop-y.offsetTop),m-=g,h({ranges:S,scrollTop:m})}),he(q(u,ve(xd),ae(vF)),o),he(q(s,Ce(u),ve(([,h])=>h!==void 0),Qe(),ae(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Xe(_n,Bt,mi,gr,Ld));function vF(e){return{offset:e.scrollTop,index:0,align:"start"}}const bF=Ve(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Xe(Nd,cF,gr,A0,O0,hF,pF,Ld,gF,mr)),D0=Ve(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,b,v,{listState:y,topItemsIndexes:g,...S},{scrollToIndex:T},E,{topItemCount:C},{groupCounts:I},A])=>(he(S.rangeChanged,A.scrollSeekRangeChanged),he(q(A.windowViewportRect,ae(O=>O.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:y,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...A,...m,sizes:d,...b}),Xe(_n,mi,Bt,yF,iF,Yr,di,fF,uF,T0,bF)),Vd="-webkit-sticky",M0="sticky",N0=_0(()=>{if(typeof document>"u")return M0;const e=document.createElement("div");return e.style.position=Vd,e.style.position===Vd?Vd:M0});function $d(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,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Ed(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 el=w.createContext(void 0),F0=w.createContext(void 0);function Rd(e){return e}const wF=Ve(([e,t])=>({...e,...t}),Xe(D0,Ve(()=>{const e=ee(l=>`Item ${l}`),t=ee(null),n=ee(l=>`Group ${l}`),r=ee({}),o=ee(Rd),s=ee("div"),i=ee(Ur),a=(l,c=null)=>Lt(q(r,ae(u=>u[l]),Qe()),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")}}))),xF=({height:e})=>w.createElement("div",{style:{height:e}}),TF={position:N0(),zIndex:1,overflowAnchor:"none"},SF={overflowAnchor:"none"},L0=w.memo(function({showTopList:t=!1}){const n=Ae("listState"),r=on("sizeRanges"),o=Ae("useWindowScroll"),s=Ae("customScrollParent"),i=on("windowScrollContainerState"),a=on("scrollContainerState"),l=s||o?i:a,c=Ae("itemContent"),u=Ae("context"),d=Ae("groupContent"),f=Ae("trackItemSizes"),h=Ae("itemSize"),p=Ae("log"),m=on("gap"),{callbackRef:b}=a0(r,h,f,t?Ur:l,p,m,s),[v,y]=w.useState(0);zd("deviation",P=>{v!==P&&y(P)});const g=Ae("EmptyPlaceholder"),S=Ae("ScrollSeekPlaceholder")||xF,T=Ae("ListComponent"),E=Ae("ItemComponent"),C=Ae("GroupComponent"),I=Ae("computeItemKey"),A=Ae("isSeeking"),O=Ae("groupIndices").length>0,M=Ae("alignToBottom"),_=Ae("initialItemFinalLocationReached"),F=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:M?"auto":0,..._?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?w.createElement(g,ct(g,u)):w.createElement(T,{...ct(T,u),ref:b,style:F,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const N=P.originalIndex,L=I(N+n.firstItemIndex,P.data,u);return A?w.createElement(S,{...ct(S,u),key:L,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?w.createElement(C,{...ct(C,u),key:L,"data-index":N,"data-known-size":P.size,"data-item-index":P.index,style:TF},d(P.index,u)):w.createElement(E,{...ct(E,u),...V0(E,P.data),key:L,"data-index":N,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:SF},O?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),EF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ts=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),CF={width:"100%",position:N0(),top:0,zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function V0(e,t){return{item:typeof e=="string"?void 0:t}}const PF=w.memo(function(){const t=Ae("HeaderComponent"),n=on("headerHeight"),r=Ae("headerFooterTag"),o=On(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=Ae("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),kF=w.memo(function(){const t=Ae("FooterComponent"),n=on("footerHeight"),r=Ae("headerFooterTag"),o=On(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=Ae("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null});function Bd({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"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=c0(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:h,style:{...EF,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ct(c,f)},i)})}function jd({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"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:b,scrollToCallback:v}=c0(l,u,c,Ur,h);return VN(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",b),w.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...ct(c,p)},i)})}const IF=({children:e})=>{const t=w.useContext(el),n=on("viewportHeight"),r=on("fixedItemHeight"),o=Ae("alignToBottom"),s=On(w.useMemo(()=>ai(n,i=>fn(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:ts(o),ref:s,"data-viewport-type":"element"},e)},AF=({children:e})=>{const t=w.useContext(el),n=on("windowViewportRect"),r=on("fixedItemHeight"),o=Ae("customScrollParent"),s=$d(n,o),i=Ae("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:ts(i),"data-viewport-type":"window"},e)},OF=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...CF,marginTop:`${n}px`},o=Ae("context");return w.createElement(t,{style:r,...ct(t,o)},e)},_F=w.memo(function(t){const n=Ae("useWindowScroll"),r=Ae("topItemsIndexes").length>0,o=Ae("customScrollParent"),s=o||n?NF:MF,i=o||n?AF:IF;return w.createElement(s,{...t},r&&w.createElement(OF,null,w.createElement(L0,{showTopList:!0})),w.createElement(i,null,w.createElement(PF,null),w.createElement(L0,null),w.createElement(kF,null)))}),{Component:DF,usePublisher:on,useEmitterValue:Ae,useEmitter:zd}=Sd(wF,{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"}},_F),MF=Bd({usePublisher:on,useEmitterValue:Ae,useEmitter:zd}),NF=jd({usePublisher:on,useEmitterValue:Ae,useEmitter:zd}),$0=DF,R0={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},FF={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:B0,ceil:j0,floor:tl,min:Hd,max:yi}=Math;function LF(e){return{...FF,items:e}}function z0(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 VF(e,t){return e&&e.column===t.column&&e.row===t.row}function nl(e,t){return e&&e.width===t.width&&e.height===t.height}const $F=Ve(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:b,customScrollParent:v,windowScrollContainerState:y,windowScrollTo:g},S])=>{const T=ee(0),E=ee(0),C=ee(R0),I=ee({height:0,width:0}),A=ee({height:0,width:0}),O=Oe(),M=Oe(),_=ee(0),F=ee(null),P=ee({row:0,column:0}),N=Oe(),L=Oe(),V=ee(!1),B=ee(0),W=ee(!0),D=ee(!1);ze(q(p,Ce(B),ve(([$,z])=>!!z)),()=>{Ee(W,!1),Ee(E,0)}),ze(q(Et(p,W,A,I,B,D),ve(([$,z,H,U,,Y])=>$&&!z&&H.height!==0&&U.height!==0&&!Y)),([,,,,$])=>{Ee(D,!0),Dd(1,()=>{Ee(O,$)}),kn(q(r),()=>{Ee(n,[0,0]),Ee(W,!0)})}),he(q(L,ve($=>$!=null&&$.scrollTop>0),In(0)),E),ze(q(p,Ce(L),ve(([,$])=>$!=null)),([,$])=>{$&&(Ee(I,$.viewport),Ee(A,$==null?void 0:$.item),Ee(P,$.gap),$.scrollTop>0&&(Ee(V,!0),kn(q(r,Jo(1)),z=>{Ee(V,!1)}),Ee(i,{top:$.scrollTop})))}),he(q(I,ae(({height:$})=>$)),o),he(q(Et(we(I,nl),we(A,nl),we(P,($,z)=>$&&$.column===z.column&&$.row===z.row),we(r)),ae(([$,z,H,U])=>({viewport:$,item:z,gap:H,scrollTop:U}))),N),he(q(Et(we(T),t,we(P,VF),we(A,nl),we(I,nl),we(F),we(E),we(V),we(W),we(B)),ve(([,,,,,,,$])=>!$),ae(([$,[z,H],U,Y,ce,R,pe,,xe,te])=>{const{row:me,column:re}=U,{height:fe,width:ue}=Y,{width:Pe}=ce;if(pe===0&&($===0||Pe===0))return R0;if(ue===0){const zt=Md(te,$),no=zt===0?Math.max(pe-1,0):zt;return LF(z0(zt,no,R))}const ot=W0(Pe,ue,re);let Me,yt;xe?z===0&&H===0&&pe>0?(Me=0,yt=pe-1):(Me=ot*tl((z+me)/(fe+me)),yt=ot*j0((H+me)/(fe+me))-1,yt=Hd($-1,yi(yt,ot-1)),Me=Hd(yt,yi(0,Me))):(Me=0,yt=-1);const ne=z0(Me,yt,R),{top:le,bottom:Ne}=H0(ce,U,Y,ne),Je=j0($/ot),Vt=Je*fe+(Je-1)*me-Ne;return{items:ne,offsetTop:le,offsetBottom:Vt,top:le,bottom:Ne,itemHeight:fe,itemWidth:ue}})),C),he(q(F,ve($=>$!==null),ae($=>$.length)),T),he(q(Et(I,A,C,P),ve(([$,z,{items:H}])=>H.length>0&&z.height!==0&&$.height!==0),ae(([$,z,{items:H},U])=>{const{top:Y,bottom:ce}=H0($,U,z,H);return[Y,ce]}),Qe(gi)),n);const j=ee(!1);he(q(r,Ce(j),ae(([$,z])=>z||$!==0)),j);const K=Xt(q(we(C),ve(({items:$})=>$.length>0),Ce(T,j),ve(([{items:$},z,H])=>H&&$[$.length-1].index===z-1),ae(([,$])=>$-1),Qe())),J=Xt(q(we(C),ve(({items:$})=>$.length>0&&$[0].index===0),In(0),Qe())),X=Xt(q(we(C),Ce(V),ve(([{items:$},z])=>$.length>0&&!z),ae(([{items:$}])=>({startIndex:$[0].index,endIndex:$[$.length-1].index})),Qe(S0),pr(0)));he(X,f.scrollSeekRangeChanged),he(q(O,Ce(I,A,T,P),ae(([$,z,H,U,Y])=>{const ce=w0($),{align:R,behavior:pe,offset:xe}=ce;let te=ce.index;te==="LAST"&&(te=U-1),te=yi(0,te,Hd(U-1,te));let me=Wd(z,Y,H,te);return R==="end"?me=B0(me-z.height+H.height):R==="center"&&(me=B0(me-z.height/2+H.height/2)),xe&&(me+=xe),{top:me,behavior:pe}})),i);const G=Lt(q(C,ae($=>$.offsetBottom+$.bottom)),0);return he(q(m,ae($=>({width:$.visibleWidth,height:$.visibleHeight}))),I),{data:F,totalCount:T,viewportDimensions:I,itemDimensions:A,scrollTop:r,scrollHeight:M,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:b,customScrollParent:v,windowScrollContainerState:y,deviation:_,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:L,...f,initialTopMostItemIndex:B,gridState:C,totalListHeight:G,...d,startReached:J,endReached:K,rangeChanged:X,stateChanged:N,propsReady:h,stateRestoreInProgress:V,...S}},Xe(Nd,Bt,pi,A0,gr,Ld,mr));function H0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Wd(e,t,n,r[0].index),i=Wd(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Wd(e,t,n,r){const o=W0(e.width,n.width,t.column),s=tl(r/o),i=s*n.height+yi(0,s-1)*t.row;return i>0?i+t.row:i}function W0(e,t,n){return yi(1,tl((e+n)/(tl(t)+n)))}const RF=Ve(([e,t])=>({...e,...t}),Xe($F,Ve(()=>{const e=ee(c=>`Item ${c}`),t=ee({}),n=ee(null),r=ee("virtuoso-grid-item"),o=ee("virtuoso-grid-list"),s=ee(Rd),i=ee("div"),a=ee(Ur),l=(c,u=null)=>Lt(q(t,ae(d=>d[c]),Qe()),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")}}))),BF=w.memo(function(){const t=nt("gridState"),n=nt("listClassName"),r=nt("itemClassName"),o=nt("itemContent"),s=nt("computeItemKey"),i=nt("isSeeking"),a=pn("scrollHeight"),l=nt("ItemComponent"),c=nt("ListComponent"),u=nt("ScrollSeekPlaceholder"),d=nt("context"),f=pn("itemDimensions"),h=pn("gap"),p=nt("log"),m=nt("stateRestoreInProgress"),b=On(w.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const g=v.firstChild;if(g){const{width:S,height:T}=g.getBoundingClientRect();f({width:S,height:T})}h({row:G0("row-gap",getComputedStyle(v).rowGap,p),column:G0("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:w.createElement(c,{ref:b,className:n,...ct(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const y=s(v.index,v.data,d);return i?w.createElement(u,{key:y,...ct(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...ct(l,d),className:r,"data-index":v.index,key:y},o(v.index,v.data,d))}))}),jF=w.memo(function(){const t=nt("HeaderComponent"),n=pn("headerHeight"),r=nt("headerFooterTag"),o=On(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=nt("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),zF=w.memo(function(){const t=nt("FooterComponent"),n=pn("footerHeight"),r=nt("headerFooterTag"),o=On(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=nt("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),HF=({children:e})=>{const t=w.useContext(F0),n=pn("itemDimensions"),r=pn("viewportDimensions"),o=On(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:ts(!1),ref:o},e)},WF=({children:e})=>{const t=w.useContext(F0),n=pn("windowViewportRect"),r=pn("itemDimensions"),o=nt("customScrollParent"),s=$d(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:ts(!1)},e)},UF=w.memo(function({...t}){const n=nt("useWindowScroll"),r=nt("customScrollParent"),o=r||n?YF:GF,s=r||n?WF:HF;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(jF,null),w.createElement(BF,null),w.createElement(zF,null)))}),{Component:sR,usePublisher:pn,useEmitterValue:nt,useEmitter:U0}=Sd(RF,{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"}},UF),GF=Bd({usePublisher:pn,useEmitterValue:nt,useEmitter:U0}),YF=jd({usePublisher:pn,useEmitterValue:nt,useEmitter:U0});function G0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Qt.WARN),t==="normal"?0:parseInt(t??"0",10)}const qF=Ve(([e,t])=>({...e,...t}),Xe(D0,Ve(()=>{const e=ee(l=>w.createElement("td",null,"Item $",l)),t=ee(null),n=ee(null),r=ee(null),o=ee({}),s=ee(Rd),i=ee(Ur),a=(l,c=null)=>Lt(q(o,ae(u=>u[l]),Qe()),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")}}))),KF=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),ZF=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),XF={overflowAnchor:"none"},QF=w.memo(function(){const t=He("listState"),n=mn("sizeRanges"),r=He("useWindowScroll"),o=He("customScrollParent"),s=mn("windowScrollContainerState"),i=mn("scrollContainerState"),a=o||r?s:i,l=He("itemContent"),c=He("trackItemSizes"),u=He("itemSize"),d=He("log"),{callbackRef:f,ref:h}=a0(n,u,c,a,d,void 0,o),[p,m]=w.useState(0);Ud("deviation",L=>{p!==L&&(h.current.style.marginTop=`${L}px`,m(L))});const b=He("EmptyPlaceholder"),v=He("ScrollSeekPlaceholder")||KF,y=He("FillerRow")||ZF,g=He("TableBodyComponent"),S=He("TableRowComponent"),T=He("computeItemKey"),E=He("isSeeking"),C=He("paddingTopAddition"),I=He("firstItemIndex"),A=He("statefulTotalCount"),O=He("context");if(A===0&&b)return w.createElement(b,ct(b,O));const M=t.offsetTop+C+p,_=t.offsetBottom,F=M>0?w.createElement(y,{height:M,key:"padding-top",context:O}):null,P=_>0?w.createElement(y,{height:_,key:"padding-bottom",context:O}):null,N=t.items.map(L=>{const V=L.originalIndex,B=T(V+I,L.data,O);return E?w.createElement(v,{...ct(v,O),key:B,index:L.index,height:L.size,type:L.type||"item"}):w.createElement(S,{...ct(S,O),...V0(S,L.data),key:B,"data-index":V,"data-known-size":L.size,"data-item-index":L.index,style:XF},l(L.index,L.data,O))});return w.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...ct(g,O)},[F,...N,P])}),JF=({children:e})=>{const t=w.useContext(el),n=mn("viewportHeight"),r=mn("fixedItemHeight"),o=On(w.useMemo(()=>ai(n,s=>fn(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:ts(!1),ref:o,"data-viewport-type":"element"},e)},eL=({children:e})=>{const t=w.useContext(el),n=mn("windowViewportRect"),r=mn("fixedItemHeight"),o=He("customScrollParent"),s=$d(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:ts(!1),"data-viewport-type":"window"},e)},tL=w.memo(function(t){const n=He("useWindowScroll"),r=He("customScrollParent"),o=mn("fixedHeaderHeight"),s=mn("fixedFooterHeight"),i=He("fixedHeaderContent"),a=He("fixedFooterContent"),l=He("context"),c=On(w.useMemo(()=>ai(o,y=>fn(y,"height")),[o])),u=On(w.useMemo(()=>ai(s,y=>fn(y,"height")),[s])),d=r||n?oL:rL,f=r||n?eL:JF,h=He("TableComponent"),p=He("TableHeadComponent"),m=He("TableFooterComponent"),b=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ct(p,l)},i()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ct(m,l)},a()):null;return w.createElement(d,{...t},w.createElement(f,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(h,l)},[b,w.createElement(QF,{key:"TableBody"}),v])))}),{Component:nL,usePublisher:mn,useEmitterValue:He,useEmitter:Ud}=Sd(qF,{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"}},tL),rL=Bd({usePublisher:mn,useEmitterValue:He,useEmitter:Ud}),oL=jd({usePublisher:mn,useEmitterValue:He,useEmitter:Ud}),sL=nL,iL=e=>x.jsx(w.Fragment,{children:e.children}),aL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},lL={caseSensitive:!1,sort:!1},cL=[],uL=w.forwardRef(function(t,n){return x.jsx(dt.ul,{...t,ref:n,className:"w-full border-b border-tooltip-border last:border-transparent rounded-lg",children:x.jsx(Jn,{children:t.children})})}),dL=w.forwardRef(function(t,n){return x.jsx(dt.li,{...t,ref:n,className:"first:rounded-t-lg last:rounded-t-lg",children:t.children})}),fL={List:uL,Item:dL},hL=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const b=w.useRef(null),v=w.useRef(null),y=p.value??p.defaultValue??"",g=kt(),[S,T]=w.useState(0),[E,C]=w.useState(!1),[I,A]=w.useState(""),[O,M]=w.useState(y),[_,F]=w.useState(()=>{var te;return((te=e.find(me=>me.value===y))==null?void 0:te.label)??y}),[P,N]=w.useState(null),L=w.useRef(cL),V=t&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...e]:e,B=new Wr(V,["value","label"],lL).search(I),W=t?void 0:`^(${e.map(te=>`${Cs(te.value)}${te.label?"|"+Cs(te.label):""}`).join("|")})$`;w.useEffect(()=>{E||T(0)},[E]),w.useEffect(()=>{if(p.value){const te=e.find(me=>me.value===p.value);M((te==null?void 0:te.label)??p.value)}},[p.value]);const{x:D,y:j,strategy:K,refs:J,context:X}=jr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Js,middleware:[ei(4),cb({padding:10,elementContext:"reference",apply(te){var Pe;const me=(Pe=b.current)==null?void 0:Pe.getBoundingClientRect().width,re=te.elements.floating.querySelector("ul"),fe=(re==null?void 0:re.getBoundingClientRect().height)||0,ue=Math.min(fe<40?300:fe,300);Oi.flushSync(()=>setTimeout(()=>T(ue),200)),Object.assign(te.elements.floating.style,{width:`${me}px`,maxWidth:`${me}px`,maxHeight:`${ue}px`})}})]}),G=Ub(X,aL),{getReferenceProps:$,getFloatingProps:z,getItemProps:H}=zr([Hr(X,{role:"listbox"}),Br(X),yd(X,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:te=>N(me=>te??me)})]);w.useEffect(()=>{const te=J.reference.current;if(te)return Ss(te)},[]);const U=(te,me)=>{M(te.value);const re=J.reference.current;if(!re)return;re==null||re.setAttribute("data-value",te.value),re.value=te.value;const fe=new Event("change",{bubbles:!1,cancelable:!0});re.dispatchEvent(fe),p.onChange&&p.onChange(fe),F(te.label??""),C(!1),A(""),N(me)},Y=te=>{var re;const me=te.target.value;return A(me),!E&&me===""?C(!0):(te.target.name=p.name||"",me?C(!0):(re=p.onChange)==null?void 0:re.call(p,te))},ce=()=>{var te;C(!0),A(""),(te=J.reference.current)==null||te.focus()},R=()=>{C(!0),A("")},pe=()=>{var te;(te=J.reference.current)==null||te.setAttribute("data-value",""),A(""),M(""),F(""),Jl(J.reference.current),C(!1)},xe=p.id||p.name;return x.jsxs(ii,{...p,left:d,error:f,ref:b,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ce,children:[x.jsx(uu,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),O?x.jsx("button",{type:"button",onClick:pe,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",{"data-shadow":"true",...$({...p,onChange:Y,onFocus:R,pattern:W,ref:J.setReference,name:`${xe}-shadow`,id:`${xe}-shadow`,onClick:te=>te.currentTarget.focus(),onKeyDown(te){var me,re;if(te.key==="ArrowDown"){let fe=P+1;return fe>B.length-1&&(fe=0),(me=v.current)==null||me.scrollIntoView({index:fe}),N(fe)}if(te.key==="ArrowUp"){let fe=P-1;return fe<0&&(fe=B.length-1),(re=v.current)==null||re.scrollIntoView({index:fe}),N(fe)}if(te.key==="Escape")return te.currentTarget.blur(),C(!1);if(te.key==="Enter"){if(P!==null&&B[P])return te.preventDefault(),U(B[P],P);if(B.length===1)return te.preventDefault(),U(B[0],0)}}}),"data-value":O,"data-error":!!f,"data-name":xe,"data-target":xe,required:h,value:E?I:_||O,"aria-autocomplete":"list",autoComplete:"off",className:$e("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",p.className)}),x.jsx("input",{id:xe,name:xe,type:"hidden","data-origin":xe,ref:m,required:h,defaultValue:p.value||O||void 0}),x.jsx($r,{preserveTabOrder:!0,children:E?x.jsx(Ko,{guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...z({ref:J.setFloating,style:{...G.styles,position:K,left:(D??0)+(O?26:18),top:j??0}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[B.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:o||g.autocompleteEmpty})}):null,x.jsx($0,{data:B,ref:v,hidden:B.length===0,components:fL,className:"bg-floating-background p-0 text-foreground rounded-lg border-floating-border",style:{height:S},itemContent:(te,me)=>{const re=me.Render??iL,fe=O===me.value||O===me.label,ue=P===te,Pe=me.label??me.value;return x.jsx("button",{"data-value":me.value,...H({ref:ot=>void(L.current[te]=ot),role:"option",type:"button","aria-checked":fe,"aria-current":fe,"aria-selected":fe,"aria-busy":me.disabled,onClick:()=>U(me,te),className:`cursor-pointer p-2 text-left ${fe?"bg-primary-hover text-primary-foreground":""} ${ue?"bg-primary text-primary-foreground":""}`}),children:x.jsx(re,{...p,label:me.label,value:me.value,children:Pe})})}})]})}):null})]})}),Y0=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:$e("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:$e("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:$e("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),q0=(e,t,n,r)=>w.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:d,optionalText:f,container:h,hideLeft:p=!1,right:m,left:b,error:v,...y},g)=>{const S=e,T=y.id??y.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const C=E.current,I=Ss(E.current),A=r==null?void 0:r(C),O=M=>{const _=M;if(_.key==="Enter"&&C.enterKeyHint==="next"){const F=C.getAttribute("data-next");if(F){const P=document.getElementById(F);if(P)return P.focus(),void _.preventDefault()}}};return C.addEventListener("keydown",O),()=>{A==null||A(),I(),C.removeEventListener("keydown",O)}},[]),x.jsx(ii,{...n,componentName:t,info:a,container:h,error:v,feedback:i,hideLeft:p,left:b,optionalText:f,right:m,rightLabel:d,interactive:u,form:y.form,id:y.name||y.id,name:y.name,labelClassName:l,title:y.title,placeholder:y.placeholder,required:y.required,disabled:y.disabled,children:x.jsx(S,{...n,...y,id:T,name:T,type:s,"data-next":c,"aria-busy":y.disabled,"aria-disabled":y.disabled,"aria-readonly":y.readOnly,ref:Ql(g,E),className:$e("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","disabled:cursor-not-allowed disabled:text-disabled",y.className)})})}),vi=q0(By,"input",{type:"text"}),K0=new Date(1970,11,31),Gd={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Z0={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},pL={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")},Yd=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},mL=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||tv(),l=w.useId(),c=kt(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=w.useState(e||void 0),[h,p]=w.useState(!1),m=Yd(u,K0).flatMap(C=>Ct.keyof(Gd,C.type)?Gd[C.type](C.value):[]),b=Yd(u,K0).reduce((C,I)=>C+(Ct.keyof(Z0,I.type)?Z0[I.type](I.value):""),""),[v,y]=w.useState(d?Yd(u,d).reduce((C,I)=>C+(Ct.keyof(Gd,I.type)?pL[I.type](d,I.value):""),""):""),g=C=>{const I=C.target.value;if(y(I),m.length===I.length&&m.every((O,M)=>{const _=I.charAt(M);return typeof O=="string"?_===O:O.test(_)})){const O=Do(xO(I,b,new Date));return f(O),r==null?void 0:r(O)}return f(void 0),r==null?void 0:r(void 0)},S=C=>(f(C),r==null||r(C),y(C?TA(C,b):"")),T=dy(d),E=T?d.toISOString():void 0;return x.jsx(vi,{...s,mask:m,value:v,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:g,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??b,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(Xo,{open:h,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(lI,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(av,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),gL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],yL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],vL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],X0=(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 Q0(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?bL:vL:t.binary?yL:gL,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=X0(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=X0(Number(e),t.locale,i),c=n[a];return s+l+r+c}var qd={exports:{}},rl={exports:{}},Re={};/** @license React v16.13.1
|
|
177
|
+
*/var oM=["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])"],La=oM.join(","),ib=typeof Element>"u",Wo=ib?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fa=!ib&&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},Va=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},sM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},iM=function(t,n,r){if(Va(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(La));return n&&Wo.call(t,La)&&o.unshift(t),o=o.filter(r),o},aM=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Va(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=Wo.call(i,La);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Va(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},ab=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},lb=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||sM(t))&&!ab(t)?0:t.tabIndex},lM=function(t,n){var r=lb(t);return r<0&&n&&!ab(t)?0:r},cM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},cb=function(t){return t.tagName==="INPUT"},uM=function(t){return cb(t)&&t.type==="hidden"},dM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},fM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},hM=function(t){if(!t.name)return!0;var n=t.form||Fa(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=fM(o,t.form);return!s||s===t},pM=function(t){return cb(t)&&t.type==="radio"},mM=function(t){return pM(t)&&!hM(t)},gM=function(t){var n,r=t&&Fa(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,d;r=Fa(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},ub=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},yM=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Wo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Wo.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=Fa(t);if(l&&!l.shadowRoot&&o(l)===!0)return ub(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(gM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ub(t);return!1},vM=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Wo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},bM=function(t,n){return!(n.disabled||Va(n)||uM(n)||yM(n,t)||dM(n)||vM(n))},dd=function(t,n){return!(mM(n)||lb(n)<0||!bM(t,n))},wM=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},xM=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=lM(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(cM).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ni=function(t,n){n=n||{};var r;return n.getShadowRoot?r=aM([t],n.includeContainer,{filter:dd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:wM}):r=iM(t,n.includeContainer,dd.bind(null,n)),xM(r)},TM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Wo.call(t,La)===!1?!1:dd(n,t)};function db(e,t,n){let{reference:r,floating:o}=e;const s=Fr(t),i=cd(t),a=ld(i),l=cr(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(jo(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const SM=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:d}=db(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:b}=a[m],{x:v,y:g,data:S,reset:T}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=v??u,d=g??d,h={...h,[y]:{...h[y],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=db(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function fd(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:d="floating",altBoundary:f=!1,padding:h=0}=Bo(t,e),p=sb(h),y=a[f?d==="floating"?"reference":"floating":d],b=Na(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},T=Na(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:g,strategy:l}):v);return{top:(b.top-T.top+p.top)/S.y,bottom:(T.bottom-b.bottom+p.bottom)/S.y,left:(b.left-T.left+p.left)/S.x,right:(T.right-b.right+p.right)/S.x}}const EM=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 d=sb(u),f={x:n,y:r},h=cd(o),p=ld(h),m=await i.getDimensions(c),y=h==="y",b=y?"top":"left",v=y?"bottom":"right",g=y?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-f[h]-s.floating[p],T=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const I=S/2-T/2,A=C/2-m[p]/2-1,O=Pn(d[b],A),L=Pn(d[v],A),_=O,V=C-m[p]-L,k=C/2-m[p]/2+I,M=ad(_,k,V),F=!l.arrow&&jo(o)!=null&&k!==M&&s.reference[p]/2-(k<_?O:L)-m[p]/2<0,N=F?k<_?k-_:k-V:0;return{[h]:f[h]+N,data:{[h]:M,centerOffset:k-M-N,...F&&{alignmentOffset:N}},reset:F}}}),CM=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:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=Bo(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=cr(o),v=Fr(a),g=cr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(g||!m?[Ma(a)]:eM(a)),E=p!=="none";!f&&E&&T.push(...nM(a,m,p,S));const C=[a,...T],I=await fd(t,y),A=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&A.push(I[b]),d){const k=JD(o,i,S);A.push(I[k[0]],I[k[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(k=>k<=0)){var L,_;const k=(((L=s.flip)==null?void 0:L.index)||0)+1,M=C[k];if(M)return{data:{index:k,overflows:O},reset:{placement:M}};let F=(_=O.filter(N=>N.overflows[0]<=0).sort((N,B)=>N.overflows[1]-B.overflows[1])[0])==null?void 0:_.placement;if(!F)switch(h){case"bestFit":{var V;const N=(V=O.filter(B=>{if(E){const z=Fr(B.placement);return z===v||z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(z=>z>0).reduce((z,D)=>z+D,0)]).sort((B,z)=>B[1]-z[1])[0])==null?void 0:V[0];N&&(F=N);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function PM(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=cr(n),a=jo(n),l=Fr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=Bo(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const kM=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 PM(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}}}}},IM=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:y=>{let{x:b,y:v}=y;return{x:b,y:v}}},...l}=Bo(e,t),c={x:n,y:r},u=await fd(t,l),d=Fr(cr(o)),f=ob(d);let h=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",v=h+u[y],g=h-u[b];h=ad(v,h,g)}if(i){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",v=p+u[y],g=p-u[b];p=ad(v,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},AM=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 fd(t,a),c=cr(n),u=jo(n),d=Fr(n)==="y",{width:f,height:h}=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 y=h-l.top-l.bottom,b=f-l.left-l.right,v=Pn(h-l[p],y),g=Pn(f-l[m],b),S=!t.middlewareData.shift;let T=v,E=g;if(d?E=u||S?Pn(g,b):b:T=u||S?Pn(v,y):y,S&&!u){const I=Zt(l.left,0),A=Zt(l.right,0),O=Zt(l.top,0),L=Zt(l.bottom,0);d?E=f-2*(I!==0||A!==0?I+A:Zt(l.left,l.right)):T=h-2*(O!==0||L!==0?O+L:Zt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const C=await o.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function fb(e){const t=Kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Da(n)!==s||Da(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function hd(e){return Ue(e)?e:e.contextElement}function Ho(e){const t=hd(e);if(!mt(t))return lr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=fb(t);let i=(s?Da(n.width):n.width)/r,a=(s?Da(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const OM=lr(0);function hb(e){const t=Rt(e);return!Ju()||!t.visualViewport?OM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _M(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function Vr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=hd(e);let i=lr(1);t&&(r?Ue(r)&&(i=Ho(r)):i=Ho(e));const a=_M(s,n,r)?hb(s):lr(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Rt(s),h=r&&Ue(r)?Rt(r):r;let p=f,m=ed(p);for(;m&&r&&h!==p;){const y=Ho(m),b=m.getBoundingClientRect(),v=Kt(m),g=b.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,S=b.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=g,c+=S,p=Rt(m),m=ed(p)}}return Na({width:u,height:d,x:l,y:c})}function DM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Wn(r),a=t?Oa(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=lr(1);const u=lr(0),d=mt(r);if((d||!d&&!s)&&((sr(r)!=="body"||ti(i))&&(l=_a(r)),mt(r))){const f=Vr(r);c=Ho(r),u.x=f.x+r.clientLeft,u.y=f.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 MM(e){return Array.from(e.getClientRects())}function pb(e){return Vr(Wn(e)).left+_a(e).scrollLeft}function NM(e){const t=Wn(e),n=_a(e),r=e.ownerDocument.body,o=Zt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Zt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+pb(e);const a=-n.scrollTop;return Kt(r).direction==="rtl"&&(i+=Zt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function LM(e,t){const n=Rt(e),r=Wn(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=Ju();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function FM(e,t){const n=Vr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=mt(e)?Ho(e):lr(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 mb(e,t,n){let r;if(t==="viewport")r=LM(e,n);else if(t==="document")r=NM(Wn(e));else if(Ue(t))r=FM(t,n);else{const o=hb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Na(r)}function gb(e,t){const n=Hn(e);return n===t||!Ue(n)||ir(n)?!1:Kt(n).position==="fixed"||gb(n,t)}function VM(e,t){const n=t.get(e);if(n)return n;let r=ar(e,[],!1).filter(a=>Ue(a)&&sr(a)!=="body"),o=null;const s=Kt(e).position==="fixed";let i=s?Hn(e):e;for(;Ue(i)&&!ir(i);){const a=Kt(i),l=Qu(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ti(i)&&!l&&gb(e,i))?r=r.filter(u=>u!==i):o=a,i=Hn(i)}return t.set(e,r),r}function $M(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Oa(t)?[]:VM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=mb(t,u,o);return c.top=Zt(d.top,c.top),c.right=Pn(d.right,c.right),c.bottom=Pn(d.bottom,c.bottom),c.left=Zt(d.left,c.left),c},mb(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function RM(e){const{width:t,height:n}=fb(e);return{width:t,height:n}}function BM(e,t,n){const r=mt(t),o=Wn(t),s=n==="fixed",i=Vr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=lr(0);if(r||!r&&!s)if((sr(t)!=="body"||ti(o))&&(a=_a(t)),r){const d=Vr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=pb(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 pd(e){return Kt(e).position==="static"}function yb(e,t){return!mt(e)||Kt(e).position==="fixed"?null:t?t(e):e.offsetParent}function vb(e,t){const n=Rt(e);if(Oa(e))return n;if(!mt(e)){let o=Hn(e);for(;o&&!ir(o);){if(Ue(o)&&!pd(o))return o;o=Hn(o)}return n}let r=yb(e,t);for(;r&&UD(r)&&pd(r);)r=yb(r,t);return r&&ir(r)&&pd(r)&&!Qu(r)?n:r||GD(e)||n}const jM=async function(e){const t=this.getOffsetParent||vb,n=this.getDimensions,r=await n(e.floating);return{reference:BM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WM(e){return Kt(e).direction==="rtl"}const HM={convertOffsetParentRelativeRectToViewportRelativeRect:DM,getDocumentElement:Wn,getClippingRect:$M,getOffsetParent:vb,getElementRects:jM,getClientRects:MM,getDimensions:RM,getScale:Ho,isElement:Ue,isRTL:WM};function zM(e,t){let n=null,r;const o=Wn(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:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Ro(u),p=Ro(o.clientWidth-(c+d)),m=Ro(o.clientHeight-(u+f)),y=Ro(c),v={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Zt(0,Pn(1,l))||1};let g=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return i(!0),s}function ri(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=hd(e),u=o||s?[...c?ar(c):[],...ar(t)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=c&&a?zM(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(b=>{let[v]=b;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Vr(e):null;l&&y();function y(){const b=Vr(e);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&n(),m=b,p=requestAnimationFrame(y)}return n(),()=>{var b;u.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const UM=kM,GM=IM,YM=CM,qM=AM,bb=EM,KM=(e,t,n)=>{const r=new Map,o={platform:HM,...n},s={...o.platform,_c:r};return SM(e,t,{...o,platform:s})};var $a=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Ra(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(!Ra(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)&&!Ra(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function wb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xb(e,t){const n=wb(e);return Math.round(t*n)/n}function Tb(e){const t=P.useRef(e);return $a(()=>{t.current=e}),t}function ZM(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,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=P.useState(r);Ra(f,r)||h(r);const[p,m]=P.useState(null),[y,b]=P.useState(null),v=P.useCallback(N=>{N!==E.current&&(E.current=N,m(N))},[]),g=P.useCallback(N=>{N!==C.current&&(C.current=N,b(N))},[]),S=s||p,T=i||y,E=P.useRef(null),C=P.useRef(null),I=P.useRef(u),A=l!=null,O=Tb(l),L=Tb(o),_=P.useCallback(()=>{if(!E.current||!C.current)return;const N={placement:t,strategy:n,middleware:f};L.current&&(N.platform=L.current),KM(E.current,C.current,N).then(B=>{const z={...B,isPositioned:!0};V.current&&!Ra(I.current,z)&&(I.current=z,bs.flushSync(()=>{d(z)}))})},[f,t,n,L]);$a(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[c]);const V=P.useRef(!1);$a(()=>(V.current=!0,()=>{V.current=!1}),[]),$a(()=>{if(S&&(E.current=S),T&&(C.current=T),S&&T){if(O.current)return O.current(S,T,_);_()}},[S,T,_,O,A]);const k=P.useMemo(()=>({reference:E,floating:C,setReference:v,setFloating:g}),[v,g]),M=P.useMemo(()=>({reference:S,floating:T}),[S,T]),F=P.useMemo(()=>{const N={position:n,left:0,top:0};if(!M.floating)return N;const B=xb(M.floating,u.x),z=xb(M.floating,u.y);return a?{...N,transform:"translate("+B+"px, "+z+"px)",...wb(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:z}},[n,a,M.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:_,refs:k,elements:M,floatingStyles:F}),[u,_,k,M,F])}const XM=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?bb({element:r.current,padding:o}).fn(n):{}:r?bb({element:r,padding:o}).fn(n):{}}}},oi=(e,t)=>({...UM(e),options:[e,t]}),md=(e,t)=>({...GM(e),options:[e,t]}),gd=(e,t)=>({...YM(e),options:[e,t]}),Sb=(e,t)=>({...qM(e),options:[e,t]}),Eb=(e,t)=>({...XM(e),options:[e,t]});function yd(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 Cb={...P},QM=Cb.useInsertionEffect||(e=>e());function bt(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return QM(()=>{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 vd="ArrowUp",si="ArrowDown",zo="ArrowLeft",Uo="ArrowRight";function Ba(e,t,n){return Math.floor(e/t)!==n}function ii(e,t){return t<0||t>=e.current.length}function bd(e,t){return Nt(e,{disabledIndices:t})}function Pb(e,t){return Nt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Nt(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&&ja(i,a,o));return a}function JM(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===vd){if(u&&It(n),c===-1)d=l;else if(d=Nt(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}ii(e,d)&&(d=c)}if(n.key===si&&(u&&It(n),c===-1?d=a:(d=Nt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Nt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),ii(e,d)&&(d=c)),r==="both"){const f=Ro(c/s);n.key===Uo&&(u&&It(n),c%s!==s-1?(d=Nt(e,{startingIndex:c,disabledIndices:i}),o&&Ba(d,s,f)&&(d=Nt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Nt(e,{startingIndex:c-c%s-1,disabledIndices:i})),Ba(d,s,f)&&(d=c)),n.key===zo&&(u&&It(n),c%s!==0?(d=Nt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Ba(d,s,f)&&(d=Nt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Nt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Ba(d,s,f)&&(d=c));const h=Ro(l/s)===f;ii(e,d)&&(o&&h?d=n.key===zo?l:Nt(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function eN(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 d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function tN(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 nN(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ja(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 kb=0;function ur(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(kb);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():kb=requestAnimationFrame(s)}var _e=typeof document<"u"?w.useLayoutEffect:w.useEffect;function rN(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 oN(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 Ib=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function sN(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 _e(()=>{const l=new Map(o);Array.from(l.keys()).sort(rN).forEach((u,d)=>{l.set(u,d)}),oN(o,l)||s(l)},[o]),P.createElement(Ib.Provider,{value:P.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function Ab(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=P.useContext(Ib),[a,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return _e(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),_e(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Go(){return Go=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},Go.apply(this,arguments)}let Ob=!1,iN=0;const _b=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+iN++;function aN(){const[e,t]=P.useState(()=>Ob?_b():void 0);return _e(()=>{e==null&&t(_b())},[]),P.useEffect(()=>{Ob=!0},[]),e}const Yo=Cb.useId||aN;let ai;process.env.NODE_ENV!=="production"&&(ai=new Set);function Wa(){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=ai)!=null&&e.has(o))){var s;(s=ai)==null||s.add(o),console.warn(o)}}function lN(){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=ai)!=null&&e.has(o))){var s;(s=ai)==null||s.add(o),console.error(o)}}const Db=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:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Wa("The `ref` prop is required for `FloatingArrow`."));const y=Yo(),[b,v]=P.useState(!1);if(_e(()=>{if(!o)return;Kt(o).direction==="rtl"&&v(!0)},[o]),!o)return null;const g=c*2,S=g/2,T=i/2*(l/-8+1),E=a/2*l/4,[C,I]=r.split("-"),A=!!f,O=C==="top"||C==="bottom",L=u&&I==="end"?"bottom":"top";let _=u&&I==="end"?"right":"left";u&&b&&(_=I==="end"?"left":"right");const V=(s==null?void 0:s.x)!=null?u||s.x:"",k=(s==null?void 0:s.y)!=null?u||s.y:"",M=f||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",F={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[C];return P.createElement("svg",Go({},m,{"aria-hidden":!0,ref:n,width:A?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[_]:V,[L]:k,[C]:O||A?"100%":"calc(100% - "+g/2+"px)",transform:""+F+(h??""),...p}}),g>0&&P.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:M}),P.createElement("path",{stroke:g&&!f?m.fill:"none",d:M}),P.createElement("clipPath",{id:y},P.createElement("rect",{x:-S,y:S*(A?-1:1),width:i+g,height:i})))});function Mb(){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 Nb=P.createContext(null),Lb=P.createContext(null),dr=()=>{var e;return((e=P.useContext(Nb))==null?void 0:e.id)||null},fr=()=>P.useContext(Lb);function cN(e){const t=Yo(),n=fr(),o=dr();return _e(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function uN(e){const{children:t,id:n}=e,r=dr();return P.createElement(Nb.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function dN(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(()=>Mb())[0];return P.createElement(Lb.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function hr(e){return"data-floating-ui-"+e}function At(e){const t=w.useRef(e);return _e(()=>{t.current=e}),t}const Fb=hr("safe-polygon");function wd(e,t,n){return n&&!$o(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Vb(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:d=0,move:f=!0}=t,h=fr(),p=dr(),m=At(c),y=At(l),b=At(n),v=P.useRef(),g=P.useRef(-1),S=P.useRef(),T=P.useRef(-1),E=P.useRef(!0),C=P.useRef(!1),I=P.useRef(()=>{}),A=P.useCallback(()=>{var M;const F=(M=o.current.openEvent)==null?void 0:M.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);P.useEffect(()=>{if(!a)return;function M(F){let{open:N}=F;N||(clearTimeout(g.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(N){A()&&r(!1,N,"hover")}const F=St(i.floating).documentElement;return F.addEventListener("mouseleave",M),()=>{F.removeEventListener("mouseleave",M)}},[i.floating,n,r,a,m,A]);const O=P.useCallback(function(M,F,N){F===void 0&&(F=!0),N===void 0&&(N="hover");const B=wd(y.current,"close",v.current);B&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,M,N),B)):F&&(clearTimeout(g.current),r(!1,M,N))},[y,r]),L=bt(()=>{I.current(),S.current=void 0}),_=bt(()=>{if(C.current){const M=St(i.floating).body;M.style.pointerEvents="",M.removeAttribute(Fb),C.current=!1}});P.useEffect(()=>{if(!a)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(D){if(clearTimeout(g.current),E.current=!1,u&&!$o(v.current)||d>0&&!wd(y.current,"open"))return;const j=wd(y.current,"open",v.current);j?g.current=window.setTimeout(()=>{b.current||r(!0,D,"hover")},j):r(!0,D,"hover")}function N(D){if(M())return;I.current();const j=St(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){_(),L(),O(D,!0,"safe-polygon")}});const J=S.current;j.addEventListener("mousemove",J),I.current=()=>{j.removeEventListener("mousemove",J)};return}(v.current==="touch"?!lt(i.floating,D.relatedTarget):!0)&&O(D)}function B(D){M()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){_(),L(),O(D)}})(D))}if(Ue(i.domReference)){var z;const D=i.domReference;return n&&D.addEventListener("mouseleave",B),(z=i.floating)==null||z.addEventListener("mouseleave",B),f&&D.addEventListener("mousemove",F,{once:!0}),D.addEventListener("mouseenter",F),D.addEventListener("mouseleave",N),()=>{var j;n&&D.removeEventListener("mouseleave",B),(j=i.floating)==null||j.removeEventListener("mouseleave",B),f&&D.removeEventListener("mousemove",F),D.removeEventListener("mouseenter",F),D.removeEventListener("mouseleave",N)}}},[i,a,e,u,d,f,O,L,_,r,n,b,h,y,m,o]),_e(()=>{var M;if(a&&n&&(M=m.current)!=null&&M.__options.blockPointerEvents&&A()){const N=St(i.floating).body;N.setAttribute(Fb,""),N.style.pointerEvents="none",C.current=!0;const B=i.floating;if(Ue(i.domReference)&&B){var F;const z=i.domReference,D=h==null||(F=h.nodesRef.current.find(j=>j.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return D&&(D.style.pointerEvents=""),z.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{z.style.pointerEvents="",B.style.pointerEvents=""}}}},[a,n,p,i,h,m,A]),_e(()=>{n||(v.current=void 0,L(),_())},[n,L,_]),P.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(T.current),_()},[a,i.domReference,L,_]);const V=P.useMemo(()=>{function M(F){v.current=F.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(F){const{nativeEvent:N}=F;function B(){!E.current&&!b.current&&r(!0,N,"hover")}u&&!$o(v.current)||n||d===0||(clearTimeout(T.current),v.current==="touch"?B():T.current=window.setTimeout(B,d))}}},[u,r,n,b,d]),k=P.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(M){O(M.nativeEvent,!1)}}),[O]);return P.useMemo(()=>a?{reference:V,floating:k}:{},[a,V,k])}function fN(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 $r(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 hN(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),$r(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let qo=new WeakMap,Ha=new WeakSet,za={},xd=0;const pN=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,$b=e=>e&&(e.host||$b(e.parentNode)),mN=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=$b(n);return e.contains(r)?r:null}).filter(n=>n!=null);function gN(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=mN(t,e),a=new Set,l=new Set(i),c=[];za[o]||(za[o]=new WeakMap);const u=za[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(sr(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,y=m!==null&&m!=="false",b=(qo.get(p)||0)+1,v=(u.get(p)||0)+1;qo.set(p,b),u.set(p,v),c.push(p),b===1&&y&&Ha.add(p),v===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return xd++,()=>{c.forEach(h=>{const p=(qo.get(h)||0)-1,m=(u.get(h)||0)-1;qo.set(h,p),u.set(h,m),p||(!Ha.has(h)&&s&&h.removeAttribute(s),Ha.delete(h)),m||h.removeAttribute(o)}),xd--,xd||(qo=new WeakMap,qo=new WeakMap,Ha=new WeakSet,za={})}}function Rb(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=St(e[0]).body;return gN(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ko=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Bb(e,t){const n=ni(e,Ko());t==="prev"&&n.reverse();const r=n.indexOf(un(St(e)));return n.slice(r+1)[0]}function jb(){return Bb(document.body,"next")}function Wb(){return Bb(document.body,"prev")}function li(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!lt(n,r)}function yN(e){ni(e,Ko()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function vN(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 bN(e,t,n){const r=e.indexOf(t);function o(i){const a=hr("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||lt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Td={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 wN;function Hb(e){e.key==="Tab"&&(e.target,clearTimeout(wN))}const Ua=P.forwardRef(function(t,n){const[r,o]=P.useState();_e(()=>(rd()&&o("button"),document.addEventListener("keydown",Hb),()=>{document.removeEventListener("keydown",Hb)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[hr("focus-guard")]:"",style:Td};return P.createElement("span",Go({},t,s))}),zb=P.createContext(null),Ub=hr("portal");function xN(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Yo(),o=Gb(),[s,i]=P.useState(null),a=P.useRef(null);return _e(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),_e(()=>{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(Ub,""),l.appendChild(c),a.current=c,i(c)},[t,r]),_e(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ue(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(Ub,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Rr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=xN({id:n,root:r}),[i,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return P.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&li(p)&&(p.type==="focusin"?vN:yN)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),P.createElement(zb.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&P.createElement(Ua,{"data-type":"outside",ref:l,onFocus:h=>{if(li(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=Wb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&P.createElement("span",{"aria-owns":s.id,style:Td}),s&&bs.createPortal(t,s),f&&s&&P.createElement(Ua,{"data-type":"outside",ref:c,onFocus:h=>{if(li(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=jb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Gb=()=>P.useContext(zb),Yb=20;let Br=[];function Sd(e){Br=Br.filter(n=>n.isConnected);let t=e;if(!(!t||sr(t)==="body")){if(!TM(t,Ko())){const n=ni(t,Ko())[0];n&&(t=n)}Br.push(t),Br.length>Yb&&(Br=Br.slice(-Yb))}}function qb(){return Br.slice().reverse().find(e=>e.isConnected)}const TN=P.forwardRef(function(t,n){return P.createElement("button",Go({},t,{type:"button",ref:n,tabIndex:-1,style:Td}))});function Zo(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:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:b,floatingId:v,elements:{domReference:g,floating:S}}=t,T=typeof i=="number"&&i<0,E=rb(g)&&T,C=pN()?s:!0,I=At(o),A=At(i),O=At(a),L=fr(),_=Gb(),V=P.useRef(null),k=P.useRef(null),M=P.useRef(!1),F=P.useRef(!1),N=P.useRef(-1),B=_!=null,z=S==null?void 0:S.firstElementChild,D=(z==null?void 0:z.id)===v?z:S,j=bt(function(G){return G===void 0&&(G=D),G?ni(G,Ko()):[]}),K=bt(G=>{const $=j(G);return I.current.map(W=>g&&W==="reference"?g:D&&W==="floating"?D:$).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function G(W){if(W.key==="Tab"){lt(D,un(St(D)))&&j().length===0&&!E&&It(W);const H=K(),U=Cn(W);I.current[0]==="reference"&&U===g&&(It(W),W.shiftKey?ur(H[H.length-1]):ur(H[1])),I.current[1]==="floating"&&U===D&&W.shiftKey&&(It(W),ur(H[0]))}}const $=St(D);return $.addEventListener("keydown",G),()=>{$.removeEventListener("keydown",G)}},[r,g,D,c,I,E,j,K]),P.useEffect(()=>{if(r||!S)return;function G($){const W=Cn($),U=j().indexOf(W);U!==-1&&(N.current=U)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,j]),P.useEffect(()=>{if(r||!d)return;function G(){F.current=!0,setTimeout(()=>{F.current=!1})}function $(W){const H=W.relatedTarget;queueMicrotask(()=>{const U=!(lt(g,H)||lt(S,H)||lt(H,S)||lt(_==null?void 0:_.portalNode,H)||H!=null&&H.hasAttribute(hr("focus-guard"))||L&&($r(L.nodesRef.current,p).find(Y=>{var ce,R;return lt((ce=Y.context)==null?void 0:ce.elements.floating,H)||lt((R=Y.context)==null?void 0:R.elements.domReference,H)})||fN(L.nodesRef.current,p).find(Y=>{var ce,R;return((ce=Y.context)==null?void 0:ce.elements.floating)===H||((R=Y.context)==null?void 0:R.elements.domReference)===H})));if(l&&U&&un(St(D))===St(D).body){mt(D)&&(D==null||D.focus());const Y=N.current,ce=j(),R=ce[Y]||ce[ce.length-1]||D;mt(R)&&R.focus()}(E||!c)&&H&&U&&!F.current&&H!==qb()&&(M.current=!0,m(!1,W))})}if(S&&mt(g))return g.addEventListener("focusout",$),g.addEventListener("pointerdown",G),S.addEventListener("focusout",$),()=>{g.removeEventListener("focusout",$),g.removeEventListener("pointerdown",G),S.removeEventListener("focusout",$)}},[r,g,S,D,c,p,L,_,m,d,l,j,E]),P.useEffect(()=>{var G;if(r)return;const $=Array.from((_==null||(G=_.portalNode)==null?void 0:G.querySelectorAll("["+hr("portal")+"]"))||[]);if(S){const W=[S,...$,V.current,k.current,I.current.includes("reference")||E?g:null].filter(U=>U!=null),H=c||E?Rb(W,C,!C):Rb(W);return()=>{H()}}},[r,g,S,c,I,_,E,C]),_e(()=>{if(r||!mt(D))return;const G=St(D),$=un(G);queueMicrotask(()=>{const W=K(D),H=A.current,U=(typeof H=="number"?W[H]:H.current)||D,Y=lt(D,$);!T&&!Y&&f&&ur(U,{preventScroll:U===D})})},[r,f,D,T,K,A]),_e(()=>{if(r||!D)return;let G=!1;const $=St(D),W=un($);let U=b.current.openEvent;const Y=h.domReference.current;Sd(W);function ce(R){let{open:pe,reason:xe,event:te,nested:me}=R;pe&&(U=te),xe==="escape-key"&&h.domReference.current&&Sd(h.domReference.current),xe==="hover"&&te.type==="mouseleave"&&(M.current=!0),xe==="outside-press"&&(me?(M.current=!1,G=!0):M.current=!(tb(te)||nd(te)))}return y.on("openchange",ce),()=>{y.off("openchange",ce);const R=un($),pe=lt(S,R)||L&&$r(L.nodesRef.current,p).some(re=>{var fe;return lt((fe=re.context)==null?void 0:fe.elements.floating,R)});(pe||U&&["click","mousedown"].includes(U.type))&&h.domReference.current&&Sd(h.domReference.current);const te=Y||W,me=ni(St(te).body,Ko());queueMicrotask(()=>{let re=qb();!re&&mt(te)&&S&&(re=bN(me,te,S)),O.current&&!M.current&&mt(re)&&(!(re!==R&&R!==$.body)||pe)&&re.focus({preventScroll:G})})}},[r,S,D,O,b,h,y,L,p]),_e(()=>{if(!r&&_)return _.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{_.setFocusManagerState(null)}},[r,_,c,f,m,h,d]),_e(()=>{if(r||!D||typeof MutationObserver!="function"||T)return;const G=()=>{const W=D.getAttribute("tabindex"),H=j(),U=un(St(S)),Y=H.indexOf(U);Y!==-1&&(N.current=Y),I.current.includes("floating")||U!==h.domReference.current&&H.length===0?W!=="0"&&D.setAttribute("tabindex","0"):W!=="-1"&&D.setAttribute("tabindex","-1")};G();const $=new MutationObserver(G);return $.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{$.disconnect()}},[r,S,D,h,I,j,T]);function J(G){return r||!u||!c?null:P.createElement(TN,{ref:G==="start"?V:k,onClick:$=>m(!1,$.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&C&&(c?!E:!0)&&(B||c);return P.createElement(P.Fragment,null,X&&P.createElement(Ua,{"data-type":"inside",ref:_==null?void 0:_.beforeInsideRef,onFocus:G=>{if(c){const W=K();ur(o[0]==="reference"?W[0]:W[W.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(M.current=!1,li(G,_.portalNode)){const W=jb()||g;W==null||W.focus()}else{var $;($=_.beforeOutsideRef.current)==null||$.focus()}}}),!E&&J("start"),n,J("end"),X&&P.createElement(Ua,{"data-type":"inside",ref:_==null?void 0:_.afterInsideRef,onFocus:G=>{if(c)ur(K()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(d&&(M.current=!0),li(G,_.portalNode)){const W=Wb()||g;W==null||W.focus()}else{var $;($=_.afterOutsideRef.current)==null||$.focus()}}}))}const Ed=new Set,SN=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Yo();return _e(()=>{if(!r)return;Ed.add(s);const i=/iP(hone|ad|od)|iOS/.test(td()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(y))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Ed.delete(s),Ed.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),P.createElement("div",Go({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Kb(e){return mt(e.target)&&e.target.tagName==="BUTTON"}function Zb(e){return id(e)}function ci(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,d=P.useRef(),f=P.useRef(!1),h=P.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&($o(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=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}$o(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){d.current=void 0,!(p.defaultPrevented||!u||Kb(p))&&(p.key===" "&&!Zb(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Kb(p)||Zb(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return P.useMemo(()=>i?{reference:h}:{},[i,h])}function EN(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,d=i.height,f=i.x,h=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function Xb(e){return e!=null&&e.clientX!=null}function CN(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,d=P.useRef(!1),f=P.useRef(null),[h,p]=P.useState(),[m,y]=P.useState([]),b=bt((E,C)=>{d.current||r.current.openEvent&&!Xb(r.current.openEvent)||i.setPositionReference(EN(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),v=bt(E=>{c!=null||u!=null||(n?f.current||y([]):b(E.clientX,E.clientY))}),g=$o(h)?o:n,S=P.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Rt(o);function C(I){const A=Cn(I);lt(o,A)?(E.removeEventListener("mousemove",C),f.current=null):b(I.clientX,I.clientY)}if(!r.current.openEvent||Xb(r.current.openEvent)){E.addEventListener("mousemove",C);const I=()=>{E.removeEventListener("mousemove",C),f.current=null};return f.current=I,I}i.setPositionReference(s)},[g,a,c,u,o,r,i,s,b]);P.useEffect(()=>S(),[S,m]),P.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),_e(()=>{a&&(c!=null||u!=null)&&(d.current=!1,b(c,u))},[a,c,u,b]);const T=P.useMemo(()=>{function E(C){let{pointerType:I}=C;p(I)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:v,onMouseEnter:v}},[v]);return P.useMemo(()=>a?{reference:T}:{},[a,T])}const PN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},kN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Qb=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 jr(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:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=fr(),y=bt(typeof l=="function"?l:()=>!1),b=typeof l=="function"?y:l,v=P.useRef(!1),g=P.useRef(!1),{escapeKey:S,outsidePress:T}=Qb(h),{escapeKey:E,outsidePress:C}=Qb(p),I=bt(k=>{var M;if(!n||!i||!a||k.key!=="Escape")return;const F=(M=s.current.floatingContext)==null?void 0:M.nodeId,N=m?$r(m.nodesRef.current,F):[];if(!S&&(k.stopPropagation(),N.length>0)){let B=!0;if(N.forEach(z=>{var D;if((D=z.context)!=null&&D.open&&!z.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,qD(k)?k.nativeEvent:k,"escape-key")}),A=bt(k=>{var M;const F=()=>{var N;I(k),(N=Cn(k))==null||N.removeEventListener("keydown",F)};(M=Cn(k))==null||M.addEventListener("keydown",F)}),O=bt(k=>{var M;const F=v.current;v.current=!1;const N=g.current;if(g.current=!1,c==="click"&&N||F||typeof b=="function"&&!b(k))return;const B=Cn(k),z="["+hr("inert")+"]",D=St(o.floating).querySelectorAll(z);let j=Ue(B)?B:null;for(;j&&!ir(j);){const G=Hn(j);if(ir(G)||!Ue(G))break;j=G}if(D.length&&Ue(B)&&!KD(B)&&!lt(B,o.floating)&&Array.from(D).every(G=>!lt(j,G)))return;if(mt(B)&&V){const G=B.clientWidth>0&&B.scrollWidth>B.clientWidth,$=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let W=$&&k.offsetX>B.clientWidth;if($&&Kt(B).direction==="rtl"&&(W=k.offsetX<=B.offsetWidth-B.clientWidth),W||G&&k.offsetY>B.clientHeight)return}const K=(M=s.current.floatingContext)==null?void 0:M.nodeId,J=m&&$r(m.nodesRef.current,K).some(G=>{var $;return sd(k,($=G.context)==null?void 0:$.elements.floating)});if(sd(k,o.floating)||sd(k,o.domReference)||J)return;const X=m?$r(m.nodesRef.current,K):[];if(X.length>0){let G=!0;if(X.forEach($=>{var W;if((W=$.context)!=null&&W.open&&!$.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,k,"outside-press")}),L=bt(k=>{var M;const F=()=>{var N;O(k),(N=Cn(k))==null||N.removeEventListener(c,F)};(M=Cn(k))==null||M.addEventListener(c,F)});P.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function k(N){r(!1,N,"ancestor-scroll")}const M=St(o.floating);a&&M.addEventListener("keydown",E?A:I,E),b&&M.addEventListener(c,C?L:O,C);let F=[];return f&&(Ue(o.domReference)&&(F=ar(o.domReference)),Ue(o.floating)&&(F=F.concat(ar(o.floating))),!Ue(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(ar(o.reference.contextElement)))),F=F.filter(N=>{var B;return N!==((B=M.defaultView)==null?void 0:B.visualViewport)}),F.forEach(N=>{N.addEventListener("scroll",k,{passive:!0})}),()=>{a&&M.removeEventListener("keydown",E?A:I,E),b&&M.removeEventListener(c,C?L:O,C),F.forEach(N=>{N.removeEventListener("scroll",k)})}},[s,o,a,b,c,n,r,f,i,S,T,I,E,A,O,C,L]),P.useEffect(()=>{v.current=!1},[b,c]);const _=P.useMemo(()=>({onKeyDown:I,[PN[d]]:k=>{u&&r(!1,k.nativeEvent,"reference-press")}}),[I,r,u,d]),V=P.useMemo(()=>({onKeyDown:I,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[kN[c]]:()=>{v.current=!0}}),[I,c]);return P.useMemo(()=>i?{reference:_,floating:V}:{},[i,_,V])}function IN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yo(),s=P.useRef({}),[i]=P.useState(()=>Mb()),a=dr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Ue(h)&&lN("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=bt((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Wr(e){e===void 0&&(e={});const{nodeId:t}=e,n=IN({...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,d=P.useRef(null),f=fr();_e(()=>{u&&(d.current=u)},[u]);const h=ZM({...e,elements:{...o,...a&&{reference:a}}}),p=P.useCallback(g=>{const S=Ue(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),h.refs.setReference(S)},[h.refs]),m=P.useCallback(g=>{(Ue(g)||g===null)&&(d.current=g,i(g)),(Ue(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Ue(g))&&h.refs.setReference(g)},[h.refs]),y=P.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),b=P.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),v=P.useMemo(()=>({...h,...r,refs:y,elements:b,nodeId:t}),[h,y,b,t,r]);return _e(()=>{r.dataRef.current.floatingContext=v;const g=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);g&&(g.context=v)}),P.useMemo(()=>({...h,context:v,refs:y,elements:b}),[h,y,b,v])}function AN(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(),d=P.useRef(!0);P.useEffect(()=>{if(!a)return;const h=Rt(i.domReference);function p(){!n&&mt(i.domReference)&&i.domReference===un(St(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),P.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),P.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=P.useMemo(()=>({onPointerDown(h){nd(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Cn(h.nativeEvent);if(l&&Ue(p))try{if(rd()&&nb())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!id(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=Ue(p)&&p.hasAttribute(hr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var b;const v=un(i.domReference?i.domReference.ownerDocument:document);!p&&v===i.domReference||lt((b=s.current.floatingContext)==null?void 0:b.refs.floating.current,v)||lt(i.domReference,v)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}const Jb="active",e0="selected";function Cd(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Jb]:i,[e0]: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&&[Jb,e0].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function Hr(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=>Cd(a,e,"reference"),t),s=P.useCallback(a=>Cd(a,e,"floating"),n),i=P.useCallback(a=>Cd(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let t0=!1;function Ga(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function n0(e,t){return Ga(t,e===vd||e===si,e===zo||e===Uo)}function Pd(e,t,n){return Ga(t,e===si,n?e===zo:e===Uo)||e==="Enter"||e===" "||e===""}function ON(e,t,n){return Ga(t,n?e===zo:e===Uo,e===si)}function r0(e,t,n){return Ga(t,n?e===Uo:e===zo,e===vd)}function kd(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:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:v=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:C,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||Wa("`useListNavigation` looping must be enabled to allow escaping."),p||Wa("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&Wa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const A=dr(),O=fr(),L=bt(a),_=P.useRef(m),V=P.useRef(c??-1),k=P.useRef(null),M=P.useRef(!0),F=P.useRef(L),N=P.useRef(!!o.floating),B=P.useRef(n),z=P.useRef(!1),D=P.useRef(!1),j=At(v),K=At(n),J=At(T),X=At(o.floating),G=At(c),[$,W]=P.useState(),[H,U]=P.useState(),Y=bt(function(re,fe,ue){ue===void 0&&(ue=!1);function Pe(Me){p?(W(Me.id),O==null||O.events.emit("virtualfocus",Me),E&&(E.current=Me)):ur(Me,{preventScroll:!0,sync:nb()&&rd()?t0||z.current:!1})}const ot=re.current[fe.current];ot&&Pe(ot),requestAnimationFrame(()=>{const Me=re.current[fe.current]||ot;if(!Me)return;ot||Pe(Me);const yt=J.current;yt&&R&&(ue||!M.current)&&(Me.scrollIntoView==null||Me.scrollIntoView(typeof yt=="boolean"?{block:"nearest",inline:"nearest"}:yt))})});_e(()=>{document.createElement("div").focus({get preventScroll(){return t0=!0,!1}})},[]),_e(()=>{l&&(n&&o.floating?_.current&&c!=null&&(D.current=!0,V.current=c,L(c)):N.current&&(V.current=-1,F.current(null)))},[l,n,o.floating,c,L]),_e(()=>{if(l&&n&&o.floating)if(i==null){if(z.current=!1,G.current!=null)return;if(N.current&&(V.current=-1,Y(s,V)),(!B.current||!N.current)&&_.current&&(k.current!=null||_.current===!0&&k.current==null)){let re=0;const fe=()=>{s.current[0]==null?(re<2&&(re?requestAnimationFrame:queueMicrotask)(fe),re++):(V.current=k.current==null||Pd(k.current,g,h)||f?bd(s,j.current):Pb(s,j.current),k.current=null,L(V.current))};fe()}}else ii(s,i)||(V.current=i,Y(s,V,D.current),D.current=!1)},[l,n,o.floating,i,G,f,s,g,h,L,Y,j]),_e(()=>{var re;if(!l||o.floating||!O||p||!N.current)return;const fe=O.nodesRef.current,ue=(re=fe.find(Me=>Me.id===A))==null||(re=re.context)==null?void 0:re.elements.floating,Pe=un(St(o.floating)),ot=fe.some(Me=>Me.context&<(Me.context.elements.floating,Pe));ue&&!ot&&M.current&&ue.focus({preventScroll:!0})},[l,o.floating,O,A,p]),_e(()=>{if(!l||!O||!p||A)return;function re(fe){U(fe.id),E&&(E.current=fe)}return O.events.on("virtualfocus",re),()=>{O.events.off("virtualfocus",re)}},[l,O,p,A,E]),_e(()=>{F.current=L,N.current=!!o.floating}),_e(()=>{n||(k.current=null)},[n]),_e(()=>{B.current=n},[n]);const ce=i!=null,R=P.useMemo(()=>{function re(ue){if(!n)return;const Pe=s.current.indexOf(ue);Pe!==-1&&L(Pe)}return{onFocus(ue){let{currentTarget:Pe}=ue;re(Pe)},onClick:ue=>{let{currentTarget:Pe}=ue;return Pe.focus({preventScroll:!0})},...y&&{onMouseMove(ue){let{currentTarget:Pe}=ue;re(Pe)},onPointerLeave(ue){let{pointerType:Pe}=ue;!M.current||Pe==="touch"||(V.current=-1,Y(s,V),L(null),p||ur(X.current,{preventScroll:!0}))}}}},[n,X,Y,y,s,L,p]),pe=bt(re=>{if(M.current=!1,z.current=!0,!K.current&&re.currentTarget===X.current)return;if(f&&r0(re.key,g,h)){It(re),r(!1,re.nativeEvent,"list-navigation"),mt(o.domReference)&&!p&&o.domReference.focus();return}const fe=V.current,ue=bd(s,v),Pe=Pb(s,v);if(re.key==="Home"&&(It(re),V.current=ue,L(V.current)),re.key==="End"&&(It(re),V.current=Pe,L(V.current)),S>1){const ot=C||Array.from({length:s.current.length},()=>({width:1,height:1})),Me=eN(ot,S,I),yt=Me.findIndex(le=>le!=null&&!ja(s.current,le,v)),ne=Me.reduce((le,Ne,Je)=>Ne!=null&&!ja(s.current,Ne,v)?Je:le,-1);if(V.current=Me[JM({current:Me.map(le=>le!=null?s.current[le]:null)},{event:re,orientation:g,loop:d,cols:S,disabledIndices:nN([...v||s.current.map((le,Ne)=>ja(s.current,Ne)?Ne:void 0),void 0],Me),minIndex:yt,maxIndex:ne,prevIndex:tN(V.current>Pe?ue:V.current,ot,Me,S,re.key===si?"bl":re.key===Uo?"tr":"tl"),stopEvent:!0})],L(V.current),g==="both")return}if(n0(re.key,g)){if(It(re),n&&!p&&un(re.currentTarget.ownerDocument)===re.currentTarget){V.current=Pd(re.key,g,h)?ue:Pe,L(V.current);return}Pd(re.key,g,h)?d?V.current=fe>=Pe?u&&fe!==s.current.length?-1:ue:Nt(s,{startingIndex:fe,disabledIndices:v}):V.current=Math.min(Pe,Nt(s,{startingIndex:fe,disabledIndices:v})):d?V.current=fe<=ue?u&&fe!==-1?s.current.length:Pe:Nt(s,{startingIndex:fe,decrement:!0,disabledIndices:v}):V.current=Math.max(ue,Nt(s,{startingIndex:fe,decrement:!0,disabledIndices:v})),ii(s,V.current)?L(null):L(V.current)}}),xe=P.useMemo(()=>p&&n&&ce&&{"aria-activedescendant":H||$},[p,n,ce,H,$]),te=P.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!rb(o.domReference)&&xe,onKeyDown:pe,onPointerMove(){M.current=!0}}),[xe,pe,o.domReference,g]),me=P.useMemo(()=>{function re(ue){m==="auto"&&tb(ue.nativeEvent)&&(_.current=!0)}function fe(ue){_.current=m,m==="auto"&&nd(ue.nativeEvent)&&(_.current=!0)}return{...xe,onKeyDown(ue){M.current=!1;const Pe=ue.key.indexOf("Arrow")===0,ot=ON(ue.key,g,h),Me=r0(ue.key,g,h),yt=n0(ue.key,g),ne=(f?ot:yt)||ue.key==="Enter"||ue.key.trim()==="";if(p&&n){const Ot=O==null?void 0:O.nodesRef.current.find(Wt=>Wt.parentId==null),Vt=O&&Ot?hN(O.nodesRef.current,Ot.id):null;if(Pe&&Vt&&E){const Wt=new KeyboardEvent("keydown",{key:ue.key,bubbles:!0});if(ot||Me){var le,Ne;const ro=((le=Vt.context)==null?void 0:le.elements.domReference)===ue.currentTarget,ys=Me&&!ro?(Ne=Vt.context)==null?void 0:Ne.elements.domReference:ot?s.current.find(vs=>(vs==null?void 0:vs.id)===$):null;ys&&(It(ue),ys.dispatchEvent(Wt),U(void 0))}if(yt&&Vt.context&&Vt.context.open&&Vt.parentId&&ue.currentTarget!==Vt.context.elements.domReference){var Je;It(ue),(Je=Vt.context.elements.domReference)==null||Je.dispatchEvent(Wt);return}}return pe(ue)}if(!(!n&&!b&&Pe)){if(ne&&(k.current=f&&yt?null:ue.key),f){ot&&(It(ue),n?(V.current=bd(s,j.current),L(V.current)):r(!0,ue.nativeEvent,"list-navigation"));return}yt&&(c!=null&&(V.current=c),It(ue),!n&&b?r(!0,ue.nativeEvent,"list-navigation"):pe(ue),n&&L(V.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:fe,onMouseDown:re,onClick:re}},[$,xe,pe,j,m,s,f,L,r,n,b,g,h,c,O,p,E]);return P.useMemo(()=>l?{reference:me,floating:te,item:R}:{},[l,me,te,R])}const _N=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function zr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=_N.get(i))!=null?n:i,l=Yo(),u=dr()!=null,d=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]),f=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]),h=P.useCallback(p=>{let{active:m,selected:y}=p;const b={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...b,"aria-selected":m&&y};case"combobox":return{...b,...m&&{"aria-selected":!0}}}return{}},[o,i]);return P.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const o0=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Xo(e,t){return typeof e=="function"?e(t):e}function DN(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 MN(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=DN(n,i);return!c&&a==="close"&&l("unmounted"),_e(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function s0(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",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=P.useState(()=>({...Xo(s,c),...Xo(n,c)})),{isMounted:m,status:y}=MN(e,{duration:i}),b=At(n),v=At(r),g=At(o),S=At(s);return _e(()=>{const T=Xo(b.current,c),E=Xo(g.current,c),C=Xo(S.current,c),I=Xo(v.current,c)||Object.keys(T).reduce((A,O)=>(A[O]="",A),{});if(y==="initial"&&p(A=>({transitionProperty:A.transitionProperty,...C,...T})),y==="open"&&p({transitionProperty:Object.keys(I).map(o0).join(","),transitionDuration:d+"ms",...C,...I}),y==="close"){const A=E||T;p({transitionProperty:Object.keys(A).map(o0).join(","),transitionDuration:f+"ms",...C,...A})}},[f,g,b,v,S,d,y,c]),{isMounted:m,styles:h}}function NN(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:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=P.useRef(),m=P.useRef(""),y=P.useRef((n=h??i)!=null?n:-1),b=P.useRef(null),v=bt(a),g=bt(l),S=At(u),T=At(f);_e(()=>{r&&(clearTimeout(p.current),b.current=null,m.current="")},[r]),_e(()=>{if(r&&m.current===""){var O;y.current=(O=h??i)!=null?O:-1}},[r,h,i]);const E=bt(O=>{O?o.current.typing||(o.current.typing=O,g(O)):o.current.typing&&(o.current.typing=O,g(O))}),C=bt(O=>{function L(F,N,B){const z=S.current?S.current(N,B):N.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(B.toLocaleLowerCase()))===0);return z?F.indexOf(z):-1}const _=s.current;if(m.current.length>0&&m.current[0]!==" "&&(L(_,_,m.current)===-1?E(!1):O.key===" "&&It(O)),_==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(It(O),E(!0)),_.every(F=>{var N,B;return F?((N=F[0])==null?void 0:N.toLocaleLowerCase())!==((B=F[1])==null?void 0:B.toLocaleLowerCase()):!0})&&m.current===O.key&&(m.current="",y.current=b.current),m.current+=O.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",y.current=b.current,E(!1)},d);const k=y.current,M=L(_,[..._.slice((k||0)+1),..._.slice(0,(k||0)+1)],m.current);M!==-1?(v(M),b.current=M):O.key!==" "&&(m.current="",E(!1))}),I=P.useMemo(()=>({onKeyDown:C}),[C]),A=P.useMemo(()=>({onKeyDown:C,onKeyUp(O){O.key===" "&&E(!1)}}),[C,E]);return P.useMemo(()=>c?{reference:I,floating:A}:{},[c,I,A])}function i0(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,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function LN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function a0(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(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,y=f-a,v=Math.sqrt(m*m+y*y)/p;return i=d,a=f,l=h,v}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:y,nodeId:b,tree:v}=d;return function(S){function T(){clearTimeout(o),y()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:C}=S,I=[E,C],A=Cn(S),O=S.type==="mouseleave",L=lt(m.floating,A),_=lt(m.domReference,A),V=m.domReference.getBoundingClientRect(),k=m.floating.getBoundingClientRect(),M=p.split("-")[0],F=f>k.right-k.width/2,N=h>k.bottom-k.height/2,B=LN(I,V),z=k.width>V.width,D=k.height>V.height,j=(z?V:k).left,K=(z?V:k).right,J=(D?V:k).top,X=(D?V:k).bottom;if(L&&(s=!0,!O))return;if(_&&(s=!1),_&&!O){s=!0;return}if(O&&Ue(S.relatedTarget)&<(m.floating,S.relatedTarget)||v&&$r(v.nodesRef.current,b).some(W=>{let{context:H}=W;return H==null?void 0:H.open}))return;if(M==="top"&&h>=V.bottom-1||M==="bottom"&&h<=V.top+1||M==="left"&&f>=V.right-1||M==="right"&&f<=V.left+1)return T();let G=[];switch(M){case"top":G=[[j,V.top+1],[j,k.bottom-1],[K,k.bottom-1],[K,V.top+1]];break;case"bottom":G=[[j,k.top+1],[j,V.bottom-1],[K,V.bottom-1],[K,k.top+1]];break;case"left":G=[[k.right-1,X],[k.right-1,J],[V.left+1,J],[V.left+1,X]];break;case"right":G=[[V.right-1,X],[V.right-1,J],[k.left+1,J],[k.left+1,X]];break}function $(W){let[H,U]=W;switch(M){case"top":{const Y=[z?H+t/2:F?H+t*4:H-t*4,U+t+1],ce=[z?H-t/2:F?H+t*4:H-t*4,U+t+1],R=[[k.left,F||z?k.bottom-t:k.top],[k.right,F?z?k.bottom-t:k.top:k.bottom-t]];return[Y,ce,...R]}case"bottom":{const Y=[z?H+t/2:F?H+t*4:H-t*4,U-t],ce=[z?H-t/2:F?H+t*4:H-t*4,U-t],R=[[k.left,F||z?k.top+t:k.bottom],[k.right,F?z?k.top+t:k.bottom:k.top+t]];return[Y,ce,...R]}case"left":{const Y=[H+t+1,D?U+t/2:N?U+t*4:U-t*4],ce=[H+t+1,D?U-t/2:N?U+t*4:U-t*4];return[...[[N||D?k.right-t:k.left,k.top],[N?D?k.right-t:k.left:k.right-t,k.bottom]],Y,ce]}case"right":{const Y=[H-t,D?U+t/2:N?U+t*4:U-t*4],ce=[H-t,D?U-t/2:N?U+t*4:U-t*4],R=[[N||D?k.left+t:k.right,k.top],[N?D?k.left+t:k.right:k.left+t,k.bottom]];return[Y,ce,...R]}}}if(!i0([E,C],G)){if(s&&!B)return T();if(!O&&r){const W=c(S.clientX,S.clientY);if(W!==null&&W<.1)return T()}i0([E,C],$([f,h]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Qo=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[oi(10),gd({fallbackAxisSideDirection:"end"}),md(),Eb({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Wr({open:n,middleware:s,transform:!0,whileElementsMounted:ri,onOpenChange:(p,m)=>{var b;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(b=e.onChange)==null||b.call(e,p))}}),c=ci(l),u=jr(l),d=zr(l),{getReferenceProps:f,getFloatingProps:h}=Hr([c,u,d]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(Rr,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(Zo,{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,...h(),children:[x.jsx(Db,{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]})})})]})},FN=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=Wr({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=ci(a),u=zr(a),d=jr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Hr([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(go,{...h(e),as:dt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(dt.span,{layoutId:o,children:e.trigger})}),x.jsx(er,{children:s?x.jsx(Rr,{root:t,children:x.jsx(Zo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(dt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},l0=300,VN=500,c0=(e="")=>$e("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Id=w.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),u0=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=dr(),c=l!==null,[u,d]=w.useState(!1),[f,h]=w.useState(!1),[p,m]=w.useState(null),y=w.useRef([]),b=w.useRef([]),v=w.useContext(Id),g=fr(),S=cN(),T=Ab(),{floatingStyles:E,refs:C,context:I}=Wr({nodeId:S,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:ri,placement:c?"right":"bottom-start",middleware:[oi({mainAxis:c?0:4,alignmentAxis:c?-4:0}),gd(),md()]}),A=zr(I,{role:"menu",enabled:!0}),O=jr(I,{bubbles:!0}),L=Vb(I,{enabled:n,delay:{open:l0},handleClose:a0({blockPointerEvents:!0,buffer:1})}),_=ci(I,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),V=kd(I,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:y,scrollItemIntoView:!0,onNavigate:m}),k=NN(I,{activeIndex:p,listRef:b,resetMs:VN,onMatch:u?m:void 0}),{getReferenceProps:M,getFloatingProps:F,getItemProps:N}=Hr([L,_,A,O,V,k]);w.useEffect(()=>{if(!g)return;const z=()=>d(!1),D=j=>{j.nodeId!==S&&j.parentId===l&&d(!1)};return g.events.on("click",z),g.events.on("menuopen",D),()=>{g.events.off("click",z),g.events.off("menuopen",D)}},[g,S,l]),w.useEffect(()=>{u&&g&&g.events.emit("menuopen",{parentId:l,nodeId:S})},[g,u,S,l]);const B=r?i.className:$e(c0(i.className));return x.jsxs(uN,{id:S,children:[x.jsx(w.Fragment,{children:i.asChild?x.jsx(Vo,{children:s,ref:yd([C.setReference,T.ref,a]),tabIndex:c?v.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":f?"":void 0,className:B,...M(v.getItemProps({...i,onFocus(z){var D;(D=i.onFocus)==null||D.call(i,z),h(!1),v.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:yd([C.setReference,T.ref,a]),tabIndex:c?v.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":f?"":void 0,className:B,...M(v.getItemProps({...i,onFocus(z){var D;(D=i.onFocus)==null||D.call(i,z),h(!1),v.setHasFocusInside(!0)}})),children:[s,c&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(wu,{size:14})]})]})}),x.jsx(Id.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:N,setHasFocusInside:h,isOpen:u},children:x.jsx(sN,{elementsRef:y,labelsRef:b,children:u&&x.jsx(Rr,{preserveTabOrder:!0,children:x.jsx(Zo,{context:I,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...F(),ref:C.setFloating,style:{...i.style,...E},className:$e("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})})})})})]})}),$N=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext(Id),a=Ab({label:r?null:typeof e=="string"?e:t}),l=fr(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:yd([a.ref,s]),"data-active":c,"data-open":i.isOpen,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:c0(o.className),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),RN=w.forwardRef((e,t)=>dr()!==null?x.jsx(u0,{...e,isParent:!1,ref:t}):x.jsx(dN,{children:x.jsx(u0,{...e,isParent:!0,ref:t})}));var kn=function(){return kn=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},kn.apply(this,arguments)};function d0(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 Jo(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(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function es(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 f0(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 Ad(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))}typeof SuppressedError=="function"&&SuppressedError;var Ya="right-scroll-bar-position",qa="width-before-scroll-bar",BN="with-scroll-bars-hidden",jN="--removed-body-scroll-bar-size";function Od(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function WN(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var HN=typeof window<"u"?P.useLayoutEffect:P.useEffect,h0=new WeakMap;function zN(e,t){var n=WN(null,function(r){return e.forEach(function(o){return Od(o,r)})});return HN(function(){var r=h0.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Od(a,null)}),s.forEach(function(a){o.has(a)||Od(a,i)})}h0.set(n,e)},[e]),n}function UN(e){return e}function GN(e,t){t===void 0&&(t=UN);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function YN(e){e===void 0&&(e={});var t=GN(null);return t.options=kn({async:!0,ssr:!1},e),t}var p0=function(e){var t=e.sideCar,n=d0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return P.createElement(r,kn({},n))};p0.isSideCarExport=!0;function qN(e,t){return e.useMedium(t),p0}var m0=YN(),_d=function(){},Ka=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:_d,onWheelCapture:_d,onTouchMoveCapture:_d}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,v=e.gapMode,g=d0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,T=zN([n,t]),E=kn(kn({},g),o);return P.createElement(P.Fragment,null,u&&P.createElement(S,{sideCar:m0,removeScrollBar:c,shards:d,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:v}),i?P.cloneElement(P.Children.only(a),kn(kn({},E),{ref:T})):P.createElement(b,kn({},E,{className:l,ref:T}),a))});Ka.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ka.classNames={fullWidth:qa,zeroRight:Ya};var KN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=KN();return t&&e.setAttribute("nonce",t),e}function XN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function QN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ZN())&&(XN(t,n),QN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eL=function(){var e=JN();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},g0=function(){var e=eL(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},tL={left:0,top:0,right:0,gap:0},Dd=function(e){return parseInt(e||"",10)||0},nL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Dd(n),Dd(r),Dd(o)]},rL=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tL;var t=nL(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oL=g0(),ts="data-scroll-locked",sL=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
178
|
+
.`.concat(BN,` {
|
|
179
|
+
overflow: hidden `).concat(r,`;
|
|
180
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
181
|
+
}
|
|
182
|
+
body[`).concat(ts,`] {
|
|
183
|
+
overflow: hidden `).concat(r,`;
|
|
184
|
+
overscroll-behavior: contain;
|
|
185
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
186
|
+
padding-left: `.concat(o,`px;
|
|
187
|
+
padding-top: `).concat(s,`px;
|
|
188
|
+
padding-right: `).concat(i,`px;
|
|
189
|
+
margin-left:0;
|
|
190
|
+
margin-top:0;
|
|
191
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
192
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.`).concat(Ya,` {
|
|
196
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.`).concat(qa,` {
|
|
200
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.`).concat(Ya," .").concat(Ya,` {
|
|
204
|
+
right: 0 `).concat(r,`;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.`).concat(qa," .").concat(qa,` {
|
|
208
|
+
margin-right: 0 `).concat(r,`;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
body[`).concat(ts,`] {
|
|
212
|
+
`).concat(jN,": ").concat(a,`px;
|
|
213
|
+
}
|
|
214
|
+
`)},y0=function(){var e=parseInt(document.body.getAttribute(ts)||"0",10);return isFinite(e)?e:0},iL=function(){P.useEffect(function(){return document.body.setAttribute(ts,(y0()+1).toString()),function(){var e=y0()-1;e<=0?document.body.removeAttribute(ts):document.body.setAttribute(ts,e.toString())}},[])},aL=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;iL();var s=P.useMemo(function(){return rL(o)},[o]);return P.createElement(oL,{styles:sL(s,!t,o,n?"":"!important")})},Md=!1;if(typeof window<"u")try{var Za=Object.defineProperty({},"passive",{get:function(){return Md=!0,!0}});window.addEventListener("test",Za,Za),window.removeEventListener("test",Za,Za)}catch{Md=!1}var ns=Md?{passive:!1}:!1,lL=function(e){return e.tagName==="TEXTAREA"},v0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lL(e)&&n[t]==="visible")},cL=function(e){return v0(e,"overflowY")},uL=function(e){return v0(e,"overflowX")},b0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=w0(e,r);if(o){var s=x0(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dL=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},fL=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},w0=function(e,t){return e==="v"?cL(t):uL(t)},x0=function(e,t){return e==="v"?dL(t):fL(t)},hL=function(e,t){return e==="h"&&t==="rtl"?-1:1},pL=function(e,t,n,r,o){var s=hL(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,u=i>0,d=0,f=0;do{var h=x0(e,a),p=h[0],m=h[1],y=h[2],b=m-y-s*p;(p||b)&&w0(e,a)&&(d+=b,f+=p),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(d)<1||!o)||!u&&(Math.abs(f)<1||!o))&&(c=!0),c},Xa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},T0=function(e){return[e.deltaX,e.deltaY]},S0=function(e){return e&&"current"in e?e.current:e},mL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gL=function(e){return`
|
|
215
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
216
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
217
|
+
`)},yL=0,rs=[];function vL(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(yL++)[0],s=P.useState(g0)[0],i=P.useRef(e);P.useEffect(function(){i.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Ad([e.lockRef.current],(e.shards||[]).map(S0),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=P.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var b=Xa(m),v=n.current,g="deltaX"in m?m.deltaX:v[0]-b[0],S="deltaY"in m?m.deltaY:v[1]-b[1],T,E=m.target,C=Math.abs(g)>Math.abs(S)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var I=b0(C,E);if(!I)return!0;if(I?T=C:(T=C==="v"?"h":"v",I=b0(C,E)),!I)return!1;if(!r.current&&"changedTouches"in m&&(g||S)&&(r.current=T),!T)return!0;var A=r.current||T;return pL(A,y,m,A==="h"?g:S,!0)},[]),l=P.useCallback(function(m){var y=m;if(!(!rs.length||rs[rs.length-1]!==s)){var b="deltaY"in y?T0(y):Xa(y),v=t.current.filter(function(T){return T.name===y.type&&(T.target===y.target||y.target===T.shadowParent)&&mL(T.delta,b)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var g=(i.current.shards||[]).map(S0).filter(Boolean).filter(function(T){return T.contains(y.target)}),S=g.length>0?a(y,g[0]):!i.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),c=P.useCallback(function(m,y,b,v){var g={name:m,delta:y,target:b,should:v,shadowParent:bL(b)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(S){return S!==g})},1)},[]),u=P.useCallback(function(m){n.current=Xa(m),r.current=void 0},[]),d=P.useCallback(function(m){c(m.type,T0(m),m.target,a(m,e.lockRef.current))},[]),f=P.useCallback(function(m){c(m.type,Xa(m),m.target,a(m,e.lockRef.current))},[]);P.useEffect(function(){return rs.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ns),document.addEventListener("touchmove",l,ns),document.addEventListener("touchstart",u,ns),function(){rs=rs.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,ns),document.removeEventListener("touchmove",l,ns),document.removeEventListener("touchstart",u,ns)}},[]);var h=e.removeScrollBar,p=e.inert;return P.createElement(P.Fragment,null,p?P.createElement(s,{styles:gL(o)}):null,h?P.createElement(aL,{gapMode:e.gapMode}):null)}function bL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wL=qN(m0,vL);var E0=P.forwardRef(function(e,t){return P.createElement(Ka,kn({},e,{ref:t,sideCar:wL}))});E0.classNames=Ka.classNames;const xL=(e,t)=>zi()?t:window.matchMedia(e).matches,TL=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(xL(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},dn="600ms",SL={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:dn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:dn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:dn}},EL={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:dn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:dn}},Nd={drawer:e=>e==="left"?SL:EL,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:dn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:dn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:dn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:dn},enter:{opacity:1,scale:[1.05,1],animationDuration:dn},exit:{opacity:0,scale:.97,animationDuration:dn}}},CL=po("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"}}),PL={top:0,left:0,right:0,bottom:-1},kL=e=>e*.62,IL=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=kL(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(dt.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:PL,whileDrag:{cursor:"grabbing"},className:$e("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})},Ld={drawer:"right",sheet:"none",dialog:"none"},AL=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=w.useId(),a=w.useId(),l=TL("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:Ld[e]:r?Ld[e]:Ld.sheet,d=l||r?Nd[e]:Nd.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=Wr({open:s.open,onOpenChange:s.onChange}),y=ci(m),b=zr(m),v=jr(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:g,getFloatingProps:S}=Hr([y,b,v]),T=s.trigger,E=_r(void 0),C=()=>s.onChange(!1);return x.jsxs(w.Fragment,{children:[s.trigger?x.jsx(w.Fragment,{children:s.asChild?x.jsx(Vo,{ref:p.setReference,...g({layoutId:s.layoutId}),children:T}):x.jsx(dt.button,{ref:p.setReference,...g(),layoutId:s.layoutId,type:"button",children:T})}):null,x.jsx(Rr,{children:x.jsx(er,{mode:"wait",presenceAffectsLayout:!0,children:s.open?x.jsx(E0,{forwardProps:!0,removeScrollBar:!0,allowPinchZoom:!0,noIsolation:!0,children:x.jsx(SN,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"flex items-start justify-center p-10"}`,children:x.jsx(Zo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(dt.div,{exit:"exit",animate:"enter",initial:"initial",variants:f,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:CL({position:u,type:h}),style:h==="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:C,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(Tu,{})})}):null,c&&t?x.jsx(IL,{onChange:s.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})})}):null})})]})},OL=e=>x.jsx(dt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),C0=({as:e,title:t,children:n,placement:r,focus:o=!0,hover:s=!0,enabled:i=!0,popover:a=!0,followCursor:l=!1,...c})=>{const[u,d]=w.useState(!1),f=w.useRef(null),h=e||"span",{refs:p,floatingStyles:m,context:y}=Wr({open:u,placement:r,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:ri,middleware:[md(),oi(5),gd({fallbackAxisSideDirection:"start"}),Eb({padding:5,element:f})]}),b=Vb(y,{move:!0,delay:{open:l0},enabled:i?s:!1,handleClose:a?a0():null}),v=AN(y,{enabled:i?o:!1}),g=ci(y,{enabled:i?a:!1}),S=jr(y,{enabled:i}),T=zr(y,{role:"tooltip",enabled:i}),E=CN(y,{enabled:!!i&&!!l}),{getReferenceProps:C,getFloatingProps:I}=Hr([T,S,E,o?v:void 0,s?b:void 0,a?g:void 0]);return x.jsxs(w.Fragment,{children:[x.jsx(h,{ref:p.setReference,...C(c),children:t}),x.jsx(Rr,{preserveTabOrder:!0,children:u&&x.jsxs(mo,{...I(),ref:p.setFloating,style:m,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(Db,{ref:f,context:y,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Qa{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++)Qa.getDescendantProperty(a[l],s,r);else s&&Qa.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Ur{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=Ur.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=Qa.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Ur.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=Ur.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 Ur.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 P0=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:$e("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-disabled:text-disabled group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(C0,{as:"button",type:"button",title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(by,{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(yy,{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(VI,{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]}),ui=w.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,componentName:m,placeholder:y,hideLeft:b=!1,required:v,disabled:g},S)=>{const T=d??h,E=kt(),C=e??E.inputOptionalLabel;return x.jsxs("fieldset",{ref:S,form:u,disabled:g,"data-error":!!c,"aria-disabled":g,"data-component":m,"data-interactive":!!s,className:$e("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:T,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(P0,{info:a,hideLeft:b,reportStatus:!0,title:p,placeholder:y,children:C||n?x.jsxs(w.Fragment,{children:[v?null:x.jsx("span",{"aria-disabled":g,className:"text-opacity-70 aria-disabled:text-disabled",children:C}),n?x.jsx(w.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,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})]})}),_L=e=>x.jsx(w.Fragment,{children:e.children}),k0=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??_L,a=r.label??r.value;return r.hidden?null:x.jsx(dt.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(LI,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),DL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},ML={caseSensitive:!1,sort:!1},NL=[],LL=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const y=w.useRef(null),b=p.value??p.defaultValue??"",v=kt(),[g,S]=w.useState(!1),[T,E]=w.useState(""),[C,I]=w.useState(b),[A,O]=w.useState(()=>{var R;return((R=e.find(pe=>pe.value===b))==null?void 0:R.label)??b}),[L,_]=w.useState(null),V=w.useRef(NL),k=t&&T!==""?[{value:T,label:T,"data-dynamic":"true"},...e]:e,M=new Ur(k,["value","label"],ML).search(T),F=t?void 0:`^(${e.map(R=>`${As(R.value)}${R.label?"|"+As(R.label):""}`).join("|")})$`;w.useEffect(()=>{if(p.value){const R=e.find(pe=>pe.value===p.value);I((R==null?void 0:R.label)??p.value)}},[p.value]);const{x:N,y:B,strategy:z,refs:D,context:j}=Wr({open:g,transform:!0,strategy:"absolute",onOpenChange:S,whileElementsMounted:ri,middleware:[oi(4),Sb({elementContext:"reference",padding:10,apply(R){var xe;const pe=(xe=y.current)==null?void 0:xe.getBoundingClientRect().width;Object.assign(R.elements.floating.style,{width:`${pe}px`,maxWidth:`${pe}px`,maxHeight:`${Math.min(250,R.availableHeight)}px`})}})]}),K=s0(j,DL),{getReferenceProps:J,getFloatingProps:X,getItemProps:G}=Hr([zr(j,{role:"listbox"}),jr(j),kd(j,{cols:0,listRef:V,loop:!0,virtual:!0,allowEscape:!0,activeIndex:L,selectedIndex:L,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:R=>_(pe=>R??pe)})]);w.useEffect(()=>{const R=D.reference.current;if(R)return ks(R)},[]);const $=(R,pe)=>{I(R.value);const xe=D.reference.current;if(!xe)return;xe==null||xe.setAttribute("data-value",R.value),xe.value=R.value;const te=new Event("change",{bubbles:!1,cancelable:!0});xe.dispatchEvent(te),p.onChange&&p.onChange(te),O(R.label??""),S(!1),E(""),_(pe)},W=R=>{var xe;const pe=R.target.value;return E(pe),!g&&pe===""?S(!0):(R.target.name=p.name||"",pe?S(!0):(xe=p.onChange)==null?void 0:xe.call(p,R))},H=()=>{S(!0),E("")},U=()=>{var R;E(""),I(""),(R=D.reference.current)==null||R.setAttribute("data-value",""),O(""),lc(D.reference.current),S(!1)},Y=p.id||p.name,ce=()=>{var R;S(!0),E(""),(R=D.reference.current)==null||R.focus()};return x.jsxs(ui,{...p,left:d,error:f,ref:y,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ce,children:[x.jsx(bu,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]}),C?x.jsx("button",{type:"button",onClick:U,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",{"data-shadow":"true",...J({...p,onChange:W,onFocus:H,pattern:F,ref:D.setReference,name:`${Y}-shadow`,id:`${Y}-shadow`,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),S(!1);if(R.key==="Enter"){if(L!==null&&M[L])return R.preventDefault(),$(M[L],L);if(M.length===1)return R.preventDefault(),$(M[0],0)}}}),"data-value":C,"data-error":!!f,"data-name":Y,"data-target":Y,required:h,value:g?T:A||C,"aria-autocomplete":"list",autoComplete:"off",className:$e("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",p.className)}),x.jsx("input",{id:Y,name:Y,type:"hidden","data-origin":Y,ref:m,required:h,defaultValue:p.value||C||void 0}),x.jsx(Rr,{preserveTabOrder:!0,children:g?x.jsx(Zo,{guards:!0,returnFocus:!1,context:j,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...X({ref:D.setFloating,style:{position:z,left:(N??0)+(C?26:16),top:B??0,...K.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:x.jsxs(er,{children:[M.map((R,pe)=>{const xe=C===R.value||C===R.label;return x.jsx(k0,{...G({onClick:()=>$(R,pe),ref:te=>void(V.current[pe]=te),selected:L===pe}),option:R,active:xe,selected:L===pe},`${R.value}-option`)}),M.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:o||v.autocompleteEmpty})}):null]})})}):null})]})}),Ja=0,pr=1,os=2,I0=4;function di(e,t){return n=>e(t(n))}function FL(e,t){return t(e)}function A0(e,t){return n=>e(t,n)}function O0(e,t){return()=>e(t)}function el(e,t){return t(e),e}function Xe(...e){return e}function VL(e){e()}function _0(e){return()=>e}function $L(...e){return()=>{e.map(VL)}}function Fd(e){return e!==void 0}function Gr(){}function We(e,t){return e(pr,t)}function Ee(e,t){e(Ja,t)}function Vd(e){e(os)}function Lt(e){return e(I0)}function he(e,t){return We(e,A0(t,Ja))}function In(e,t){const n=e(pr,r=>{n(),t(r)});return n}function Oe(){const e=[];return(t,n)=>{switch(t){case os:e.splice(0,e.length);return;case pr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ja:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ee(e){let t=e;const n=Oe();return(r,o)=>{switch(r){case pr:o(t);break;case Ja:t=o;break;case I0:return t}return n(r,o)}}function RL(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case pr:return s?n===s?void 0:(r(),n=s,t=We(e,s),t):(r(),Gr);case os:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Xt(e){return el(Oe(),t=>he(e,t))}function Ft(e,t){return el(ee(t),n=>he(e,n))}function BL(...e){return t=>e.reduceRight(FL,t)}function q(e,...t){const n=BL(...t);return(r,o)=>{switch(r){case pr:return We(e,n(o));case os:Vd(e);return}}}function D0(e,t){return e===t}function Qe(e=D0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ve(e){return t=>n=>{e(n)&&t(n)}}function ae(e){return t=>di(t,e)}function An(e){return t=>()=>t(e)}function On(e,t){return n=>r=>n(t=e(t,r))}function ss(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function M0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ce(...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);We(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 N0(...e){return function(t,n){switch(t){case pr:return $L(...e.map(r=>We(r,n)));case os:return;default:throw new Error(`unrecognized action ${t}`)}}}function we(e,t=D0){return q(e,Qe(t))}function Et(...e){const t=Oe(),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);We(s,l=>{n[i]=l,r=r|a,r===o&&Ee(t,n)})}),function(s,i){switch(s){case pr:return r===o&&i(n),We(t,i);case os:return Vd(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ve(e,t=[],{singleton:n}={singleton:!0}){return{id:jL(),constructor:e,dependencies:t,singleton:n}}const jL=()=>Symbol();function WL(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 HL(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 tl=typeof document<"u"?w.useLayoutEffect:w.useEffect;function $d(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(b,v){b.propsReady&&Ee(b.propsReady,!1);for(const g of r){const S=b[t.required[g]];Ee(S,v[g])}for(const g of o)if(g in v){const S=b[t.optional[g]];Ee(S,v[g])}b.propsReady&&Ee(b.propsReady,!0)}function c(b){return s.reduce((v,g)=>(v[g]=S=>{const T=b[t.methods[g]];Ee(T,S)},v),{})}function u(b){return i.reduce((v,g)=>(v[g]=RL(b[t.events[g]]),v),{})}const d=w.forwardRef((b,v)=>{const{children:g,...S}=b,[T]=w.useState(()=>el(WL(e),C=>l(C,S))),[E]=w.useState(O0(u,T));return tl(()=>{for(const C of i)C in S&&We(E[C],S[C]);return()=>{Object.values(E).map(Vd)}},[S,E,T]),tl(()=>{l(T,S)}),w.useImperativeHandle(v,_0(c(T))),w.createElement(a.Provider,{value:T},n?w.createElement(n,HL([...r,...o,...i],S),g):g)}),f=b=>w.useCallback(A0(Ee,w.useContext(a)[b]),[b]),h=b=>{const g=w.useContext(a)[b],S=w.useCallback(T=>We(g,T),[g]);return w.useSyncExternalStore(S,()=>Lt(g),()=>Lt(g))},p=b=>{const g=w.useContext(a)[b],[S,T]=w.useState(O0(Lt,g));return tl(()=>We(g,E=>{E!==S&&T(_0(E))}),[g,S]),S},m=w.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(b,v)=>{const S=w.useContext(a)[b];tl(()=>We(S,v),[v,S])}}}const zL=typeof document<"u"?w.useLayoutEffect:w.useEffect;var Qt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Qt||{});const UL={0:"debug",1:"log",2:"warn",3:"error"},GL=()=>typeof globalThis>"u"?window:globalThis,gr=Ve(()=>{const e=ee(3);return{log:ee((n,r,o=1)=>{var s;const i=(s=GL().VIRTUOSO_LOG_LEVEL)!=null?s:Lt(e);o>=i&&console[UL[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Rd(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 _n(e,t=!0){return Rd(e,t).callbackRef}function L0(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=YL(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(qL("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Rd(a,n)}function YL(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},Qt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function qL(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Qt.WARN),t==="normal"?0:parseInt(t??"0",10)}function fn(e,t){return Math.round(e.getBoundingClientRect()[t])}function F0(e,t){return Math.abs(e-t)<1.01}function V0(e,t,n,r=Gr,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,y=h?window.innerHeight:f.offsetHeight,b=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};d.suppressFlushSync?b():Ni.flushSync(b),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,y;f===window?(m=Math.max(fn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=f.scrollHeight,p=fn(f,"height"),y=f.scrollTop);const b=m-p;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),F0(p,m)||d.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Bt=Ve(()=>{const e=Oe(),t=Oe(),n=ee(0),r=Oe(),o=ee(0),s=Oe(),i=Oe(),a=ee(0),l=ee(0),c=ee(0),u=ee(0),d=Oe(),f=Oe(),h=ee(!1);return he(q(e,ae(({scrollTop:p})=>p)),t),he(q(e,ae(({scrollHeight:p})=>p)),i),he(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),fi={lvl:0};function $0(e,t,n,r=fi,o=fi){return{k:e,v:t,lvl:n,l:r,r:o}}function Ge(e){return e===fi}function is(){return fi}function Bd(e,t){if(Ge(e))return fi;const{k:n,l:r,r:o}=e;if(t===n){if(Ge(r))return o;if(Ge(o))return r;{const[s,i]=R0(r);return nl(wt(e,{k:s,v:i,l:B0(r)}))}}else return t<n?nl(wt(e,{l:Bd(r,t)})):nl(wt(e,{r:Bd(o,t)}))}function hi(e,t){if(!Ge(e))return t===e.k?e.v:t<e.k?hi(e.l,t):hi(e.r,t)}function hn(e,t,n="k"){if(Ge(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=hn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return hn(e.l,t,n)}function Jt(e,t,n){return Ge(e)?$0(t,n,1):t===e.k?wt(e,{k:t,v:n}):t<e.k?j0(wt(e,{l:Jt(e.l,t,n)})):j0(wt(e,{r:Jt(e.r,t,n)}))}function jd(e,t,n){if(Ge(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(jd(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(jd(i,t,n))),a}function Yr(e){return Ge(e)?[]:[...Yr(e.l),{k:e.k,v:e.v},...Yr(e.r)]}function R0(e){return Ge(e.r)?[e.k,e.v]:R0(e.r)}function B0(e){return Ge(e.r)?e.l:nl(wt(e,{r:B0(e.r)}))}function wt(e,t){return $0(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 Wd(e){return Ge(e)||e.lvl>e.r.lvl}function j0(e){return Hd(H0(e))}function nl(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(Wd(t))return H0(wt(e,{lvl:r-1}));if(!Ge(t)&&!Ge(t.r))return wt(t.r,{l:wt(t,{r:t.r.l}),r:wt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Wd(e))return Hd(wt(e,{lvl:r-1}));if(!Ge(n)&&!Ge(n.l)){const o=n.l,s=Wd(o)?n.lvl-1:n.lvl;return wt(o,{l:wt(e,{r:o.l,lvl:r-1}),r:Hd(wt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function rl(e,t,n){if(Ge(e))return[];const r=hn(e,t)[0];return KL(jd(e,r,n))}function W0(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 KL(e){return W0(e,({k:t,v:n})=>({index:t,value:n}))}function Hd(e){const{r:t,lvl:n}=e;return!Ge(t)&&!Ge(t.r)&&t.lvl===n&&t.r.lvl===n?wt(t,{l:wt(e,{r:t.l}),lvl:n+1}):e}function H0(e){const{l:t}=e;return!Ge(t)&&t.lvl===e.lvl?wt(t,{r:wt(e,{l:t.r})}):e}function ol(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 z0(e,t,n){return e[ol(e,t,n)]}function ZL(e,t,n,r){const o=ol(e,t,r),s=ol(e,n,r,o);return e.slice(o,s+1)}const zd=Ve(()=>({recalcInProgress:ee(!1)}),[],{singleton:!0});function XL(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 U0(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 QL(e,t){let n=Ge(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Ge(e)){e=Jt(e,0,o);continue}const a=rl(e,s-1,i+1);if(a.some(XL(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Bd(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Jt(e,i+1,f));c&&(e=Jt(e,s,o))}return[e,n]}function JL(){return{offsetTree:[],sizeTree:is(),groupOffsetTree:is(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Ud({index:e},t){return t===e?0:t<e?-1:1}function eF({offset:e},t){return t===e?0:t<e?-1:1}function tF(e){return{index:e.index,value:e}}function nF(e,t,n,r=0){return r>0&&(t=Math.max(t,z0(e,r,Ud).offset)),W0(ZL(e,t,n,eF),tF)}function Gd(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=ol(o,t-1,Ud),a=o[l].offset;const u=hn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===hn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of rl(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function rF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Qt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Ge(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Jt(Jt(p,m,f),m+1,h),i)}else[i,a]=QL(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Gd(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Jt(f,h,pi(h,l,o)),is()),groupIndices:n}}function pi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=z0(t,e,Ud),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 G0(e,t,n){if(oF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Y0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Y0(e,t){if(!sl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function sl(e){return!Ge(e.groupOffsetTree)}function sF(e){return Yr(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 iF={offsetHeight:"height",offsetWidth:"width"},Dn=Ve(([{log:e},{recalcInProgress:t}])=>{const n=Oe(),r=Oe(),o=Ft(r,0),s=Oe(),i=Oe(),a=ee(0),l=ee([]),c=ee(void 0),u=ee(void 0),d=ee((T,E)=>fn(T,iF[E])),f=ee(void 0),h=ee(0),p=JL(),m=Ft(q(n,Ce(l,e,h),On(rF,p),Qe()),p),y=Ft(q(l,Qe(),On((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ae(({prev:T})=>T)),[]);he(q(l,ve(T=>T.length>0),Ce(m,h),ae(([T,E,C])=>{const I=T.reduce((A,O,L)=>Jt(A,O,pi(O,E.offsetTree,C)||L),is());return{...E,groupIndices:T,groupOffsetTree:I}})),m),he(q(r,Ce(m),ve(([T,{lastIndex:E}])=>T<E),ae(([T,{lastIndex:E,lastSize:C}])=>[{startIndex:T,endIndex:E,size:C}])),n),he(c,u);const b=Ft(q(c,ae(T=>T===void 0)),!0);he(q(u,ve(T=>T!==void 0&&Ge(Lt(m).sizeTree)),ae(T=>[{startIndex:0,endIndex:0,size:T}])),n);const v=Xt(q(n,Ce(m),On(({sizes:T},[E,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:p}),ae(T=>T.changed)));We(q(a,On((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),ae(T=>T.diff)),T=>{const{groupIndices:E}=Lt(m);if(T>0)Ee(t,!0),Ee(s,T+U0(T,E));else if(T<0){const C=Lt(y);C.length>0&&(T-=U0(-T,C)),Ee(i,T)}}),We(q(a,Ce(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},Qt.ERROR)});const g=Xt(s);he(q(s,Ce(m),ae(([T,E])=>{const C=E.groupIndices.length>0,I=[],A=E.lastSize;if(C){const O=hi(E.sizeTree,0);let L=0,_=0;for(;L<T;){const M=E.groupIndices[_],F=E.groupIndices.length===_+1?1/0:E.groupIndices[_+1]-M-1;I.push({startIndex:M,endIndex:M,size:O}),I.push({startIndex:M+1,endIndex:M+1+F-1,size:A}),_++,L+=F+1}const V=Yr(E.sizeTree);return L!==T&&V.shift(),V.reduce((M,{k:F,v:N})=>{let B=M.ranges;return M.prevSize!==0&&(B=[...M.ranges,{startIndex:M.prevIndex,endIndex:F+T-1,size:M.prevSize}]),{ranges:B,prevIndex:F+T,prevSize:N}},{ranges:I,prevIndex:T,prevSize:0}).ranges}return Yr(E.sizeTree).reduce((O,{k:L,v:_})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:L+T-1,size:O.prevSize}],prevIndex:L+T,prevSize:_}),{ranges:[],prevIndex:0,prevSize:A}).ranges})),n);const S=Xt(q(i,Ce(m,h),ae(([T,{offsetTree:E},C])=>{const I=-T;return pi(I,E,C)})));return he(q(i,Ce(m,h),ae(([T,E,C])=>{if(E.groupIndices.length>0){if(Ge(E.sizeTree))return E;let A=is();const O=Lt(y);let L=0,_=0,V=0;for(;L<-T;){V=O[_];const M=O[_+1]-V-1;_++,L+=M+1}if(A=Yr(E.sizeTree).reduce((M,{k:F,v:N})=>Jt(M,Math.max(0,F+T),N),A),L!==-T){const M=hi(E.sizeTree,V);A=Jt(A,0,M);const F=hn(E.sizeTree,-T+1)[1];A=Jt(A,1,F)}return{...E,sizeTree:A,...Gd(E.offsetTree,0,A,C)}}else{const A=Yr(E.sizeTree).reduce((O,{k:L,v:_})=>Jt(O,Math.max(0,L+T),_),is());return{...E,sizeTree:A,...Gd(E.offsetTree,0,A,C)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:v,statefulTotalCount:o,trackItemSizes:b,itemSize:d}},Xe(gr,zd),{singleton:!0}),aF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function q0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!aF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const mi=Ve(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Oe(),p=Oe(),m=ee(0);let y=null,b=null,v=null;function g(){y&&(y(),y=null),v&&(v(),v=null),b&&(clearTimeout(b),b=null),Ee(o,!1)}return he(q(h,Ce(e,s,t,m,l,c,f),Ce(r,u,d),ae(([[S,T,E,C,I,A,O,L],_,V,k])=>{const M=q0(S),{align:F,behavior:N,offset:B}=M,z=C-1,D=G0(M,T,z);let j=pi(D,T.offsetTree,_)+A;F==="end"?(j+=V+hn(T.sizeTree,D)[1]-E+k,D===z&&(j+=O)):F==="center"?j+=(V+hn(T.sizeTree,D)[1]-E+k)/2:j-=I,B&&(j+=B);const K=J=>{g(),J?(L("retrying to scroll to",{location:S},Qt.DEBUG),Ee(h,S)):(Ee(p,!0),L("list did not change, scroll successful",{},Qt.DEBUG))};if(g(),N==="smooth"){let J=!1;v=We(n,X=>{J=J||X}),y=In(a,()=>{K(J)})}else y=In(q(n,lF(150)),K);return b=setTimeout(()=>{g()},1200),Ee(o,!0),L("scrolling from index to",{index:D,top:j,behavior:N},Qt.DEBUG),{top:j,behavior:N}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Xe(Dn,Bt,gr),{singleton:!0});function lF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const gi="up",yi="down",cF="none",uF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},dF=0,vi=Ve(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ee(!1),a=ee(!0),l=Oe(),c=Oe(),u=ee(4),d=ee(dF),f=Ft(q(N0(q(we(t),ss(1),An(!0)),q(we(t),ss(1),An(!1),M0(100))),Qe()),!1),h=Ft(q(N0(q(s,An(!0)),q(s,An(!1),M0(200))),Qe()),!1);he(q(Et(we(t),we(d)),ae(([v,g])=>v<=g),Qe()),a),he(q(a,mr(50)),c);const p=Xt(q(Et(e,we(n),we(r),we(o),we(u)),On((v,[{scrollTop:g,scrollHeight:S},T,E,C,I])=>{const A=g+T-S>-I,O={viewportHeight:T,scrollTop:g,scrollHeight:S};if(A){let _,V;return g>v.state.scrollTop?(_="SCROLLED_DOWN",V=v.state.scrollTop-g):(_="SIZE_DECREASED",V=v.state.scrollTop-g||v.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:_,scrollTopDelta:V}}let L;return O.scrollHeight>v.state.scrollHeight?L="SIZE_INCREASED":T<v.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<v.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:O}},uF),Qe((v,g)=>v&&v.atBottom===g.atBottom))),m=Ft(q(e,On((v,{scrollTop:g,scrollHeight:S,viewportHeight:T})=>{if(F0(v.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const E=S-(g+T)<1;return v.scrollTop!==g&&E?{scrollHeight:S,scrollTop:g,jump:v.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ve(v=>v.changed),ae(v=>v.jump)),0);he(q(p,ae(v=>v.atBottom)),i),he(q(i,mr(50)),l);const y=ee(yi);he(q(e,ae(({scrollTop:v})=>v),Qe(),On((v,g)=>Lt(h)?{direction:v.direction,prevScrollTop:g}:{direction:g<v.prevScrollTop?gi:yi,prevScrollTop:g},{direction:yi,prevScrollTop:0}),ae(v=>v.direction)),y),he(q(e,mr(50),An(cF)),y);const b=ee(0);return he(q(f,ve(v=>!v),An(0)),b),he(q(t,mr(100),Ce(f),ve(([v,g])=>!!g),On(([v,g],[S])=>[g,S],[0,0]),ae(([v,g])=>g-v)),b),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:m}},Xe(Bt)),yr=Ve(([{log:e}])=>{const t=ee(!1),n=Xt(q(t,ve(r=>r),Qe()));return We(t,r=>{r&&Lt(e)("props updated",{},Qt.DEBUG)}),{propsReady:t,didMount:n}},Xe(gr),{singleton:!0});function Yd(e,t){e==0?t():requestAnimationFrame(()=>Yd(e-1,t))}function qd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const bi=Ve(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=ee(!0),l=ee(0),c=ee(!0);return he(q(i,Ce(l),ve(([u,d])=>!!d),An(!1)),a),he(q(i,Ce(l),ve(([u,d])=>!!d),An(!1)),c),We(q(Et(t,i),Ce(a,e,n,c),ve(([[,u],d,{sizeTree:f},h,p])=>u&&(!Ge(f)||Fd(h))&&!d&&!p),Ce(l)),([,u])=>{In(s,()=>{Ee(c,!0)}),Yd(4,()=>{In(r,()=>{Ee(a,!0)}),Ee(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Xe(Dn,Bt,mi,yr),{singleton:!0});function K0(e){return e?e==="smooth"?"smooth":"auto":!1}const fF=(e,t)=>typeof e=="function"?K0(e(t)):t&&K0(e),hF=Ve(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ee(!1),d=Oe();let f=null;function h(m){Ee(o,{index:"LAST",align:"end",behavior:m})}We(q(Et(q(we(e),ss(1)),a),Ce(we(u),n,s,c),ae(([[m,y],b,v,g,S])=>{let T=y&&g,E="auto";return T&&(E=fF(b,v||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),ve(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{f&&(f(),f=null),f=In(t,()=>{Lt(l)("following output to ",{totalCount:m},Qt.DEBUG),h(y),f=null})});function p(m){const y=In(r,b=>{m&&!b.atBottom&&b.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Lt(l)("scrolling to bottom due to increased size",{},Qt.DEBUG),h("auto"))});setTimeout(y,100)}return We(q(Et(we(u),e,i),ve(([m,,y])=>m&&y),On(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),ve(({refreshed:m})=>m),Ce(u,e)),([,m])=>{Lt(s)&&p(m!==!1)}),We(d,()=>{p(Lt(u)!==!1)}),We(Et(we(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Xe(Dn,vi,mi,bi,yr,gr,Bt));function pF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Z0=Ve(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Oe(),i=Oe(),a=Xt(q(s,ae(pF)));return he(q(a,ae(l=>l.totalCount)),e),he(q(a,ae(l=>l.groupIndices)),t),he(q(Et(r,n,o),ve(([l,c])=>sl(c)),ae(([l,c,u])=>hn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Qe(),ae(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Xe(Dn,Bt));function wi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function X0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const il="top",al="bottom",Q0="none";function J0(e,t,n){return typeof e=="number"?n===gi&&t===il||n===yi&&t===al?e:0:n===gi?t===il?e.main:e.reverse:t===al?e.main:e.reverse}function ew(e,t){return typeof e=="number"?e:e[t]||0}const Kd=Ve(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Oe(),i=ee(0),a=ee(0),l=ee(0),c=Ft(q(Et(we(e),we(t),we(r),we(s,wi),we(l),we(i),we(o),we(n),we(a)),ae(([u,d,f,[h,p],m,y,b,v,g])=>{const S=u-v,T=y+b,E=Math.max(f-S,0);let C=Q0;const I=ew(g,il),A=ew(g,al);return h-=v,h+=f+b,p+=f+b,p-=v,h>u+T-I&&(C=gi),p<u-E+d+A&&(C=yi),C!==Q0?[Math.max(S-f-J0(m,il,C)-I,0),S-E-b+d+J0(m,al,C)+A]:null}),ve(u=>u!=null),Qe(wi)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Xe(Bt),{singleton:!0});function mF(e,t,n){if(sl(t)){const r=Y0(e,t);return[{index:hn(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 Zd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function tw(e,t,n){if(e.length===0)return[];if(!sl(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=rl(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 ll(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 d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:tw(e,o,s),topItems:tw(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function nw(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=qd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return ll(c,[],a,o,n,r)}const qr=Ve(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=ee([]),y=ee(0),b=Oe();he(s.topItemsIndexes,m);const v=Ft(q(Et(h,p,we(i,wi),we(t),we(e),we(u),c,we(m),we(r),we(o),n),ve(([E,C,,I,,,,,,,A])=>{const O=A&&A.length!==I;return E&&!C&&!O}),ae(([,,[E,C],I,A,O,L,_,V,k,M])=>{const F=A,{sizeTree:N,offsetTree:B}=F,z=Lt(y);if(I===0)return{...Zd,totalCount:I};if(E===0&&C===0)return z===0?{...Zd,totalCount:I}:nw(z,O,A,V,k,M||[]);if(Ge(N))return z>0?null:ll(mF(qd(O,I),F,M),[],I,k,F,V);const D=[];if(_.length>0){const G=_[0],$=_[_.length-1];let W=0;for(const H of rl(N,G,$)){const U=H.value,Y=Math.max(H.start,G),ce=Math.min(H.end,$);for(let R=Y;R<=ce;R++)D.push({index:R,size:U,offset:W,data:M&&M[R]}),W+=U}}if(!L)return ll([],D,I,k,F,V);const j=_.length>0?_[_.length-1]+1:0,K=nF(B,E,C,j);if(K.length===0)return null;const J=I-1,X=el([],G=>{for(const $ of K){const W=$.value;let H=W.offset,U=$.start;const Y=W.size;if(W.offset<E){U+=Math.floor((E-W.offset+k)/(Y+k));const R=U-$.start;H+=R*Y+R*k}U<j&&(H+=(j-U)*Y,U=j);const ce=Math.min($.end,J);for(let R=U;R<=ce&&!(H>=C);R++)G.push({index:R,size:Y,offset:H,data:M&&M[R]}),H+=Y+k}});return ll(X,D,I,k,F,V)}),ve(E=>E!==null),Qe()),Zd);he(q(n,ve(Fd),ae(E=>E==null?void 0:E.length)),t),he(q(v,ae(E=>E.topListHeight)),d),he(d,l),he(q(v,ae(E=>[E.top,E.bottom])),a),he(q(v,ae(E=>E.items)),b);const g=Xt(q(v,ve(({items:E})=>E.length>0),Ce(t,n),ve(([{items:E},C])=>E[E.length-1].originalIndex===C-1),ae(([,E,C])=>[E-1,C]),Qe(wi),ae(([E])=>E))),S=Xt(q(v,mr(200),ve(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),ae(({items:E})=>E[0].index),Qe())),T=Xt(q(v,ve(({items:E})=>E.length>0),ae(({items:E})=>{let C=0,I=E.length-1;for(;E[C].type==="group"&&C<I;)C++;for(;E[I].type==="group"&&I>C;)I--;return{startIndex:E[C].index,endIndex:E[I].index}}),Qe(X0)));return{listState:v,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:T,itemsRendered:b,initialItemCount:y,...f}},Xe(Dn,Z0,Kd,bi,mi,vi,yr,zd),{singleton:!0}),gF=Ve(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(he(q(a,Ce(s),ve(([,l])=>l!==0),Ce(o,e,t,r,n),ae(([[,l],c,u,d,f,h=[]])=>nw(l,c,u,d,f,h))),i),{}),Xe(Dn,bi,qr,yr),{singleton:!0}),rw=Ve(([{scrollVelocity:e}])=>{const t=ee(!1),n=Oe(),r=ee(!1);return he(q(e,Ce(r,t,n),ve(([o,s])=>!!s),ae(([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}),Qe()),t),We(q(Et(t,e,n),Ce(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Xe(vi),{singleton:!0}),yF=Ve(([{topItemsIndexes:e}])=>{const t=ee(0);return he(q(t,ve(n=>n>0),ae(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Xe(qr)),ow=Ve(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Oe(),i=Ft(q(Et(e,r,t,n,o),ae(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return he(we(i),s),{totalListHeight:i,totalListHeightChanged:s}},Xe(Bt,qr),{singleton:!0});function sw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const vF=sw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),bF=Ve(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Xt(q(l,Ce(a),On(([,b,v,g],[{items:S,totalCount:T,bottom:E,offsetBottom:C},I])=>{const A=E+C;let O=0;return v===T&&b.length>0&&S.length>0&&(S[0].originalIndex===0&&b[0].originalIndex===0||(O=A-g,O!==0&&(O+=I))),[O,S,T,A]},[0,[],0,0]),ve(([b])=>b!==0),Ce(t,i,r,s,h,p),ve(([,b,v,g,,,S])=>!S&&!g&&b!==0&&v===gi),ae(([[b],,,,,v])=>(v("Upward scrolling compensation",{amount:b},Qt.DEBUG),b))));function y(b){b>0?(Ee(e,{top:-b,behavior:"auto"}),Ee(n,0)):(Ee(n,0),Ee(e,{top:-b,behavior:"auto"}))}return We(q(m,Ce(n,o)),([b,v,g])=>{g&&vF()?Ee(n,v-b):y(-b)}),We(q(Et(Ft(o,!1),n,p),ve(([b,v,g])=>!b&&!g&&v!==0),ae(([b,v])=>v),mr(1)),y),he(q(u,ae(b=>({top:-b}))),e),We(q(c,Ce(d,f),ae(([b,{lastSize:v,groupIndices:g,sizeTree:S},T])=>{function E(C){return C*(v+T)}if(g.length===0)return E(b);{let C=0;const I=hi(S,0);let A=0,O=0;for(;A<b;){A++,C+=I;let L=g.length===O+1?1/0:g[O+1]-g[O]-1;A+L>b&&(C-=I,L=b-A+1),A+=L,C+=E(L),O++}return C}})),b=>{Ee(n,b),requestAnimationFrame(()=>{Ee(e,{top:b}),requestAnimationFrame(()=>{Ee(n,0),Ee(p,!1)})})}),{deviation:n}},Xe(Bt,vi,qr,Dn,gr,zd)),wF=Ve(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ee(0);return We(q(e,Ce(r),ve(([,o])=>o!==0),ae(([,o])=>({top:o}))),o=>{In(q(n,ss(1),ve(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Ee(t,o)})})}),{initialScrollTop:r}},Xe(yr,Bt,qr),{singleton:!0}),xF=Ve(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ee(!1),r=Ft(q(Et(n,e,t),ve(([o])=>o),ae(([,o,s])=>Math.max(0,o-s)),mr(0),Qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Xe(Bt,ow),{singleton:!0}),Xd=Ve(([{scrollTo:e,scrollContainerState:t}])=>{const n=Oe(),r=Oe(),o=Oe(),s=ee(!1),i=ee(void 0);return he(q(Et(n,r),ae(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),he(q(e,Ce(r),ae(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Xe(Bt)),TF=({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,SF=Ve(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Oe();return he(q(u,Ce(e,o,t,s,i,a,r),Ce(n),ae(([[d,f,h,p,m,y,b,v],g])=>{const{done:S,behavior:T,align:E,calculateViewLocation:C=TF,...I}=d,A=G0(d,f,p-1),O=pi(A,f.offsetTree,g)+m+y,L=O+hn(f.sizeTree,A)[1],_=v+y,V=v+h-b,k=C({itemTop:O,itemBottom:L,viewportTop:_,viewportBottom:V,locationParams:{behavior:T,align:E,...I}});return k?S&&In(q(l,ve(M=>M===!1),ss(Lt(l)?1:2)),S):S&&S(),k}),ve(d=>d!==null)),c),{scrollIntoView:u}},Xe(Dn,Bt,mi,qr,gr),{singleton:!0}),EF=Ve(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Oe(),u=ee(void 0),d=ee(null),f=ee(null);return he(a,d),he(l,f),We(q(c,Ce(e,n,i,d,f,r)),([h,p,m,y,b,v,g])=>{const S=sF(p.sizeTree);y&&b!==null&&v!==null&&(m=b.scrollTop-v.offsetTop),m-=g,h({ranges:S,scrollTop:m})}),he(q(u,ve(Fd),ae(CF)),o),he(q(s,Ce(u),ve(([,h])=>h!==void 0),Qe(),ae(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Xe(Dn,Bt,bi,yr,Xd));function CF(e){return{offset:e.scrollTop,index:0,align:"start"}}const PF=Ve(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Xe(Kd,gF,yr,rw,ow,wF,xF,Xd,SF,gr)),iw=Ve(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,b,{listState:v,topItemsIndexes:g,...S},{scrollToIndex:T},E,{topItemCount:C},{groupCounts:I},A])=>(he(S.rangeChanged,A.scrollSeekRangeChanged),he(q(A.windowViewportRect,ae(O=>O.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...b,statefulTotalCount:c,listState:v,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...A,...m,sizes:d,...y}),Xe(Dn,bi,Bt,EF,hF,qr,mi,bF,yF,Z0,PF)),Qd="-webkit-sticky",aw="sticky",lw=sw(()=>{if(typeof document>"u")return aw;const e=document.createElement("div");return e.style.position=Qd,e.style.position===Qd?Qd:aw});function Jd(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,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Rd(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 cl=w.createContext(void 0),cw=w.createContext(void 0);function ef(e){return e}const kF=Ve(([e,t])=>({...e,...t}),Xe(iw,Ve(()=>{const e=ee(l=>`Item ${l}`),t=ee(null),n=ee(l=>`Group ${l}`),r=ee({}),o=ee(ef),s=ee("div"),i=ee(Gr),a=(l,c=null)=>Ft(q(r,ae(u=>u[l]),Qe()),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")}}))),IF=({height:e})=>w.createElement("div",{style:{height:e}}),AF={position:lw(),zIndex:1,overflowAnchor:"none"},OF={overflowAnchor:"none"},uw=w.memo(function({showTopList:t=!1}){const n=Ae("listState"),r=on("sizeRanges"),o=Ae("useWindowScroll"),s=Ae("customScrollParent"),i=on("windowScrollContainerState"),a=on("scrollContainerState"),l=s||o?i:a,c=Ae("itemContent"),u=Ae("context"),d=Ae("groupContent"),f=Ae("trackItemSizes"),h=Ae("itemSize"),p=Ae("log"),m=on("gap"),{callbackRef:y}=L0(r,h,f,t?Gr:l,p,m,s),[b,v]=w.useState(0);rf("deviation",k=>{b!==k&&v(k)});const g=Ae("EmptyPlaceholder"),S=Ae("ScrollSeekPlaceholder")||IF,T=Ae("ListComponent"),E=Ae("ItemComponent"),C=Ae("GroupComponent"),I=Ae("computeItemKey"),A=Ae("isSeeking"),O=Ae("groupIndices").length>0,L=Ae("alignToBottom"),_=Ae("initialItemFinalLocationReached"),V=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:L?"auto":0,..._?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?w.createElement(g,ct(g,u)):w.createElement(T,{...ct(T,u),ref:y,style:V,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const M=k.originalIndex,F=I(M+n.firstItemIndex,k.data,u);return A?w.createElement(S,{...ct(S,u),key:F,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?w.createElement(C,{...ct(C,u),key:F,"data-index":M,"data-known-size":k.size,"data-item-index":k.index,style:AF},d(k.index,u)):w.createElement(E,{...ct(E,u),...dw(E,k.data),key:F,"data-index":M,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:OF},O?c(k.index,k.groupIndex,k.data,u):c(k.index,k.data,u))}))}),_F={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},as=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),DF={width:"100%",position:lw(),top:0,zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function dw(e,t){return{item:typeof e=="string"?void 0:t}}const MF=w.memo(function(){const t=Ae("HeaderComponent"),n=on("headerHeight"),r=Ae("headerFooterTag"),o=_n(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=Ae("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),NF=w.memo(function(){const t=Ae("FooterComponent"),n=on("footerHeight"),r=Ae("headerFooterTag"),o=_n(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=Ae("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null});function tf({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"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=V0(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:h,style:{..._F,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ct(c,f)},i)})}function nf({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"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:b}=V0(l,u,c,Gr,h);return zL(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",b),t("scrollBy",y),w.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...ct(c,p)},i)})}const LF=({children:e})=>{const t=w.useContext(cl),n=on("viewportHeight"),r=on("fixedItemHeight"),o=Ae("alignToBottom"),s=_n(w.useMemo(()=>di(n,i=>fn(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:as(o),ref:s,"data-viewport-type":"element"},e)},FF=({children:e})=>{const t=w.useContext(cl),n=on("windowViewportRect"),r=on("fixedItemHeight"),o=Ae("customScrollParent"),s=Jd(n,o),i=Ae("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:as(i),"data-viewport-type":"window"},e)},VF=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...DF,marginTop:`${n}px`},o=Ae("context");return w.createElement(t,{style:r,...ct(t,o)},e)},$F=w.memo(function(t){const n=Ae("useWindowScroll"),r=Ae("topItemsIndexes").length>0,o=Ae("customScrollParent"),s=o||n?jF:BF,i=o||n?FF:LF;return w.createElement(s,{...t},r&&w.createElement(VF,null,w.createElement(uw,{showTopList:!0})),w.createElement(i,null,w.createElement(MF,null),w.createElement(uw,null),w.createElement(NF,null)))}),{Component:RF,usePublisher:on,useEmitterValue:Ae,useEmitter:rf}=$d(kF,{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"}},$F),BF=tf({usePublisher:on,useEmitterValue:Ae,useEmitter:rf}),jF=nf({usePublisher:on,useEmitterValue:Ae,useEmitter:rf}),fw=RF,hw={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},WF={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:pw,ceil:mw,floor:ul,min:of,max:xi}=Math;function HF(e){return{...WF,items:e}}function gw(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 zF(e,t){return e&&e.column===t.column&&e.row===t.row}function dl(e,t){return e&&e.width===t.width&&e.height===t.height}const UF=Ve(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:b,windowScrollContainerState:v,windowScrollTo:g},S])=>{const T=ee(0),E=ee(0),C=ee(hw),I=ee({height:0,width:0}),A=ee({height:0,width:0}),O=Oe(),L=Oe(),_=ee(0),V=ee(null),k=ee({row:0,column:0}),M=Oe(),F=Oe(),N=ee(!1),B=ee(0),z=ee(!0),D=ee(!1);We(q(p,Ce(B),ve(([$,W])=>!!W)),()=>{Ee(z,!1),Ee(E,0)}),We(q(Et(p,z,A,I,B,D),ve(([$,W,H,U,,Y])=>$&&!W&&H.height!==0&&U.height!==0&&!Y)),([,,,,$])=>{Ee(D,!0),Yd(1,()=>{Ee(O,$)}),In(q(r),()=>{Ee(n,[0,0]),Ee(z,!0)})}),he(q(F,ve($=>$!=null&&$.scrollTop>0),An(0)),E),We(q(p,Ce(F),ve(([,$])=>$!=null)),([,$])=>{$&&(Ee(I,$.viewport),Ee(A,$==null?void 0:$.item),Ee(k,$.gap),$.scrollTop>0&&(Ee(N,!0),In(q(r,ss(1)),W=>{Ee(N,!1)}),Ee(i,{top:$.scrollTop})))}),he(q(I,ae(({height:$})=>$)),o),he(q(Et(we(I,dl),we(A,dl),we(k,($,W)=>$&&$.column===W.column&&$.row===W.row),we(r)),ae(([$,W,H,U])=>({viewport:$,item:W,gap:H,scrollTop:U}))),M),he(q(Et(we(T),t,we(k,zF),we(A,dl),we(I,dl),we(V),we(E),we(N),we(z),we(B)),ve(([,,,,,,,$])=>!$),ae(([$,[W,H],U,Y,ce,R,pe,,xe,te])=>{const{row:me,column:re}=U,{height:fe,width:ue}=Y,{width:Pe}=ce;if(pe===0&&($===0||Pe===0))return hw;if(ue===0){const Wt=qd(te,$),ro=Wt===0?Math.max(pe-1,0):Wt;return HF(gw(Wt,ro,R))}const ot=vw(Pe,ue,re);let Me,yt;xe?W===0&&H===0&&pe>0?(Me=0,yt=pe-1):(Me=ot*ul((W+me)/(fe+me)),yt=ot*mw((H+me)/(fe+me))-1,yt=of($-1,xi(yt,ot-1)),Me=of(yt,xi(0,Me))):(Me=0,yt=-1);const ne=gw(Me,yt,R),{top:le,bottom:Ne}=yw(ce,U,Y,ne),Je=mw($/ot),Vt=Je*fe+(Je-1)*me-Ne;return{items:ne,offsetTop:le,offsetBottom:Vt,top:le,bottom:Ne,itemHeight:fe,itemWidth:ue}})),C),he(q(V,ve($=>$!==null),ae($=>$.length)),T),he(q(Et(I,A,C,k),ve(([$,W,{items:H}])=>H.length>0&&W.height!==0&&$.height!==0),ae(([$,W,{items:H},U])=>{const{top:Y,bottom:ce}=yw($,U,W,H);return[Y,ce]}),Qe(wi)),n);const j=ee(!1);he(q(r,Ce(j),ae(([$,W])=>W||$!==0)),j);const K=Xt(q(we(C),ve(({items:$})=>$.length>0),Ce(T,j),ve(([{items:$},W,H])=>H&&$[$.length-1].index===W-1),ae(([,$])=>$-1),Qe())),J=Xt(q(we(C),ve(({items:$})=>$.length>0&&$[0].index===0),An(0),Qe())),X=Xt(q(we(C),Ce(N),ve(([{items:$},W])=>$.length>0&&!W),ae(([{items:$}])=>({startIndex:$[0].index,endIndex:$[$.length-1].index})),Qe(X0),mr(0)));he(X,f.scrollSeekRangeChanged),he(q(O,Ce(I,A,T,k),ae(([$,W,H,U,Y])=>{const ce=q0($),{align:R,behavior:pe,offset:xe}=ce;let te=ce.index;te==="LAST"&&(te=U-1),te=xi(0,te,of(U-1,te));let me=sf(W,Y,H,te);return R==="end"?me=pw(me-W.height+H.height):R==="center"&&(me=pw(me-W.height/2+H.height/2)),xe&&(me+=xe),{top:me,behavior:pe}})),i);const G=Ft(q(C,ae($=>$.offsetBottom+$.bottom)),0);return he(q(m,ae($=>({width:$.visibleWidth,height:$.visibleHeight}))),I),{data:V,totalCount:T,viewportDimensions:I,itemDimensions:A,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:b,windowScrollContainerState:v,deviation:_,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:k,restoreStateFrom:F,...f,initialTopMostItemIndex:B,gridState:C,totalListHeight:G,...d,startReached:J,endReached:K,rangeChanged:X,stateChanged:M,propsReady:h,stateRestoreInProgress:N,...S}},Xe(Kd,Bt,vi,rw,yr,Xd,gr));function yw(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=sf(e,t,n,r[0].index),i=sf(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function sf(e,t,n,r){const o=vw(e.width,n.width,t.column),s=ul(r/o),i=s*n.height+xi(0,s-1)*t.row;return i>0?i+t.row:i}function vw(e,t,n){return xi(1,ul((e+n)/(ul(t)+n)))}const GF=Ve(([e,t])=>({...e,...t}),Xe(UF,Ve(()=>{const e=ee(c=>`Item ${c}`),t=ee({}),n=ee(null),r=ee("virtuoso-grid-item"),o=ee("virtuoso-grid-list"),s=ee(ef),i=ee("div"),a=ee(Gr),l=(c,u=null)=>Ft(q(t,ae(d=>d[c]),Qe()),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")}}))),YF=w.memo(function(){const t=nt("gridState"),n=nt("listClassName"),r=nt("itemClassName"),o=nt("itemContent"),s=nt("computeItemKey"),i=nt("isSeeking"),a=pn("scrollHeight"),l=nt("ItemComponent"),c=nt("ListComponent"),u=nt("ScrollSeekPlaceholder"),d=nt("context"),f=pn("itemDimensions"),h=pn("gap"),p=nt("log"),m=nt("stateRestoreInProgress"),y=_n(w.useMemo(()=>b=>{const v=b.parentElement.parentElement.scrollHeight;a(v);const g=b.firstChild;if(g){const{width:S,height:T}=g.getBoundingClientRect();f({width:S,height:T})}h({row:ww("row-gap",getComputedStyle(b).rowGap,p),column:ww("column-gap",getComputedStyle(b).columnGap,p)})},[a,f,h,p]));return m?null:w.createElement(c,{ref:y,className:n,...ct(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(b=>{const v=s(b.index,b.data,d);return i?w.createElement(u,{key:v,...ct(u,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...ct(l,d),className:r,"data-index":b.index,key:v},o(b.index,b.data,d))}))}),qF=w.memo(function(){const t=nt("HeaderComponent"),n=pn("headerHeight"),r=nt("headerFooterTag"),o=_n(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=nt("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),KF=w.memo(function(){const t=nt("FooterComponent"),n=pn("footerHeight"),r=nt("headerFooterTag"),o=_n(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=nt("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),ZF=({children:e})=>{const t=w.useContext(cw),n=pn("itemDimensions"),r=pn("viewportDimensions"),o=_n(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:as(!1),ref:o},e)},XF=({children:e})=>{const t=w.useContext(cw),n=pn("windowViewportRect"),r=pn("itemDimensions"),o=nt("customScrollParent"),s=Jd(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:as(!1)},e)},QF=w.memo(function({...t}){const n=nt("useWindowScroll"),r=nt("customScrollParent"),o=r||n?e2:JF,s=r||n?XF:ZF;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(qF,null),w.createElement(YF,null),w.createElement(KF,null)))}),{Component:fB,usePublisher:pn,useEmitterValue:nt,useEmitter:bw}=$d(GF,{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"}},QF),JF=tf({usePublisher:pn,useEmitterValue:nt,useEmitter:bw}),e2=nf({usePublisher:pn,useEmitterValue:nt,useEmitter:bw});function ww(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Qt.WARN),t==="normal"?0:parseInt(t??"0",10)}const t2=Ve(([e,t])=>({...e,...t}),Xe(iw,Ve(()=>{const e=ee(l=>w.createElement("td",null,"Item $",l)),t=ee(null),n=ee(null),r=ee(null),o=ee({}),s=ee(ef),i=ee(Gr),a=(l,c=null)=>Ft(q(o,ae(u=>u[l]),Qe()),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")}}))),n2=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),r2=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),o2={overflowAnchor:"none"},s2=w.memo(function(){const t=He("listState"),n=mn("sizeRanges"),r=He("useWindowScroll"),o=He("customScrollParent"),s=mn("windowScrollContainerState"),i=mn("scrollContainerState"),a=o||r?s:i,l=He("itemContent"),c=He("trackItemSizes"),u=He("itemSize"),d=He("log"),{callbackRef:f,ref:h}=L0(n,u,c,a,d,void 0,o),[p,m]=w.useState(0);af("deviation",F=>{p!==F&&(h.current.style.marginTop=`${F}px`,m(F))});const y=He("EmptyPlaceholder"),b=He("ScrollSeekPlaceholder")||n2,v=He("FillerRow")||r2,g=He("TableBodyComponent"),S=He("TableRowComponent"),T=He("computeItemKey"),E=He("isSeeking"),C=He("paddingTopAddition"),I=He("firstItemIndex"),A=He("statefulTotalCount"),O=He("context");if(A===0&&y)return w.createElement(y,ct(y,O));const L=t.offsetTop+C+p,_=t.offsetBottom,V=L>0?w.createElement(v,{height:L,key:"padding-top",context:O}):null,k=_>0?w.createElement(v,{height:_,key:"padding-bottom",context:O}):null,M=t.items.map(F=>{const N=F.originalIndex,B=T(N+I,F.data,O);return E?w.createElement(b,{...ct(b,O),key:B,index:F.index,height:F.size,type:F.type||"item"}):w.createElement(S,{...ct(S,O),...dw(S,F.data),key:B,"data-index":N,"data-known-size":F.size,"data-item-index":F.index,style:o2},l(F.index,F.data,O))});return w.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...ct(g,O)},[V,...M,k])}),i2=({children:e})=>{const t=w.useContext(cl),n=mn("viewportHeight"),r=mn("fixedItemHeight"),o=_n(w.useMemo(()=>di(n,s=>fn(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:as(!1),ref:o,"data-viewport-type":"element"},e)},a2=({children:e})=>{const t=w.useContext(cl),n=mn("windowViewportRect"),r=mn("fixedItemHeight"),o=He("customScrollParent"),s=Jd(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:as(!1),"data-viewport-type":"window"},e)},l2=w.memo(function(t){const n=He("useWindowScroll"),r=He("customScrollParent"),o=mn("fixedHeaderHeight"),s=mn("fixedFooterHeight"),i=He("fixedHeaderContent"),a=He("fixedFooterContent"),l=He("context"),c=_n(w.useMemo(()=>di(o,v=>fn(v,"height")),[o])),u=_n(w.useMemo(()=>di(s,v=>fn(v,"height")),[s])),d=r||n?d2:u2,f=r||n?a2:i2,h=He("TableComponent"),p=He("TableHeadComponent"),m=He("TableFooterComponent"),y=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ct(p,l)},i()):null,b=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ct(m,l)},a()):null;return w.createElement(d,{...t},w.createElement(f,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(h,l)},[y,w.createElement(s2,{key:"TableBody"}),b])))}),{Component:c2,usePublisher:mn,useEmitterValue:He,useEmitter:af}=$d(t2,{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"}},l2),u2=tf({usePublisher:mn,useEmitterValue:He,useEmitter:af}),d2=nf({usePublisher:mn,useEmitterValue:He,useEmitter:af}),f2=c2,h2=e=>x.jsx(w.Fragment,{children:e.children}),p2={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},m2={caseSensitive:!1,sort:!1},g2=[],y2=w.forwardRef(function(t,n){return x.jsx(dt.ul,{...t,ref:n,className:"w-full border-b border-tooltip-border last:border-transparent rounded-lg",children:x.jsx(er,{children:t.children})})}),v2=w.forwardRef(function(t,n){return x.jsx(dt.li,{...t,ref:n,className:"first:rounded-t-lg last:rounded-t-lg",children:t.children})}),b2={List:y2,Item:v2},w2=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const y=w.useRef(null),b=w.useRef(null),v=p.value??p.defaultValue??"",g=kt(),[S,T]=w.useState(0),[E,C]=w.useState(!1),[I,A]=w.useState(""),[O,L]=w.useState(v),[_,V]=w.useState(()=>{var te;return((te=e.find(me=>me.value===v))==null?void 0:te.label)??v}),[k,M]=w.useState(null),F=w.useRef(g2),N=t&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...e]:e,B=new Ur(N,["value","label"],m2).search(I),z=t?void 0:`^(${e.map(te=>`${As(te.value)}${te.label?"|"+As(te.label):""}`).join("|")})$`;w.useEffect(()=>{E||T(0)},[E]),w.useEffect(()=>{if(p.value){const te=e.find(me=>me.value===p.value);L((te==null?void 0:te.label)??p.value)}},[p.value]);const{x:D,y:j,strategy:K,refs:J,context:X}=Wr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:ri,middleware:[oi(4),Sb({padding:10,elementContext:"reference",apply(te){var Pe;const me=(Pe=y.current)==null?void 0:Pe.getBoundingClientRect().width,re=te.elements.floating.querySelector("ul"),fe=(re==null?void 0:re.getBoundingClientRect().height)||0,ue=Math.min(fe<40?300:fe,300);Ni.flushSync(()=>setTimeout(()=>T(ue),200)),Object.assign(te.elements.floating.style,{width:`${me}px`,maxWidth:`${me}px`,maxHeight:`${ue}px`})}})]}),G=s0(X,p2),{getReferenceProps:$,getFloatingProps:W,getItemProps:H}=Hr([zr(X,{role:"listbox"}),jr(X),kd(X,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:te=>M(me=>te??me)})]);w.useEffect(()=>{const te=J.reference.current;if(te)return ks(te)},[]);const U=(te,me)=>{L(te.value);const re=J.reference.current;if(!re)return;re==null||re.setAttribute("data-value",te.value),re.value=te.value;const fe=new Event("change",{bubbles:!1,cancelable:!0});re.dispatchEvent(fe),p.onChange&&p.onChange(fe),V(te.label??""),C(!1),A(""),M(me)},Y=te=>{var re;const me=te.target.value;return A(me),!E&&me===""?C(!0):(te.target.name=p.name||"",me?C(!0):(re=p.onChange)==null?void 0:re.call(p,te))},ce=()=>{var te;C(!0),A(""),(te=J.reference.current)==null||te.focus()},R=()=>{C(!0),A("")},pe=()=>{var te;(te=J.reference.current)==null||te.setAttribute("data-value",""),A(""),L(""),V(""),lc(J.reference.current),C(!1)},xe=p.id||p.name;return x.jsxs(ui,{...p,left:d,error:f,ref:y,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ce,children:[x.jsx(bu,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),O?x.jsx("button",{type:"button",onClick:pe,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",{"data-shadow":"true",...$({...p,onChange:Y,onFocus:R,pattern:z,ref:J.setReference,name:`${xe}-shadow`,id:`${xe}-shadow`,onClick:te=>te.currentTarget.focus(),onKeyDown(te){var me,re;if(te.key==="ArrowDown"){let fe=k+1;return fe>B.length-1&&(fe=0),(me=b.current)==null||me.scrollIntoView({index:fe}),M(fe)}if(te.key==="ArrowUp"){let fe=k-1;return fe<0&&(fe=B.length-1),(re=b.current)==null||re.scrollIntoView({index:fe}),M(fe)}if(te.key==="Escape")return te.currentTarget.blur(),C(!1);if(te.key==="Enter"){if(k!==null&&B[k])return te.preventDefault(),U(B[k],k);if(B.length===1)return te.preventDefault(),U(B[0],0)}}}),"data-value":O,"data-error":!!f,"data-name":xe,"data-target":xe,required:h,value:E?I:_||O,"aria-autocomplete":"list",autoComplete:"off",className:$e("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",p.className)}),x.jsx("input",{id:xe,name:xe,type:"hidden","data-origin":xe,ref:m,required:h,defaultValue:p.value||O||void 0}),x.jsx(Rr,{preserveTabOrder:!0,children:E?x.jsx(Zo,{guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...W({ref:J.setFloating,style:{...G.styles,position:K,left:(D??0)+(O?26:18),top:j??0}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[B.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:o||g.autocompleteEmpty})}):null,x.jsx(fw,{data:B,ref:b,hidden:B.length===0,components:b2,className:"bg-floating-background p-0 text-foreground rounded-lg border-floating-border",style:{height:S},itemContent:(te,me)=>{const re=me.Render??h2,fe=O===me.value||O===me.label,ue=k===te,Pe=me.label??me.value;return x.jsx("button",{"data-value":me.value,...H({ref:ot=>void(F.current[te]=ot),role:"option",type:"button","aria-checked":fe,"aria-current":fe,"aria-selected":fe,"aria-busy":me.disabled,onClick:()=>U(me,te),className:`cursor-pointer p-2 text-left ${fe?"bg-primary-hover text-primary-foreground":""} ${ue?"bg-primary text-primary-foreground":""}`}),children:x.jsx(re,{...p,label:me.label,value:me.value,children:Pe})})}})]})}):null})]})}),xw=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:$e("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:$e("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:$e("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Tw=(e,t,n,r)=>w.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:d,optionalText:f,container:h,hideLeft:p=!1,right:m,left:y,error:b,...v},g)=>{const S=e,T=v.id??v.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const C=E.current,I=ks(E.current),A=r==null?void 0:r(C),O=L=>{const _=L;if(_.key==="Enter"&&C.enterKeyHint==="next"){const V=C.getAttribute("data-next");if(V){const k=document.getElementById(V);if(k)return k.focus(),void _.preventDefault()}}};return C.addEventListener("keydown",O),()=>{A==null||A(),I(),C.removeEventListener("keydown",O)}},[]),x.jsx(ui,{...n,componentName:t,info:a,container:h,error:b,feedback:i,hideLeft:p,left:y,optionalText:f,right:m,rightLabel:d,interactive:u,form:v.form,id:v.name||v.id,name:v.name,labelClassName:l,title:v.title,placeholder:v.placeholder,required:v.required,disabled:v.disabled,children:x.jsx(S,{...n,...v,id:T,name:T,type:s,"data-next":c,"aria-busy":v.disabled,"aria-disabled":v.disabled,"aria-readonly":v.readOnly,ref:ac(g,E),className:$e("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","disabled:cursor-not-allowed disabled:text-disabled",v.className)})})}),Ti=Tw(tv,"input",{type:"text"}),Sw=new Date(1970,11,31),lf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Ew={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},x2={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")},cf=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},T2=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||Ru(),l=w.useId(),c=kt(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=w.useState(e||void 0),[h,p]=w.useState(!1),m=cf(u,Sw).flatMap(C=>Ct.keyof(lf,C.type)?lf[C.type](C.value):[]),y=cf(u,Sw).reduce((C,I)=>C+(Ct.keyof(Ew,I.type)?Ew[I.type](I.value):""),""),[b,v]=w.useState(d?cf(u,d).reduce((C,I)=>C+(Ct.keyof(lf,I.type)?x2[I.type](d,I.value):""),""):""),g=C=>{const I=C.target.value;if(v(I),m.length===I.length&&m.every((O,L)=>{const _=I.charAt(L);return typeof O=="string"?_===O:O.test(_)})){const O=Mo(YO(I,y,new Date));return f(O),r==null?void 0:r(O)}return f(void 0),r==null?void 0:r(void 0)},S=C=>(f(C),r==null||r(C),v(C?qA(C,y):"")),T=Py(d),E=T?d.toISOString():void 0;return x.jsx(Ti,{...s,mask:m,value:b,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:g,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??y,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(Qo,{open:h,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(NI,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(xv,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),S2=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],E2=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],C2=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],P2=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Cw=(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 Pw(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?P2:C2:t.binary?E2:S2,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=Cw(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=Cw(Number(e),t.locale,i),c=n[a];return s+l+r+c}var uf={exports:{}},fl={exports:{}},Re={};/** @license React v16.13.1
|
|
178
218
|
* react-is.production.min.js
|
|
179
219
|
*
|
|
180
220
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
181
221
|
*
|
|
182
222
|
* This source code is licensed under the MIT license found in the
|
|
183
223
|
* LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/var
|
|
224
|
+
*/var kw;function k2(){if(kw)return Re;kw=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,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function g(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 d:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case h:case i:return T;default:return E}}case n:return E}}}function S(T){return g(T)===c}return Re.AsyncMode=l,Re.ConcurrentMode=c,Re.ContextConsumer=a,Re.ContextProvider=i,Re.Element=t,Re.ForwardRef=u,Re.Fragment=r,Re.Lazy=p,Re.Memo=h,Re.Portal=n,Re.Profiler=s,Re.StrictMode=o,Re.Suspense=d,Re.isAsyncMode=function(T){return S(T)||g(T)===l},Re.isConcurrentMode=S,Re.isContextConsumer=function(T){return g(T)===a},Re.isContextProvider=function(T){return g(T)===i},Re.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Re.isForwardRef=function(T){return g(T)===u},Re.isFragment=function(T){return g(T)===r},Re.isLazy=function(T){return g(T)===p},Re.isMemo=function(T){return g(T)===h},Re.isPortal=function(T){return g(T)===n},Re.isProfiler=function(T){return g(T)===s},Re.isStrictMode=function(T){return g(T)===o},Re.isSuspense=function(T){return g(T)===d},Re.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===h||T.$$typeof===i||T.$$typeof===a||T.$$typeof===u||T.$$typeof===y||T.$$typeof===b||T.$$typeof===v||T.$$typeof===m)},Re.typeOf=g,Re}var Be={};/** @license React v16.13.1
|
|
185
225
|
* react-is.development.js
|
|
186
226
|
*
|
|
187
227
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
188
228
|
*
|
|
189
229
|
* This source code is licensed under the MIT license found in the
|
|
190
230
|
* LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/var
|
|
231
|
+
*/var Iw;function I2(){return Iw||(Iw=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,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function g(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===s||R===o||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===p||R.$$typeof===h||R.$$typeof===i||R.$$typeof===a||R.$$typeof===u||R.$$typeof===y||R.$$typeof===b||R.$$typeof===v||R.$$typeof===m)}function S(R){if(typeof R=="object"&&R!==null){var pe=R.$$typeof;switch(pe){case t:var xe=R.type;switch(xe){case l:case c:case r:case s:case o:case d:return xe;default:var te=xe&&xe.$$typeof;switch(te){case a:case u:case p:case h:case i:return te;default:return pe}}case n:return pe}}}var T=l,E=c,C=a,I=i,A=t,O=u,L=r,_=p,V=h,k=n,M=s,F=o,N=d,B=!1;function z(R){return B||(B=!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(R)||S(R)===l}function D(R){return S(R)===c}function j(R){return S(R)===a}function K(R){return S(R)===i}function J(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function X(R){return S(R)===u}function G(R){return S(R)===r}function $(R){return S(R)===p}function W(R){return S(R)===h}function H(R){return S(R)===n}function U(R){return S(R)===s}function Y(R){return S(R)===o}function ce(R){return S(R)===d}Be.AsyncMode=T,Be.ConcurrentMode=E,Be.ContextConsumer=C,Be.ContextProvider=I,Be.Element=A,Be.ForwardRef=O,Be.Fragment=L,Be.Lazy=_,Be.Memo=V,Be.Portal=k,Be.Profiler=M,Be.StrictMode=F,Be.Suspense=N,Be.isAsyncMode=z,Be.isConcurrentMode=D,Be.isContextConsumer=j,Be.isContextProvider=K,Be.isElement=J,Be.isForwardRef=X,Be.isFragment=G,Be.isLazy=$,Be.isMemo=W,Be.isPortal=H,Be.isProfiler=U,Be.isStrictMode=Y,Be.isSuspense=ce,Be.isValidElementType=g,Be.typeOf=S}()),Be}var Aw;function Ow(){return Aw||(Aw=1,process.env.NODE_ENV==="production"?fl.exports=k2():fl.exports=I2()),fl.exports}/*
|
|
192
232
|
object-assign
|
|
193
233
|
(c) Sindre Sorhus
|
|
194
234
|
@license MIT
|
|
195
|
-
*/var
|
|
196
|
-
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var R=ce(
|
|
197
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
198
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
199
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
200
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iw(e,t){if(e){if(typeof e=="string")return sf(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 sf(e,t)}}function sf(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 v2(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 b2(e){if(Array.isArray(e))return e}function Aw(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 rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Aw(Object(n),!0).forEach(function(r){af(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function af(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function al(e,t){if(e==null)return{};var n=w2(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 w2(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 lf=w.forwardRef(function(e,t){var n=e.children,r=al(e,c2),o=_w(r),s=o.open,i=al(o,u2);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(rt(rt({},i),{},{open:s})))});lf.displayName="Dropzone";var Ow={disabled:!1,getFilesFromEvent:DL,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};lf.defaultProps=Ow,lf.propTypes={children:Ye.func,accept:Ye.objectOf(Ye.arrayOf(Ye.string)),multiple:Ye.bool,preventDropOnDocument:Ye.bool,noClick:Ye.bool,noKeyboard:Ye.bool,noDrag:Ye.bool,noDragEventsBubbling:Ye.bool,minSize:Ye.number,maxSize:Ye.number,maxFiles:Ye.number,disabled:Ye.bool,getFilesFromEvent:Ye.func,onFileDialogCancel:Ye.func,onFileDialogOpen:Ye.func,useFsAccessApi:Ye.bool,autoFocus:Ye.bool,onDragEnter:Ye.func,onDragLeave:Ye.func,onDragOver:Ye.func,onDrop:Ye.func,onDropAccepted:Ye.func,onDropRejected:Ye.func,onError:Ye.func,validator:Ye.func};var cf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function _w(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=rt(rt({},Ow),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,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,b=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,g=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,I=t.onError,A=t.validator,O=w.useMemo(function(){return i2(n)},[n]),M=w.useMemo(function(){return s2(n)},[n]),_=w.useMemo(function(){return typeof b=="function"?b:Dw},[b]),F=w.useMemo(function(){return typeof m=="function"?m:Dw},[m]),P=w.useRef(null),N=w.useRef(null),L=w.useReducer(x2,cf),V=of(L,2),B=V[0],W=V[1],D=B.isFocused,j=B.isFileDialogActive,K=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&o2()),J=function(){!K.current&&j&&setTimeout(function(){if(N.current){var le=N.current.files;le.length||(W({type:"closeDialog"}),F())}},300)};w.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[N,j,F,K]);var X=w.useRef([]),G=function(le){P.current&&P.current.contains(le.target)||(le.preventDefault(),X.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",Cw,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",Cw),document.removeEventListener("drop",G))}},[P,g]),w.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var $=w.useCallback(function(ne){I?I(ne):console.error(ne)},[I]),z=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne),X.current=[].concat(h2(X.current),[ne.target]),il(ne)&&Promise.resolve(o(ne)).then(function(le){if(!(sl(ne)&&!C)){var Ne=le.length,Je=Ne>0&&e2({files:le,accept:O,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:A}),Ot=Ne>0&&!Je;W({isDragAccept:Je,isDragReject:Ot,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ne)}}).catch(function(le){return $(le)})},[o,c,$,C,O,i,s,a,l,A]),H=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne);var le=il(ne);if(le&&ne.dataTransfer)try{ne.dataTransfer.dropEffect="copy"}catch{}return le&&d&&d(ne),!1},[d,C]),U=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne);var le=X.current.filter(function(Je){return P.current&&P.current.contains(Je)}),Ne=le.indexOf(ne.target);Ne!==-1&&le.splice(Ne,1),X.current=le,!(le.length>0)&&(W({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),il(ne)&&u&&u(ne))},[P,u,C]),Y=w.useCallback(function(ne,le){var Ne=[],Je=[];ne.forEach(function(Ot){var Vt=Sw(Ot,O),zt=of(Vt,2),no=zt[0],hs=zt[1],ps=Ew(Ot,i,s),kl=of(ps,2),Vf=kl[0],$f=kl[1],Rf=A?A(Ot):null;if(no&&Vf&&!Rf)Ne.push(Ot);else{var Bf=[hs,$f];Rf&&(Bf=Bf.concat(Rf)),Je.push({file:Ot,errors:Bf.filter(function(H$){return H$})})}}),(!a&&Ne.length>1||a&&l>=1&&Ne.length>l)&&(Ne.forEach(function(Ot){Je.push({file:Ot,errors:[JL]})}),Ne.splice(0)),W({acceptedFiles:Ne,fileRejections:Je,type:"setFiles"}),f&&f(Ne,Je,le),Je.length>0&&p&&p(Je,le),Ne.length>0&&h&&h(Ne,le)},[W,a,O,i,s,l,f,h,p,A]),ce=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne),X.current=[],il(ne)&&Promise.resolve(o(ne)).then(function(le){sl(ne)&&!C||Y(le,ne)}).catch(function(le){return $(le)}),W({type:"reset"})},[o,Y,$,C]),R=w.useCallback(function(){if(K.current){W({type:"openDialog"}),_();var ne={multiple:a,types:M};window.showOpenFilePicker(ne).then(function(le){return o(le)}).then(function(le){Y(le,null),W({type:"closeDialog"})}).catch(function(le){a2(le)?(F(le),W({type:"closeDialog"})):l2(le)?(K.current=!1,N.current?(N.current.value=null,N.current.click()):$(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."))):$(le)});return}N.current&&(W({type:"openDialog"}),_(),N.current.value=null,N.current.click())},[W,_,F,v,Y,$,M,a]),pe=w.useCallback(function(ne){!P.current||!P.current.isEqualNode(ne.target)||(ne.key===" "||ne.key==="Enter"||ne.keyCode===32||ne.keyCode===13)&&(ne.preventDefault(),R())},[P,R]),xe=w.useCallback(function(){W({type:"focus"})},[]),te=w.useCallback(function(){W({type:"blur"})},[]),me=w.useCallback(function(){S||(r2()?setTimeout(R,0):R())},[S,R]),re=function(le){return r?null:le},fe=function(le){return T?null:re(le)},ue=function(le){return E?null:re(le)},Pe=function(le){C&&le.stopPropagation()},ot=w.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ne.refKey,Ne=le===void 0?"ref":le,Je=ne.role,Ot=ne.onKeyDown,Vt=ne.onFocus,zt=ne.onBlur,no=ne.onClick,hs=ne.onDragEnter,ps=ne.onDragOver,kl=ne.onDragLeave,Vf=ne.onDrop,$f=al(ne,d2);return rt(rt(af({onKeyDown:fe(Dn(Ot,pe)),onFocus:fe(Dn(Vt,xe)),onBlur:fe(Dn(zt,te)),onClick:re(Dn(no,me)),onDragEnter:ue(Dn(hs,z)),onDragOver:ue(Dn(ps,H)),onDragLeave:ue(Dn(kl,U)),onDrop:ue(Dn(Vf,ce)),role:typeof Je=="string"&&Je!==""?Je:"presentation"},Ne,P),!r&&!T?{tabIndex:0}:{}),$f)}},[P,pe,xe,te,me,z,H,U,ce,T,E,r]),Me=w.useCallback(function(ne){ne.stopPropagation()},[]),yt=w.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ne.refKey,Ne=le===void 0?"ref":le,Je=ne.onChange,Ot=ne.onClick,Vt=al(ne,f2),zt=af({accept:O,multiple:a,type:"file",style:{display:"none"},onChange:re(Dn(Je,ce)),onClick:re(Dn(Ot,Me)),tabIndex:-1},Ne,N);return rt(rt({},zt),Vt)}},[N,n,a,ce,r]);return rt(rt({},B),{},{isFocused:D&&!r,getRootProps:ot,getInputProps:yt,rootRef:P,inputRef:N,open:re(R)})}function x2(e,t){switch(t.type){case"focus":return rt(rt({},e),{},{isFocused:!0});case"blur":return rt(rt({},e),{},{isFocused:!1});case"openDialog":return rt(rt({},cf),{},{isFileDialogActive:!0});case"closeDialog":return rt(rt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return rt(rt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return rt(rt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return rt({},cf);default:return e}}function Dw(){}const T2={isImage:e=>e.type.includes("image")},S2=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(T2.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Q0(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Q0(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Ao,{})})]}):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(ry,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Ao,{className:"text-danger"})})]})},E2=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(S2,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),C2=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(E2,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),P2=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(vI,{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"})]})]}),k2=({idle:e=P2,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=_w({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(C2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},I2=["INPUT","SELECT"],Mw=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{I2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},A2=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})},O2=({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:$e("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]}),Kr=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:d,left:f,error:h,...p},m)=>{const b=kt(),v=w.useRef(null),y=p.id??p.name;w.useImperativeHandle(m,()=>v.current),w.useEffect(()=>{if(v.current===null)return;const S=new AbortController,T=v.current,E=Ss(v.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:S.signal}),()=>{E(),S.abort()}},[]);const g=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return x.jsx(ii,{info:n,left:f,error:h,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:y,children:x.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(uu,{size:20}),x.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:y,name:y,value:p.value,required:e,ref:Ql(m,v),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:$e("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=>w.createElement("option",{...S,value:S.value,children:S.label??S.value,key:`${y}-select-option-${S.value}`}))]})})}),uf=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},_2=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=uf(r.onChange);w.useImperativeHandle(o,()=>c.current),w.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=()=>{var h,p;const f=!((h=c.current)!=null&&h.checked);a(f),(p=r==null?void 0:r.onCheck)==null||p.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:$e("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:f=>a(f.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:d,"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})]})}),D2=e=>{const[t,n]=Gk();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:Xk(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},M2=q0("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)}),N2=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},F2={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"})})},L2=e=>{const t=w.useRef(null),n=N2(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(vi,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx($0,{height:n,useWindowScroll:!0,data:e.source,components:F2,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(Y0,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(mo,{children:x.jsx(du,{})})}),x.jsx("div",{})]})};var V2=Object.defineProperty,Nw=Object.getOwnPropertySymbols,$2=Object.prototype.hasOwnProperty,R2=Object.prototype.propertyIsEnumerable,Fw=(e,t,n)=>t in e?V2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B2=(e,t)=>{for(var n in t||(t={}))$2.call(t,n)&&Fw(e,n,t[n]);if(Nw)for(var n of Nw(t))R2.call(t,n)&&Fw(e,n,t[n]);return e},df=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},j2=(e,t,n,r)=>cl(df,e,t,n,r),os=e=>typeof e=="object",yr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!os(e)&&!os(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=>yr(e[r],t[r]))},z2=(e,t)=>(os(e)||Array.isArray(e))&&t?e[t]:e,H2=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ll=e=>/[0-9.]+/.test(e),Lw=e=>["string","number"].includes(typeof e),Vw=e=>e==null||(e==null?void 0:e.length)===0||e==="",$w={eq:yr,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:Vw,notEmpty:e=>!Vw(e),in:(e,t)=>df(t,n=>yr(e,n)),notIn:(e,t)=>Rw(t,n=>!yr(e,n))},W2=e=>{if(e in $w)return $w[e];throw new Error("Linq - Symbol not found")},ss=(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},cl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=W2(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},U2=(e,t,n,r)=>cl(ss,e,t,n,r),Rw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},G2=(e,t,n,r)=>cl(Rw,e,t,n,r),Bw=e=>{if(e===null)return null;const t=B2({},e);return Object.keys(t).forEach(n=>t[n]=os(e[n])?Bw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},jw=(e,t)=>{if(os(t)){for(let n=0;n<e.length;n++){const r=e[n];if(yr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(yr(t,r))return!0}return!1},Y2=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},q2=e=>ss(e,(t,n,r)=>os(t)?n===r.findIndex(o=>yr(o,t)):n===r.indexOf(t)),K2=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},zw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},Z2=(e,t)=>zw(e,n=>n[t]),Hw=(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},X2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Q2=(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 ll(e)&&ll(t)?r.map(i=>Number.parseInt(i)):r},ff=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ll(e)&&ll(t)){const o=[],[s,i]=X2(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return Q2(e,t,r)},J2=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?ff(r,o,1):ff(r,s,Number.parseInt(o,10))}return Lw(e)&&Lw(t)?ff(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},hf=(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},Ww=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},eV=(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)},tV=(e,t,n,r)=>cl(eV,e,t,n,r),Uw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(H2(t))},Gw=(e=>(e.Asc="asc",e.Desc="desc",e))(Gw||{}),nV=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),rV=(e,t)=>e.sort(nV(t)),oV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ss(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},sV=class jf{constructor(t=[]){this.array=t}static Range(...t){return J2(...t)}static New(t){return new jf(t)}Where(t,n,r){return this.array=U2(this.array,t,n,r),this}Some(t,n,r){return j2(this.array,t,n,r)}All(t,n,r){return G2(this.array,t,n,r)}Reverse(){return this.array=Ww(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=tV(this.array,t,n,r),this}Distinct(){return this.array=q2(this.array),this}First(t){return t===void 0?this.array[0]:K2(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?hf((n,r)=>n+r,0,this.array):hf((n,r)=>n+z2(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Z2(this.array,t)}GroupWith(t){return zw(this.array,t)}Except(t){return ss(this.array,n=>!jw(t,n))}Intersect(t){return ss(this.array,n=>jw(t,n))}OrderBy(t,n){let r;return r=t?Uw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Ww(r):r,this}Includes(t){return df(this.array,n=>yr(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 hf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Hw(this.array,n=>[t,n]))}Zip(t,n){return Hw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ss(this.array,t).length}Get(t){return this.array[t]}Clone(){return new jf(Bw(this.array))}ToObject(t){return Y2(this.array,t)}Sort(t){return Array.isArray(t)?rV(this.array,t):Uw(this.array,t)}Unique(t){return oV(this.array,t)}},Yw=sV,is={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(b,v)=>{try{Object.keys(b).forEach(v)}catch(y){window.console.log(y)}},n=b=>b==null,r=b=>{const v=typeof b;return v==="string"||v==="number"||v==="boolean"||n(b)},o=(b,v)=>{const y=v.getItem(b);try{return JSON.parse(y)}catch{return y??null}},s=b=>Object.keys(b).reduce((v,y)=>({...v,[y]:o(y,b)}),{}),i=b=>b instanceof Date?b:typeof b=="number"?new Date(new Date*1+b*864e5):b,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(b=>b.split("=")).reduce((b,v)=>(b[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),b),{}),c=new Set,u=()=>{const b=l();c.forEach(v=>v(b))},d=[{name:"expires",parse:b=>`expires=${i(b.expires??a)}`},{name:"maxAge",parse:b=>b.maxAge?`max-age=${i(b.expires??a)}`:""},{name:"path",parse:b=>`path=${b.path??"/"}`},{name:"sameSite",parse:b=>`samesite=${b.sameSite??"strict"}`},{name:"useSecure",parse:b=>`${b.useSecure??!0?"secure":""}`},{name:"domain",parse:b=>{const v=b.domain??"";return v===""?"":`domain=${b.multiDomain?".":""}${v}`}},{name:"partitioned",parse:b=>b.partitioned?"Partitioned":""}],f={json:l,listener:b=>(c.add(b),()=>c.delete(b)),clearListeners:()=>c.clear(),has:b=>document.cookie.split(";").some(v=>v.trim().startsWith(`${b}=`)),deleteAll:()=>{document.cookie.split(";").forEach(b=>{document.cookie=b.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:b=>{const v=f.json()[b];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:b=>{document.cookie=`${encodeURIComponent(b)}=;expires=${new Date().toUTCString()}`,u()},set:(b,v,y={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,E)=>{const C=E.parse(y);return C===""?T:T.concat(C)},[`${encodeURIComponent(b)}=${g}`]).join(";");document.cookie=S,u()}},h=b=>{const v=new Set,y=g=>{b().removeItem(g);const S=s(b());v.forEach(T=>T(S))};return{delete:y,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(b()):b(),has:g=>{const S=b().getItem(g);return!n(S)},deleteAll:()=>{t(b(),y),v.forEach(g=>g(b()))},get:g=>o(g,b()),set:(g,S)=>{b().setItem(g,JSON.stringify(S)),v.forEach(T=>T(b()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(is);const pf=e=>e.headerLabel??e.thead??e.id,mf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var as=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(as||{});const gf=e=>e.type==="number"?e.valueAsNumber:e.value,iV=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},aV={},lV=(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}})},cV=(e,t,n=aV)=>{const r=Bi()?null:is.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=ku({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:lV(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Bi()||is.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},yf=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??as.Text,i=t[s]??[],a=((c=i.find(d=>d["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:Es(),operation:l,label:pf(e),name:o,type:s,value:"",...r}},vf=()=>{const e=kt(),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(()=>({[as.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[as.Boolean]:[t.is,t.isNot],[as.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},uV=e=>{const t=kt(),n=vf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,yf(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(p=>u===p.id);return yf(h,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=gf(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsx(w.Fragment,{children:x.jsx(Xo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(hI,{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(Kr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Kr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(vi,{"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(Ao,{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(fu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},dV=({filter:e,onDelete:t,set:n})=>{const r=kt(),o=vf(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},i=a=>{const l=a.target.dataset.id||"",c=gf(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Kr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(vi,{"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(Ao,{className:"text-danger",size:14})})]})},fV=({item:e,onPointerDown:t})=>{const n=Or(0);return x.jsxs(Jg,{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(fI,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},hV=e=>{var l;const t=kt(),n=mf(e.cols),r=Kk(),[o,s]=w.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var b;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((b=u.options.item(f))==null?void 0:b.label)||"";s(h);const p=new Yw(e.rows).GroupBy(d),m=e.cols.find(v=>v.id===d);e.setGroups(uT(p).map((v,y)=>{const g=p[v];return{...m,groupId:Es(),groupKey:d,index:y,rows:g,groupName:v}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(Xo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(yI,{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(Kr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(mo,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Ao,{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(uS,{children:x.jsx(Xg,{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(fV,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},pV=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),mV=(e,t)=>e.toSorted(pV(t)),qw=(e,t,n)=>({id:Es(),type:n,value:e.id,label:t}),gV=e=>{const t=kt(),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,qw(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(w.Fragment,{children:x.jsx(Xo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(ty,{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(Kr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Kr,{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(Ao,{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(fu,{size:14})," ",t.tableSortAddButton]})})]})})})},yV=e=>{const t=kt(),[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=qw(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=pf(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(aI,{size:14}):null,n==="desc"?x.jsx(iI,{size:14}):null,n==="undefined"?x.jsx(ty,{size:14}):null]})},vV=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(uV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(gV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(hV,{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=gf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function bV(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 wV=e=>{const t=w.useId(),n=kt(),r=e.asLink||"button",o=w.useMemo(()=>bV(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]})})]})},xV={top:0,left:0,right:0,bottom:-1},TV=e=>{var p;const t=kt(),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?pI:mI,l=m=>{const b=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(y=>y.id!==b))},c=w.useCallback(m=>{if(m===null)return;const b=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:b.signal}),()=>b.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===Gw.Asc?"ascending":"descending":"none",f=pf(e.header),h=Or(void 0);return x.jsxs(Jg,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:h},role:"columnheader","aria-sort":d,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&&s?x.jsx(Xo,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),x.jsx(a,{"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:f})]}),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(dV,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(yf(e.header,i.options,i.operations))),children:[x.jsx(fu,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?x.jsx(yV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),x.jsx(dt.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:xV,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,b)=>{const v=m.target,y=h.get()||v.getBoundingClientRect().width,g=b.delta.x;return h.set(Math.abs(y+g))}})]})},SV=e=>x.jsx(Xg,{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(Jn,{children:e.headers.map(t=>x.jsx(TV,{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}`))})}),Kw=w.createContext({}),EV=()=>w.useContext(Kw),CV=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(Jn,{children:n.children})})),PV=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??""}`})),kV=w.forwardRef(({context:e,...t},n)=>{const r=EV(),o={...t==null?void 0:t.style,top:Ct.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})}),IV=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)??""}`})),AV=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),OV={TableHead:kV,Table:PV,TableBody:CV,TableRow:IV,TableFoot:AV},_V=[0,0,0,0,0,0,0,0,0,0],Zw=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),DV=(e,t,n)=>x.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?Zw:x.jsx(cv,{})}),MV=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=ec(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.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?Zw:c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:Ct.nil(l)?"":l}))})})},NV=()=>x.jsx(w.Fragment,{}),FV=[{}],Xw=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=w.useRef(null),[f,h]=w.useState(!1),p=uf(i),m=uf(u.loadingMore),b=w.useMemo(()=>{if(u.loading)return _V;if(c)return u.rows;const v=new Yw(u.rows);return t.length>0&&t.forEach(y=>y.value===""||Number.isNaN(y.value)?void 0:v.Where(y.name,y.operation.symbol,y.value)),r.length===0?v.Select():mV(v.Select(),r)},[u.rows,t,r,u.loading]);return w.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,y=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return y.observe(v),()=>y.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[x.jsx(sL,{useWindowScroll:!0,followOutput:"smooth",components:OV,totalCount:b.length,data:b.length===0?FV:b,fixedFooterContent:f?NV:null,itemContent:b.length===0?DV:MV,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(SV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(wV,{...l}):null]})},LV=(e,t)=>typeof t=="function"?t(e):t,ul=(e,t,n)=>e===t||n==null?void 0:n(t),VV=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>mf(e.cols),[e.cols]),[o,s]=ku({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:LV(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),ul((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),ul((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),ul((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),ul((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(Kw.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(vV,{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(Xw,{...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(Xw,{...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 $V=String.prototype.replace,RV=/%20/g,bf={RFC1738:"RFC1738",RFC3986:"RFC3986"},wf={default:bf.RFC3986,formatters:{RFC1738:function(e){return $V.call(e,RV,"+")},RFC3986:function(e){return String(e)}},RFC1738:bf.RFC1738,RFC3986:bf.RFC3986},BV=wf,xf=Object.prototype.hasOwnProperty,Zr=Array.isArray,Mn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),jV=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Zr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Qw=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},zV=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Zr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!xf.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 Zr(t)&&!Zr(n)&&(o=Qw(t,r)),Zr(t)&&Zr(n)?(n.forEach(function(s,i){if(xf.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 xf.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},HV=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},WV=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}},Tf=1024,UV=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(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Tf){for(var c=i.length>=Tf?i.slice(l,l+Tf):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===BV.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Mn[f];continue}if(f<2048){u[u.length]=Mn[192|f>>6]+Mn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Mn[224|f>>12]+Mn[128|f>>6&63]+Mn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Mn[240|f>>18]+Mn[128|f>>12&63]+Mn[128|f>>6&63]+Mn[128|f&63]}a+=u.join("")}return a},GV=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 jV(n),t},YV=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},qV=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},KV=function(t,n){return[].concat(t,n)},ZV=function(t,n){if(Zr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Jw={arrayToObject:Qw,assign:HV,combine:KV,compact:GV,decode:WV,encode:UV,isBuffer:qV,isRegExp:YV,maybeMap:ZV,merge:zV},ex=sT,dl=Jw,xi=wf,XV=Object.prototype.hasOwnProperty,tx={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Nn=Array.isArray,QV=Array.prototype.push,nx=function(e,t){QV.apply(e,Nn(t)?t:[t])},JV=Date.prototype.toISOString,rx=xi.default,xt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:dl.encode,encodeValuesOnly:!1,format:rx,formatter:xi.formatters[rx],indices:!1,serializeDate:function(t){return JV.call(t)},skipNulls:!1,strictNullHandling:!1},e$=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Sf={},t$=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,b,v,y){for(var g=t,S=y,T=0,E=!1;(S=S.get(Sf))!==void 0&&!E;){var C=S.get(t);if(T+=1,typeof C<"u"){if(C===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Sf)>"u"&&(T=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&Nn(g)&&(g=dl.maybeMap(g,function(D){return D instanceof Date?h(D):D})),g===null){if(i)return c&&!b?c(n,xt.encoder,v,"key",p):n;g=""}if(e$(g)||dl.isBuffer(g)){if(c){var I=b?n:c(n,xt.encoder,v,"key",p);return[m(I)+"="+m(c(g,xt.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var A=[];if(typeof g>"u")return A;var O;if(r==="comma"&&Nn(g))b&&c&&(g=dl.maybeMap(g,c)),O=[{value:g.length>0?g.join(",")||null:void 0}];else if(Nn(u))O=u;else{var M=Object.keys(g);O=d?M.sort(d):M}var _=l?n.replace(/\./g,"%2E"):n,F=o&&Nn(g)&&g.length===1?_+"[]":_;if(s&&Nn(g)&&g.length===0)return F+"[]";for(var P=0;P<O.length;++P){var N=O[P],L=typeof N=="object"&&typeof N.value<"u"?N.value:g[N];if(!(a&&L===null)){var V=f&&l?N.replace(/\./g,"%2E"):N,B=Nn(g)?typeof r=="function"?r(F,V):F:F+(f?"."+V:"["+V+"]");y.set(t,T);var W=ex();W.set(Sf,y),nx(A,e(L,B,r,o,s,i,a,l,r==="comma"&&b&&Nn(g)?null:c,u,d,f,h,p,m,b,v,W))}}return A},n$=function(t){if(!t)return xt;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||xt.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=xi.default;if(typeof t.format<"u"){if(!XV.call(xi.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=xi.formatters[r],s=xt.filter;(typeof t.filter=="function"||Nn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in tx?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=xt.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:xt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:xt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:xt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:xt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?xt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:xt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:xt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:xt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:xt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:xt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:xt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:xt.strictNullHandling}},r$=function(e,t){var n=e,r=n$(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Nn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=tx[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=ex(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||nx(i,t$(n[d],d,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 f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},ls=Jw,Ef=Object.prototype.hasOwnProperty,o$=Array.isArray,gt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ls.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s$=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},ox=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},i$="utf8=%26%2310003%3B",a$="utf8=%E2%9C%93",l$=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]===a$?c="utf-8":i[l]===i$&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,gt.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),gt.decoder,c,"key"),p=ls.maybeMap(ox(u.slice(f+1),n),function(b){return n.decoder(b,gt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=s$(p)),u.indexOf("[]=")>-1&&(p=o$(p)?[p]:p);var m=Ef.call(r,h);m&&n.duplicates==="combine"?r[h]=ls.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},c$=function(e,t,n,r){for(var o=r?t:ox(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},u$=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&&Ef.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&Ef.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),c$(u,n,r,o)}},d$=function(t){if(!t)return gt;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"?gt.charset:t.charset,r=typeof t.duplicates>"u"?gt.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:gt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:gt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:gt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:gt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:gt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:gt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:gt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:gt.decoder,delimiter:typeof t.delimiter=="string"||ls.isRegExp(t.delimiter)?t.delimiter:gt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:gt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:gt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:gt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:gt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gt.strictNullHandling}},f$=function(e,t){var n=d$(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?l$(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=u$(a,r[a],n,typeof e=="string");o=ls.merge(o,l,n)}return n.allowSparse===!0?o:ls.compact(o)},h$=r$,p$=f$,m$=wf,g$={formats:m$,parse:p$,stringify:h$},De;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(De||(De={}));var sx;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(sx||(sx={}));const se=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xr=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},Z=De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class sn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof sn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}sn.create=e=>new sn(e);const Ti=(e,t)=>{let n;switch(e.code){case Z.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,De.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${De.joinValues(e.keys,", ")}`;break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${De.joinValues(e.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${De.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:De.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:n="Number must be finite";break;default:n=t.defaultError,De.assertNever(e)}return{message:n}};let y$=Ti;function Cf(){return y$}const Pf=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function oe(e,t){const n=Cf(),r=Pf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ti?void 0:Ti].filter(o=>!!o)});e.common.issues.push(r)}class jt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return be;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return jt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return be;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const be=Object.freeze({status:"aborted"}),Si=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),ix=e=>e.status==="aborted",ax=e=>e.status==="dirty",fl=e=>e.status==="valid",hl=e=>typeof Promise<"u"&&e instanceof Promise;function pl(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function lx(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var de;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(de||(de={}));var Ei,Ci;class Fn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const cx=(e,t)=>{if(fl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sn(e.common.issues);return this._error=n,this._error}}};function Te(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class ke{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Xr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jt,ctx:{common:t.parent.common,data:t.data,parsedType:Xr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(hl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return cx(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(hl(o)?o:Promise.resolve(o));return cx(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:Z.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Gn({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Yn.create(this,this._def)}nullable(){return eo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ln.create(this,this._def)}promise(){return Ii.create(this,this._def)}or(t){return yl.create([this,t],this._def)}and(t){return vl.create(this,t,this._def)}transform(t){return new Gn({...Te(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Sl({...Te(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new hx({typeName:ye.ZodBranded,type:this,...Te(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new El({...Te(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cl.create(this,t)}readonly(){return Pl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const v$=/^c[^\s-]{8,}$/i,b$=/^[0-9a-z]+$/,w$=/^[0-9A-HJKMNP-TV-Z]{26}$/,x$=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,T$=/^[a-z0-9_-]{21}$/i,S$=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,E$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,C$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let kf;const P$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,k$=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,I$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ux="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",A$=new RegExp(`^${ux}$`);function dx(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function O$(e){return new RegExp(`^${dx(e)}$`)}function _$(e){let t=`${ux}T${dx(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function D$(e,t){return!!((t==="v4"||!t)&&P$.test(e)||(t==="v6"||!t)&&k$.test(e))}class Hn extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.string,received:s.parsedType}),be}const r=new jt;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?oe(o,{code:Z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&oe(o,{code:Z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")E$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"email",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")kf||(kf=new RegExp(C$,"u")),kf.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"emoji",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")x$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"uuid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")T$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"nanoid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")v$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")b$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid2",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")w$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ulid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),oe(o,{validation:"url",code:Z.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"regex",code:Z.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?_$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?A$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?O$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?S$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"duration",code:Z.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?D$(t.data,s.version)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ip",code:Z.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?I$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"base64",code:Z.invalid_string,message:s.message}),r.dirty()):De.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:Z.invalid_string,...de.errToObj(r)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...de.errToObj(t)})}url(t){return this._addCheck({kind:"url",...de.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...de.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...de.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...de.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...de.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...de.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...de.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...de.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...de.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...de.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...de.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...de.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...de.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...de.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...de.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...de.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...de.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...de.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...de.errToObj(n)})}nonempty(t){return this.min(1,de.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:ye.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Te(e)})};function M$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Qr extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.number,received:s.parsedType}),be}let r;const o=new jt;for(const s of this._def.checks)s.kind==="int"?De.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?M$(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_finite,message:s.message}),o.dirty()):De.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,o){return new Qr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(o)}]})}_addCheck(t){return new Qr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:de.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:de.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&De.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Qr.create=e=>new Qr({checks:[],typeName:ye.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Te(e)});class cs extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==se.bigint){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.bigint,received:s.parsedType}),be}let r;const o=new jt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):De.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,o){return new cs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(o)}]})}_addCheck(t){return new cs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}cs.create=e=>{var t;return new cs({checks:[],typeName:ye.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Te(e)})};class If extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.boolean,received:r.parsedType}),be}return Yt(t.data)}}If.create=e=>new If({typeName:ye.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Te(e)});class Pi extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.date,received:s.parsedType}),be}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_date}),be}const r=new jt;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):De.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Pi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:de.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:de.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Pi.create=e=>new Pi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ye.ZodDate,...Te(e)});class Af extends ke{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.symbol,received:r.parsedType}),be}return Yt(t.data)}}Af.create=e=>new Af({typeName:ye.ZodSymbol,...Te(e)});class ml extends ke{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.undefined,received:r.parsedType}),be}return Yt(t.data)}}ml.create=e=>new ml({typeName:ye.ZodUndefined,...Te(e)});class gl extends ke{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.null,received:r.parsedType}),be}return Yt(t.data)}}gl.create=e=>new gl({typeName:ye.ZodNull,...Te(e)});class Of extends ke{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Of.create=e=>new Of({typeName:ye.ZodAny,...Te(e)});class us extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}us.create=e=>new us({typeName:ye.ZodUnknown,...Te(e)});class vr extends ke{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:Z.invalid_type,expected:se.never,received:n.parsedType}),be}}vr.create=e=>new vr({typeName:ye.ZodNever,...Te(e)});class _f extends ke{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.void,received:r.parsedType}),be}return Yt(t.data)}}_f.create=e=>new _f({typeName:ye.ZodVoid,...Te(e)});class Ln extends ke{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==se.array)return oe(n,{code:Z.invalid_type,expected:se.array,received:n.parsedType}),be;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(oe(n,{code:i?Z.too_big:Z.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(oe(n,{code:Z.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(oe(n,{code:Z.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Fn(n,i,n.path,a)))).then(i=>jt.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Fn(n,i,n.path,a)));return jt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ln({...this._def,minLength:{value:t,message:de.toString(n)}})}max(t,n){return new Ln({...this._def,maxLength:{value:t,message:de.toString(n)}})}length(t,n){return new Ln({...this._def,exactLength:{value:t,message:de.toString(n)}})}nonempty(t){return this.min(1,t)}}Ln.create=(e,t)=>new Ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...Te(t)});function ds(e){if(e instanceof ut){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Yn.create(ds(r))}return new ut({...e._def,shape:()=>t})}else return e instanceof Ln?new Ln({...e._def,type:ds(e.element)}):e instanceof Yn?Yn.create(ds(e.unwrap())):e instanceof eo?eo.create(ds(e.unwrap())):e instanceof Un?Un.create(e.items.map(t=>ds(t))):e}class ut extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=De.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const c=this._getOrReturnCtx(t);return oe(c,{code:Z.invalid_type,expected:se.object,received:c.parsedType}),be}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof vr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Fn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof vr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(oe(o,{code:Z.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Fn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>jt.mergeObjectSync(r,c)):jt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return de.errToObj,new ut({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=de.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ut({...this._def,unknownKeys:"strip"})}passthrough(){return new ut({...this._def,unknownKeys:"passthrough"})}extend(t){return new ut({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ut({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ye.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ut({...this._def,catchall:t})}pick(t){const n={};return De.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ut({...this._def,shape:()=>n})}omit(t){const n={};return De.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ut({...this._def,shape:()=>n})}deepPartial(){return ds(this)}partial(t){const n={};return De.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ut({...this._def,shape:()=>n})}required(t){const n={};return De.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Yn;)s=s._def.innerType;n[r]=s}}),new ut({...this._def,shape:()=>n})}keyof(){return fx(De.objectKeys(this.shape))}}ut.create=(e,t)=>new ut({shape:()=>e,unknownKeys:"strip",catchall:vr.create(),typeName:ye.ZodObject,...Te(t)}),ut.strictCreate=(e,t)=>new ut({shape:()=>e,unknownKeys:"strict",catchall:vr.create(),typeName:ye.ZodObject,...Te(t)}),ut.lazycreate=(e,t)=>new ut({shape:e,unknownKeys:"strip",catchall:vr.create(),typeName:ye.ZodObject,...Te(t)});class yl extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new sn(a.ctx.common.issues));return oe(n,{code:Z.invalid_union,unionErrors:i}),be}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new sn(l));return oe(n,{code:Z.invalid_union,unionErrors:a}),be}}get options(){return this._def.options}}yl.create=(e,t)=>new yl({options:e,typeName:ye.ZodUnion,...Te(t)});const Wn=e=>e instanceof wl?Wn(e.schema):e instanceof Gn?Wn(e.innerType()):e instanceof xl?[e.value]:e instanceof Jr?e.options:e instanceof Tl?De.objectValues(e.enum):e instanceof Sl?Wn(e._def.innerType):e instanceof ml?[void 0]:e instanceof gl?[null]:e instanceof Yn?[void 0,...Wn(e.unwrap())]:e instanceof eo?[null,...Wn(e.unwrap())]:e instanceof hx||e instanceof Pl?Wn(e.unwrap()):e instanceof El?Wn(e._def.innerType):[];class Df extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return oe(n,{code:Z.invalid_type,expected:se.object,received:n.parsedType}),be;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Wn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Df({typeName:ye.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Te(r)})}}function Mf(e,t){const n=Xr(e),r=Xr(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const o=De.objectKeys(t),s=De.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Mf(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Mf(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class vl extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(ix(s)||ix(i))return be;const a=Mf(s.value,i.value);return a.valid?((ax(s)||ax(i))&&n.dirty(),{status:n.value,value:a.data}):(oe(r,{code:Z.invalid_intersection_types}),be)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}vl.create=(e,t,n)=>new vl({left:e,right:t,typeName:ye.ZodIntersection,...Te(n)});class Un extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return oe(r,{code:Z.invalid_type,expected:se.array,received:r.parsedType}),be;if(r.data.length<this._def.items.length)return oe(r,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Fn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>jt.mergeArray(n,i)):jt.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Un({...this._def,rest:t})}}Un.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Un({items:e,typeName:ye.ZodTuple,rest:null,...Te(t)})};class bl extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return oe(r,{code:Z.invalid_type,expected:se.object,received:r.parsedType}),be;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Fn(r,a,r.path,a)),value:i._parse(new Fn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?jt.mergeObjectAsync(n,o):jt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ke?new bl({keyType:t,valueType:n,typeName:ye.ZodRecord,...Te(r)}):new bl({keyType:Hn.create(),valueType:t,typeName:ye.ZodRecord,...Te(n)})}}class Nf extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return oe(r,{code:Z.invalid_type,expected:se.map,received:r.parsedType}),be;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Fn(r,a,r.path,[c,"key"])),value:s._parse(new Fn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Nf.create=(e,t,n)=>new Nf({valueType:t,keyType:e,typeName:ye.ZodMap,...Te(n)});class fs extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return oe(r,{code:Z.invalid_type,expected:se.set,received:r.parsedType}),be;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(oe(r,{code:Z.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(oe(r,{code:Z.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return be;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Fn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new fs({...this._def,minSize:{value:t,message:de.toString(n)}})}max(t,n){return new fs({...this._def,maxSize:{value:t,message:de.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}fs.create=(e,t)=>new fs({valueType:e,minSize:null,maxSize:null,typeName:ye.ZodSet,...Te(t)});class ki extends ke{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return oe(n,{code:Z.invalid_type,expected:se.function,received:n.parsedType}),be;function r(a,l){return Pf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cf(),Ti].filter(c=>!!c),issueData:{code:Z.invalid_arguments,argumentsError:l}})}function o(a,l){return Pf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cf(),Ti].filter(c=>!!c),issueData:{code:Z.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ii){const a=this;return Yt(async function(...l){const c=new sn([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return Yt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new sn([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new sn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ki({...this._def,args:Un.create(t).rest(us.create())})}returns(t){return new ki({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ki({args:t||Un.create([]).rest(us.create()),returns:n||us.create(),typeName:ye.ZodFunction,...Te(r)})}}class wl extends ke{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}wl.create=(e,t)=>new wl({getter:e,typeName:ye.ZodLazy,...Te(t)});class xl extends ke{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:t.data}}get value(){return this._def.value}}xl.create=(e,t)=>new xl({value:e,typeName:ye.ZodLiteral,...Te(t)});function fx(e,t){return new Jr({values:e,typeName:ye.ZodEnum,...Te(t)})}class Jr extends ke{constructor(){super(...arguments),Ei.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:De.joinValues(r),received:n.parsedType,code:Z.invalid_type}),be}if(pl(this,Ei)||lx(this,Ei,new Set(this._def.values)),!pl(this,Ei).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:Z.invalid_enum_value,options:r}),be}return Yt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Jr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Jr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ei=new WeakMap,Jr.create=fx;class Tl extends ke{constructor(){super(...arguments),Ci.set(this,void 0)}_parse(t){const n=De.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const o=De.objectValues(n);return oe(r,{expected:De.joinValues(o),received:r.parsedType,code:Z.invalid_type}),be}if(pl(this,Ci)||lx(this,Ci,new Set(De.getValidEnumValues(this._def.values))),!pl(this,Ci).has(t.data)){const o=De.objectValues(n);return oe(r,{received:r.data,code:Z.invalid_enum_value,options:o}),be}return Yt(t.data)}get enum(){return this._def.values}}Ci=new WeakMap,Tl.create=(e,t)=>new Tl({values:e,typeName:ye.ZodNativeEnum,...Te(t)});class Ii extends ke{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return oe(n,{code:Z.invalid_type,expected:se.promise,received:n.parsedType}),be;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ii.create=(e,t)=>new Ii({type:e,typeName:ye.ZodPromise,...Te(t)});class Gn extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{oe(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return be;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?be:l.status==="dirty"||n.value==="dirty"?Si(l.value):l});{if(n.value==="aborted")return be;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?be:a.status==="dirty"||n.value==="dirty"?Si(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?be:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?be:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!fl(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>fl(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);De.assertNever(o)}}Gn.create=(e,t,n)=>new Gn({schema:e,typeName:ye.ZodEffects,effect:t,...Te(n)}),Gn.createWithPreprocess=(e,t,n)=>new Gn({schema:t,effect:{type:"preprocess",transform:e},typeName:ye.ZodEffects,...Te(n)});class Yn extends ke{_parse(t){return this._getType(t)===se.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yn.create=(e,t)=>new Yn({innerType:e,typeName:ye.ZodOptional,...Te(t)});class eo extends ke{_parse(t){return this._getType(t)===se.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}eo.create=(e,t)=>new eo({innerType:e,typeName:ye.ZodNullable,...Te(t)});class Sl extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Sl.create=(e,t)=>new Sl({innerType:e,typeName:ye.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Te(t)});class El extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return hl(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}El.create=(e,t)=>new El({innerType:e,typeName:ye.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Te(t)});class Ff extends ke{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.nan,received:r.parsedType}),be}return{status:"valid",value:t.data}}}Ff.create=e=>new Ff({typeName:ye.ZodNaN,...Te(e)});class hx extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cl extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?be:s.status==="dirty"?(n.dirty(),Si(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?be:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Cl({in:t,out:n,typeName:ye.ZodPipeline})}}class Pl extends ke{_parse(t){const n=this._def.innerType._parse(t),r=o=>(fl(o)&&(o.value=Object.freeze(o.value)),o);return hl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:ye.ZodReadonly,...Te(t)}),ut.lazycreate;var ye;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ye||(ye={})),Hn.create,Qr.create,Ff.create,cs.create,If.create,Pi.create,Af.create,ml.create,gl.create,Of.create,us.create,vr.create,_f.create,Ln.create,ut.create,ut.strictCreate,yl.create,Df.create,vl.create,Un.create,bl.create,Nf.create,fs.create,ki.create,wl.create,xl.create,Jr.create,Tl.create,Ii.create,Gn.create,Yn.create,eo.create,Gn.createWithPreprocess,Cl.create;const N$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},F$=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const s=t[o];if(o===r)e[s]=n;else{if(!(s in e)||typeof e[s]!="object"){const i=t[o+1];e[s]=isNaN(Number(i))?{}:[]}e=e[s]}}},px=e=>e.replace(/\[(\d+)]/g,".$1").split("."),gn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):px(t),o=structuredClone(e);return F$(o,r,n),o},L$=(e,t)=>e.localeCompare(t),Ai={},mx=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return gx(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=mx(e._def.innerType);return t==="ZodArray"?n??[]:n}},gx=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,mx(n)])),yx=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],s=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof s=="object"&&s!==null&&!Array.isArray(s)?n[r]=yx(s,o):n[r]=o||s)}return n},V$={sort:L$,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},vx=e=>{const t=new FormData(e),n=new URLSearchParams(t);return g$.parse(n.toString(),V$)},to=(e,t)=>px(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),br=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Lf=e=>{const t=e.dataset.target;if(!t)return br(e);const n=document.querySelector(`[data-origin="${t}"]`);return br(n||e)},$$={state:{},loading:!1,useOnChange:!1},bx=e=>e.dataset.target||e.name,R$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=is.LocalStorage.get(t);return N$(n)?n:{}},clear:()=>void is.LocalStorage.delete(t),set:n=>is.LocalStorage.set(t,n)}},B$=(e,t,n=$$)=>{const[r,o]=w.useState(null),s=w.useRef({}),[i,a]=w.useState(()=>Ct.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??gx(e)??{}),l=w.useCallback(y=>{var A;const g=y.target,S=y.currentTarget;if(g.dataset.optional==="true")return;const E=bx(g),C=Lf(g)||(S?br(S):""),I=to(E,e);if(g.setAttribute("data-initialized","true"),I){const O=I.safeParse(C),M=O.success?void 0:((A=O.error.issues[0])==null?void 0:A.message)??"";o(_=>gn(_??{},E,M))}},[]),c=w.useCallback(y=>g=>{const S=g.currentTarget,T=Object.values(s.current).reduce((C,I)=>{var F;const A=I.element,O=I.schema.safeParse(br(A));if(A.dataset.ignore==="ignore"||O.success)return C;const M=(F=O.error.issues[0])==null?void 0:F.message;A.setAttribute("data-initialized","true");const _=A.dataset.name||A.name||"";return gn(C,_,M)},{}),E=Ct.empty(T)?null:T;o(E),console.error(E),y==null||y({form:S,errors:E||{}})},[]),u=(y,g=Ai)=>{const S=to(y,e),T=E=>{var I;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(A=>gn(A,y,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)};return{...g,loading:n.loading,name:y,id:y,onChange:T,form:t,date:Ct.string(i[y])?new Date(i[y]):i[y],required:g.required??!S.isOptional(),error:r==null?void 0:r[y],ref:E=>{E!==null&&(s.current[y]={element:E,schema:S})}}},d=(y,g=Ai)=>{const S=to(y,e);return{...g,name:y,id:y,onChange:E=>{var I;const C=E.target.value;a(A=>gn(A,y,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:Tr(r,y,void 0),value:Tr(i,y,void 0)||"",required:g.required??!S.isOptional(),ref:E=>E!==null?s.current[y]={element:E,schema:S}:void 0}},f=(y,g=Ai)=>{const S=to(y,e);return{...g,name:y,id:y,onChange:E=>{var I;const C=E.target.checked;a(A=>gn(A??{},y,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:Tr(r,y,void 0),required:g.required??!S.isOptional(),ref:E=>E!==null?void(s.current[y]={element:E,schema:S}):void 0}},h=(y,g=Ai)=>{const S=to(y,e),T=E=>{var I,A;(I=E.persist)==null||I.call(E);const C=E.target.value;(A=g==null?void 0:g.onChange)==null||A.call(g,E),a(O=>gn(O,y,C))};return{...g,loading:n.loading,name:y,id:y,onChange:T,form:t,onInvalid:l,error:Tr(r,y,void 0),required:g.required??!S.isOptional(),value:Tr(i,y,void 0)||(g==null?void 0:g.value)||"",type:Ct.instance(S,Qr)?"number":(g==null?void 0:g.type)??"text",ref:E=>E===null?void 0:s.current[y]={element:E,schema:S}}},p=(y,g=Ai)=>{const S=to(y,e),T=S._def.typeName==="ZodNumber";return{...g,name:y,id:y,onChange:C=>{var A,O;(A=C.persist)==null||A.call(C);const I=T?C.target.valueAsNumber:C.target.value;(O=g==null?void 0:g.onChange)==null||O.call(g,C),a(M=>gn(M,y,I))},form:t,loading:n.loading,onInvalid:l,error:Tr(r,y,void 0),required:g.required??!S.isOptional(),type:T?"number":(g==null?void 0:g.type)??"text",value:Tr(i,y,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[y]={element:C,schema:S})}};w.useEffect(()=>{const y=Object.values(s.current).map(S=>{const T=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,E=S.schema.safeParse(br(T)),C=M=>{var L;const _=bx(M.target);if(!_)return!1;const F=M.target,P=Lf(M.target)||(M.relatedTarget?br(M.relatedTarget):""),N=S.schema.safeParse(P);if(F.setAttribute("value",P),N.success)return T.setCustomValidity(""),o(V=>{if(Ct.null(V))return null;const B=gn(V,_,void 0);return Ct.empty(V)||Ct.nil(V)||Ct.empty(B)?null:B}),!1;if(T.required){const V=((L=N.error.issues[0])==null?void 0:L.message)||"";T.setCustomValidity(V),o(B=>{if(Ct.null(B))return null;const W=gn(B,_,V||void 0);return Ct.empty(W)?null:W})}return!1},I=new AbortController,A=T.getAttribute("data-trigger")||"blur";T.addEventListener(A,C,{signal:I.signal});const O=T.dataset.shadow?!1:T.required?!E.success:!1;return{input:S,hasInitialError:O,unsubscribe:()=>I.abort()}});return y.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>y.forEach(S=>S.unsubscribe())});const m=y=>g=>{var O;g.preventDefault();const S=g.currentTarget;let T=vx(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(M=>{if(M.tagName==="SELECT"){const _=M;T=gn(T,_.name,_.value)}if(M.tagName==="INPUT"){const _=M,F=Lf(_)||(_?br(_):"");T=gn(T,_.dataset.target||_.name,F)}});const C=yx(T,i),I=e.safeParse(C),A=()=>{var M;Mw(S),(M=n.interceptor)==null||M.clear()};if(I.success){const M=JSON.stringify(I.data);return S.setAttribute("data-json",M),(O=n.interceptor)==null||O.clear(),y==null?void 0:y(g,{form:S,event:g,reset:A,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),S.reportValidity(),y==null?void 0:y(g,{form:S,json:T,event:g,reset:A,data:T,success:!1,errors:I.error.issues.map(M=>({message:M.message,path:M.path.map(_=>String(_))}))})},b=y=>ec(i,y)||"",v=y=>({...y,id:t,name:t});return w.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(i))},[i]),{get:b,input:p,state:i,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},j$=e=>e?JSON.parse(e.getAttribute("data-json")):{},z$=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};Q.Alert=xI,Q.Autocomplete=IN,Q.Button=mo,Q.Calendar=av,Q.Card=lv,Q.Checkbox=Y0,Q.ColType=as,Q.Collapse=iy,Q.ComponentsProvider=c_,Q.DatePicker=mL,Q.Dropdown=Xo,Q.Empty=cv,Q.Expand=uN,Q.FileUpload=k2,Q.Form=A2,Q.Input=vi,Q.InputFeedback=Qb,Q.InputField=ii,Q.Menu=hN,Q.MenuItem=fN,Q.Modal=TN,Q.Notifications=pD,Q.Option=Jb,Q.Polymorph=po,Q.Radiobox=O2,Q.RenderOnView=qT,Q.Select=Kr,Q.Stats=mD,Q.Switch=_2,Q.Tab=vD,Q.Table=VV,Q.Tabs=gD,Q.Tag=XT,Q.TaskList=D2,Q.Textarea=M2,Q.Toolbar=SN,Q.Tooltip=Xb,Q.TransferList=L2,Q.VirtualAutocomplete=hL,Q.createColumns=iV,Q.createCssProperties=r_,Q.createDesignTokens=Xy,Q.createFormStorage=R$,Q.createOptionCols=mf,Q.createStyles=t_,Q.createTheme=n_,Q.createTokenStyles=o_,Q.css=$e,Q.defaultDarkTheme=a_,Q.defaultLightTheme=l_,Q.dispatchInput=Jl,Q.formReset=Mw,Q.formToJson=vx,Q.getJsonForm=j$,Q.getSchemaShape=to,Q.initializeInputDataset=Ss,Q.isReactComponent=HT,Q.isReactFC=WT,Q.isSsr=Bi,Q.mergeRefs=Ql,Q.parsers=va,Q.path=ec,Q.reduceTokens=Fo,Q.safeRegex=Cs,Q.splitInto=$h,Q.useColorParser=u_,Q.useForm=B$,Q.useLocale=tv,Q.useNotification=fD,Q.usePrevious=z$,Q.useReactive=Lv,Q.useTablePreferences=cV,Q.useTranslations=kt,Q.uuid=Es,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
235
|
+
*/var df,_w;function A2(){if(_w)return df;_w=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 df=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 d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},df}var ff,Dw;function hf(){if(Dw)return ff;Dw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ff=e,ff}var pf,Mw;function Nw(){return Mw||(Mw=1,pf=Function.call.bind(Object.prototype.hasOwnProperty)),pf}var mf,Lw;function O2(){if(Lw)return mf;Lw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=hf(),n={},r=Nw();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 d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mf=o,mf}var gf,Fw;function _2(){if(Fw)return gf;Fw=1;var e=Ow(),t=A2(),n=hf(),r=Nw(),o=O2(),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 gf=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var j=D&&(c&&D[c]||D[u]);if(typeof j=="function")return j}var f="<<anonymous>>",h={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:v(),arrayOf:g,element:S(),elementType:T(),instanceOf:E,node:O(),objectOf:I,oneOf:C,oneOfType:A,shape:_,exact:V};function p(D,j){return D===j?D!==0||1/D===1/j:D!==D&&j!==j}function m(D,j){this.message=D,this.data=j&&typeof j=="object"?j:{},this.stack=""}m.prototype=Error.prototype;function y(D){if(process.env.NODE_ENV!=="production")var j={},K=0;function J(G,$,W,H,U,Y,ce){if(H=H||f,Y=Y||W,ce!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=H+":"+W;!j[pe]&&K<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+H+"`. 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."),j[pe]=!0,K++)}}return $[W]==null?G?$[W]===null?new m("The "+U+" `"+Y+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new m("The "+U+" `"+Y+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:D($,W,H,U,Y)}var X=J.bind(null,!1);return X.isRequired=J.bind(null,!0),X}function b(D){function j(K,J,X,G,$,W){var H=K[J],U=F(H);if(U!==D){var Y=N(H);return new m("Invalid "+G+" `"+$+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return y(j)}function v(){return y(i)}function g(D){function j(K,J,X,G,$){if(typeof D!="function")return new m("Property `"+$+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var W=K[J];if(!Array.isArray(W)){var H=F(W);return new m("Invalid "+G+" `"+$+"` of type "+("`"+H+"` supplied to `"+X+"`, expected an array."))}for(var U=0;U<W.length;U++){var Y=D(W,U,X,G,$+"["+U+"]",n);if(Y instanceof Error)return Y}return null}return y(j)}function S(){function D(j,K,J,X,G){var $=j[K];if(!a($)){var W=F($);return new m("Invalid "+X+" `"+G+"` of type "+("`"+W+"` supplied to `"+J+"`, expected a single ReactElement."))}return null}return y(D)}function T(){function D(j,K,J,X,G){var $=j[K];if(!e.isValidElementType($)){var W=F($);return new m("Invalid "+X+" `"+G+"` of type "+("`"+W+"` supplied to `"+J+"`, expected a single ReactElement type."))}return null}return y(D)}function E(D){function j(K,J,X,G,$){if(!(K[J]instanceof D)){var W=D.name||f,H=z(K[J]);return new m("Invalid "+G+" `"+$+"` of type "+("`"+H+"` supplied to `"+X+"`, expected ")+("instance of `"+W+"`."))}return null}return y(j)}function C(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 j(K,J,X,G,$){for(var W=K[J],H=0;H<D.length;H++)if(p(W,D[H]))return null;var U=JSON.stringify(D,function(ce,R){var pe=N(R);return pe==="symbol"?String(R):R});return new m("Invalid "+G+" `"+$+"` of value `"+String(W)+"` "+("supplied to `"+X+"`, expected one of "+U+"."))}return y(j)}function I(D){function j(K,J,X,G,$){if(typeof D!="function")return new m("Property `"+$+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var W=K[J],H=F(W);if(H!=="object")return new m("Invalid "+G+" `"+$+"` of type "+("`"+H+"` supplied to `"+X+"`, expected an object."));for(var U in W)if(r(W,U)){var Y=D(W,U,X,G,$+"."+U,n);if(Y instanceof Error)return Y}return null}return y(j)}function A(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 j=0;j<D.length;j++){var K=D[j];if(typeof K!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+B(K)+" at index "+j+"."),i}function J(X,G,$,W,H){for(var U=[],Y=0;Y<D.length;Y++){var ce=D[Y],R=ce(X,G,$,W,H,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&U.push(R.data.expectedType)}var pe=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new m("Invalid "+W+" `"+H+"` supplied to "+("`"+$+"`"+pe+"."))}return y(J)}function O(){function D(j,K,J,X,G){return k(j[K])?null:new m("Invalid "+X+" `"+G+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return y(D)}function L(D,j,K,J,X){return new m((D||"React class")+": "+j+" type `"+K+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function _(D){function j(K,J,X,G,$){var W=K[J],H=F(W);if(H!=="object")return new m("Invalid "+G+" `"+$+"` of type `"+H+"` "+("supplied to `"+X+"`, expected `object`."));for(var U in D){var Y=D[U];if(typeof Y!="function")return L(X,G,$,U,N(Y));var ce=Y(W,U,X,G,$+"."+U,n);if(ce)return ce}return null}return y(j)}function V(D){function j(K,J,X,G,$){var W=K[J],H=F(W);if(H!=="object")return new m("Invalid "+G+" `"+$+"` of type `"+H+"` "+("supplied to `"+X+"`, expected `object`."));var U=t({},K[J],D);for(var Y in U){var ce=D[Y];if(r(D,Y)&&typeof ce!="function")return L(X,G,$,Y,N(ce));if(!ce)return new m("Invalid "+G+" `"+$+"` key `"+Y+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(K[J],null," ")+`
|
|
236
|
+
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var R=ce(W,Y,X,G,$+"."+Y,n);if(R)return R}return null}return y(j)}function k(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(k);if(D===null||a(D))return!0;var j=d(D);if(j){var K=j.call(D),J;if(j!==D.entries){for(;!(J=K.next()).done;)if(!k(J.value))return!1}else for(;!(J=K.next()).done;){var X=J.value;if(X&&!k(X[1]))return!1}}else return!1;return!0;default:return!1}}function M(D,j){return D==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function F(D){var j=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":M(j,D)?"symbol":j}function N(D){if(typeof D>"u"||D===null)return""+D;var j=F(D);if(j==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return j}function B(D){var j=N(D);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function z(D){return!D.constructor||!D.constructor.name?f:D.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},gf}var yf,Vw;function D2(){if(Vw)return yf;Vw=1;var e=hf();function t(){}function n(){}return n.resetWarningCache=t,yf=function(){function r(i,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var 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},yf}if(process.env.NODE_ENV!=="production"){var M2=Ow(),N2=!0;uf.exports=_2()(M2.isElement,N2)}else uf.exports=D2()();var L2=uf.exports;const Ye=Yx(L2);var F2=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 Si(e,t){var n=V2(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 V2(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=F2.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var $2=[".DS_Store","Thumbs.db"];function R2(e){return Jo(this,void 0,void 0,function(){return es(this,function(t){return hl(e)&&B2(e.dataTransfer)?[2,z2(e.dataTransfer,e.type)]:j2(e)?[2,W2(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,H2(e)]:[2,[]]})})}function B2(e){return hl(e)}function j2(e){return hl(e)&&hl(e.target)}function hl(e){return typeof e=="object"&&e!==null}function W2(e){return vf(e.target.files).map(function(t){return Si(t)})}function H2(e){return Jo(this,void 0,void 0,function(){var t;return es(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 Si(r)})]}})})}function z2(e,t){return Jo(this,void 0,void 0,function(){var n,r;return es(this,function(o){switch(o.label){case 0:return e.items?(n=vf(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(U2))]):[3,2];case 1:return r=o.sent(),[2,$w(Rw(r))];case 2:return[2,$w(vf(e.files).map(function(s){return Si(s)}))]}})})}function $w(e){return e.filter(function(t){return $2.indexOf(t.name)===-1})}function vf(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function U2(e){if(typeof e.webkitGetAsEntry!="function")return Bw(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?jw(t):Bw(e)}function Rw(e){return e.reduce(function(t,n){return Ad(Ad([],f0(t),!1),f0(Array.isArray(n)?Rw(n):[n]),!1)},[])}function Bw(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Si(t);return Promise.resolve(n)}function G2(e){return Jo(this,void 0,void 0,function(){return es(this,function(t){return[2,e.isDirectory?jw(e):Y2(e)]})})}function jw(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Jo(i,void 0,void 0,function(){var l,c,u;return es(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(G2)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function Y2(e){return Jo(this,void 0,void 0,function(){return es(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=Si(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var q2=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 Ww(e){return X2(e)||Z2(e)||Gw(e)||K2()}function K2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
237
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function X2(e){if(Array.isArray(e))return bf(e)}function Hw(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 zw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(n),!0).forEach(function(r){Uw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ei(e,t){return eV(e)||J2(e,t)||Gw(e,t)||Q2()}function Q2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
238
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gw(e,t){if(e){if(typeof e=="string")return bf(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 bf(e,t)}}function bf(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 J2(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 eV(e){if(Array.isArray(e))return e}var tV="file-invalid-type",nV="file-too-large",rV="file-too-small",oV="too-many-files",sV=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:tV,message:"File type must be ".concat(n)}},Yw=function(t){return{code:nV,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},qw=function(t){return{code:rV,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},iV={code:oV,message:"Too many files"};function Kw(e,t){var n=e.type==="application/x-moz-file"||q2(e,t);return[n,n?null:sV(t)]}function Zw(e,t,n){if(Kr(e.size))if(Kr(t)&&Kr(n)){if(e.size>n)return[!1,Yw(n)];if(e.size<t)return[!1,qw(t)]}else{if(Kr(t)&&e.size<t)return[!1,qw(t)];if(Kr(n)&&e.size>n)return[!1,Yw(n)]}return[!0,null]}function Kr(e){return e!=null}function aV(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=Kw(l,n),u=Ei(c,1),d=u[0],f=Zw(l,r,o),h=Ei(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function pl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ml(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 Xw(e){e.preventDefault()}function lV(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function cV(e){return e.indexOf("Edge/")!==-1}function uV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return lV(e)||cV(e)}function Mn(){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!pl(r)&&a&&a.apply(void 0,[r].concat(s)),pl(r)})}}function dV(){return"showOpenFilePicker"in window}function fV(e){if(Kr(e)){var t=Object.entries(e).filter(function(n){var r=Ei(n,2),o=r[0],s=r[1],i=!0;return Qw(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(Jw))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=Ei(r,2),s=o[0],i=o[1];return zw(zw({},n),{},Uw({},s,i))},{});return[{description:"Files",accept:t}]}return e}function hV(e){if(Kr(e))return Object.entries(e).reduce(function(t,n){var r=Ei(n,2),o=r[0],s=r[1];return[].concat(Ww(t),[o],Ww(s))},[]).filter(function(t){return Qw(t)||Jw(t)}).join(",")}function pV(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function mV(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Qw(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Jw(e){return/^.*\.[\w]+$/.test(e)}var gV=["children"],yV=["open"],vV=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],bV=["refKey","onChange","onClick"];function wV(e){return SV(e)||TV(e)||ex(e)||xV()}function xV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
239
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SV(e){if(Array.isArray(e))return xf(e)}function wf(e,t){return PV(e)||CV(e,t)||ex(e,t)||EV()}function EV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
240
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ex(e,t){if(e){if(typeof e=="string")return xf(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 xf(e,t)}}function xf(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 CV(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 PV(e){if(Array.isArray(e))return e}function tx(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 rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tx(Object(n),!0).forEach(function(r){Tf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gl(e,t){if(e==null)return{};var n=kV(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 kV(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 Sf=w.forwardRef(function(e,t){var n=e.children,r=gl(e,gV),o=rx(r),s=o.open,i=gl(o,yV);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(rt(rt({},i),{},{open:s})))});Sf.displayName="Dropzone";var nx={disabled:!1,getFilesFromEvent:R2,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};Sf.defaultProps=nx,Sf.propTypes={children:Ye.func,accept:Ye.objectOf(Ye.arrayOf(Ye.string)),multiple:Ye.bool,preventDropOnDocument:Ye.bool,noClick:Ye.bool,noKeyboard:Ye.bool,noDrag:Ye.bool,noDragEventsBubbling:Ye.bool,minSize:Ye.number,maxSize:Ye.number,maxFiles:Ye.number,disabled:Ye.bool,getFilesFromEvent:Ye.func,onFileDialogCancel:Ye.func,onFileDialogOpen:Ye.func,useFsAccessApi:Ye.bool,autoFocus:Ye.bool,onDragEnter:Ye.func,onDragLeave:Ye.func,onDragOver:Ye.func,onDrop:Ye.func,onDropAccepted:Ye.func,onDropRejected:Ye.func,onError:Ye.func,validator:Ye.func};var Ef={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function rx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=rt(rt({},nx),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,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,v=t.autoFocus,g=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,I=t.onError,A=t.validator,O=w.useMemo(function(){return hV(n)},[n]),L=w.useMemo(function(){return fV(n)},[n]),_=w.useMemo(function(){return typeof y=="function"?y:ox},[y]),V=w.useMemo(function(){return typeof m=="function"?m:ox},[m]),k=w.useRef(null),M=w.useRef(null),F=w.useReducer(IV,Ef),N=wf(F,2),B=N[0],z=N[1],D=B.isFocused,j=B.isFileDialogActive,K=w.useRef(typeof window<"u"&&window.isSecureContext&&b&&dV()),J=function(){!K.current&&j&&setTimeout(function(){if(M.current){var le=M.current.files;le.length||(z({type:"closeDialog"}),V())}},300)};w.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[M,j,V,K]);var X=w.useRef([]),G=function(le){k.current&&k.current.contains(le.target)||(le.preventDefault(),X.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",Xw,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",Xw),document.removeEventListener("drop",G))}},[k,g]),w.useEffect(function(){return!r&&v&&k.current&&k.current.focus(),function(){}},[k,v,r]);var $=w.useCallback(function(ne){I?I(ne):console.error(ne)},[I]),W=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne),X.current=[].concat(wV(X.current),[ne.target]),ml(ne)&&Promise.resolve(o(ne)).then(function(le){if(!(pl(ne)&&!C)){var Ne=le.length,Je=Ne>0&&aV({files:le,accept:O,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:A}),Ot=Ne>0&&!Je;z({isDragAccept:Je,isDragReject:Ot,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ne)}}).catch(function(le){return $(le)})},[o,c,$,C,O,i,s,a,l,A]),H=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne);var le=ml(ne);if(le&&ne.dataTransfer)try{ne.dataTransfer.dropEffect="copy"}catch{}return le&&d&&d(ne),!1},[d,C]),U=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne);var le=X.current.filter(function(Je){return k.current&&k.current.contains(Je)}),Ne=le.indexOf(ne.target);Ne!==-1&&le.splice(Ne,1),X.current=le,!(le.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ml(ne)&&u&&u(ne))},[k,u,C]),Y=w.useCallback(function(ne,le){var Ne=[],Je=[];ne.forEach(function(Ot){var Vt=Kw(Ot,O),Wt=wf(Vt,2),ro=Wt[0],ys=Wt[1],vs=Zw(Ot,i,s),Fl=wf(vs,2),Qf=Fl[0],Jf=Fl[1],eh=A?A(Ot):null;if(ro&&Qf&&!eh)Ne.push(Ot);else{var th=[ys,Jf];eh&&(th=th.concat(eh)),Je.push({file:Ot,errors:th.filter(function(ZR){return ZR})})}}),(!a&&Ne.length>1||a&&l>=1&&Ne.length>l)&&(Ne.forEach(function(Ot){Je.push({file:Ot,errors:[iV]})}),Ne.splice(0)),z({acceptedFiles:Ne,fileRejections:Je,type:"setFiles"}),f&&f(Ne,Je,le),Je.length>0&&p&&p(Je,le),Ne.length>0&&h&&h(Ne,le)},[z,a,O,i,s,l,f,h,p,A]),ce=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne),X.current=[],ml(ne)&&Promise.resolve(o(ne)).then(function(le){pl(ne)&&!C||Y(le,ne)}).catch(function(le){return $(le)}),z({type:"reset"})},[o,Y,$,C]),R=w.useCallback(function(){if(K.current){z({type:"openDialog"}),_();var ne={multiple:a,types:L};window.showOpenFilePicker(ne).then(function(le){return o(le)}).then(function(le){Y(le,null),z({type:"closeDialog"})}).catch(function(le){pV(le)?(V(le),z({type:"closeDialog"})):mV(le)?(K.current=!1,M.current?(M.current.value=null,M.current.click()):$(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."))):$(le)});return}M.current&&(z({type:"openDialog"}),_(),M.current.value=null,M.current.click())},[z,_,V,b,Y,$,L,a]),pe=w.useCallback(function(ne){!k.current||!k.current.isEqualNode(ne.target)||(ne.key===" "||ne.key==="Enter"||ne.keyCode===32||ne.keyCode===13)&&(ne.preventDefault(),R())},[k,R]),xe=w.useCallback(function(){z({type:"focus"})},[]),te=w.useCallback(function(){z({type:"blur"})},[]),me=w.useCallback(function(){S||(uV()?setTimeout(R,0):R())},[S,R]),re=function(le){return r?null:le},fe=function(le){return T?null:re(le)},ue=function(le){return E?null:re(le)},Pe=function(le){C&&le.stopPropagation()},ot=w.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ne.refKey,Ne=le===void 0?"ref":le,Je=ne.role,Ot=ne.onKeyDown,Vt=ne.onFocus,Wt=ne.onBlur,ro=ne.onClick,ys=ne.onDragEnter,vs=ne.onDragOver,Fl=ne.onDragLeave,Qf=ne.onDrop,Jf=gl(ne,vV);return rt(rt(Tf({onKeyDown:fe(Mn(Ot,pe)),onFocus:fe(Mn(Vt,xe)),onBlur:fe(Mn(Wt,te)),onClick:re(Mn(ro,me)),onDragEnter:ue(Mn(ys,W)),onDragOver:ue(Mn(vs,H)),onDragLeave:ue(Mn(Fl,U)),onDrop:ue(Mn(Qf,ce)),role:typeof Je=="string"&&Je!==""?Je:"presentation"},Ne,k),!r&&!T?{tabIndex:0}:{}),Jf)}},[k,pe,xe,te,me,W,H,U,ce,T,E,r]),Me=w.useCallback(function(ne){ne.stopPropagation()},[]),yt=w.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ne.refKey,Ne=le===void 0?"ref":le,Je=ne.onChange,Ot=ne.onClick,Vt=gl(ne,bV),Wt=Tf({accept:O,multiple:a,type:"file",style:{display:"none"},onChange:re(Mn(Je,ce)),onClick:re(Mn(Ot,Me)),tabIndex:-1},Ne,M);return rt(rt({},Wt),Vt)}},[M,n,a,ce,r]);return rt(rt({},B),{},{isFocused:D&&!r,getRootProps:ot,getInputProps:yt,rootRef:k,inputRef:M,open:re(R)})}function IV(e,t){switch(t.type){case"focus":return rt(rt({},e),{},{isFocused:!0});case"blur":return rt(rt({},e),{},{isFocused:!1});case"openDialog":return rt(rt({},Ef),{},{isFileDialogActive:!0});case"closeDialog":return rt(rt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return rt(rt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return rt(rt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return rt({},Ef);default:return e}}function ox(){}const AV={isImage:e=>e.type.includes("image")},OV=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(AV.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Pw(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Pw(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(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Oo,{})})]}):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(vy,{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(go,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Oo,{className:"text-danger"})})]})},_V=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(OV,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),DV=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(_V,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),MV=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(zI,{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"})]})]}),NV=({idle:e=MV,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=rx({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(DV,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},LV=["INPUT","SELECT"],sx=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{LV.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},FV=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})},VV=({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:$e("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]}),Zr=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:d,left:f,error:h,...p},m)=>{const y=kt(),b=w.useRef(null),v=p.id??p.name;w.useImperativeHandle(m,()=>b.current),w.useEffect(()=>{if(b.current===null)return;const S=new AbortController,T=b.current,E=ks(b.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:S.signal}),()=>{E(),S.abort()}},[]);const g=()=>{var S;return(S=b.current)==null?void 0:S.focus()};return x.jsx(ui,{info:n,left:f,error:h,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:v,children:x.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(bu,{size:20}),x.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:v,name:v,value:p.value,required:e,ref:ac(m,b),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:$e("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=>w.createElement("option",{...S,value:S.value,children:S.label??S.value,key:`${v}-select-option-${S.value}`}))]})})}),Cf=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},$V=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=Cf(r.onChange);w.useImperativeHandle(o,()=>c.current),w.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=()=>{var h,p;const f=!((h=c.current)!=null&&h.checked);a(f),(p=r==null?void 0:r.onCheck)==null||p.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:$e("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:f=>a(f.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:d,"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})]})}),RV=e=>{const[t,n]=vI();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:SI(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},BV=Tw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
241
|
+
`);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)}),jV=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},WV={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"})})},HV=e=>{const t=w.useRef(null),n=jV(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(Ti,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(fw,{height:n,useWindowScroll:!0,data:e.source,components:WV,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(xw,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(go,{children:x.jsx(wu,{})})}),x.jsx("div",{})]})};var zV=Object.defineProperty,ix=Object.getOwnPropertySymbols,UV=Object.prototype.hasOwnProperty,GV=Object.prototype.propertyIsEnumerable,ax=(e,t,n)=>t in e?zV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YV=(e,t)=>{for(var n in t||(t={}))UV.call(t,n)&&ax(e,n,t[n]);if(ix)for(var n of ix(t))GV.call(t,n)&&ax(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},qV=(e,t,n,r)=>vl(Pf,e,t,n,r),ls=e=>typeof e=="object",vr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!ls(e)&&!ls(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=>vr(e[r],t[r]))},KV=(e,t)=>(ls(e)||Array.isArray(e))&&t?e[t]:e,ZV=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,yl=e=>/[0-9.]+/.test(e),lx=e=>["string","number"].includes(typeof e),cx=e=>e==null||(e==null?void 0:e.length)===0||e==="",ux={eq:vr,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:cx,notEmpty:e=>!cx(e),in:(e,t)=>Pf(t,n=>vr(e,n)),notIn:(e,t)=>dx(t,n=>!vr(e,n))},XV=e=>{if(e in ux)return ux[e];throw new Error("Linq - Symbol not found")},cs=(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},vl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=XV(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},QV=(e,t,n,r)=>vl(cs,e,t,n,r),dx=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},JV=(e,t,n,r)=>vl(dx,e,t,n,r),fx=e=>{if(e===null)return null;const t=YV({},e);return Object.keys(t).forEach(n=>t[n]=ls(e[n])?fx(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},hx=(e,t)=>{if(ls(t)){for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(vr(t,r))return!0}return!1},e$=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},t$=e=>cs(e,(t,n,r)=>ls(t)?n===r.findIndex(o=>vr(o,t)):n===r.indexOf(t)),n$=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},px=(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())},r$=(e,t)=>px(e,n=>n[t]),mx=(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},o$=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},s$=(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 yl(e)&&yl(t)?r.map(i=>Number.parseInt(i)):r},kf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&yl(e)&&yl(t)){const o=[],[s,i]=o$(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return s$(e,t,r)},i$=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?kf(r,o,1):kf(r,s,Number.parseInt(o,10))}return lx(e)&&lx(t)?kf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},If=(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},gx=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},a$=(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)},l$=(e,t,n,r)=>vl(a$,e,t,n,r),yx=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(ZV(t))},vx=(e=>(e.Asc="asc",e.Desc="desc",e))(vx||{}),c$=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),u$=(e,t)=>e.sort(c$(t)),d$=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:cs(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},f$=class nh{constructor(t=[]){this.array=t}static Range(...t){return i$(...t)}static New(t){return new nh(t)}Where(t,n,r){return this.array=QV(this.array,t,n,r),this}Some(t,n,r){return qV(this.array,t,n,r)}All(t,n,r){return JV(this.array,t,n,r)}Reverse(){return this.array=gx(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=l$(this.array,t,n,r),this}Distinct(){return this.array=t$(this.array),this}First(t){return t===void 0?this.array[0]:n$(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?If((n,r)=>n+r,0,this.array):If((n,r)=>n+KV(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return r$(this.array,t)}GroupWith(t){return px(this.array,t)}Except(t){return cs(this.array,n=>!hx(t,n))}Intersect(t){return cs(this.array,n=>hx(t,n))}OrderBy(t,n){let r;return r=t?yx(this.array,t):this.array.toSorted(),this.array=n==="desc"?gx(r):r,this}Includes(t){return Pf(this.array,n=>vr(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 If(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(mx(this.array,n=>[t,n]))}Zip(t,n){return mx(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:cs(this.array,t).length}Get(t){return this.array[t]}Clone(){return new nh(fx(this.array))}ToObject(t){return e$(this.array,t)}Sort(t){return Array.isArray(t)?u$(this.array,t):yx(this.array,t)}Unique(t){return d$(this.array,t)}},bx=f$,us={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,b)=>{try{Object.keys(y).forEach(b)}catch(v){window.console.log(v)}},n=y=>y==null,r=y=>{const b=typeof y;return b==="string"||b==="number"||b==="boolean"||n(y)},o=(y,b)=>{const v=b.getItem(y);try{return JSON.parse(v)}catch{return v??null}},s=y=>Object.keys(y).reduce((b,v)=>({...b,[v]:o(v,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,b)=>(y[decodeURIComponent(b[0].trim())]=decodeURIComponent(b[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(b=>b(y))},d=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const b=y.domain??"";return b===""?"":`domain=${y.multiDomain?".":""}${b}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],f={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(b=>b.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const b=f.json()[y];if(n(b))return null;try{return JSON.parse(decodeURIComponent(b))}catch{return b}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,b,v={})=>{const g=r(b)?b:encodeURIComponent(JSON.stringify(b)),S=d.reduce((T,E)=>{const C=E.parse(v);return C===""?T:T.concat(C)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=S,u()}},h=y=>{const b=new Set,v=g=>{y().removeItem(g);const S=s(y());b.forEach(T=>T(S))};return{delete:v,listener:g=>(b.add(g),()=>b.delete(g)),clearListeners:()=>b.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const S=y().getItem(g);return!n(S)},deleteAll:()=>{t(y(),v),b.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,S)=>{y().setItem(g,JSON.stringify(S)),b.forEach(T=>T(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(us);const Af=e=>e.headerLabel??e.thead??e.id,Of=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ds=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ds||{});const _f=e=>e.type==="number"?e.valueAsNumber:e.value,h$=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},p$={},m$=(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}})},g$=(e,t,n=p$)=>{const r=zi()?null:us.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=Fu({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:m$(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return zi()||us.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},Df=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??ds.Text,i=t[s]??[],a=((c=i.find(d=>d["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:Is(),operation:l,label:Af(e),name:o,type:s,value:"",...r}},Mf=()=>{const e=kt(),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(()=>({[ds.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ds.Boolean]:[t.is,t.isNot],[ds.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},y$=e=>{const t=kt(),n=Mf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Df(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(p=>u===p.id);return Df(h,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=_f(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsx(w.Fragment,{children:x.jsx(Qo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(RI,{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(Zr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Zr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Ti,{"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(Oo,{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]})})]})})})},v$=({filter:e,onDelete:t,set:n})=>{const r=kt(),o=Mf(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},i=a=>{const l=a.target.dataset.id||"",c=_f(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Zr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(Ti,{"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(Oo,{className:"text-danger",size:14})})]})},b$=({item:e,onPointerDown:t})=>{const n=_r(0);return x.jsxs(py,{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($I,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},w$=e=>{var l;const t=kt(),n=Of(e.cols),r=xI(),[o,s]=w.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var y;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((y=u.options.item(f))==null?void 0:y.label)||"";s(h);const p=new bx(e.rows).GroupBy(d),m=e.cols.find(b=>b.id===d);e.setGroups(FT(p).map((b,v)=>{const g=p[b];return{...m,groupId:Is(),groupKey:d,index:v,rows:g,groupName:b}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(Qo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(HI,{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(Zr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(go,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Oo,{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(FS,{children:x.jsx(fy,{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(b$,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},x$=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),T$=(e,t)=>e.toSorted(x$(t)),wx=(e,t,n)=>({id:Is(),type:n,value:e.id,label:t}),S$=e=>{const t=kt(),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,wx(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(w.Fragment,{children:x.jsx(Qo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(gy,{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(Zr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Zr,{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(Oo,{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]})})]})})})},E$=e=>{const t=kt(),[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=wx(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=Af(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(MI,{size:14}):null,n==="desc"?x.jsx(DI,{size:14}):null,n==="undefined"?x.jsx(gy,{size:14}):null]})},C$=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(y$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(S$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(w$,{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=_f(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function P$(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 k$=e=>{const t=w.useId(),n=kt(),r=e.asLink||"button",o=w.useMemo(()=>P$(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]})})]})},I$={top:0,left:0,right:0,bottom:-1},A$=e=>{var p;const t=kt(),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=Mf(),a=r?BI:jI,l=m=>{const y=m.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(v=>v.id!==y))},c=w.useCallback(m=>{if(m===null)return;const y=new AbortController;return m.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===vx.Asc?"ascending":"descending":"none",f=Af(e.header),h=_r(void 0);return x.jsxs(py,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:h},role:"columnheader","aria-sort":d,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&&s?x.jsx(Qo,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),x.jsx(a,{"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:f})]}),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(v$,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(Df(e.header,i.options,i.operations))),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&&o?x.jsx(E$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),x.jsx(dt.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:I$,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,y)=>{const b=m.target,v=h.get()||b.getBoundingClientRect().width,g=y.delta.x;return h.set(Math.abs(v+g))}})]})},O$=e=>x.jsx(fy,{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(er,{children:e.headers.map(t=>x.jsx(A$,{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}`))})}),xx=w.createContext({}),_$=()=>w.useContext(xx),D$=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(er,{children:n.children})})),M$=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??""}`})),N$=w.forwardRef(({context:e,...t},n)=>{const r=_$(),o={...t==null?void 0:t.style,top:Ct.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})}),L$=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)??""}`})),F$=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),V$={TableHead:N$,Table:M$,TableBody:D$,TableRow:L$,TableFoot:F$},$$=[0,0,0,0,0,0,0,0,0,0],Tx=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),R$=(e,t,n)=>x.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?Tx:x.jsx(Sv,{})}),B$=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=cc(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.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?Tx:c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:Ct.nil(l)?"":l}))})})},j$=()=>x.jsx(w.Fragment,{}),W$=[{}],Sx=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=w.useRef(null),[f,h]=w.useState(!1),p=Cf(i),m=Cf(u.loadingMore),y=w.useMemo(()=>{if(u.loading)return $$;if(c)return u.rows;const b=new bx(u.rows);return t.length>0&&t.forEach(v=>v.value===""||Number.isNaN(v.value)?void 0:b.Where(v.name,v.operation.symbol,v.value)),r.length===0?b.Select():T$(b.Select(),r)},[u.rows,t,r,u.loading]);return w.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,v=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return v.observe(b),()=>v.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[x.jsx(f2,{useWindowScroll:!0,followOutput:"smooth",components:V$,totalCount:y.length,data:y.length===0?W$:y,fixedFooterContent:f?j$:null,itemContent:y.length===0?R$:B$,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(O$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(k$,{...l}):null]})},H$=(e,t)=>typeof t=="function"?t(e):t,bl=(e,t,n)=>e===t||n==null?void 0:n(t),z$=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>Of(e.cols),[e.cols]),[o,s]=Fu({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:H$(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),bl((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),bl((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),bl((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),bl((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(xx.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(C$,{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(Sx,{...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(Sx,{...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 U$=String.prototype.replace,G$=/%20/g,Nf={RFC1738:"RFC1738",RFC3986:"RFC3986"},Lf={default:Nf.RFC3986,formatters:{RFC1738:function(e){return U$.call(e,G$,"+")},RFC3986:function(e){return String(e)}},RFC1738:Nf.RFC1738,RFC3986:Nf.RFC3986},Y$=Lf,Ff=Object.prototype.hasOwnProperty,Xr=Array.isArray,Nn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),q$=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Xr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Ex=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},K$=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Xr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Ff.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 Xr(t)&&!Xr(n)&&(o=Ex(t,r)),Xr(t)&&Xr(n)?(n.forEach(function(s,i){if(Ff.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 Ff.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},Z$=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},X$=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}},Vf=1024,Q$=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(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Vf){for(var c=i.length>=Vf?i.slice(l,l+Vf):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===Y$.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Nn[f];continue}if(f<2048){u[u.length]=Nn[192|f>>6]+Nn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Nn[224|f>>12]+Nn[128|f>>6&63]+Nn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Nn[240|f>>18]+Nn[128|f>>12&63]+Nn[128|f>>6&63]+Nn[128|f&63]}a+=u.join("")}return a},J$=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 q$(n),t},eR=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},tR=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},nR=function(t,n){return[].concat(t,n)},rR=function(t,n){if(Xr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Cx={arrayToObject:Ex,assign:Z$,combine:nR,compact:J$,decode:X$,encode:Q$,isBuffer:tR,isRegExp:eR,maybeMap:rR,merge:K$},Px=_T,wl=Cx,Ci=Lf,oR=Object.prototype.hasOwnProperty,kx={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Ln=Array.isArray,sR=Array.prototype.push,Ix=function(e,t){sR.apply(e,Ln(t)?t:[t])},iR=Date.prototype.toISOString,Ax=Ci.default,xt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:wl.encode,encodeValuesOnly:!1,format:Ax,formatter:Ci.formatters[Ax],indices:!1,serializeDate:function(t){return iR.call(t)},skipNulls:!1,strictNullHandling:!1},aR=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},$f={},lR=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,y,b,v){for(var g=t,S=v,T=0,E=!1;(S=S.get($f))!==void 0&&!E;){var C=S.get(t);if(T+=1,typeof C<"u"){if(C===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get($f)>"u"&&(T=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&Ln(g)&&(g=wl.maybeMap(g,function(D){return D instanceof Date?h(D):D})),g===null){if(i)return c&&!y?c(n,xt.encoder,b,"key",p):n;g=""}if(aR(g)||wl.isBuffer(g)){if(c){var I=y?n:c(n,xt.encoder,b,"key",p);return[m(I)+"="+m(c(g,xt.encoder,b,"value",p))]}return[m(n)+"="+m(String(g))]}var A=[];if(typeof g>"u")return A;var O;if(r==="comma"&&Ln(g))y&&c&&(g=wl.maybeMap(g,c)),O=[{value:g.length>0?g.join(",")||null:void 0}];else if(Ln(u))O=u;else{var L=Object.keys(g);O=d?L.sort(d):L}var _=l?n.replace(/\./g,"%2E"):n,V=o&&Ln(g)&&g.length===1?_+"[]":_;if(s&&Ln(g)&&g.length===0)return V+"[]";for(var k=0;k<O.length;++k){var M=O[k],F=typeof M=="object"&&typeof M.value<"u"?M.value:g[M];if(!(a&&F===null)){var N=f&&l?M.replace(/\./g,"%2E"):M,B=Ln(g)?typeof r=="function"?r(V,N):V:V+(f?"."+N:"["+N+"]");v.set(t,T);var z=Px();z.set($f,v),Ix(A,e(F,B,r,o,s,i,a,l,r==="comma"&&y&&Ln(g)?null:c,u,d,f,h,p,m,y,b,z))}}return A},cR=function(t){if(!t)return xt;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||xt.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=Ci.default;if(typeof t.format<"u"){if(!oR.call(Ci.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Ci.formatters[r],s=xt.filter;(typeof t.filter=="function"||Ln(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in kx?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=xt.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:xt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:xt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:xt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:xt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?xt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:xt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:xt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:xt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:xt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:xt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:xt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:xt.strictNullHandling}},uR=function(e,t){var n=e,r=cR(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Ln(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=kx[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=Px(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||Ix(i,lR(n[d],d,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 f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},fs=Cx,Rf=Object.prototype.hasOwnProperty,dR=Array.isArray,gt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:fs.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},fR=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Ox=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},hR="utf8=%26%2310003%3B",pR="utf8=%E2%9C%93",mR=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]===pR?c="utf-8":i[l]===hR&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,gt.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),gt.decoder,c,"key"),p=fs.maybeMap(Ox(u.slice(f+1),n),function(y){return n.decoder(y,gt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=fR(p)),u.indexOf("[]=")>-1&&(p=dR(p)?[p]:p);var m=Rf.call(r,h);m&&n.duplicates==="combine"?r[h]=fs.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},gR=function(e,t,n,r){for(var o=r?t:Ox(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},yR=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&&Rf.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&Rf.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),gR(u,n,r,o)}},vR=function(t){if(!t)return gt;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"?gt.charset:t.charset,r=typeof t.duplicates>"u"?gt.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:gt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:gt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:gt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:gt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:gt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:gt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:gt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:gt.decoder,delimiter:typeof t.delimiter=="string"||fs.isRegExp(t.delimiter)?t.delimiter:gt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:gt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:gt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:gt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:gt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gt.strictNullHandling}},bR=function(e,t){var n=vR(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?mR(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=yR(a,r[a],n,typeof e=="string");o=fs.merge(o,l,n)}return n.allowSparse===!0?o:fs.compact(o)},wR=uR,xR=bR,TR=Lf,SR={formats:TR,parse:xR,stringify:wR},De;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(De||(De={}));var _x;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(_x||(_x={}));const se=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qr=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},Z=De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class sn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof sn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}sn.create=e=>new sn(e);const Pi=(e,t)=>{let n;switch(e.code){case Z.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,De.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${De.joinValues(e.keys,", ")}`;break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${De.joinValues(e.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${De.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:De.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:n="Number must be finite";break;default:n=t.defaultError,De.assertNever(e)}return{message:n}};let ER=Pi;function Bf(){return ER}const jf=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function oe(e,t){const n=Bf(),r=jf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Pi?void 0:Pi].filter(o=>!!o)});e.common.issues.push(r)}class jt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return be;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return jt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return be;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const be=Object.freeze({status:"aborted"}),ki=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),Dx=e=>e.status==="aborted",Mx=e=>e.status==="dirty",xl=e=>e.status==="valid",Tl=e=>typeof Promise<"u"&&e instanceof Promise;function Sl(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Nx(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var de;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(de||(de={}));var Ii,Ai;class Fn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Lx=(e,t)=>{if(xl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sn(e.common.issues);return this._error=n,this._error}}};function Te(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class ke{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Qr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jt,ctx:{common:t.parent.common,data:t.data,parsedType:Qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Tl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Lx(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Tl(o)?o:Promise.resolve(o));return Lx(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:Z.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Yn({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return qn.create(this,this._def)}nullable(){return to.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vn.create(this,this._def)}promise(){return Di.create(this,this._def)}or(t){return Pl.create([this,t],this._def)}and(t){return kl.create(this,t,this._def)}transform(t){return new Yn({...Te(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Dl({...Te(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new Rx({typeName:ye.ZodBranded,type:this,...Te(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ml({...Te(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Nl.create(this,t)}readonly(){return Ll.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const CR=/^c[^\s-]{8,}$/i,PR=/^[0-9a-z]+$/,kR=/^[0-9A-HJKMNP-TV-Z]{26}$/,IR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,AR=/^[a-z0-9_-]{21}$/i,OR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_R=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,DR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wf;const MR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,NR=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,LR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",FR=new RegExp(`^${Fx}$`);function Vx(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function VR(e){return new RegExp(`^${Vx(e)}$`)}function $R(e){let t=`${Fx}T${Vx(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function RR(e,t){return!!((t==="v4"||!t)&&MR.test(e)||(t==="v6"||!t)&&NR.test(e))}class zn extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.string,received:s.parsedType}),be}const r=new jt;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?oe(o,{code:Z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&oe(o,{code:Z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")_R.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"email",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Wf||(Wf=new RegExp(DR,"u")),Wf.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"emoji",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")IR.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"uuid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")AR.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"nanoid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")CR.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")PR.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid2",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")kR.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ulid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),oe(o,{validation:"url",code:Z.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"regex",code:Z.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?$R(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?FR.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?VR(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?OR.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"duration",code:Z.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?RR(t.data,s.version)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ip",code:Z.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?LR.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"base64",code:Z.invalid_string,message:s.message}),r.dirty()):De.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:Z.invalid_string,...de.errToObj(r)})}_addCheck(t){return new zn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...de.errToObj(t)})}url(t){return this._addCheck({kind:"url",...de.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...de.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...de.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...de.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...de.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...de.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...de.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...de.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...de.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...de.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...de.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...de.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...de.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...de.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...de.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...de.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...de.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...de.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...de.errToObj(n)})}nonempty(t){return this.min(1,de.errToObj(t))}trim(){return new zn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new zn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new zn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}zn.create=e=>{var t;return new zn({checks:[],typeName:ye.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Te(e)})};function BR(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Jr extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.number,received:s.parsedType}),be}let r;const o=new jt;for(const s of this._def.checks)s.kind==="int"?De.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?BR(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_finite,message:s.message}),o.dirty()):De.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,o){return new Jr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(o)}]})}_addCheck(t){return new Jr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:de.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:de.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&De.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Jr.create=e=>new Jr({checks:[],typeName:ye.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Te(e)});class hs extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==se.bigint){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.bigint,received:s.parsedType}),be}let r;const o=new jt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):De.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,o){return new hs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(o)}]})}_addCheck(t){return new hs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}hs.create=e=>{var t;return new hs({checks:[],typeName:ye.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Te(e)})};class Hf extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.boolean,received:r.parsedType}),be}return Yt(t.data)}}Hf.create=e=>new Hf({typeName:ye.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Te(e)});class Oi extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.date,received:s.parsedType}),be}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_date}),be}const r=new jt;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):De.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Oi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:de.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:de.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Oi.create=e=>new Oi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ye.ZodDate,...Te(e)});class zf extends ke{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.symbol,received:r.parsedType}),be}return Yt(t.data)}}zf.create=e=>new zf({typeName:ye.ZodSymbol,...Te(e)});class El extends ke{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.undefined,received:r.parsedType}),be}return Yt(t.data)}}El.create=e=>new El({typeName:ye.ZodUndefined,...Te(e)});class Cl extends ke{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.null,received:r.parsedType}),be}return Yt(t.data)}}Cl.create=e=>new Cl({typeName:ye.ZodNull,...Te(e)});class Uf extends ke{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Uf.create=e=>new Uf({typeName:ye.ZodAny,...Te(e)});class ps extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}ps.create=e=>new ps({typeName:ye.ZodUnknown,...Te(e)});class br extends ke{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:Z.invalid_type,expected:se.never,received:n.parsedType}),be}}br.create=e=>new br({typeName:ye.ZodNever,...Te(e)});class Gf extends ke{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.void,received:r.parsedType}),be}return Yt(t.data)}}Gf.create=e=>new Gf({typeName:ye.ZodVoid,...Te(e)});class Vn extends ke{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==se.array)return oe(n,{code:Z.invalid_type,expected:se.array,received:n.parsedType}),be;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(oe(n,{code:i?Z.too_big:Z.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(oe(n,{code:Z.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(oe(n,{code:Z.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Fn(n,i,n.path,a)))).then(i=>jt.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Fn(n,i,n.path,a)));return jt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Vn({...this._def,minLength:{value:t,message:de.toString(n)}})}max(t,n){return new Vn({...this._def,maxLength:{value:t,message:de.toString(n)}})}length(t,n){return new Vn({...this._def,exactLength:{value:t,message:de.toString(n)}})}nonempty(t){return this.min(1,t)}}Vn.create=(e,t)=>new Vn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...Te(t)});function ms(e){if(e instanceof ut){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=qn.create(ms(r))}return new ut({...e._def,shape:()=>t})}else return e instanceof Vn?new Vn({...e._def,type:ms(e.element)}):e instanceof qn?qn.create(ms(e.unwrap())):e instanceof to?to.create(ms(e.unwrap())):e instanceof Gn?Gn.create(e.items.map(t=>ms(t))):e}class ut extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=De.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const c=this._getOrReturnCtx(t);return oe(c,{code:Z.invalid_type,expected:se.object,received:c.parsedType}),be}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof br&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Fn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(oe(o,{code:Z.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Fn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>jt.mergeObjectSync(r,c)):jt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return de.errToObj,new ut({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=de.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ut({...this._def,unknownKeys:"strip"})}passthrough(){return new ut({...this._def,unknownKeys:"passthrough"})}extend(t){return new ut({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ut({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ye.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ut({...this._def,catchall:t})}pick(t){const n={};return De.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ut({...this._def,shape:()=>n})}omit(t){const n={};return De.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ut({...this._def,shape:()=>n})}deepPartial(){return ms(this)}partial(t){const n={};return De.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ut({...this._def,shape:()=>n})}required(t){const n={};return De.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof qn;)s=s._def.innerType;n[r]=s}}),new ut({...this._def,shape:()=>n})}keyof(){return $x(De.objectKeys(this.shape))}}ut.create=(e,t)=>new ut({shape:()=>e,unknownKeys:"strip",catchall:br.create(),typeName:ye.ZodObject,...Te(t)}),ut.strictCreate=(e,t)=>new ut({shape:()=>e,unknownKeys:"strict",catchall:br.create(),typeName:ye.ZodObject,...Te(t)}),ut.lazycreate=(e,t)=>new ut({shape:e,unknownKeys:"strip",catchall:br.create(),typeName:ye.ZodObject,...Te(t)});class Pl extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new sn(a.ctx.common.issues));return oe(n,{code:Z.invalid_union,unionErrors:i}),be}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new sn(l));return oe(n,{code:Z.invalid_union,unionErrors:a}),be}}get options(){return this._def.options}}Pl.create=(e,t)=>new Pl({options:e,typeName:ye.ZodUnion,...Te(t)});const Un=e=>e instanceof Al?Un(e.schema):e instanceof Yn?Un(e.innerType()):e instanceof Ol?[e.value]:e instanceof eo?e.options:e instanceof _l?De.objectValues(e.enum):e instanceof Dl?Un(e._def.innerType):e instanceof El?[void 0]:e instanceof Cl?[null]:e instanceof qn?[void 0,...Un(e.unwrap())]:e instanceof to?[null,...Un(e.unwrap())]:e instanceof Rx||e instanceof Ll?Un(e.unwrap()):e instanceof Ml?Un(e._def.innerType):[];class Yf extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return oe(n,{code:Z.invalid_type,expected:se.object,received:n.parsedType}),be;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Un(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Yf({typeName:ye.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Te(r)})}}function qf(e,t){const n=Qr(e),r=Qr(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const o=De.objectKeys(t),s=De.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=qf(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=qf(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class kl extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(Dx(s)||Dx(i))return be;const a=qf(s.value,i.value);return a.valid?((Mx(s)||Mx(i))&&n.dirty(),{status:n.value,value:a.data}):(oe(r,{code:Z.invalid_intersection_types}),be)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}kl.create=(e,t,n)=>new kl({left:e,right:t,typeName:ye.ZodIntersection,...Te(n)});class Gn extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return oe(r,{code:Z.invalid_type,expected:se.array,received:r.parsedType}),be;if(r.data.length<this._def.items.length)return oe(r,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Fn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>jt.mergeArray(n,i)):jt.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Gn({...this._def,rest:t})}}Gn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:e,typeName:ye.ZodTuple,rest:null,...Te(t)})};class Il extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return oe(r,{code:Z.invalid_type,expected:se.object,received:r.parsedType}),be;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Fn(r,a,r.path,a)),value:i._parse(new Fn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?jt.mergeObjectAsync(n,o):jt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ke?new Il({keyType:t,valueType:n,typeName:ye.ZodRecord,...Te(r)}):new Il({keyType:zn.create(),valueType:t,typeName:ye.ZodRecord,...Te(n)})}}class Kf extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return oe(r,{code:Z.invalid_type,expected:se.map,received:r.parsedType}),be;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Fn(r,a,r.path,[c,"key"])),value:s._parse(new Fn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Kf.create=(e,t,n)=>new Kf({valueType:t,keyType:e,typeName:ye.ZodMap,...Te(n)});class gs extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return oe(r,{code:Z.invalid_type,expected:se.set,received:r.parsedType}),be;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(oe(r,{code:Z.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(oe(r,{code:Z.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return be;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Fn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new gs({...this._def,minSize:{value:t,message:de.toString(n)}})}max(t,n){return new gs({...this._def,maxSize:{value:t,message:de.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}gs.create=(e,t)=>new gs({valueType:e,minSize:null,maxSize:null,typeName:ye.ZodSet,...Te(t)});class _i extends ke{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return oe(n,{code:Z.invalid_type,expected:se.function,received:n.parsedType}),be;function r(a,l){return jf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Bf(),Pi].filter(c=>!!c),issueData:{code:Z.invalid_arguments,argumentsError:l}})}function o(a,l){return jf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Bf(),Pi].filter(c=>!!c),issueData:{code:Z.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Di){const a=this;return Yt(async function(...l){const c=new sn([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return Yt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new sn([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new sn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new _i({...this._def,args:Gn.create(t).rest(ps.create())})}returns(t){return new _i({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new _i({args:t||Gn.create([]).rest(ps.create()),returns:n||ps.create(),typeName:ye.ZodFunction,...Te(r)})}}class Al extends ke{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Al.create=(e,t)=>new Al({getter:e,typeName:ye.ZodLazy,...Te(t)});class Ol extends ke{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ol.create=(e,t)=>new Ol({value:e,typeName:ye.ZodLiteral,...Te(t)});function $x(e,t){return new eo({values:e,typeName:ye.ZodEnum,...Te(t)})}class eo extends ke{constructor(){super(...arguments),Ii.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:De.joinValues(r),received:n.parsedType,code:Z.invalid_type}),be}if(Sl(this,Ii)||Nx(this,Ii,new Set(this._def.values)),!Sl(this,Ii).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:Z.invalid_enum_value,options:r}),be}return Yt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return eo.create(t,{...this._def,...n})}exclude(t,n=this._def){return eo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ii=new WeakMap,eo.create=$x;class _l extends ke{constructor(){super(...arguments),Ai.set(this,void 0)}_parse(t){const n=De.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const o=De.objectValues(n);return oe(r,{expected:De.joinValues(o),received:r.parsedType,code:Z.invalid_type}),be}if(Sl(this,Ai)||Nx(this,Ai,new Set(De.getValidEnumValues(this._def.values))),!Sl(this,Ai).has(t.data)){const o=De.objectValues(n);return oe(r,{received:r.data,code:Z.invalid_enum_value,options:o}),be}return Yt(t.data)}get enum(){return this._def.values}}Ai=new WeakMap,_l.create=(e,t)=>new _l({values:e,typeName:ye.ZodNativeEnum,...Te(t)});class Di extends ke{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return oe(n,{code:Z.invalid_type,expected:se.promise,received:n.parsedType}),be;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Di.create=(e,t)=>new Di({type:e,typeName:ye.ZodPromise,...Te(t)});class Yn extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{oe(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return be;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?be:l.status==="dirty"||n.value==="dirty"?ki(l.value):l});{if(n.value==="aborted")return be;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?be:a.status==="dirty"||n.value==="dirty"?ki(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?be:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?be:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!xl(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>xl(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);De.assertNever(o)}}Yn.create=(e,t,n)=>new Yn({schema:e,typeName:ye.ZodEffects,effect:t,...Te(n)}),Yn.createWithPreprocess=(e,t,n)=>new Yn({schema:t,effect:{type:"preprocess",transform:e},typeName:ye.ZodEffects,...Te(n)});class qn extends ke{_parse(t){return this._getType(t)===se.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qn.create=(e,t)=>new qn({innerType:e,typeName:ye.ZodOptional,...Te(t)});class to extends ke{_parse(t){return this._getType(t)===se.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}to.create=(e,t)=>new to({innerType:e,typeName:ye.ZodNullable,...Te(t)});class Dl extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Dl.create=(e,t)=>new Dl({innerType:e,typeName:ye.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Te(t)});class Ml extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Tl(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:ye.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Te(t)});class Zf extends ke{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.nan,received:r.parsedType}),be}return{status:"valid",value:t.data}}}Zf.create=e=>new Zf({typeName:ye.ZodNaN,...Te(e)});class Rx extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Nl extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?be:s.status==="dirty"?(n.dirty(),ki(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?be:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Nl({in:t,out:n,typeName:ye.ZodPipeline})}}class Ll extends ke{_parse(t){const n=this._def.innerType._parse(t),r=o=>(xl(o)&&(o.value=Object.freeze(o.value)),o);return Tl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ll.create=(e,t)=>new Ll({innerType:e,typeName:ye.ZodReadonly,...Te(t)}),ut.lazycreate;var ye;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ye||(ye={})),zn.create,Jr.create,Zf.create,hs.create,Hf.create,Oi.create,zf.create,El.create,Cl.create,Uf.create,ps.create,br.create,Gf.create,Vn.create,ut.create,ut.strictCreate,Pl.create,Yf.create,kl.create,Gn.create,Il.create,Kf.create,gs.create,_i.create,Al.create,Ol.create,eo.create,_l.create,Di.create,Yn.create,qn.create,to.create,Yn.createWithPreprocess,Nl.create;const jR=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},WR=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const s=t[o];if(o===r)e[s]=n;else{if(!(s in e)||typeof e[s]!="object"){const i=t[o+1];e[s]=isNaN(Number(i))?{}:[]}e=e[s]}}},Bx=e=>e.replace(/\[(\d+)]/g,".$1").split("."),gn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Bx(t),o=structuredClone(e);return WR(o,r,n),o},HR=(e,t)=>e.localeCompare(t),Mi={},jx=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return Wx(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=jx(e._def.innerType);return t==="ZodArray"?n??[]:n}},Wx=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,jx(n)])),Hx=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],s=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof s=="object"&&s!==null&&!Array.isArray(s)?n[r]=Hx(s,o):n[r]=o||s)}return n},zR={sort:HR,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},zx=e=>{const t=new FormData(e),n=new URLSearchParams(t);return SR.parse(n.toString(),zR)},no=(e,t)=>Bx(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),wr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Xf=e=>{const t=e.dataset.target;if(!t)return wr(e);const n=document.querySelector(`[data-origin="${t}"]`);return wr(n||e)},UR={state:{},loading:!1,useOnChange:!1},Ux=e=>e.dataset.target||e.name,GR=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=us.LocalStorage.get(t);return jR(n)?n:{}},clear:()=>void us.LocalStorage.delete(t),set:n=>us.LocalStorage.set(t,n)}},YR=(e,t,n=UR)=>{const[r,o]=w.useState(null),s=w.useRef({}),[i,a]=w.useState(()=>Ct.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??Wx(e)??{}),l=w.useCallback(v=>{var A;const g=v.target,S=v.currentTarget;if(g.dataset.optional==="true")return;const E=Ux(g),C=Xf(g)||(S?wr(S):""),I=no(E,e);if(g.setAttribute("data-initialized","true"),I){const O=I.safeParse(C),L=O.success?void 0:((A=O.error.issues[0])==null?void 0:A.message)??"";o(_=>gn(_??{},E,L))}},[]),c=w.useCallback(v=>g=>{const S=g.currentTarget,T=Object.values(s.current).reduce((C,I)=>{var V;const A=I.element,O=I.schema.safeParse(wr(A));if(A.dataset.ignore==="ignore"||O.success)return C;const L=(V=O.error.issues[0])==null?void 0:V.message;A.setAttribute("data-initialized","true");const _=A.dataset.name||A.name||"";return gn(C,_,L)},{}),E=Ct.empty(T)?null:T;o(E),console.error(E),v==null||v({form:S,errors:E||{}})},[]),u=(v,g=Mi)=>{const S=no(v,e),T=E=>{var I;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(A=>gn(A,v,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)};return{...g,loading:n.loading,name:v,id:v,onChange:T,form:t,date:Ct.string(i[v])?new Date(i[v]):i[v],required:g.required??!S.isOptional(),error:r==null?void 0:r[v],ref:E=>{E!==null&&(s.current[v]={element:E,schema:S})}}},d=(v,g=Mi)=>{const S=no(v,e);return{...g,name:v,id:v,onChange:E=>{var I;const C=E.target.value;a(A=>gn(A,v,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:Sr(r,v,void 0),value:Sr(i,v,void 0)||"",required:g.required??!S.isOptional(),ref:E=>E!==null?s.current[v]={element:E,schema:S}:void 0}},f=(v,g=Mi)=>{const S=no(v,e);return{...g,name:v,id:v,onChange:E=>{var I;const C=E.target.checked;a(A=>gn(A??{},v,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:Sr(r,v,void 0),required:g.required??!S.isOptional(),ref:E=>E!==null?void(s.current[v]={element:E,schema:S}):void 0}},h=(v,g=Mi)=>{const S=no(v,e),T=E=>{var I,A;(I=E.persist)==null||I.call(E);const C=E.target.value;(A=g==null?void 0:g.onChange)==null||A.call(g,E),a(O=>gn(O,v,C))};return{...g,loading:n.loading,name:v,id:v,onChange:T,form:t,onInvalid:l,error:Sr(r,v,void 0),required:g.required??!S.isOptional(),value:Sr(i,v,void 0)||(g==null?void 0:g.value)||"",type:Ct.instance(S,Jr)?"number":(g==null?void 0:g.type)??"text",ref:E=>E===null?void 0:s.current[v]={element:E,schema:S}}},p=(v,g=Mi)=>{const S=no(v,e),T=S._def.typeName==="ZodNumber";return{...g,name:v,id:v,onChange:C=>{var A,O;(A=C.persist)==null||A.call(C);const I=T?C.target.valueAsNumber:C.target.value;(O=g==null?void 0:g.onChange)==null||O.call(g,C),a(L=>gn(L,v,I))},form:t,loading:n.loading,onInvalid:l,error:Sr(r,v,void 0),required:g.required??!S.isOptional(),type:T?"number":(g==null?void 0:g.type)??"text",value:Sr(i,v,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[v]={element:C,schema:S})}};w.useEffect(()=>{const v=Object.values(s.current).map(S=>{const T=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,E=S.schema.safeParse(wr(T)),C=L=>{var F;const _=Ux(L.target);if(!_)return!1;const V=L.target,k=Xf(L.target)||(L.relatedTarget?wr(L.relatedTarget):""),M=S.schema.safeParse(k);if(V.setAttribute("value",k),M.success)return T.setCustomValidity(""),o(N=>{if(Ct.null(N))return null;const B=gn(N,_,void 0);return Ct.empty(N)||Ct.nil(N)||Ct.empty(B)?null:B}),!1;if(T.required){const N=((F=M.error.issues[0])==null?void 0:F.message)||"";T.setCustomValidity(N),o(B=>{if(Ct.null(B))return null;const z=gn(B,_,N||void 0);return Ct.empty(z)?null:z})}return!1},I=new AbortController,A=T.getAttribute("data-trigger")||"blur";T.addEventListener(A,C,{signal:I.signal});const O=T.dataset.shadow?!1:T.required?!E.success:!1;return{input:S,hasInitialError:O,unsubscribe:()=>I.abort()}});return v.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>v.forEach(S=>S.unsubscribe())});const m=v=>g=>{var O;g.preventDefault();const S=g.currentTarget;let T=zx(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(L=>{if(L.tagName==="SELECT"){const _=L;T=gn(T,_.name,_.value)}if(L.tagName==="INPUT"){const _=L,V=Xf(_)||(_?wr(_):"");T=gn(T,_.dataset.target||_.name,V)}});const C=Hx(T,i),I=e.safeParse(C),A=()=>{var L;sx(S),(L=n.interceptor)==null||L.clear()};if(I.success){const L=JSON.stringify(I.data);return S.setAttribute("data-json",L),(O=n.interceptor)==null||O.clear(),v==null?void 0:v(g,{form:S,event:g,reset:A,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),S.reportValidity(),v==null?void 0:v(g,{form:S,json:T,event:g,reset:A,data:T,success:!1,errors:I.error.issues.map(L=>({message:L.message,path:L.path.map(_=>String(_))}))})},y=v=>cc(i,v)||"",b=v=>({...v,id:t,name:t});return w.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(i))},[i]),{get:y,input:p,state:i,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,disabled:r!==null}},qR=e=>e?JSON.parse(e.getAttribute("data-json")):{},KR=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};Q.Alert=YI,Q.Autocomplete=LL,Q.Button=go,Q.Calendar=xv,Q.Card=Tv,Q.Checkbox=xw,Q.ColType=ds,Q.Collapse=xy,Q.ComponentsProvider=L_,Q.DatePicker=T2,Q.Dropdown=Qo,Q.Empty=Sv,Q.Expand=FN,Q.FileUpload=NV,Q.Form=FV,Q.Input=Ti,Q.InputFeedback=P0,Q.InputField=ui,Q.Menu=RN,Q.MenuItem=$N,Q.Modal=AL,Q.Notifications=BD,Q.Option=k0,Q.Polymorph=mo,Q.Radiobox=VV,Q.RenderOnView=wS,Q.Select=Zr,Q.Stats=jD,Q.Switch=$V,Q.Tab=zD,Q.Table=z$,Q.Tabs=WD,Q.Tag=SS,Q.TaskList=RV,Q.Textarea=BV,Q.Toolbar=OL,Q.Tooltip=C0,Q.TransferList=HV,Q.VirtualAutocomplete=w2,Q.createColumns=h$,Q.createCssProperties=A_,Q.createDesignTokens=fv,Q.createFormStorage=GR,Q.createOptionCols=Of,Q.createStyles=k_,Q.createTheme=I_,Q.createTokenStyles=O_,Q.css=$e,Q.defaultDarkTheme=M_,Q.defaultLightTheme=N_,Q.dispatchInput=lc,Q.formReset=sx,Q.formToJson=zx,Q.getJsonForm=qR,Q.getSchemaShape=no,Q.initializeInputDataset=ks,Q.isReactComponent=mS,Q.isReactFC=gS,Q.isSsr=zi,Q.mergeRefs=ac,Q.parsers=Ta,Q.path=cc,Q.reduceTokens=Fo,Q.safeRegex=As,Q.splitInto=Jh,Q.useColorParser=F_,Q.useForm=YR,Q.useLocale=Ru,Q.useNotification=$D,Q.usePrevious=KR,Q.useReactive=Zv,Q.useTablePreferences=g$,Q.useTranslations=kt,Q.uuid=Is,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
202
242
|
//# sourceMappingURL=index.umd.js.map
|